From 641371a86cac52875e62d6eb0908bbddb9cd1cc4 Mon Sep 17 00:00:00 2001 From: Yufei Li Date: Fri, 9 Jul 2021 15:48:07 +0800 Subject: [PATCH] initial commit (#2) --- .gitattributes | 1 + .github/workflows/php.yml | 32 + .gitignore | 12 +- .gitlab-ci.yml | 12 + LICENSE | 202 ++ Makefile | 48 + README | 22 - README.md | 23 + composer.json | 43 + config.simple.php | 8 - docs/configure.md | 45 + docs/error.md | 30 + docs/generic.md | 35 + docs/middleware.md | 49 + docs/quickstart.md | 81 + docs/typesystem.md | 3 + examples/two-tier/README.md | 19 + examples/two-tier/main.php | 264 ++ examples/uhost/README.md | 21 + examples/uhost/main.php | 124 + phpcs.xml | 35 + phpunit.xml | 26 + sdk.php | 311 --- sendsms.php | 23 - src/Core/Client.php | 180 ++ src/Core/ClientInterface.php | 11 + src/Core/Config/Config.php | 234 ++ src/Core/Credential/Credential.php | 103 + src/Core/Credential/CredentialInterface.php | 27 + src/Core/CredentialMiddleware.php | 18 + src/Core/DefaultsMiddleware.php | 44 + src/Core/Exception/UCloudException.php | 59 + src/Core/LogMiddleware.php | 42 + src/Core/Logger/DefaultLogger.php | 18 + src/Core/Logger/DisabledLogger.php | 15 + src/Core/Middleware/Context.php | 148 ++ src/Core/Middleware/Middleware.php | 24 + src/Core/Middleware/MiddlewareInterface.php | 15 + src/Core/Request/Request.php | 212 ++ src/Core/Request/RequestInterface.php | 13 + src/Core/Response/Response.php | 68 + src/Core/Response/ResponseInterface.php | 13 + src/Core/Transport/Transport.php | 70 + src/Core/Transport/TransportInterface.php | 12 + src/Cube/Apis/CreateCubeDeploymentRequest.php | 274 ++ .../Apis/CreateCubeDeploymentResponse.php | 64 + src/Cube/Apis/CreateCubePodRequest.php | 314 +++ src/Cube/Apis/CreateCubePodResponse.php | 64 + src/Cube/Apis/DeleteCubeDeploymentRequest.php | 111 + .../Apis/DeleteCubeDeploymentResponse.php | 26 + src/Cube/Apis/DeleteCubePodRequest.php | 151 ++ src/Cube/Apis/DeleteCubePodResponse.php | 26 + src/Cube/Apis/GetCubeDeploymentRequest.php | 111 + src/Cube/Apis/GetCubeDeploymentResponse.php | 44 + src/Cube/Apis/GetCubeExecTokenRequest.php | 152 ++ src/Cube/Apis/GetCubeExecTokenResponse.php | 64 + src/Cube/Apis/GetCubeExtendInfoRequest.php | 112 + src/Cube/Apis/GetCubeExtendInfoResponse.php | 56 + src/Cube/Apis/GetCubeMetricsRequest.php | 196 ++ src/Cube/Apis/GetCubeMetricsResponse.php | 55 + src/Cube/Apis/GetCubePodRequest.php | 131 + src/Cube/Apis/GetCubePodResponse.php | 44 + src/Cube/Apis/GetCubePriceRequest.php | 196 ++ src/Cube/Apis/GetCubePriceResponse.php | 64 + src/Cube/Apis/ListCubeDeploymentRequest.php | 132 + src/Cube/Apis/ListCubeDeploymentResponse.php | 64 + src/Cube/Apis/ListCubePodRequest.php | 210 ++ src/Cube/Apis/ListCubePodResponse.php | 64 + src/Cube/Apis/ModifyCubeExtendInfoRequest.php | 132 + .../Apis/ModifyCubeExtendInfoResponse.php | 26 + src/Cube/Apis/ModifyCubeTagRequest.php | 132 + src/Cube/Apis/ModifyCubeTagResponse.php | 44 + src/Cube/Apis/RenewCubePodRequest.php | 133 + src/Cube/Apis/RenewCubePodResponse.php | 44 + src/Cube/Apis/UpdateCubeDeploymentRequest.php | 152 ++ .../Apis/UpdateCubeDeploymentResponse.php | 44 + src/Cube/CubeClient.php | 587 +++++ src/Cube/Models/CubeExtendInfo.php | 133 + src/Cube/Models/EIPAddr.php | 64 + src/Cube/Models/EIPSet.php | 213 ++ src/Cube/Models/MetricDataSet.php | 73 + src/Cube/Models/ValueSet.php | 64 + .../Apis/CreateRemoteVPNGatewayRequest.php | 153 ++ .../Apis/CreateRemoteVPNGatewayResponse.php | 44 + src/IPSecVPN/Apis/CreateVPNGatewayRequest.php | 274 ++ .../Apis/CreateVPNGatewayResponse.php | 44 + src/IPSecVPN/Apis/CreateVPNTunnelRequest.php | 539 ++++ src/IPSecVPN/Apis/CreateVPNTunnelResponse.php | 44 + .../Apis/DeleteRemoteVPNGatewayRequest.php | 92 + .../Apis/DeleteRemoteVPNGatewayResponse.php | 26 + src/IPSecVPN/Apis/DeleteVPNGatewayRequest.php | 112 + .../Apis/DeleteVPNGatewayResponse.php | 26 + src/IPSecVPN/Apis/DeleteVPNTunnelRequest.php | 92 + src/IPSecVPN/Apis/DeleteVPNTunnelResponse.php | 26 + .../Apis/DescribeRemoteVPNGatewayRequest.php | 151 ++ .../Apis/DescribeRemoteVPNGatewayResponse.php | 74 + .../Apis/DescribeVPNGatewayRequest.php | 171 ++ .../Apis/DescribeVPNGatewayResponse.php | 74 + .../Apis/DescribeVPNTunnelRequest.php | 151 ++ .../Apis/DescribeVPNTunnelResponse.php | 76 + .../Apis/GetVPNGatewayPriceRequest.php | 132 + .../Apis/GetVPNGatewayPriceResponse.php | 54 + .../Apis/GetVPNGatewayUpgradePriceRequest.php | 113 + .../GetVPNGatewayUpgradePriceResponse.php | 44 + src/IPSecVPN/Apis/UpdateVPNGatewayRequest.php | 113 + .../Apis/UpdateVPNGatewayResponse.php | 26 + .../Apis/UpdateVPNTunnelAttributeRequest.php | 432 ++++ .../Apis/UpdateVPNTunnelAttributeResponse.php | 26 + src/IPSecVPN/IPSecVPNClient.php | 536 ++++ src/IPSecVPN/Models/IKEData.php | 204 ++ src/IPSecVPN/Models/IPSecData.php | 184 ++ .../Models/RemoteVPNGatewayDataSet.php | 164 ++ src/IPSecVPN/Models/VPNGatewayDataSet.php | 304 +++ src/IPSecVPN/Models/VPNGatewayPriceSet.php | 84 + src/IPSecVPN/Models/VPNTunnelDataSet.php | 284 ++ src/PathX/Apis/BindPathXSSLRequest.php | 113 + src/PathX/Apis/BindPathXSSLResponse.php | 26 + .../Apis/CreateGlobalSSHInstanceRequest.php | 274 ++ .../Apis/CreateGlobalSSHInstanceResponse.php | 64 + src/PathX/Apis/CreatePathXSSLRequest.php | 171 ++ src/PathX/Apis/CreatePathXSSLResponse.php | 44 + src/PathX/Apis/CreateUGAForwarderRequest.php | 271 ++ src/PathX/Apis/CreateUGAForwarderResponse.php | 26 + src/PathX/Apis/CreateUGAInstanceRequest.php | 151 ++ src/PathX/Apis/CreateUGAInstanceResponse.php | 64 + src/PathX/Apis/CreateUPathRequest.php | 193 ++ src/PathX/Apis/CreateUPathResponse.php | 44 + .../Apis/DeleteGlobalSSHInstanceRequest.php | 71 + .../Apis/DeleteGlobalSSHInstanceResponse.php | 26 + src/PathX/Apis/DeletePathXSSLRequest.php | 71 + src/PathX/Apis/DeletePathXSSLResponse.php | 26 + src/PathX/Apis/DeleteUGAForwarderRequest.php | 171 ++ src/PathX/Apis/DeleteUGAForwarderResponse.php | 26 + src/PathX/Apis/DeleteUGAInstanceRequest.php | 71 + src/PathX/Apis/DeleteUGAInstanceResponse.php | 26 + src/PathX/Apis/DeleteUPathRequest.php | 71 + src/PathX/Apis/DeleteUPathResponse.php | 26 + .../Apis/DescribeGlobalSSHInstanceRequest.php | 70 + .../DescribeGlobalSSHInstanceResponse.php | 54 + .../Apis/DescribePathXLineConfigRequest.php | 50 + .../Apis/DescribePathXLineConfigResponse.php | 55 + src/PathX/Apis/DescribePathXSSLRequest.php | 130 + src/PathX/Apis/DescribePathXSSLResponse.php | 75 + src/PathX/Apis/DescribeUGAInstanceRequest.php | 110 + .../Apis/DescribeUGAInstanceResponse.php | 79 + src/PathX/Apis/DescribeUPathRequest.php | 70 + src/PathX/Apis/DescribeUPathResponse.php | 56 + .../Apis/DescribeUPathTemplateRequest.php | 71 + .../Apis/DescribeUPathTemplateResponse.php | 54 + src/PathX/Apis/GetGlobalSSHPriceRequest.php | 110 + src/PathX/Apis/GetGlobalSSHPriceResponse.php | 44 + .../Apis/GetGlobalSSHUpdatePriceRequest.php | 131 + .../Apis/GetGlobalSSHUpdatePriceResponse.php | 44 + src/PathX/Apis/GetPathXMetricRequest.php | 176 ++ src/PathX/Apis/GetPathXMetricResponse.php | 49 + src/PathX/Apis/ModifyGlobalSSHPortRequest.php | 92 + .../Apis/ModifyGlobalSSHPortResponse.php | 26 + src/PathX/Apis/ModifyGlobalSSHTypeRequest.php | 152 ++ .../Apis/ModifyGlobalSSHTypeResponse.php | 26 + .../Apis/ModifyUPathBandwidthRequest.php | 92 + .../Apis/ModifyUPathBandwidthResponse.php | 26 + src/PathX/Apis/ModifyUPathTemplateRequest.php | 211 ++ .../Apis/ModifyUPathTemplateResponse.php | 26 + src/PathX/Apis/UGABindUPathRequest.php | 112 + src/PathX/Apis/UGABindUPathResponse.php | 26 + src/PathX/Apis/UGAUnBindUPathRequest.php | 92 + src/PathX/Apis/UGAUnBindUPathResponse.php | 26 + src/PathX/Apis/UnBindPathXSSLRequest.php | 113 + src/PathX/Apis/UnBindPathXSSLResponse.php | 26 + src/PathX/Models/AlarmRuler.php | 204 ++ src/PathX/Models/GlobalSSHInfo.php | 304 +++ src/PathX/Models/LineDetail.php | 124 + src/PathX/Models/MatricPoint.php | 64 + src/PathX/Models/MetricPeriod.php | 140 + src/PathX/Models/OutPublicIpInfo.php | 64 + src/PathX/Models/PathXSSLSet.php | 213 ++ src/PathX/Models/PathXUGAInfo.php | 84 + src/PathX/Models/SSLBindedTargetSet.php | 64 + src/PathX/Models/UGAAInfo.php | 289 +++ src/PathX/Models/UGAALine.php | 173 ++ src/PathX/Models/UGAATask.php | 64 + src/PathX/Models/UGAL4Forwarder.php | 84 + src/PathX/Models/UGAL7Forwarder.php | 124 + src/PathX/Models/UPathInfo.php | 282 ++ src/PathX/Models/UPathSet.php | 184 ++ src/PathX/PathXClient.php | 1011 ++++++++ .../Apis/AddMemberToProjectRequest.php | 91 + .../Apis/AddMemberToProjectResponse.php | 26 + src/UAccount/Apis/CreateProjectRequest.php | 50 + src/UAccount/Apis/CreateProjectResponse.php | 44 + src/UAccount/Apis/FreezeMemberRequest.php | 50 + src/UAccount/Apis/FreezeMemberResponse.php | 26 + src/UAccount/Apis/GetNetworkMaskRequest.php | 27 + src/UAccount/Apis/GetNetworkMaskResponse.php | 45 + src/UAccount/Apis/GetProjectListRequest.php | 49 + src/UAccount/Apis/GetProjectListResponse.php | 74 + src/UAccount/Apis/GetRegionRequest.php | 27 + src/UAccount/Apis/GetRegionResponse.php | 54 + src/UAccount/Apis/InviteSubaccountRequest.php | 113 + .../Apis/InviteSubaccountResponse.php | 26 + .../Apis/RemoveMemberFromProjectRequest.php | 71 + .../Apis/RemoveMemberFromProjectResponse.php | 26 + src/UAccount/Apis/SetNetworkMaskRequest.php | 90 + src/UAccount/Apis/SetNetworkMaskResponse.php | 26 + src/UAccount/Models/NetworkMask.php | 64 + src/UAccount/Models/ProjectListInfo.php | 184 ++ src/UAccount/Models/RegionInfo.php | 144 ++ src/UAccount/UAccountClient.php | 295 +++ src/UBill/Apis/GetBalanceRequest.php | 27 + src/UBill/Apis/GetBalanceResponse.php | 45 + src/UBill/Apis/GetBillDataFileUrlRequest.php | 111 + src/UBill/Apis/GetBillDataFileUrlResponse.php | 64 + src/UBill/Models/AccountInfo.php | 124 + src/UBill/UBillClient.php | 90 + ...escribeNewUcdnPrefetchCacheTaskRequest.php | 169 ++ ...scribeNewUcdnPrefetchCacheTaskResponse.php | 75 + ...DescribeNewUcdnRefreshCacheTaskRequest.php | 169 ++ ...escribeNewUcdnRefreshCacheTaskResponse.php | 75 + .../Apis/GetNewUcdnDomainBandwidthRequest.php | 150 ++ .../GetNewUcdnDomainBandwidthResponse.php | 74 + .../Apis/GetNewUcdnDomainHitRateRequest.php | 149 ++ .../Apis/GetNewUcdnDomainHitRateResponse.php | 54 + .../Apis/GetNewUcdnDomainHttpCodeRequest.php | 150 ++ .../Apis/GetNewUcdnDomainHttpCodeResponse.php | 54 + .../GetNewUcdnDomainHttpCodeV2Request.php | 152 ++ .../GetNewUcdnDomainHttpCodeV2Response.php | 54 + .../GetUcdnDomain95BandwidthV2Request.php | 131 + .../GetUcdnDomain95BandwidthV2Response.php | 64 + .../Apis/GetUcdnDomainBandwidthV2Request.php | 189 ++ .../Apis/GetUcdnDomainBandwidthV2Response.php | 54 + src/UCDN/Apis/GetUcdnDomainConfigRequest.php | 129 + src/UCDN/Apis/GetUcdnDomainConfigResponse.php | 62 + src/UCDN/Apis/GetUcdnDomainHitRateRequest.php | 170 ++ .../Apis/GetUcdnDomainHitRateResponse.php | 54 + .../Apis/GetUcdnDomainHttpCodeV2Request.php | 170 ++ .../Apis/GetUcdnDomainHttpCodeV2Response.php | 60 + .../Apis/GetUcdnDomainInfoListRequest.php | 89 + .../Apis/GetUcdnDomainInfoListResponse.php | 74 + src/UCDN/Apis/GetUcdnDomainLogRequest.php | 129 + src/UCDN/Apis/GetUcdnDomainLogResponse.php | 55 + ...tUcdnDomainOriginHttpCodeDetailRequest.php | 152 ++ ...UcdnDomainOriginHttpCodeDetailResponse.php | 54 + .../GetUcdnDomainOriginHttpCodeRequest.php | 150 ++ .../GetUcdnDomainOriginHttpCodeResponse.php | 54 + .../GetUcdnDomainOriginRequestNumRequest.php | 152 ++ .../GetUcdnDomainOriginRequestNumResponse.php | 54 + .../GetUcdnDomainPrefetchEnableRequest.php | 70 + .../GetUcdnDomainPrefetchEnableResponse.php | 44 + .../Apis/GetUcdnDomainRequestNumV2Request.php | 152 ++ .../GetUcdnDomainRequestNumV2Response.php | 54 + .../Apis/GetUcdnDomainRequestNumV3Request.php | 172 ++ .../GetUcdnDomainRequestNumV3Response.php | 54 + src/UCDN/Apis/GetUcdnDomainTrafficRequest.php | 149 ++ .../Apis/GetUcdnDomainTrafficResponse.php | 54 + src/UCDN/Apis/GetUcdnPassBandwidthRequest.php | 150 ++ .../Apis/GetUcdnPassBandwidthResponse.php | 54 + .../Apis/GetUcdnPassBandwidthV2Request.php | 150 ++ .../Apis/GetUcdnPassBandwidthV2Response.php | 54 + .../Apis/GetUcdnProIspBandwidthV2Request.php | 172 ++ .../Apis/GetUcdnProIspBandwidthV2Response.php | 55 + .../Apis/GetUcdnProIspRequestNumV2Request.php | 171 ++ .../GetUcdnProIspRequestNumV2Response.php | 55 + src/UCDN/Apis/GetUcdnTrafficRequest.php | 49 + src/UCDN/Apis/GetUcdnTrafficResponse.php | 54 + src/UCDN/Apis/GetUcdnTrafficV2Request.php | 49 + src/UCDN/Apis/GetUcdnTrafficV2Response.php | 54 + .../PrefetchNewUcdnDomainCacheRequest.php | 70 + .../PrefetchNewUcdnDomainCacheResponse.php | 44 + src/UCDN/Apis/QueryIpLocationRequest.php | 50 + src/UCDN/Apis/QueryIpLocationResponse.php | 54 + .../Apis/RefreshNewUcdnDomainCacheRequest.php | 91 + .../RefreshNewUcdnDomainCacheResponse.php | 44 + src/UCDN/Apis/SwitchUcdnChargeTypeRequest.php | 70 + .../Apis/SwitchUcdnChargeTypeResponse.php | 26 + src/UCDN/Models/AccessControlConf.php | 64 + src/UCDN/Models/AdvancedConf.php | 84 + src/UCDN/Models/BandwidthInfo.php | 64 + src/UCDN/Models/BandwidthInfoDetail.php | 64 + src/UCDN/Models/BandwidthTrafficInfo.php | 84 + src/UCDN/Models/CacheAllConfig.php | 131 + src/UCDN/Models/CacheConf.php | 164 ++ src/UCDN/Models/CacheKeyInfo.php | 84 + src/UCDN/Models/DomainBaseInfo.php | 64 + src/UCDN/Models/DomainConfigInfo.php | 364 +++ src/UCDN/Models/HitRateInfo.php | 84 + src/UCDN/Models/HitRateInfoV2.php | 84 + src/UCDN/Models/HttpCodeInfo.php | 144 ++ src/UCDN/Models/HttpCodeInfoV2.php | 164 ++ src/UCDN/Models/HttpCodeV2Detail.php | 1184 +++++++++ src/UCDN/Models/IpLocationInfo.php | 124 + src/UCDN/Models/LogSetInfo.php | 84 + src/UCDN/Models/LogSetList.php | 73 + src/UCDN/Models/OriginConf.php | 224 ++ src/UCDN/Models/ProIspBandwidthList.php | 84 + src/UCDN/Models/ProIspBandwidthSet.php | 73 + src/UCDN/Models/ProIspRequestListV2.php | 64 + src/UCDN/Models/ProIspRequestNumSetV2.php | 73 + src/UCDN/Models/ReferConf.php | 84 + src/UCDN/Models/RequestInfo.php | 84 + src/UCDN/Models/RequestInfoV2.php | 64 + src/UCDN/Models/TaskInfo.php | 113 + src/UCDN/Models/TrafficSet.php | 104 + src/UCDN/Models/UcdnDomainTrafficSet.php | 64 + src/UCDN/Models/UrlProgressInfo.php | 124 + src/UCDN/UCDNClient.php | 1684 ++++++++++++ .../Apis/BackupUDBInstanceBinlogRequest.php | 152 ++ .../Apis/BackupUDBInstanceBinlogResponse.php | 26 + .../Apis/BackupUDBInstanceErrorLogRequest.php | 132 + .../BackupUDBInstanceErrorLogResponse.php | 26 + src/UDB/Apis/BackupUDBInstanceRequest.php | 212 ++ src/UDB/Apis/BackupUDBInstanceResponse.php | 26 + .../Apis/BackupUDBInstanceSlowLogRequest.php | 154 ++ .../Apis/BackupUDBInstanceSlowLogResponse.php | 26 + src/UDB/Apis/ChangeUDBParamGroupRequest.php | 132 + src/UDB/Apis/ChangeUDBParamGroupResponse.php | 26 + .../Apis/CheckRecoverUDBInstanceRequest.php | 111 + .../Apis/CheckRecoverUDBInstanceResponse.php | 44 + .../CheckUDBInstanceToHAAllowanceRequest.php | 91 + .../CheckUDBInstanceToHAAllowanceResponse.php | 44 + src/UDB/Apis/ClearUDBLogRequest.php | 152 ++ src/UDB/Apis/ClearUDBLogResponse.php | 26 + .../Apis/CreateMongoDBReplicaSetRequest.php | 518 ++++ .../Apis/CreateMongoDBReplicaSetResponse.php | 44 + .../CreateUDBInstanceByRecoveryRequest.php | 313 +++ .../CreateUDBInstanceByRecoveryResponse.php | 44 + src/UDB/Apis/CreateUDBInstanceRequest.php | 658 +++++ src/UDB/Apis/CreateUDBInstanceResponse.php | 44 + src/UDB/Apis/CreateUDBParamGroupRequest.php | 195 ++ src/UDB/Apis/CreateUDBParamGroupResponse.php | 44 + .../CreateUDBReplicationInstanceRequest.php | 212 ++ .../CreateUDBReplicationInstanceResponse.php | 44 + .../Apis/CreateUDBRouteInstanceRequest.php | 317 +++ .../Apis/CreateUDBRouteInstanceResponse.php | 44 + src/UDB/Apis/CreateUDBSlaveRequest.php | 412 +++ src/UDB/Apis/CreateUDBSlaveResponse.php | 44 + src/UDB/Apis/DeleteUDBInstanceRequest.php | 131 + src/UDB/Apis/DeleteUDBInstanceResponse.php | 26 + src/UDB/Apis/DeleteUDBLogPackageRequest.php | 132 + src/UDB/Apis/DeleteUDBLogPackageResponse.php | 26 + src/UDB/Apis/DeleteUDBParamGroupRequest.php | 132 + src/UDB/Apis/DeleteUDBParamGroupResponse.php | 26 + .../DescribeUDBBackupBlacklistRequest.php | 111 + .../DescribeUDBBackupBlacklistResponse.php | 44 + src/UDB/Apis/DescribeUDBBackupRequest.php | 212 ++ src/UDB/Apis/DescribeUDBBackupResponse.php | 74 + .../DescribeUDBBinlogBackupURLRequest.php | 112 + .../DescribeUDBBinlogBackupURLResponse.php | 64 + .../DescribeUDBInstanceBackupStateRequest.php | 132 + ...DescribeUDBInstanceBackupStateResponse.php | 44 + .../DescribeUDBInstanceBackupURLRequest.php | 132 + .../DescribeUDBInstanceBackupURLResponse.php | 64 + ...ibeUDBInstanceBinlogBackupStateRequest.php | 132 + ...beUDBInstanceBinlogBackupStateResponse.php | 44 + .../Apis/DescribeUDBInstanceBinlogRequest.php | 153 ++ .../DescribeUDBInstanceBinlogResponse.php | 54 + .../Apis/DescribeUDBInstanceLogRequest.php | 174 ++ .../Apis/DescribeUDBInstanceLogResponse.php | 64 + .../Apis/DescribeUDBInstancePriceRequest.php | 254 ++ .../Apis/DescribeUDBInstancePriceResponse.php | 54 + src/UDB/Apis/DescribeUDBInstanceRequest.php | 230 ++ src/UDB/Apis/DescribeUDBInstanceResponse.php | 76 + .../Apis/DescribeUDBInstanceStateRequest.php | 111 + .../Apis/DescribeUDBInstanceStateResponse.php | 44 + ...DescribeUDBInstanceUpgradePriceRequest.php | 193 ++ ...escribeUDBInstanceUpgradePriceResponse.php | 44 + .../Apis/DescribeUDBLogBackupURLRequest.php | 132 + .../Apis/DescribeUDBLogBackupURLResponse.php | 64 + src/UDB/Apis/DescribeUDBLogPackageRequest.php | 232 ++ .../Apis/DescribeUDBLogPackageResponse.php | 74 + src/UDB/Apis/DescribeUDBParamGroupRequest.php | 210 ++ .../Apis/DescribeUDBParamGroupResponse.php | 75 + .../Apis/DescribeUDBSplittingInfoRequest.php | 92 + .../Apis/DescribeUDBSplittingInfoResponse.php | 214 ++ src/UDB/Apis/DescribeUDBTypeRequest.php | 171 ++ src/UDB/Apis/DescribeUDBTypeResponse.php | 54 + src/UDB/Apis/DisableUDBRWSplittingRequest.php | 92 + .../Apis/DisableUDBRWSplittingResponse.php | 26 + .../Apis/EditUDBBackupBlacklistRequest.php | 132 + .../Apis/EditUDBBackupBlacklistResponse.php | 26 + src/UDB/Apis/EnableUDBRWSplittingRequest.php | 112 + src/UDB/Apis/EnableUDBRWSplittingResponse.php | 64 + src/UDB/Apis/ExtractUDBParamGroupRequest.php | 111 + src/UDB/Apis/ExtractUDBParamGroupResponse.php | 44 + ...hUDBInstanceEarliestRecoverTimeRequest.php | 111 + ...UDBInstanceEarliestRecoverTimeResponse.php | 44 + src/UDB/Apis/ModifyUDBInstanceNameRequest.php | 132 + .../Apis/ModifyUDBInstanceNameResponse.php | 26 + .../Apis/ModifyUDBInstancePasswordRequest.php | 152 ++ .../ModifyUDBInstancePasswordResponse.php | 26 + .../Apis/PromoteUDBInstanceToHARequest.php | 91 + .../Apis/PromoteUDBInstanceToHAResponse.php | 26 + src/UDB/Apis/PromoteUDBSlaveRequest.php | 131 + src/UDB/Apis/PromoteUDBSlaveResponse.php | 26 + src/UDB/Apis/ResizeUDBInstanceRequest.php | 293 +++ src/UDB/Apis/ResizeUDBInstanceResponse.php | 26 + src/UDB/Apis/RestartRWSplittingRequest.php | 92 + src/UDB/Apis/RestartRWSplittingResponse.php | 26 + src/UDB/Apis/RestartUDBInstanceRequest.php | 111 + src/UDB/Apis/RestartUDBInstanceResponse.php | 26 + src/UDB/Apis/SetUDBRWSplittingRequest.php | 174 ++ src/UDB/Apis/SetUDBRWSplittingResponse.php | 26 + src/UDB/Apis/StartUDBInstanceRequest.php | 111 + src/UDB/Apis/StartUDBInstanceResponse.php | 26 + src/UDB/Apis/StopUDBInstanceRequest.php | 131 + src/UDB/Apis/StopUDBInstanceResponse.php | 26 + src/UDB/Apis/SwitchUDBHAToSentinelRequest.php | 112 + .../Apis/SwitchUDBHAToSentinelResponse.php | 26 + src/UDB/Apis/SwitchUDBInstanceToHARequest.php | 91 + .../Apis/SwitchUDBInstanceToHAResponse.php | 44 + ...UpdateUDBInstanceBackupStrategyRequest.php | 191 ++ ...pdateUDBInstanceBackupStrategyResponse.php | 26 + ...ateUDBInstanceSlaveBackupSwitchRequest.php | 152 ++ ...teUDBInstanceSlaveBackupSwitchResponse.php | 26 + src/UDB/Apis/UpdateUDBParamGroupRequest.php | 212 ++ src/UDB/Apis/UpdateUDBParamGroupResponse.php | 26 + src/UDB/Apis/UploadUDBParamGroupRequest.php | 195 ++ src/UDB/Apis/UploadUDBParamGroupResponse.php | 44 + src/UDB/Models/LogPackageDataSet.php | 224 ++ src/UDB/Models/UDBBackupSet.php | 244 ++ src/UDB/Models/UDBInstanceBinlogSet.php | 104 + src/UDB/Models/UDBInstancePriceSet.php | 64 + src/UDB/Models/UDBInstanceSet.php | 833 ++++++ src/UDB/Models/UDBParamGroupSet.php | 153 ++ src/UDB/Models/UDBParamMemberSet.php | 164 ++ src/UDB/Models/UDBRWSplittingSet.php | 124 + src/UDB/Models/UDBSlaveInstanceSet.php | 764 ++++++ src/UDB/Models/UDBTypeSet.php | 44 + src/UDB/Models/UFileDataSet.php | 64 + src/UDB/UDBClient.php | 2034 +++++++++++++++ .../Apis/ChangeUDDBInstanceNameRequest.php | 134 + .../Apis/ChangeUDDBInstanceNameResponse.php | 26 + src/UDDB/Apis/ChangeUDDBSlaveCountRequest.php | 134 + .../Apis/ChangeUDDBSlaveCountResponse.php | 26 + src/UDDB/Apis/CreateUDDBInstanceRequest.php | 460 ++++ src/UDDB/Apis/CreateUDDBInstanceResponse.php | 44 + src/UDDB/Apis/DeleteUDDBInstanceRequest.php | 113 + src/UDDB/Apis/DeleteUDDBInstanceResponse.php | 26 + .../Apis/DescribeUDDBInstancePriceRequest.php | 297 +++ .../DescribeUDDBInstancePriceResponse.php | 45 + src/UDDB/Apis/DescribeUDDBInstanceRequest.php | 113 + .../Apis/DescribeUDDBInstanceResponse.php | 56 + ...escribeUDDBInstanceUpgradePriceRequest.php | 275 ++ ...scribeUDDBInstanceUpgradePriceResponse.php | 45 + src/UDDB/Apis/RestartUDDBInstanceRequest.php | 113 + src/UDDB/Apis/RestartUDDBInstanceResponse.php | 26 + src/UDDB/Apis/StartUDDBInstanceRequest.php | 113 + src/UDDB/Apis/StartUDDBInstanceResponse.php | 26 + src/UDDB/Apis/StopUDDBInstanceRequest.php | 113 + src/UDDB/Apis/StopUDDBInstanceResponse.php | 26 + src/UDDB/Apis/UpgradeUDDBDataNodeRequest.php | 174 ++ src/UDDB/Apis/UpgradeUDDBDataNodeResponse.php | 26 + src/UDDB/Apis/UpgradeUDDBInstanceRequest.php | 174 ++ src/UDDB/Apis/UpgradeUDDBInstanceResponse.php | 26 + src/UDDB/Models/DataNodeInfo.php | 193 ++ src/UDDB/Models/DataSetUDDB.php | 453 ++++ src/UDDB/Models/PriceDetailInfo.php | 84 + src/UDDB/Models/PriceInfo.php | 84 + src/UDDB/Models/SlaveInfo.php | 84 + src/UDDB/UDDBClient.php | 513 ++++ src/UDPN/Apis/AllocateUDPNRequest.php | 212 ++ src/UDPN/Apis/AllocateUDPNResponse.php | 44 + src/UDPN/Apis/DescribeUDPNRequest.php | 129 + src/UDPN/Apis/DescribeUDPNResponse.php | 74 + src/UDPN/Apis/GetUDPNLineListRequest.php | 69 + src/UDPN/Apis/GetUDPNLineListResponse.php | 74 + src/UDPN/Apis/GetUDPNPriceRequest.php | 172 ++ src/UDPN/Apis/GetUDPNPriceResponse.php | 64 + src/UDPN/Apis/GetUDPNUpgradePriceRequest.php | 111 + src/UDPN/Apis/GetUDPNUpgradePriceResponse.php | 44 + src/UDPN/Apis/ModifyUDPNBandwidthRequest.php | 111 + src/UDPN/Apis/ModifyUDPNBandwidthResponse.php | 26 + src/UDPN/Apis/ReleaseUDPNRequest.php | 90 + src/UDPN/Apis/ReleaseUDPNResponse.php | 26 + src/UDPN/Models/UDPNData.php | 164 ++ src/UDPN/Models/UDPNLineSet.php | 84 + src/UDPN/UDPNClient.php | 260 ++ src/UDisk/Apis/AttachUDiskRequest.php | 171 ++ src/UDisk/Apis/AttachUDiskResponse.php | 104 + src/UDisk/Apis/CloneUDiskRequest.php | 293 +++ src/UDisk/Apis/CloneUDiskResponse.php | 44 + src/UDisk/Apis/CloneUDiskSnapshotRequest.php | 313 +++ src/UDisk/Apis/CloneUDiskSnapshotResponse.php | 44 + src/UDisk/Apis/CloneUDiskUDataArkRequest.php | 334 +++ src/UDisk/Apis/CloneUDiskUDataArkResponse.php | 44 + src/UDisk/Apis/CreateAttachUDiskRequest.php | 373 +++ src/UDisk/Apis/CreateAttachUDiskResponse.php | 104 + src/UDisk/Apis/CreateUDiskRequest.php | 333 +++ src/UDisk/Apis/CreateUDiskResponse.php | 44 + src/UDisk/Apis/CreateUDiskSnapshotRequest.php | 193 ++ .../Apis/CreateUDiskSnapshotResponse.php | 44 + src/UDisk/Apis/DeleteUDiskRequest.php | 112 + src/UDisk/Apis/DeleteUDiskResponse.php | 26 + src/UDisk/Apis/DeleteUDiskSnapshotRequest.php | 131 + .../Apis/DeleteUDiskSnapshotResponse.php | 26 + .../Apis/DescribeRecycleUDiskRequest.php | 131 + .../Apis/DescribeRecycleUDiskResponse.php | 74 + src/UDisk/Apis/DescribeUDiskPriceRequest.php | 252 ++ src/UDisk/Apis/DescribeUDiskPriceResponse.php | 54 + src/UDisk/Apis/DescribeUDiskRequest.php | 290 +++ src/UDisk/Apis/DescribeUDiskResponse.php | 74 + .../Apis/DescribeUDiskSnapshotRequest.php | 170 ++ .../Apis/DescribeUDiskSnapshotResponse.php | 74 + .../Apis/DescribeUDiskUpgradePriceRequest.php | 213 ++ .../DescribeUDiskUpgradePriceResponse.php | 64 + src/UDisk/Apis/DetachUDiskRequest.php | 151 ++ src/UDisk/Apis/DetachUDiskResponse.php | 84 + src/UDisk/Apis/RecoverUDiskRequest.php | 152 ++ src/UDisk/Apis/RecoverUDiskResponse.php | 26 + src/UDisk/Apis/RenameUDiskRequest.php | 133 + src/UDisk/Apis/RenameUDiskResponse.php | 26 + src/UDisk/Apis/ResizeUDiskRequest.php | 173 ++ src/UDisk/Apis/ResizeUDiskResponse.php | 26 + src/UDisk/Apis/RestoreUDiskRequest.php | 152 ++ src/UDisk/Apis/RestoreUDiskResponse.php | 26 + .../Apis/SetUDiskUDataArkModeRequest.php | 152 ++ .../Apis/SetUDiskUDataArkModeResponse.php | 26 + src/UDisk/Models/RecycleUDiskSet.php | 184 ++ src/UDisk/Models/UDiskDataSet.php | 684 +++++ src/UDisk/Models/UDiskPriceDataSet.php | 124 + src/UDisk/Models/UDiskSnapshotSet.php | 404 +++ src/UDisk/UDiskClient.php | 808 ++++++ src/UEC/Apis/BindUEcFirewallRequest.php | 91 + src/UEC/Apis/BindUEcFirewallResponse.php | 26 + src/UEC/Apis/CreateUEcFirewallRequest.php | 120 + src/UEC/Apis/CreateUEcFirewallResponse.php | 44 + src/UEC/Apis/CreateUEcHolderRequest.php | 383 +++ src/UEC/Apis/CreateUEcHolderResponse.php | 44 + src/UEC/Apis/CreateUEcSubnetRequest.php | 131 + src/UEC/Apis/CreateUEcSubnetResponse.php | 44 + src/UEC/Apis/CreateUEcVHostRequest.php | 415 +++ src/UEC/Apis/CreateUEcVHostResponse.php | 54 + src/UEC/Apis/DeleteUEcCustomImageRequest.php | 90 + src/UEC/Apis/DeleteUEcCustomImageResponse.php | 44 + src/UEC/Apis/DeleteUEcHolderRequest.php | 70 + src/UEC/Apis/DeleteUEcHolderResponse.php | 26 + src/UEC/Apis/DeleteUEcSubnetRequest.php | 70 + src/UEC/Apis/DeleteUEcSubnetResponse.php | 26 + src/UEC/Apis/DeleteUEcVHostRequest.php | 70 + src/UEC/Apis/DeleteUEcVHostResponse.php | 26 + src/UEC/Apis/DescribeUEcFirewallRequest.php | 129 + .../DescribeUEcFirewallResourceRequest.php | 70 + .../DescribeUEcFirewallResourceResponse.php | 74 + src/UEC/Apis/DescribeUEcFirewallResponse.php | 75 + src/UEC/Apis/DescribeUEcHolderIDCRequest.php | 151 ++ src/UEC/Apis/DescribeUEcHolderIDCResponse.php | 54 + src/UEC/Apis/DescribeUEcHolderRequest.php | 109 + src/UEC/Apis/DescribeUEcHolderResponse.php | 80 + src/UEC/Apis/DescribeUEcIDCRequest.php | 151 ++ src/UEC/Apis/DescribeUEcIDCResponse.php | 54 + src/UEC/Apis/DescribeUEcSubnetRequest.php | 89 + src/UEC/Apis/DescribeUEcSubnetResponse.php | 54 + src/UEC/Apis/DescribeUEcVHostISPRequest.php | 89 + src/UEC/Apis/DescribeUEcVHostISPResponse.php | 54 + src/UEC/Apis/DescribeUEcVHostRequest.php | 129 + src/UEC/Apis/DescribeUEcVHostResponse.php | 75 + src/UEC/Apis/GetUEcHolderLogRequest.php | 91 + src/UEC/Apis/GetUEcHolderLogResponse.php | 44 + src/UEC/Apis/GetUEcHolderMetricsRequest.php | 152 ++ src/UEC/Apis/GetUEcHolderMetricsResponse.php | 51 + src/UEC/Apis/GetUEcIDCCutInfoRequest.php | 27 + src/UEC/Apis/GetUEcIDCCutInfoResponse.php | 75 + src/UEC/Apis/GetUEcIDCVHostDataRequest.php | 131 + src/UEC/Apis/GetUEcIDCVHostDataResponse.php | 55 + src/UEC/Apis/GetUEcImageRequest.php | 109 + src/UEC/Apis/GetUEcImageResponse.php | 75 + src/UEC/Apis/GetUEcPodPriceRequest.php | 190 ++ src/UEC/Apis/GetUEcPodPriceResponse.php | 64 + src/UEC/Apis/GetUEcUpgradePriceRequest.php | 170 ++ src/UEC/Apis/GetUEcUpgradePriceResponse.php | 44 + src/UEC/Apis/GetUEcVHostDataRequest.php | 131 + src/UEC/Apis/GetUEcVHostDataResponse.php | 55 + src/UEC/Apis/GetUEcVHostPriceRequest.php | 250 ++ src/UEC/Apis/GetUEcVHostPriceResponse.php | 64 + src/UEC/Apis/ImportUEcCustomImageRequest.php | 189 ++ src/UEC/Apis/ImportUEcCustomImageResponse.php | 44 + src/UEC/Apis/LoginUEcDockerRequest.php | 91 + src/UEC/Apis/LoginUEcDockerResponse.php | 84 + src/UEC/Apis/ModifyUEcBandwidthRequest.php | 91 + src/UEC/Apis/ModifyUEcBandwidthResponse.php | 26 + src/UEC/Apis/ModifyUEcHolderNameRequest.php | 91 + src/UEC/Apis/ModifyUEcHolderNameResponse.php | 26 + src/UEC/Apis/ModifyUEcImageNameRequest.php | 111 + src/UEC/Apis/ModifyUEcImageNameResponse.php | 26 + src/UEC/Apis/PoweroffUEcVHostRequest.php | 70 + src/UEC/Apis/PoweroffUEcVHostResponse.php | 26 + src/UEC/Apis/ReinstallUEcVHostRequest.php | 151 ++ src/UEC/Apis/ReinstallUEcVHostResponse.php | 26 + src/UEC/Apis/RestartUEcHolderRequest.php | 70 + src/UEC/Apis/RestartUEcHolderResponse.php | 26 + src/UEC/Apis/RestartUEcVHostRequest.php | 70 + src/UEC/Apis/RestartUEcVHostResponse.php | 26 + src/UEC/Apis/StartUEcVHostRequest.php | 70 + src/UEC/Apis/StartUEcVHostResponse.php | 26 + src/UEC/Apis/StopUEcVHostRequest.php | 70 + src/UEC/Apis/StopUEcVHostResponse.php | 26 + src/UEC/Apis/UnBindUEcFirewallRequest.php | 91 + src/UEC/Apis/UnBindUEcFirewallResponse.php | 26 + .../UpdateUEcFirewallAttributeRequest.php | 110 + .../UpdateUEcFirewallAttributeResponse.php | 26 + src/UEC/Apis/UpdateUEcFirewallRequest.php | 100 + src/UEC/Apis/UpdateUEcFirewallResponse.php | 26 + src/UEC/Apis/UpdateUEcSubnetRequest.php | 110 + src/UEC/Apis/UpdateUEcSubnetResponse.php | 26 + src/UEC/Models/CfgDictList.php | 84 + src/UEC/Models/DataSet.php | 314 +++ src/UEC/Models/DeployImageInfo.php | 64 + src/UEC/Models/DockerInfo.php | 242 ++ src/UEC/Models/EnvList.php | 64 + src/UEC/Models/FirewallInfo.php | 173 ++ src/UEC/Models/HolderList.php | 500 ++++ src/UEC/Models/IDCCutInfo.php | 173 ++ src/UEC/Models/IdcInfo.php | 164 ++ src/UEC/Models/ImageInfo.php | 213 ++ src/UEC/Models/ImageList.php | 84 + src/UEC/Models/IpList.php | 64 + src/UEC/Models/MetricisDataSet.php | 198 ++ src/UEC/Models/MonitorInfo.php | 64 + src/UEC/Models/NodeInfo.php | 433 ++++ src/UEC/Models/NodeIpList.php | 84 + src/UEC/Models/NodeIspList.php | 124 + src/UEC/Models/NodeList.php | 44 + src/UEC/Models/ResourceInfo.php | 124 + src/UEC/Models/ResourceSet.php | 64 + src/UEC/Models/RuleInfo.php | 144 ++ src/UEC/Models/StorVolumeInfo.php | 104 + src/UEC/Models/SubnetInfo.php | 184 ++ src/UEC/Params/CreateUEcFirewallParamRule.php | 144 ++ src/UEC/Params/CreateUEcHolderParamImage.php | 64 + src/UEC/Params/CreateUEcHolderParamPack.php | 204 ++ .../Params/CreateUEcHolderParamStorage.php | 64 + src/UEC/Params/UpdateUEcFirewallParamRule.php | 144 ++ src/UEC/UECClient.php | 1673 ++++++++++++ src/UFS/Apis/CreateUFSVolumeRequest.php | 253 ++ src/UFS/Apis/CreateUFSVolumeResponse.php | 84 + src/UFS/Apis/DescribeUFSVolume2Request.php | 130 + src/UFS/Apis/DescribeUFSVolume2Response.php | 74 + src/UFS/Apis/ExtendUFSVolumeRequest.php | 112 + src/UFS/Apis/ExtendUFSVolumeResponse.php | 26 + src/UFS/Apis/RemoveUFSVolumeRequest.php | 91 + src/UFS/Apis/RemoveUFSVolumeResponse.php | 26 + src/UFS/Models/UFSVolumeInfo2.php | 284 ++ src/UFS/UFSClient.php | 171 ++ src/UFile/Apis/CreateBucketRequest.php | 111 + src/UFile/Apis/CreateBucketResponse.php | 64 + src/UFile/Apis/CreateUFileTokenRequest.php | 170 ++ src/UFile/Apis/CreateUFileTokenResponse.php | 44 + src/UFile/Apis/DeleteBucketRequest.php | 70 + src/UFile/Apis/DeleteBucketResponse.php | 64 + src/UFile/Apis/DeleteUFileTokenRequest.php | 92 + src/UFile/Apis/DeleteUFileTokenResponse.php | 26 + src/UFile/Apis/DescribeBucketRequest.php | 129 + src/UFile/Apis/DescribeBucketResponse.php | 55 + src/UFile/Apis/DescribeUFileTokenRequest.php | 129 + src/UFile/Apis/DescribeUFileTokenResponse.php | 54 + src/UFile/Apis/GetUFileQuotaInfoRequest.php | 91 + src/UFile/Apis/GetUFileQuotaInfoResponse.php | 57 + src/UFile/Apis/GetUFileQuotaPriceRequest.php | 110 + src/UFile/Apis/GetUFileQuotaPriceResponse.php | 44 + src/UFile/Apis/GetUFileQuotaRequest.php | 70 + src/UFile/Apis/GetUFileQuotaResponse.php | 44 + src/UFile/Apis/GetUFileReportRequest.php | 112 + src/UFile/Apis/GetUFileReportResponse.php | 54 + src/UFile/Apis/SetUFileRefererRequest.php | 171 ++ src/UFile/Apis/SetUFileRefererResponse.php | 26 + src/UFile/Apis/UpdateBucketRequest.php | 91 + src/UFile/Apis/UpdateBucketResponse.php | 64 + src/UFile/Apis/UpdateUFileTokenRequest.php | 191 ++ src/UFile/Apis/UpdateUFileTokenResponse.php | 26 + src/UFile/Models/UFileBucketSet.php | 244 ++ src/UFile/Models/UFileDomainSet.php | 104 + src/UFile/Models/UFileQuotaDataSetItem.php | 124 + src/UFile/Models/UFileQuotaLeft.php | 44 + src/UFile/Models/UFileReportSet.php | 104 + src/UFile/Models/UFileTokenSet.php | 244 ++ src/UFile/UFileClient.php | 476 ++++ src/UHost/Apis/CopyCustomImageRequest.php | 192 ++ src/UHost/Apis/CopyCustomImageResponse.php | 44 + src/UHost/Apis/CreateCustomImageRequest.php | 152 ++ src/UHost/Apis/CreateCustomImageResponse.php | 44 + .../Apis/CreateIsolationGroupRequest.php | 111 + .../Apis/CreateIsolationGroupResponse.php | 44 + src/UHost/Apis/CreateUHostInstanceRequest.php | 747 ++++++ .../Apis/CreateUHostInstanceResponse.php | 64 + src/UHost/Apis/CreateUHostKeyPairRequest.php | 110 + src/UHost/Apis/CreateUHostKeyPairResponse.php | 45 + .../Apis/DeleteIsolationGroupRequest.php | 91 + .../Apis/DeleteIsolationGroupResponse.php | 44 + src/UHost/Apis/DeleteUHostKeyPairsRequest.php | 110 + .../Apis/DeleteUHostKeyPairsResponse.php | 26 + src/UHost/Apis/DescribeImageRequest.php | 210 ++ src/UHost/Apis/DescribeImageResponse.php | 74 + .../Apis/DescribeIsolationGroupRequest.php | 130 + .../Apis/DescribeIsolationGroupResponse.php | 75 + .../Apis/DescribeUHostInstanceRequest.php | 250 ++ .../Apis/DescribeUHostInstanceResponse.php | 77 + .../Apis/DescribeUHostKeyPairsRequest.php | 169 ++ .../Apis/DescribeUHostKeyPairsResponse.php | 74 + src/UHost/Apis/DescribeUHostTagsRequest.php | 90 + src/UHost/Apis/DescribeUHostTagsResponse.php | 74 + .../GetAttachedDiskUpgradePriceRequest.php | 173 ++ .../GetAttachedDiskUpgradePriceResponse.php | 44 + .../Apis/GetUHostInstancePriceRequest.php | 414 +++ .../Apis/GetUHostInstancePriceResponse.php | 54 + .../Apis/GetUHostInstanceVncInfoRequest.php | 111 + .../Apis/GetUHostInstanceVncInfoResponse.php | 104 + .../Apis/GetUHostUpgradePriceRequest.php | 171 ++ .../Apis/GetUHostUpgradePriceResponse.php | 64 + src/UHost/Apis/ImportCustomImageRequest.php | 216 ++ src/UHost/Apis/ImportCustomImageResponse.php | 44 + src/UHost/Apis/ImportUHostKeyPairsRequest.php | 131 + .../Apis/ImportUHostKeyPairsResponse.php | 84 + src/UHost/Apis/LeaveIsolationGroupRequest.php | 132 + .../Apis/LeaveIsolationGroupResponse.php | 44 + src/UHost/Apis/ModifyUHostIPRequest.php | 153 ++ src/UHost/Apis/ModifyUHostIPResponse.php | 44 + .../Apis/ModifyUHostInstanceNameRequest.php | 131 + .../Apis/ModifyUHostInstanceNameResponse.php | 44 + .../Apis/ModifyUHostInstanceRemarkRequest.php | 131 + .../ModifyUHostInstanceRemarkResponse.php | 44 + .../Apis/ModifyUHostInstanceTagRequest.php | 131 + .../Apis/ModifyUHostInstanceTagResponse.php | 44 + .../Apis/PoweroffUHostInstanceRequest.php | 111 + .../Apis/PoweroffUHostInstanceResponse.php | 44 + src/UHost/Apis/RebootUHostInstanceRequest.php | 131 + .../Apis/RebootUHostInstanceResponse.php | 44 + .../Apis/ReinstallUHostInstanceRequest.php | 271 ++ .../Apis/ReinstallUHostInstanceResponse.php | 44 + .../ResetUHostInstancePasswordRequest.php | 132 + .../ResetUHostInstancePasswordResponse.php | 44 + src/UHost/Apis/ResizeAttachedDiskRequest.php | 174 ++ src/UHost/Apis/ResizeAttachedDiskResponse.php | 64 + src/UHost/Apis/ResizeUHostInstanceRequest.php | 171 ++ .../Apis/ResizeUHostInstanceResponse.php | 44 + src/UHost/Apis/StartUHostInstanceRequest.php | 131 + src/UHost/Apis/StartUHostInstanceResponse.php | 44 + src/UHost/Apis/StopUHostInstanceRequest.php | 111 + src/UHost/Apis/StopUHostInstanceResponse.php | 44 + .../Apis/TerminateCustomImageRequest.php | 91 + .../Apis/TerminateCustomImageResponse.php | 44 + .../Apis/TerminateUHostInstanceRequest.php | 151 ++ .../Apis/TerminateUHostInstanceResponse.php | 64 + .../Apis/UpgradeToArkUHostInstanceRequest.php | 112 + .../UpgradeToArkUHostInstanceResponse.php | 44 + src/UHost/Models/IsolationGroup.php | 113 + src/UHost/Models/KeyPair.php | 144 ++ src/UHost/Models/SpreadInfo.php | 64 + src/UHost/Models/UHostDiskSet.php | 204 ++ src/UHost/Models/UHostIPSet.php | 244 ++ src/UHost/Models/UHostImageSet.php | 344 +++ src/UHost/Models/UHostInstanceSet.php | 842 ++++++ src/UHost/Models/UHostKeyPair.php | 64 + src/UHost/Models/UHostPriceSet.php | 104 + src/UHost/Models/UHostTagSet.php | 84 + .../Params/CreateUHostInstanceParamDisks.php | 164 ++ ...eateUHostInstanceParamNetworkInterface.php | 84 + ...eUHostInstanceParamNetworkInterfaceEIP.php | 144 ++ ...tanceParamNetworkInterfaceEIPGlobalSSH.php | 84 + ...UHostInstanceParamNetworkInterfaceIPv6.php | 26 + .../CreateUHostInstanceParamVirtualGpu.php | 26 + .../CreateUHostInstanceParamVolumes.php | 26 + .../GetUHostInstancePriceParamDisks.php | 104 + .../GetUHostInstancePriceParamVirtualGpu.php | 26 + .../GetUHostInstancePriceParamVolumes.php | 26 + src/UHost/UHostClient.php | 1326 ++++++++++ src/UK8S/Apis/AddUK8SExistingUHostRequest.php | 293 +++ .../Apis/AddUK8SExistingUHostResponse.php | 26 + src/UK8S/Apis/AddUK8SPHostNodeRequest.php | 375 +++ src/UK8S/Apis/AddUK8SPHostNodeResponse.php | 26 + src/UK8S/Apis/AddUK8SUHostNodeRequest.php | 537 ++++ src/UK8S/Apis/AddUK8SUHostNodeResponse.php | 44 + src/UK8S/Apis/CreateUK8SClusterV2Request.php | 560 ++++ src/UK8S/Apis/CreateUK8SClusterV2Response.php | 44 + src/UK8S/Apis/DelUK8SClusterNodeV2Request.php | 132 + .../Apis/DelUK8SClusterNodeV2Response.php | 26 + src/UK8S/Apis/DelUK8SClusterRequest.php | 111 + src/UK8S/Apis/DelUK8SClusterResponse.php | 26 + src/UK8S/Apis/DescribeUK8SImageRequest.php | 90 + src/UK8S/Apis/DescribeUK8SImageResponse.php | 84 + src/UK8S/Apis/DescribeUK8SNodeRequest.php | 112 + src/UK8S/Apis/DescribeUK8SNodeResponse.php | 594 +++++ .../Apis/ListUK8SClusterNodeV2Request.php | 91 + .../Apis/ListUK8SClusterNodeV2Response.php | 76 + src/UK8S/Apis/ListUK8SClusterV2Request.php | 130 + src/UK8S/Apis/ListUK8SClusterV2Response.php | 74 + src/UK8S/Models/ClusterSet.php | 304 +++ src/UK8S/Models/ImageInfo.php | 104 + src/UK8S/Models/K8SNodeCondition.php | 144 ++ src/UK8S/Models/KubeProxy.php | 44 + src/UK8S/Models/NodeInfoV2.php | 433 ++++ src/UK8S/Models/UHostIPSet.php | 164 ++ .../CreateUK8SClusterV2ParamKubeProxy.php | 44 + .../Params/CreateUK8SClusterV2ParamMaster.php | 44 + .../Params/CreateUK8SClusterV2ParamNodes.php | 304 +++ src/UK8S/UK8SClient.php | 515 ++++ src/ULB/Apis/AllocateBackendRequest.php | 295 +++ src/ULB/Apis/AllocateBackendResponse.php | 44 + src/ULB/Apis/BindSSLRequest.php | 134 + src/ULB/Apis/BindSSLResponse.php | 26 + src/ULB/Apis/CreatePolicyRequest.php | 195 ++ src/ULB/Apis/CreatePolicyResponse.php | 44 + src/ULB/Apis/CreateSSLRequest.php | 192 ++ src/ULB/Apis/CreateSSLResponse.php | 44 + src/ULB/Apis/CreateULBRequest.php | 290 +++ src/ULB/Apis/CreateULBResponse.php | 64 + src/ULB/Apis/CreateVServerRequest.php | 351 +++ src/ULB/Apis/CreateVServerResponse.php | 44 + src/ULB/Apis/DeletePolicyRequest.php | 112 + src/ULB/Apis/DeletePolicyResponse.php | 26 + src/ULB/Apis/DeleteSSLRequest.php | 92 + src/ULB/Apis/DeleteSSLResponse.php | 26 + src/ULB/Apis/DeleteULBRequest.php | 111 + src/ULB/Apis/DeleteULBResponse.php | 26 + src/ULB/Apis/DeleteVServerRequest.php | 113 + src/ULB/Apis/DeleteVServerResponse.php | 26 + src/ULB/Apis/DescribeSSLRequest.php | 131 + src/ULB/Apis/DescribeSSLResponse.php | 75 + src/ULB/Apis/DescribeULBRequest.php | 190 ++ src/ULB/Apis/DescribeULBResponse.php | 83 + src/ULB/Apis/DescribeULBSimpleRequest.php | 190 ++ src/ULB/Apis/DescribeULBSimpleResponse.php | 77 + src/ULB/Apis/DescribeVServerRequest.php | 152 ++ src/ULB/Apis/DescribeVServerResponse.php | 79 + src/ULB/Apis/ReleaseBackendRequest.php | 113 + src/ULB/Apis/ReleaseBackendResponse.php | 26 + src/ULB/Apis/UnbindSSLRequest.php | 134 + src/ULB/Apis/UnbindSSLResponse.php | 26 + .../Apis/UpdateBackendAttributeRequest.php | 193 ++ .../Apis/UpdateBackendAttributeResponse.php | 26 + src/ULB/Apis/UpdatePolicyRequest.php | 194 ++ src/ULB/Apis/UpdatePolicyResponse.php | 26 + src/ULB/Apis/UpdateULBAttributeRequest.php | 152 ++ src/ULB/Apis/UpdateULBAttributeResponse.php | 26 + .../Apis/UpdateVServerAttributeRequest.php | 313 +++ .../Apis/UpdateVServerAttributeResponse.php | 26 + src/ULB/Models/FirewallSet.php | 64 + src/ULB/Models/LoggerSet.php | 84 + src/ULB/Models/PolicyBackendSet.php | 204 ++ src/ULB/Models/SSLBindedTargetSet.php | 104 + src/ULB/Models/ULBBackendSet.php | 284 ++ src/ULB/Models/ULBIPSet.php | 124 + src/ULB/Models/ULBPolicySet.php | 193 ++ src/ULB/Models/ULBSSLSet.php | 173 ++ src/ULB/Models/ULBSet.php | 431 ++++ src/ULB/Models/ULBSimpleSet.php | 422 +++ src/ULB/Models/ULBVServerSet.php | 411 +++ src/ULB/ULBClient.php | 940 +++++++ .../CheckUDredisSpaceAllowanceRequest.php | 133 + .../CheckUDredisSpaceAllowanceResponse.php | 44 + src/UMem/Apis/CheckURedisAllowanceRequest.php | 193 ++ .../Apis/CheckURedisAllowanceResponse.php | 44 + src/UMem/Apis/CreateUMemBackupRequest.php | 133 + src/UMem/Apis/CreateUMemBackupResponse.php | 44 + src/UMem/Apis/CreateUMemSpaceRequest.php | 233 ++ src/UMem/Apis/CreateUMemSpaceResponse.php | 44 + src/UMem/Apis/CreateUMemcacheGroupRequest.php | 271 ++ .../Apis/CreateUMemcacheGroupResponse.php | 44 + src/UMem/Apis/CreateURedisBackupRequest.php | 152 ++ src/UMem/Apis/CreateURedisBackupResponse.php | 44 + src/UMem/Apis/CreateURedisGroupRequest.php | 453 ++++ src/UMem/Apis/CreateURedisGroupResponse.php | 44 + src/UMem/Apis/DeleteUMemSpaceRequest.php | 111 + src/UMem/Apis/DeleteUMemSpaceResponse.php | 26 + src/UMem/Apis/DeleteUMemcacheGroupRequest.php | 111 + .../Apis/DeleteUMemcacheGroupResponse.php | 26 + src/UMem/Apis/DeleteURedisGroupRequest.php | 91 + src/UMem/Apis/DeleteURedisGroupResponse.php | 26 + .../Apis/DescribeUDRedisSlowlogRequest.php | 132 + .../Apis/DescribeUDRedisSlowlogResponse.php | 74 + src/UMem/Apis/DescribeUMemBackupRequest.php | 152 ++ src/UMem/Apis/DescribeUMemBackupResponse.php | 54 + .../Apis/DescribeUMemBackupURLRequest.php | 153 ++ .../Apis/DescribeUMemBackupURLResponse.php | 44 + .../Apis/DescribeUMemBlockInfoRequest.php | 154 ++ .../Apis/DescribeUMemBlockInfoResponse.php | 54 + src/UMem/Apis/DescribeUMemPriceRequest.php | 174 ++ src/UMem/Apis/DescribeUMemPriceResponse.php | 54 + src/UMem/Apis/DescribeUMemRequest.php | 170 ++ src/UMem/Apis/DescribeUMemResponse.php | 76 + src/UMem/Apis/DescribeUMemSpaceRequest.php | 170 ++ src/UMem/Apis/DescribeUMemSpaceResponse.php | 75 + .../Apis/DescribeUMemUpgradePriceRequest.php | 153 ++ .../Apis/DescribeUMemUpgradePriceResponse.php | 64 + .../Apis/DescribeUMemcacheGroupRequest.php | 150 ++ .../Apis/DescribeUMemcacheGroupResponse.php | 74 + .../Apis/DescribeUMemcachePriceRequest.php | 172 ++ .../Apis/DescribeUMemcachePriceResponse.php | 54 + .../DescribeUMemcacheUpgradePriceRequest.php | 71 + .../DescribeUMemcacheUpgradePriceResponse.php | 44 + src/UMem/Apis/DescribeURedisBackupRequest.php | 130 + .../Apis/DescribeURedisBackupResponse.php | 74 + .../Apis/DescribeURedisBackupURLRequest.php | 171 ++ .../Apis/DescribeURedisBackupURLResponse.php | 64 + src/UMem/Apis/DescribeURedisConfigRequest.php | 192 ++ .../Apis/DescribeURedisConfigResponse.php | 74 + src/UMem/Apis/DescribeURedisGroupRequest.php | 150 ++ src/UMem/Apis/DescribeURedisGroupResponse.php | 74 + src/UMem/Apis/DescribeURedisPriceRequest.php | 192 ++ src/UMem/Apis/DescribeURedisPriceResponse.php | 54 + .../Apis/DescribeURedisSlowlogRequest.php | 132 + .../Apis/DescribeURedisSlowlogResponse.php | 74 + .../DescribeURedisUpgradePriceRequest.php | 112 + .../DescribeURedisUpgradePriceResponse.php | 44 + .../Apis/DescribeURedisVersionRequest.php | 91 + .../Apis/DescribeURedisVersionResponse.php | 74 + src/UMem/Apis/FlushallURedisGroupRequest.php | 213 ++ src/UMem/Apis/FlushallURedisGroupResponse.php | 26 + src/UMem/Apis/GetUMemSpaceStateRequest.php | 111 + src/UMem/Apis/GetUMemSpaceStateResponse.php | 44 + src/UMem/Apis/ISolationURedisGroupRequest.php | 153 ++ .../Apis/ISolationURedisGroupResponse.php | 26 + src/UMem/Apis/ModifyUMemSpaceNameRequest.php | 132 + src/UMem/Apis/ModifyUMemSpaceNameResponse.php | 26 + .../Apis/ModifyURedisGroupNameRequest.php | 112 + .../Apis/ModifyURedisGroupNameResponse.php | 26 + .../Apis/ModifyURedisGroupPasswordRequest.php | 132 + .../ModifyURedisGroupPasswordResponse.php | 26 + src/UMem/Apis/RemoveUDRedisDataRequest.php | 112 + src/UMem/Apis/RemoveUDRedisDataResponse.php | 26 + src/UMem/Apis/ResizeUMemSpaceRequest.php | 152 ++ src/UMem/Apis/ResizeUMemSpaceResponse.php | 26 + src/UMem/Apis/ResizeURedisGroupRequest.php | 192 ++ src/UMem/Apis/ResizeURedisGroupResponse.php | 26 + .../Apis/RestartUMemcacheGroupRequest.php | 112 + .../Apis/RestartUMemcacheGroupResponse.php | 26 + src/UMem/Apis/RestartURedisGroupRequest.php | 111 + src/UMem/Apis/RestartURedisGroupResponse.php | 26 + .../UpdateURedisBackupStrategyRequest.php | 172 ++ .../UpdateURedisBackupStrategyResponse.php | 26 + src/UMem/Models/UDRedisSlowlogSet.php | 104 + src/UMem/Models/UMemBackupSet.php | 144 ++ src/UMem/Models/UMemBlockInfo.php | 184 ++ src/UMem/Models/UMemDataSet.php | 562 ++++ src/UMem/Models/UMemPriceSet.php | 84 + src/UMem/Models/UMemSlaveDataSet.php | 484 ++++ src/UMem/Models/UMemSpaceAddressSet.php | 64 + src/UMem/Models/UMemSpaceSet.php | 353 +++ src/UMem/Models/UMemcacheGroupSet.php | 304 +++ src/UMem/Models/UMemcachePriceSet.php | 104 + src/UMem/Models/URedisBackupSet.php | 204 ++ src/UMem/Models/URedisConfigSet.php | 224 ++ src/UMem/Models/URedisGroupSet.php | 564 ++++ src/UMem/Models/URedisPriceSet.php | 104 + src/UMem/Models/URedisSlowlogSet.php | 84 + src/UMem/Models/URedisVersionSet.php | 44 + src/UMem/UMemClient.php | 1558 +++++++++++ src/UNet/Apis/AllocateEIPRequest.php | 272 ++ src/UNet/Apis/AllocateEIPResponse.php | 55 + .../Apis/AllocateShareBandwidthRequest.php | 173 ++ .../Apis/AllocateShareBandwidthResponse.php | 44 + .../AssociateEIPWithShareBandwidthRequest.php | 132 + ...AssociateEIPWithShareBandwidthResponse.php | 26 + src/UNet/Apis/BindEIPRequest.php | 133 + src/UNet/Apis/BindEIPResponse.php | 26 + .../Apis/CreateBandwidthPackageRequest.php | 153 ++ .../Apis/CreateBandwidthPackageResponse.php | 44 + src/UNet/Apis/CreateFirewallRequest.php | 152 ++ src/UNet/Apis/CreateFirewallResponse.php | 44 + .../Apis/DeleteBandwidthPackageRequest.php | 91 + .../Apis/DeleteBandwidthPackageResponse.php | 26 + src/UNet/Apis/DeleteFirewallRequest.php | 91 + src/UNet/Apis/DeleteFirewallResponse.php | 26 + .../Apis/DescribeBandwidthPackageRequest.php | 110 + .../Apis/DescribeBandwidthPackageResponse.php | 75 + .../Apis/DescribeBandwidthUsageRequest.php | 130 + .../Apis/DescribeBandwidthUsageResponse.php | 74 + src/UNet/Apis/DescribeEIPRequest.php | 150 ++ src/UNet/Apis/DescribeEIPResponse.php | 117 + src/UNet/Apis/DescribeFirewallRequest.php | 170 ++ .../Apis/DescribeFirewallResourceRequest.php | 131 + .../Apis/DescribeFirewallResourceResponse.php | 74 + src/UNet/Apis/DescribeFirewallResponse.php | 75 + .../Apis/DescribeShareBandwidthRequest.php | 90 + .../Apis/DescribeShareBandwidthResponse.php | 76 + ...sassociateEIPWithShareBandwidthRequest.php | 172 ++ ...associateEIPWithShareBandwidthResponse.php | 26 + src/UNet/Apis/GetEIPPayModeRequest.php | 91 + src/UNet/Apis/GetEIPPayModeResponse.php | 54 + src/UNet/Apis/GetEIPPriceRequest.php | 172 ++ src/UNet/Apis/GetEIPPriceResponse.php | 54 + src/UNet/Apis/GetEIPUpgradePriceRequest.php | 112 + src/UNet/Apis/GetEIPUpgradePriceResponse.php | 44 + .../GetThroughputDailyBillingInfoRequest.php | 133 + .../GetThroughputDailyBillingInfoResponse.php | 94 + src/UNet/Apis/GrantFirewallRequest.php | 133 + src/UNet/Apis/GrantFirewallResponse.php | 26 + src/UNet/Apis/ModifyEIPBandwidthRequest.php | 112 + src/UNet/Apis/ModifyEIPBandwidthResponse.php | 26 + src/UNet/Apis/ModifyEIPWeightRequest.php | 112 + src/UNet/Apis/ModifyEIPWeightResponse.php | 26 + src/UNet/Apis/ReleaseEIPRequest.php | 91 + src/UNet/Apis/ReleaseEIPResponse.php | 26 + .../Apis/ReleaseShareBandwidthRequest.php | 132 + .../Apis/ReleaseShareBandwidthResponse.php | 26 + src/UNet/Apis/ResizeShareBandwidthRequest.php | 112 + .../Apis/ResizeShareBandwidthResponse.php | 26 + src/UNet/Apis/SetEIPPayModeRequest.php | 133 + src/UNet/Apis/SetEIPPayModeResponse.php | 26 + src/UNet/Apis/UnBindEIPRequest.php | 133 + src/UNet/Apis/UnBindEIPResponse.php | 26 + src/UNet/Apis/UpdateEIPAttributeRequest.php | 151 ++ src/UNet/Apis/UpdateEIPAttributeResponse.php | 26 + .../Apis/UpdateFirewallAttributeRequest.php | 151 ++ .../Apis/UpdateFirewallAttributeResponse.php | 26 + src/UNet/Apis/UpdateFirewallRequest.php | 112 + src/UNet/Apis/UpdateFirewallResponse.php | 44 + src/UNet/Models/EIPAddrSet.php | 64 + src/UNet/Models/EIPPayModeSet.php | 64 + src/UNet/Models/EIPPriceDetailSet.php | 104 + src/UNet/Models/EIPSetData.php | 93 + src/UNet/Models/FirewallDataSet.php | 213 ++ src/UNet/Models/FirewallRuleSet.php | 144 ++ src/UNet/Models/ResourceSet.php | 184 ++ src/UNet/Models/ShareBandwidthSet.php | 84 + .../Models/ThroughputDailyBillingInfo.php | 124 + src/UNet/Models/UnetAllocateEIPSet.php | 73 + src/UNet/Models/UnetBandwidthPackageSet.php | 173 ++ src/UNet/Models/UnetBandwidthUsageEIPSet.php | 64 + src/UNet/Models/UnetEIPAddrSet.php | 64 + src/UNet/Models/UnetEIPResourceSet.php | 164 ++ src/UNet/Models/UnetEIPSet.php | 353 +++ src/UNet/Models/UnetShareBandwidthSet.php | 193 ++ src/UNet/UNetClient.php | 1096 ++++++++ src/UPHost/Apis/CreatePHostRequest.php | 423 +++ src/UPHost/Apis/CreatePHostResponse.php | 44 + .../DescribeBaremetalMachineTypeRequest.php | 111 + .../DescribeBaremetalMachineTypeResponse.php | 57 + src/UPHost/Apis/DescribePHostImageRequest.php | 191 ++ .../Apis/DescribePHostImageResponse.php | 74 + .../Apis/DescribePHostMachineTypeRequest.php | 111 + .../Apis/DescribePHostMachineTypeResponse.php | 58 + src/UPHost/Apis/DescribePHostRequest.php | 190 ++ src/UPHost/Apis/DescribePHostResponse.php | 77 + src/UPHost/Apis/DescribePHostTagsRequest.php | 90 + src/UPHost/Apis/DescribePHostTagsResponse.php | 74 + .../Apis/GetPHostDiskUpgradePriceRequest.php | 173 ++ .../Apis/GetPHostDiskUpgradePriceResponse.php | 64 + src/UPHost/Apis/GetPHostPriceRequest.php | 223 ++ src/UPHost/Apis/GetPHostPriceResponse.php | 54 + src/UPHost/Apis/ModifyPHostInfoRequest.php | 171 ++ src/UPHost/Apis/ModifyPHostInfoResponse.php | 44 + src/UPHost/Apis/PoweroffPHostRequest.php | 112 + src/UPHost/Apis/PoweroffPHostResponse.php | 44 + src/UPHost/Apis/RebootPHostRequest.php | 112 + src/UPHost/Apis/RebootPHostResponse.php | 44 + src/UPHost/Apis/ReinstallPHostRequest.php | 273 ++ src/UPHost/Apis/ReinstallPHostResponse.php | 44 + src/UPHost/Apis/ResetPHostPasswordRequest.php | 133 + .../Apis/ResetPHostPasswordResponse.php | 44 + .../Apis/ResizePHostAttachedDiskRequest.php | 151 ++ .../Apis/ResizePHostAttachedDiskResponse.php | 44 + src/UPHost/Apis/StartPHostRequest.php | 112 + src/UPHost/Apis/StartPHostResponse.php | 44 + src/UPHost/Apis/TerminatePHostRequest.php | 152 ++ src/UPHost/Apis/TerminatePHostResponse.php | 44 + src/UPHost/Models/PHostCPUSet.php | 104 + .../Models/PHostCloudMachineTypeSet.php | 133 + src/UPHost/Models/PHostClusterSet.php | 64 + src/UPHost/Models/PHostComponentSet.php | 64 + src/UPHost/Models/PHostDescDiskSet.php | 184 ++ src/UPHost/Models/PHostDiskSet.php | 124 + src/UPHost/Models/PHostIPSet.php | 164 ++ src/UPHost/Models/PHostImageSet.php | 144 ++ src/UPHost/Models/PHostMachineTypeSet.php | 182 ++ src/UPHost/Models/PHostPriceSet.php | 104 + src/UPHost/Models/PHostSet.php | 542 ++++ src/UPHost/Models/PHostTagSet.php | 64 + src/UPHost/Params/CreatePHostParamDisks.php | 104 + src/UPHost/Params/GetPHostPriceParamDisks.php | 84 + src/UPHost/UPHostClient.php | 697 +++++ src/USMS/Apis/CreateUSMSSignatureRequest.php | 216 ++ src/USMS/Apis/CreateUSMSSignatureResponse.php | 44 + src/USMS/Apis/CreateUSMSTemplateRequest.php | 153 ++ src/USMS/Apis/CreateUSMSTemplateResponse.php | 44 + src/USMS/Apis/DeleteUSMSSignatureRequest.php | 71 + src/USMS/Apis/DeleteUSMSSignatureResponse.php | 26 + src/USMS/Apis/DeleteUSMSTemplateRequest.php | 71 + src/USMS/Apis/DeleteUSMSTemplateResponse.php | 26 + src/USMS/Apis/GetUSMSSendReceiptRequest.php | 110 + src/USMS/Apis/GetUSMSSendReceiptResponse.php | 55 + src/USMS/Apis/QueryUSMSSignatureRequest.php | 89 + src/USMS/Apis/QueryUSMSSignatureResponse.php | 45 + src/USMS/Apis/QueryUSMSTemplateRequest.php | 71 + src/USMS/Apis/QueryUSMSTemplateResponse.php | 45 + src/USMS/Apis/SendBatchUSMSMessageRequest.php | 71 + .../Apis/SendBatchUSMSMessageResponse.php | 115 + src/USMS/Apis/SendUSMSMessageRequest.php | 173 ++ src/USMS/Apis/SendUSMSMessageResponse.php | 64 + src/USMS/Apis/UpdateUSMSSignatureRequest.php | 234 ++ src/USMS/Apis/UpdateUSMSSignatureResponse.php | 26 + src/USMS/Apis/UpdateUSMSTemplateRequest.php | 132 + src/USMS/Apis/UpdateUSMSTemplateResponse.php | 26 + src/USMS/Models/BatchInfo.php | 113 + src/USMS/Models/FailPhoneDetail.php | 124 + src/USMS/Models/OutSignature.php | 104 + src/USMS/Models/OutTemplate.php | 204 ++ src/USMS/Models/ReceiptPerPhone.php | 164 ++ src/USMS/Models/ReceiptPerSession.php | 73 + src/USMS/USMSClient.php | 410 +++ src/VPC/Apis/AddSnatRuleRequest.php | 153 ++ src/VPC/Apis/AddSnatRuleResponse.php | 26 + src/VPC/Apis/AddVPCNetworkRequest.php | 112 + src/VPC/Apis/AddVPCNetworkResponse.php | 26 + src/VPC/Apis/AddWhiteListResourceRequest.php | 112 + src/VPC/Apis/AddWhiteListResourceResponse.php | 26 + src/VPC/Apis/AllocateSecondaryIpRequest.php | 194 ++ src/VPC/Apis/AllocateSecondaryIpResponse.php | 45 + src/VPC/Apis/AllocateVIPRequest.php | 252 ++ src/VPC/Apis/AllocateVIPResponse.php | 74 + src/VPC/Apis/AssociateRouteTableRequest.php | 113 + src/VPC/Apis/AssociateRouteTableResponse.php | 26 + src/VPC/Apis/CloneRouteTableRequest.php | 92 + src/VPC/Apis/CloneRouteTableResponse.php | 44 + src/VPC/Apis/CreateNATGWPolicyRequest.php | 216 ++ src/VPC/Apis/CreateNATGWPolicyResponse.php | 44 + src/VPC/Apis/CreateNATGWRequest.php | 233 ++ src/VPC/Apis/CreateNATGWResponse.php | 44 + .../CreateNetworkAclAssociationRequest.php | 112 + .../CreateNetworkAclAssociationResponse.php | 65 + src/VPC/Apis/CreateNetworkAclEntryRequest.php | 277 ++ .../Apis/CreateNetworkAclEntryResponse.php | 44 + src/VPC/Apis/CreateNetworkAclRequest.php | 132 + src/VPC/Apis/CreateNetworkAclResponse.php | 44 + src/VPC/Apis/CreateRouteTableRequest.php | 152 ++ src/VPC/Apis/CreateRouteTableResponse.php | 44 + src/VPC/Apis/CreateSubnetRequest.php | 192 ++ src/VPC/Apis/CreateSubnetResponse.php | 44 + src/VPC/Apis/CreateVPCIntercomRequest.php | 152 ++ src/VPC/Apis/CreateVPCIntercomResponse.php | 26 + src/VPC/Apis/CreateVPCRequest.php | 152 ++ src/VPC/Apis/CreateVPCResponse.php | 44 + src/VPC/Apis/DeleteNATGWPolicyRequest.php | 112 + src/VPC/Apis/DeleteNATGWPolicyResponse.php | 26 + src/VPC/Apis/DeleteNATGWRequest.php | 111 + src/VPC/Apis/DeleteNATGWResponse.php | 26 + .../DeleteNetworkAclAssociationRequest.php | 112 + .../DeleteNetworkAclAssociationResponse.php | 26 + src/VPC/Apis/DeleteNetworkAclEntryRequest.php | 112 + .../Apis/DeleteNetworkAclEntryResponse.php | 26 + src/VPC/Apis/DeleteNetworkAclRequest.php | 91 + src/VPC/Apis/DeleteNetworkAclResponse.php | 26 + src/VPC/Apis/DeleteRouteTableRequest.php | 92 + src/VPC/Apis/DeleteRouteTableResponse.php | 26 + src/VPC/Apis/DeleteSecondaryIpRequest.php | 195 ++ src/VPC/Apis/DeleteSecondaryIpResponse.php | 26 + src/VPC/Apis/DeleteSnatRuleRequest.php | 112 + src/VPC/Apis/DeleteSnatRuleResponse.php | 26 + src/VPC/Apis/DeleteSubnetRequest.php | 91 + src/VPC/Apis/DeleteSubnetResponse.php | 26 + src/VPC/Apis/DeleteVPCIntercomRequest.php | 152 ++ src/VPC/Apis/DeleteVPCIntercomResponse.php | 26 + src/VPC/Apis/DeleteVPCRequest.php | 91 + src/VPC/Apis/DeleteVPCResponse.php | 26 + .../Apis/DeleteWhiteListResourceRequest.php | 112 + .../Apis/DeleteWhiteListResourceResponse.php | 26 + src/VPC/Apis/DescribeNATGWPolicyRequest.php | 131 + src/VPC/Apis/DescribeNATGWPolicyResponse.php | 74 + src/VPC/Apis/DescribeNATGWRequest.php | 130 + src/VPC/Apis/DescribeNATGWResponse.php | 77 + ...beNetworkAclAssociationBySubnetRequest.php | 91 + ...eNetworkAclAssociationBySubnetResponse.php | 45 + .../DescribeNetworkAclAssociationRequest.php | 131 + .../DescribeNetworkAclAssociationResponse.php | 54 + .../Apis/DescribeNetworkAclEntryRequest.php | 91 + .../Apis/DescribeNetworkAclEntryResponse.php | 55 + src/VPC/Apis/DescribeNetworkAclRequest.php | 130 + src/VPC/Apis/DescribeNetworkAclResponse.php | 57 + src/VPC/Apis/DescribeRouteTableRequest.php | 170 ++ src/VPC/Apis/DescribeRouteTableResponse.php | 75 + src/VPC/Apis/DescribeSecondaryIpRequest.php | 152 ++ src/VPC/Apis/DescribeSecondaryIpResponse.php | 54 + src/VPC/Apis/DescribeSnatRuleRequest.php | 171 ++ src/VPC/Apis/DescribeSnatRuleResponse.php | 74 + src/VPC/Apis/DescribeSubnetRequest.php | 230 ++ .../Apis/DescribeSubnetResourceRequest.php | 151 ++ .../Apis/DescribeSubnetResourceResponse.php | 74 + src/VPC/Apis/DescribeSubnetResponse.php | 74 + src/VPC/Apis/DescribeVIPRequest.php | 191 ++ src/VPC/Apis/DescribeVIPResponse.php | 94 + src/VPC/Apis/DescribeVPCIntercomRequest.php | 131 + src/VPC/Apis/DescribeVPCIntercomResponse.php | 54 + src/VPC/Apis/DescribeVPCRequest.php | 151 ++ src/VPC/Apis/DescribeVPCResponse.php | 55 + .../Apis/DescribeWhiteListResourceRequest.php | 132 + .../DescribeWhiteListResourceResponse.php | 75 + src/VPC/Apis/EnableWhiteListRequest.php | 112 + src/VPC/Apis/EnableWhiteListResponse.php | 26 + .../GetAvailableResourceForPolicyRequest.php | 131 + .../GetAvailableResourceForPolicyResponse.php | 54 + ...GetAvailableResourceForSnatRuleRequest.php | 132 + ...etAvailableResourceForSnatRuleResponse.php | 74 + ...etAvailableResourceForWhiteListRequest.php | 131 + ...tAvailableResourceForWhiteListResponse.php | 74 + .../GetNetworkAclTargetResourceRequest.php | 91 + .../GetNetworkAclTargetResourceResponse.php | 74 + src/VPC/Apis/ListSubnetForNATGWRequest.php | 90 + src/VPC/Apis/ListSubnetForNATGWResponse.php | 54 + src/VPC/Apis/ModifyRouteRuleRequest.php | 113 + src/VPC/Apis/ModifyRouteRuleResponse.php | 26 + src/VPC/Apis/MoveSecondaryIPMacRequest.php | 154 ++ src/VPC/Apis/MoveSecondaryIPMacResponse.php | 26 + src/VPC/Apis/ReleaseVIPRequest.php | 111 + src/VPC/Apis/ReleaseVIPResponse.php | 26 + src/VPC/Apis/SetGwDefaultExportRequest.php | 131 + src/VPC/Apis/SetGwDefaultExportResponse.php | 26 + src/VPC/Apis/UpdateNATGWPolicyRequest.php | 237 ++ src/VPC/Apis/UpdateNATGWPolicyResponse.php | 26 + src/VPC/Apis/UpdateNATGWSubnetRequest.php | 112 + src/VPC/Apis/UpdateNATGWSubnetResponse.php | 26 + src/VPC/Apis/UpdateNetworkAclEntryRequest.php | 298 +++ .../Apis/UpdateNetworkAclEntryResponse.php | 26 + src/VPC/Apis/UpdateNetworkAclRequest.php | 133 + src/VPC/Apis/UpdateNetworkAclResponse.php | 26 + .../Apis/UpdateRouteTableAttributeRequest.php | 152 ++ .../UpdateRouteTableAttributeResponse.php | 26 + src/VPC/Apis/UpdateSnatRuleRequest.php | 153 ++ src/VPC/Apis/UpdateSnatRuleResponse.php | 26 + src/VPC/Apis/UpdateSubnetAttributeRequest.php | 131 + .../Apis/UpdateSubnetAttributeResponse.php | 26 + src/VPC/Apis/UpdateVIPAttributeRequest.php | 152 ++ src/VPC/Apis/UpdateVIPAttributeResponse.php | 26 + src/VPC/Apis/UpdateVPCNetworkRequest.php | 113 + src/VPC/Apis/UpdateVPCNetworkResponse.php | 26 + src/VPC/Models/AclEntryInfo.php | 273 ++ src/VPC/Models/AclInfo.php | 202 ++ src/VPC/Models/AssociationInfo.php | 104 + .../DescribeWhiteListResourceObjectIPInfo.php | 204 ++ .../GetAvailableResourceForPolicyDataSet.php | 84 + ...GetAvailableResourceForSnatRuleDataSet.php | 144 ++ ...etAvailableResourceForWhiteListDataSet.php | 204 ++ src/VPC/Models/IpInfo.php | 144 ++ src/VPC/Models/NATGWPolicyDataSet.php | 204 ++ src/VPC/Models/NATGWSnatRule.php | 104 + src/VPC/Models/NatGWIPResInfo.php | 64 + src/VPC/Models/NatGWWhitelistDataSet.php | 93 + src/VPC/Models/NatGatewayDataSet.php | 242 ++ src/VPC/Models/NatGatewayIPSet.php | 133 + src/VPC/Models/NatGatewaySubnetSet.php | 84 + src/VPC/Models/NatgwSubnetDataSet.php | 124 + src/VPC/Models/RouteRuleInfo.php | 304 +++ src/VPC/Models/RouteTableInfo.php | 213 ++ src/VPC/Models/SubnetInfo.php | 344 +++ src/VPC/Models/SubnetResource.php | 104 + src/VPC/Models/TargetResourceInfo.php | 184 ++ src/VPC/Models/VIPDetailSet.php | 224 ++ src/VPC/Models/VIPSet.php | 84 + src/VPC/Models/VPCInfo.php | 233 ++ src/VPC/Models/VPCIntercomInfo.php | 184 ++ src/VPC/Models/VPCNetworkInfo.php | 64 + src/VPC/VPCClient.php | 2288 +++++++++++++++++ tests/ClientTest.php | 134 + tests/CredentialTest.php | 34 + tests/ObjectTest.php | 76 + 1252 files changed, 156909 insertions(+), 365 deletions(-) create mode 100644 .gitattributes create mode 100644 .github/workflows/php.yml create mode 100644 .gitlab-ci.yml create mode 100644 LICENSE create mode 100644 Makefile delete mode 100644 README create mode 100644 README.md create mode 100644 composer.json delete mode 100644 config.simple.php create mode 100644 docs/configure.md create mode 100644 docs/error.md create mode 100644 docs/generic.md create mode 100644 docs/middleware.md create mode 100644 docs/quickstart.md create mode 100644 docs/typesystem.md create mode 100644 examples/two-tier/README.md create mode 100644 examples/two-tier/main.php create mode 100644 examples/uhost/README.md create mode 100644 examples/uhost/main.php create mode 100644 phpcs.xml create mode 100644 phpunit.xml delete mode 100644 sdk.php delete mode 100644 sendsms.php create mode 100644 src/Core/Client.php create mode 100644 src/Core/ClientInterface.php create mode 100644 src/Core/Config/Config.php create mode 100644 src/Core/Credential/Credential.php create mode 100644 src/Core/Credential/CredentialInterface.php create mode 100644 src/Core/CredentialMiddleware.php create mode 100644 src/Core/DefaultsMiddleware.php create mode 100644 src/Core/Exception/UCloudException.php create mode 100644 src/Core/LogMiddleware.php create mode 100644 src/Core/Logger/DefaultLogger.php create mode 100644 src/Core/Logger/DisabledLogger.php create mode 100644 src/Core/Middleware/Context.php create mode 100644 src/Core/Middleware/Middleware.php create mode 100644 src/Core/Middleware/MiddlewareInterface.php create mode 100644 src/Core/Request/Request.php create mode 100644 src/Core/Request/RequestInterface.php create mode 100644 src/Core/Response/Response.php create mode 100644 src/Core/Response/ResponseInterface.php create mode 100644 src/Core/Transport/Transport.php create mode 100644 src/Core/Transport/TransportInterface.php create mode 100644 src/Cube/Apis/CreateCubeDeploymentRequest.php create mode 100644 src/Cube/Apis/CreateCubeDeploymentResponse.php create mode 100644 src/Cube/Apis/CreateCubePodRequest.php create mode 100644 src/Cube/Apis/CreateCubePodResponse.php create mode 100644 src/Cube/Apis/DeleteCubeDeploymentRequest.php create mode 100644 src/Cube/Apis/DeleteCubeDeploymentResponse.php create mode 100644 src/Cube/Apis/DeleteCubePodRequest.php create mode 100644 src/Cube/Apis/DeleteCubePodResponse.php create mode 100644 src/Cube/Apis/GetCubeDeploymentRequest.php create mode 100644 src/Cube/Apis/GetCubeDeploymentResponse.php create mode 100644 src/Cube/Apis/GetCubeExecTokenRequest.php create mode 100644 src/Cube/Apis/GetCubeExecTokenResponse.php create mode 100644 src/Cube/Apis/GetCubeExtendInfoRequest.php create mode 100644 src/Cube/Apis/GetCubeExtendInfoResponse.php create mode 100644 src/Cube/Apis/GetCubeMetricsRequest.php create mode 100644 src/Cube/Apis/GetCubeMetricsResponse.php create mode 100644 src/Cube/Apis/GetCubePodRequest.php create mode 100644 src/Cube/Apis/GetCubePodResponse.php create mode 100644 src/Cube/Apis/GetCubePriceRequest.php create mode 100644 src/Cube/Apis/GetCubePriceResponse.php create mode 100644 src/Cube/Apis/ListCubeDeploymentRequest.php create mode 100644 src/Cube/Apis/ListCubeDeploymentResponse.php create mode 100644 src/Cube/Apis/ListCubePodRequest.php create mode 100644 src/Cube/Apis/ListCubePodResponse.php create mode 100644 src/Cube/Apis/ModifyCubeExtendInfoRequest.php create mode 100644 src/Cube/Apis/ModifyCubeExtendInfoResponse.php create mode 100644 src/Cube/Apis/ModifyCubeTagRequest.php create mode 100644 src/Cube/Apis/ModifyCubeTagResponse.php create mode 100644 src/Cube/Apis/RenewCubePodRequest.php create mode 100644 src/Cube/Apis/RenewCubePodResponse.php create mode 100644 src/Cube/Apis/UpdateCubeDeploymentRequest.php create mode 100644 src/Cube/Apis/UpdateCubeDeploymentResponse.php create mode 100644 src/Cube/CubeClient.php create mode 100644 src/Cube/Models/CubeExtendInfo.php create mode 100644 src/Cube/Models/EIPAddr.php create mode 100644 src/Cube/Models/EIPSet.php create mode 100644 src/Cube/Models/MetricDataSet.php create mode 100644 src/Cube/Models/ValueSet.php create mode 100644 src/IPSecVPN/Apis/CreateRemoteVPNGatewayRequest.php create mode 100644 src/IPSecVPN/Apis/CreateRemoteVPNGatewayResponse.php create mode 100644 src/IPSecVPN/Apis/CreateVPNGatewayRequest.php create mode 100644 src/IPSecVPN/Apis/CreateVPNGatewayResponse.php create mode 100644 src/IPSecVPN/Apis/CreateVPNTunnelRequest.php create mode 100644 src/IPSecVPN/Apis/CreateVPNTunnelResponse.php create mode 100644 src/IPSecVPN/Apis/DeleteRemoteVPNGatewayRequest.php create mode 100644 src/IPSecVPN/Apis/DeleteRemoteVPNGatewayResponse.php create mode 100644 src/IPSecVPN/Apis/DeleteVPNGatewayRequest.php create mode 100644 src/IPSecVPN/Apis/DeleteVPNGatewayResponse.php create mode 100644 src/IPSecVPN/Apis/DeleteVPNTunnelRequest.php create mode 100644 src/IPSecVPN/Apis/DeleteVPNTunnelResponse.php create mode 100644 src/IPSecVPN/Apis/DescribeRemoteVPNGatewayRequest.php create mode 100644 src/IPSecVPN/Apis/DescribeRemoteVPNGatewayResponse.php create mode 100644 src/IPSecVPN/Apis/DescribeVPNGatewayRequest.php create mode 100644 src/IPSecVPN/Apis/DescribeVPNGatewayResponse.php create mode 100644 src/IPSecVPN/Apis/DescribeVPNTunnelRequest.php create mode 100644 src/IPSecVPN/Apis/DescribeVPNTunnelResponse.php create mode 100644 src/IPSecVPN/Apis/GetVPNGatewayPriceRequest.php create mode 100644 src/IPSecVPN/Apis/GetVPNGatewayPriceResponse.php create mode 100644 src/IPSecVPN/Apis/GetVPNGatewayUpgradePriceRequest.php create mode 100644 src/IPSecVPN/Apis/GetVPNGatewayUpgradePriceResponse.php create mode 100644 src/IPSecVPN/Apis/UpdateVPNGatewayRequest.php create mode 100644 src/IPSecVPN/Apis/UpdateVPNGatewayResponse.php create mode 100644 src/IPSecVPN/Apis/UpdateVPNTunnelAttributeRequest.php create mode 100644 src/IPSecVPN/Apis/UpdateVPNTunnelAttributeResponse.php create mode 100644 src/IPSecVPN/IPSecVPNClient.php create mode 100644 src/IPSecVPN/Models/IKEData.php create mode 100644 src/IPSecVPN/Models/IPSecData.php create mode 100644 src/IPSecVPN/Models/RemoteVPNGatewayDataSet.php create mode 100644 src/IPSecVPN/Models/VPNGatewayDataSet.php create mode 100644 src/IPSecVPN/Models/VPNGatewayPriceSet.php create mode 100644 src/IPSecVPN/Models/VPNTunnelDataSet.php create mode 100644 src/PathX/Apis/BindPathXSSLRequest.php create mode 100644 src/PathX/Apis/BindPathXSSLResponse.php create mode 100644 src/PathX/Apis/CreateGlobalSSHInstanceRequest.php create mode 100644 src/PathX/Apis/CreateGlobalSSHInstanceResponse.php create mode 100644 src/PathX/Apis/CreatePathXSSLRequest.php create mode 100644 src/PathX/Apis/CreatePathXSSLResponse.php create mode 100644 src/PathX/Apis/CreateUGAForwarderRequest.php create mode 100644 src/PathX/Apis/CreateUGAForwarderResponse.php create mode 100644 src/PathX/Apis/CreateUGAInstanceRequest.php create mode 100644 src/PathX/Apis/CreateUGAInstanceResponse.php create mode 100644 src/PathX/Apis/CreateUPathRequest.php create mode 100644 src/PathX/Apis/CreateUPathResponse.php create mode 100644 src/PathX/Apis/DeleteGlobalSSHInstanceRequest.php create mode 100644 src/PathX/Apis/DeleteGlobalSSHInstanceResponse.php create mode 100644 src/PathX/Apis/DeletePathXSSLRequest.php create mode 100644 src/PathX/Apis/DeletePathXSSLResponse.php create mode 100644 src/PathX/Apis/DeleteUGAForwarderRequest.php create mode 100644 src/PathX/Apis/DeleteUGAForwarderResponse.php create mode 100644 src/PathX/Apis/DeleteUGAInstanceRequest.php create mode 100644 src/PathX/Apis/DeleteUGAInstanceResponse.php create mode 100644 src/PathX/Apis/DeleteUPathRequest.php create mode 100644 src/PathX/Apis/DeleteUPathResponse.php create mode 100644 src/PathX/Apis/DescribeGlobalSSHInstanceRequest.php create mode 100644 src/PathX/Apis/DescribeGlobalSSHInstanceResponse.php create mode 100644 src/PathX/Apis/DescribePathXLineConfigRequest.php create mode 100644 src/PathX/Apis/DescribePathXLineConfigResponse.php create mode 100644 src/PathX/Apis/DescribePathXSSLRequest.php create mode 100644 src/PathX/Apis/DescribePathXSSLResponse.php create mode 100644 src/PathX/Apis/DescribeUGAInstanceRequest.php create mode 100644 src/PathX/Apis/DescribeUGAInstanceResponse.php create mode 100644 src/PathX/Apis/DescribeUPathRequest.php create mode 100644 src/PathX/Apis/DescribeUPathResponse.php create mode 100644 src/PathX/Apis/DescribeUPathTemplateRequest.php create mode 100644 src/PathX/Apis/DescribeUPathTemplateResponse.php create mode 100644 src/PathX/Apis/GetGlobalSSHPriceRequest.php create mode 100644 src/PathX/Apis/GetGlobalSSHPriceResponse.php create mode 100644 src/PathX/Apis/GetGlobalSSHUpdatePriceRequest.php create mode 100644 src/PathX/Apis/GetGlobalSSHUpdatePriceResponse.php create mode 100644 src/PathX/Apis/GetPathXMetricRequest.php create mode 100644 src/PathX/Apis/GetPathXMetricResponse.php create mode 100644 src/PathX/Apis/ModifyGlobalSSHPortRequest.php create mode 100644 src/PathX/Apis/ModifyGlobalSSHPortResponse.php create mode 100644 src/PathX/Apis/ModifyGlobalSSHTypeRequest.php create mode 100644 src/PathX/Apis/ModifyGlobalSSHTypeResponse.php create mode 100644 src/PathX/Apis/ModifyUPathBandwidthRequest.php create mode 100644 src/PathX/Apis/ModifyUPathBandwidthResponse.php create mode 100644 src/PathX/Apis/ModifyUPathTemplateRequest.php create mode 100644 src/PathX/Apis/ModifyUPathTemplateResponse.php create mode 100644 src/PathX/Apis/UGABindUPathRequest.php create mode 100644 src/PathX/Apis/UGABindUPathResponse.php create mode 100644 src/PathX/Apis/UGAUnBindUPathRequest.php create mode 100644 src/PathX/Apis/UGAUnBindUPathResponse.php create mode 100644 src/PathX/Apis/UnBindPathXSSLRequest.php create mode 100644 src/PathX/Apis/UnBindPathXSSLResponse.php create mode 100644 src/PathX/Models/AlarmRuler.php create mode 100644 src/PathX/Models/GlobalSSHInfo.php create mode 100644 src/PathX/Models/LineDetail.php create mode 100644 src/PathX/Models/MatricPoint.php create mode 100644 src/PathX/Models/MetricPeriod.php create mode 100644 src/PathX/Models/OutPublicIpInfo.php create mode 100644 src/PathX/Models/PathXSSLSet.php create mode 100644 src/PathX/Models/PathXUGAInfo.php create mode 100644 src/PathX/Models/SSLBindedTargetSet.php create mode 100644 src/PathX/Models/UGAAInfo.php create mode 100644 src/PathX/Models/UGAALine.php create mode 100644 src/PathX/Models/UGAATask.php create mode 100644 src/PathX/Models/UGAL4Forwarder.php create mode 100644 src/PathX/Models/UGAL7Forwarder.php create mode 100644 src/PathX/Models/UPathInfo.php create mode 100644 src/PathX/Models/UPathSet.php create mode 100644 src/PathX/PathXClient.php create mode 100644 src/UAccount/Apis/AddMemberToProjectRequest.php create mode 100644 src/UAccount/Apis/AddMemberToProjectResponse.php create mode 100644 src/UAccount/Apis/CreateProjectRequest.php create mode 100644 src/UAccount/Apis/CreateProjectResponse.php create mode 100644 src/UAccount/Apis/FreezeMemberRequest.php create mode 100644 src/UAccount/Apis/FreezeMemberResponse.php create mode 100644 src/UAccount/Apis/GetNetworkMaskRequest.php create mode 100644 src/UAccount/Apis/GetNetworkMaskResponse.php create mode 100644 src/UAccount/Apis/GetProjectListRequest.php create mode 100644 src/UAccount/Apis/GetProjectListResponse.php create mode 100644 src/UAccount/Apis/GetRegionRequest.php create mode 100644 src/UAccount/Apis/GetRegionResponse.php create mode 100644 src/UAccount/Apis/InviteSubaccountRequest.php create mode 100644 src/UAccount/Apis/InviteSubaccountResponse.php create mode 100644 src/UAccount/Apis/RemoveMemberFromProjectRequest.php create mode 100644 src/UAccount/Apis/RemoveMemberFromProjectResponse.php create mode 100644 src/UAccount/Apis/SetNetworkMaskRequest.php create mode 100644 src/UAccount/Apis/SetNetworkMaskResponse.php create mode 100644 src/UAccount/Models/NetworkMask.php create mode 100644 src/UAccount/Models/ProjectListInfo.php create mode 100644 src/UAccount/Models/RegionInfo.php create mode 100644 src/UAccount/UAccountClient.php create mode 100644 src/UBill/Apis/GetBalanceRequest.php create mode 100644 src/UBill/Apis/GetBalanceResponse.php create mode 100644 src/UBill/Apis/GetBillDataFileUrlRequest.php create mode 100644 src/UBill/Apis/GetBillDataFileUrlResponse.php create mode 100644 src/UBill/Models/AccountInfo.php create mode 100644 src/UBill/UBillClient.php create mode 100644 src/UCDN/Apis/DescribeNewUcdnPrefetchCacheTaskRequest.php create mode 100644 src/UCDN/Apis/DescribeNewUcdnPrefetchCacheTaskResponse.php create mode 100644 src/UCDN/Apis/DescribeNewUcdnRefreshCacheTaskRequest.php create mode 100644 src/UCDN/Apis/DescribeNewUcdnRefreshCacheTaskResponse.php create mode 100644 src/UCDN/Apis/GetNewUcdnDomainBandwidthRequest.php create mode 100644 src/UCDN/Apis/GetNewUcdnDomainBandwidthResponse.php create mode 100644 src/UCDN/Apis/GetNewUcdnDomainHitRateRequest.php create mode 100644 src/UCDN/Apis/GetNewUcdnDomainHitRateResponse.php create mode 100644 src/UCDN/Apis/GetNewUcdnDomainHttpCodeRequest.php create mode 100644 src/UCDN/Apis/GetNewUcdnDomainHttpCodeResponse.php create mode 100644 src/UCDN/Apis/GetNewUcdnDomainHttpCodeV2Request.php create mode 100644 src/UCDN/Apis/GetNewUcdnDomainHttpCodeV2Response.php create mode 100644 src/UCDN/Apis/GetUcdnDomain95BandwidthV2Request.php create mode 100644 src/UCDN/Apis/GetUcdnDomain95BandwidthV2Response.php create mode 100644 src/UCDN/Apis/GetUcdnDomainBandwidthV2Request.php create mode 100644 src/UCDN/Apis/GetUcdnDomainBandwidthV2Response.php create mode 100644 src/UCDN/Apis/GetUcdnDomainConfigRequest.php create mode 100644 src/UCDN/Apis/GetUcdnDomainConfigResponse.php create mode 100644 src/UCDN/Apis/GetUcdnDomainHitRateRequest.php create mode 100644 src/UCDN/Apis/GetUcdnDomainHitRateResponse.php create mode 100644 src/UCDN/Apis/GetUcdnDomainHttpCodeV2Request.php create mode 100644 src/UCDN/Apis/GetUcdnDomainHttpCodeV2Response.php create mode 100644 src/UCDN/Apis/GetUcdnDomainInfoListRequest.php create mode 100644 src/UCDN/Apis/GetUcdnDomainInfoListResponse.php create mode 100644 src/UCDN/Apis/GetUcdnDomainLogRequest.php create mode 100644 src/UCDN/Apis/GetUcdnDomainLogResponse.php create mode 100644 src/UCDN/Apis/GetUcdnDomainOriginHttpCodeDetailRequest.php create mode 100644 src/UCDN/Apis/GetUcdnDomainOriginHttpCodeDetailResponse.php create mode 100644 src/UCDN/Apis/GetUcdnDomainOriginHttpCodeRequest.php create mode 100644 src/UCDN/Apis/GetUcdnDomainOriginHttpCodeResponse.php create mode 100644 src/UCDN/Apis/GetUcdnDomainOriginRequestNumRequest.php create mode 100644 src/UCDN/Apis/GetUcdnDomainOriginRequestNumResponse.php create mode 100644 src/UCDN/Apis/GetUcdnDomainPrefetchEnableRequest.php create mode 100644 src/UCDN/Apis/GetUcdnDomainPrefetchEnableResponse.php create mode 100644 src/UCDN/Apis/GetUcdnDomainRequestNumV2Request.php create mode 100644 src/UCDN/Apis/GetUcdnDomainRequestNumV2Response.php create mode 100644 src/UCDN/Apis/GetUcdnDomainRequestNumV3Request.php create mode 100644 src/UCDN/Apis/GetUcdnDomainRequestNumV3Response.php create mode 100644 src/UCDN/Apis/GetUcdnDomainTrafficRequest.php create mode 100644 src/UCDN/Apis/GetUcdnDomainTrafficResponse.php create mode 100644 src/UCDN/Apis/GetUcdnPassBandwidthRequest.php create mode 100644 src/UCDN/Apis/GetUcdnPassBandwidthResponse.php create mode 100644 src/UCDN/Apis/GetUcdnPassBandwidthV2Request.php create mode 100644 src/UCDN/Apis/GetUcdnPassBandwidthV2Response.php create mode 100644 src/UCDN/Apis/GetUcdnProIspBandwidthV2Request.php create mode 100644 src/UCDN/Apis/GetUcdnProIspBandwidthV2Response.php create mode 100644 src/UCDN/Apis/GetUcdnProIspRequestNumV2Request.php create mode 100644 src/UCDN/Apis/GetUcdnProIspRequestNumV2Response.php create mode 100644 src/UCDN/Apis/GetUcdnTrafficRequest.php create mode 100644 src/UCDN/Apis/GetUcdnTrafficResponse.php create mode 100644 src/UCDN/Apis/GetUcdnTrafficV2Request.php create mode 100644 src/UCDN/Apis/GetUcdnTrafficV2Response.php create mode 100644 src/UCDN/Apis/PrefetchNewUcdnDomainCacheRequest.php create mode 100644 src/UCDN/Apis/PrefetchNewUcdnDomainCacheResponse.php create mode 100644 src/UCDN/Apis/QueryIpLocationRequest.php create mode 100644 src/UCDN/Apis/QueryIpLocationResponse.php create mode 100644 src/UCDN/Apis/RefreshNewUcdnDomainCacheRequest.php create mode 100644 src/UCDN/Apis/RefreshNewUcdnDomainCacheResponse.php create mode 100644 src/UCDN/Apis/SwitchUcdnChargeTypeRequest.php create mode 100644 src/UCDN/Apis/SwitchUcdnChargeTypeResponse.php create mode 100644 src/UCDN/Models/AccessControlConf.php create mode 100644 src/UCDN/Models/AdvancedConf.php create mode 100644 src/UCDN/Models/BandwidthInfo.php create mode 100644 src/UCDN/Models/BandwidthInfoDetail.php create mode 100644 src/UCDN/Models/BandwidthTrafficInfo.php create mode 100644 src/UCDN/Models/CacheAllConfig.php create mode 100644 src/UCDN/Models/CacheConf.php create mode 100644 src/UCDN/Models/CacheKeyInfo.php create mode 100644 src/UCDN/Models/DomainBaseInfo.php create mode 100644 src/UCDN/Models/DomainConfigInfo.php create mode 100644 src/UCDN/Models/HitRateInfo.php create mode 100644 src/UCDN/Models/HitRateInfoV2.php create mode 100644 src/UCDN/Models/HttpCodeInfo.php create mode 100644 src/UCDN/Models/HttpCodeInfoV2.php create mode 100644 src/UCDN/Models/HttpCodeV2Detail.php create mode 100644 src/UCDN/Models/IpLocationInfo.php create mode 100644 src/UCDN/Models/LogSetInfo.php create mode 100644 src/UCDN/Models/LogSetList.php create mode 100644 src/UCDN/Models/OriginConf.php create mode 100644 src/UCDN/Models/ProIspBandwidthList.php create mode 100644 src/UCDN/Models/ProIspBandwidthSet.php create mode 100644 src/UCDN/Models/ProIspRequestListV2.php create mode 100644 src/UCDN/Models/ProIspRequestNumSetV2.php create mode 100644 src/UCDN/Models/ReferConf.php create mode 100644 src/UCDN/Models/RequestInfo.php create mode 100644 src/UCDN/Models/RequestInfoV2.php create mode 100644 src/UCDN/Models/TaskInfo.php create mode 100644 src/UCDN/Models/TrafficSet.php create mode 100644 src/UCDN/Models/UcdnDomainTrafficSet.php create mode 100644 src/UCDN/Models/UrlProgressInfo.php create mode 100644 src/UCDN/UCDNClient.php create mode 100644 src/UDB/Apis/BackupUDBInstanceBinlogRequest.php create mode 100644 src/UDB/Apis/BackupUDBInstanceBinlogResponse.php create mode 100644 src/UDB/Apis/BackupUDBInstanceErrorLogRequest.php create mode 100644 src/UDB/Apis/BackupUDBInstanceErrorLogResponse.php create mode 100644 src/UDB/Apis/BackupUDBInstanceRequest.php create mode 100644 src/UDB/Apis/BackupUDBInstanceResponse.php create mode 100644 src/UDB/Apis/BackupUDBInstanceSlowLogRequest.php create mode 100644 src/UDB/Apis/BackupUDBInstanceSlowLogResponse.php create mode 100644 src/UDB/Apis/ChangeUDBParamGroupRequest.php create mode 100644 src/UDB/Apis/ChangeUDBParamGroupResponse.php create mode 100644 src/UDB/Apis/CheckRecoverUDBInstanceRequest.php create mode 100644 src/UDB/Apis/CheckRecoverUDBInstanceResponse.php create mode 100644 src/UDB/Apis/CheckUDBInstanceToHAAllowanceRequest.php create mode 100644 src/UDB/Apis/CheckUDBInstanceToHAAllowanceResponse.php create mode 100644 src/UDB/Apis/ClearUDBLogRequest.php create mode 100644 src/UDB/Apis/ClearUDBLogResponse.php create mode 100644 src/UDB/Apis/CreateMongoDBReplicaSetRequest.php create mode 100644 src/UDB/Apis/CreateMongoDBReplicaSetResponse.php create mode 100644 src/UDB/Apis/CreateUDBInstanceByRecoveryRequest.php create mode 100644 src/UDB/Apis/CreateUDBInstanceByRecoveryResponse.php create mode 100644 src/UDB/Apis/CreateUDBInstanceRequest.php create mode 100644 src/UDB/Apis/CreateUDBInstanceResponse.php create mode 100644 src/UDB/Apis/CreateUDBParamGroupRequest.php create mode 100644 src/UDB/Apis/CreateUDBParamGroupResponse.php create mode 100644 src/UDB/Apis/CreateUDBReplicationInstanceRequest.php create mode 100644 src/UDB/Apis/CreateUDBReplicationInstanceResponse.php create mode 100644 src/UDB/Apis/CreateUDBRouteInstanceRequest.php create mode 100644 src/UDB/Apis/CreateUDBRouteInstanceResponse.php create mode 100644 src/UDB/Apis/CreateUDBSlaveRequest.php create mode 100644 src/UDB/Apis/CreateUDBSlaveResponse.php create mode 100644 src/UDB/Apis/DeleteUDBInstanceRequest.php create mode 100644 src/UDB/Apis/DeleteUDBInstanceResponse.php create mode 100644 src/UDB/Apis/DeleteUDBLogPackageRequest.php create mode 100644 src/UDB/Apis/DeleteUDBLogPackageResponse.php create mode 100644 src/UDB/Apis/DeleteUDBParamGroupRequest.php create mode 100644 src/UDB/Apis/DeleteUDBParamGroupResponse.php create mode 100644 src/UDB/Apis/DescribeUDBBackupBlacklistRequest.php create mode 100644 src/UDB/Apis/DescribeUDBBackupBlacklistResponse.php create mode 100644 src/UDB/Apis/DescribeUDBBackupRequest.php create mode 100644 src/UDB/Apis/DescribeUDBBackupResponse.php create mode 100644 src/UDB/Apis/DescribeUDBBinlogBackupURLRequest.php create mode 100644 src/UDB/Apis/DescribeUDBBinlogBackupURLResponse.php create mode 100644 src/UDB/Apis/DescribeUDBInstanceBackupStateRequest.php create mode 100644 src/UDB/Apis/DescribeUDBInstanceBackupStateResponse.php create mode 100644 src/UDB/Apis/DescribeUDBInstanceBackupURLRequest.php create mode 100644 src/UDB/Apis/DescribeUDBInstanceBackupURLResponse.php create mode 100644 src/UDB/Apis/DescribeUDBInstanceBinlogBackupStateRequest.php create mode 100644 src/UDB/Apis/DescribeUDBInstanceBinlogBackupStateResponse.php create mode 100644 src/UDB/Apis/DescribeUDBInstanceBinlogRequest.php create mode 100644 src/UDB/Apis/DescribeUDBInstanceBinlogResponse.php create mode 100644 src/UDB/Apis/DescribeUDBInstanceLogRequest.php create mode 100644 src/UDB/Apis/DescribeUDBInstanceLogResponse.php create mode 100644 src/UDB/Apis/DescribeUDBInstancePriceRequest.php create mode 100644 src/UDB/Apis/DescribeUDBInstancePriceResponse.php create mode 100644 src/UDB/Apis/DescribeUDBInstanceRequest.php create mode 100644 src/UDB/Apis/DescribeUDBInstanceResponse.php create mode 100644 src/UDB/Apis/DescribeUDBInstanceStateRequest.php create mode 100644 src/UDB/Apis/DescribeUDBInstanceStateResponse.php create mode 100644 src/UDB/Apis/DescribeUDBInstanceUpgradePriceRequest.php create mode 100644 src/UDB/Apis/DescribeUDBInstanceUpgradePriceResponse.php create mode 100644 src/UDB/Apis/DescribeUDBLogBackupURLRequest.php create mode 100644 src/UDB/Apis/DescribeUDBLogBackupURLResponse.php create mode 100644 src/UDB/Apis/DescribeUDBLogPackageRequest.php create mode 100644 src/UDB/Apis/DescribeUDBLogPackageResponse.php create mode 100644 src/UDB/Apis/DescribeUDBParamGroupRequest.php create mode 100644 src/UDB/Apis/DescribeUDBParamGroupResponse.php create mode 100644 src/UDB/Apis/DescribeUDBSplittingInfoRequest.php create mode 100644 src/UDB/Apis/DescribeUDBSplittingInfoResponse.php create mode 100644 src/UDB/Apis/DescribeUDBTypeRequest.php create mode 100644 src/UDB/Apis/DescribeUDBTypeResponse.php create mode 100644 src/UDB/Apis/DisableUDBRWSplittingRequest.php create mode 100644 src/UDB/Apis/DisableUDBRWSplittingResponse.php create mode 100644 src/UDB/Apis/EditUDBBackupBlacklistRequest.php create mode 100644 src/UDB/Apis/EditUDBBackupBlacklistResponse.php create mode 100644 src/UDB/Apis/EnableUDBRWSplittingRequest.php create mode 100644 src/UDB/Apis/EnableUDBRWSplittingResponse.php create mode 100644 src/UDB/Apis/ExtractUDBParamGroupRequest.php create mode 100644 src/UDB/Apis/ExtractUDBParamGroupResponse.php create mode 100644 src/UDB/Apis/FetchUDBInstanceEarliestRecoverTimeRequest.php create mode 100644 src/UDB/Apis/FetchUDBInstanceEarliestRecoverTimeResponse.php create mode 100644 src/UDB/Apis/ModifyUDBInstanceNameRequest.php create mode 100644 src/UDB/Apis/ModifyUDBInstanceNameResponse.php create mode 100644 src/UDB/Apis/ModifyUDBInstancePasswordRequest.php create mode 100644 src/UDB/Apis/ModifyUDBInstancePasswordResponse.php create mode 100644 src/UDB/Apis/PromoteUDBInstanceToHARequest.php create mode 100644 src/UDB/Apis/PromoteUDBInstanceToHAResponse.php create mode 100644 src/UDB/Apis/PromoteUDBSlaveRequest.php create mode 100644 src/UDB/Apis/PromoteUDBSlaveResponse.php create mode 100644 src/UDB/Apis/ResizeUDBInstanceRequest.php create mode 100644 src/UDB/Apis/ResizeUDBInstanceResponse.php create mode 100644 src/UDB/Apis/RestartRWSplittingRequest.php create mode 100644 src/UDB/Apis/RestartRWSplittingResponse.php create mode 100644 src/UDB/Apis/RestartUDBInstanceRequest.php create mode 100644 src/UDB/Apis/RestartUDBInstanceResponse.php create mode 100644 src/UDB/Apis/SetUDBRWSplittingRequest.php create mode 100644 src/UDB/Apis/SetUDBRWSplittingResponse.php create mode 100644 src/UDB/Apis/StartUDBInstanceRequest.php create mode 100644 src/UDB/Apis/StartUDBInstanceResponse.php create mode 100644 src/UDB/Apis/StopUDBInstanceRequest.php create mode 100644 src/UDB/Apis/StopUDBInstanceResponse.php create mode 100644 src/UDB/Apis/SwitchUDBHAToSentinelRequest.php create mode 100644 src/UDB/Apis/SwitchUDBHAToSentinelResponse.php create mode 100644 src/UDB/Apis/SwitchUDBInstanceToHARequest.php create mode 100644 src/UDB/Apis/SwitchUDBInstanceToHAResponse.php create mode 100644 src/UDB/Apis/UpdateUDBInstanceBackupStrategyRequest.php create mode 100644 src/UDB/Apis/UpdateUDBInstanceBackupStrategyResponse.php create mode 100644 src/UDB/Apis/UpdateUDBInstanceSlaveBackupSwitchRequest.php create mode 100644 src/UDB/Apis/UpdateUDBInstanceSlaveBackupSwitchResponse.php create mode 100644 src/UDB/Apis/UpdateUDBParamGroupRequest.php create mode 100644 src/UDB/Apis/UpdateUDBParamGroupResponse.php create mode 100644 src/UDB/Apis/UploadUDBParamGroupRequest.php create mode 100644 src/UDB/Apis/UploadUDBParamGroupResponse.php create mode 100644 src/UDB/Models/LogPackageDataSet.php create mode 100644 src/UDB/Models/UDBBackupSet.php create mode 100644 src/UDB/Models/UDBInstanceBinlogSet.php create mode 100644 src/UDB/Models/UDBInstancePriceSet.php create mode 100644 src/UDB/Models/UDBInstanceSet.php create mode 100644 src/UDB/Models/UDBParamGroupSet.php create mode 100644 src/UDB/Models/UDBParamMemberSet.php create mode 100644 src/UDB/Models/UDBRWSplittingSet.php create mode 100644 src/UDB/Models/UDBSlaveInstanceSet.php create mode 100644 src/UDB/Models/UDBTypeSet.php create mode 100644 src/UDB/Models/UFileDataSet.php create mode 100644 src/UDB/UDBClient.php create mode 100644 src/UDDB/Apis/ChangeUDDBInstanceNameRequest.php create mode 100644 src/UDDB/Apis/ChangeUDDBInstanceNameResponse.php create mode 100644 src/UDDB/Apis/ChangeUDDBSlaveCountRequest.php create mode 100644 src/UDDB/Apis/ChangeUDDBSlaveCountResponse.php create mode 100644 src/UDDB/Apis/CreateUDDBInstanceRequest.php create mode 100644 src/UDDB/Apis/CreateUDDBInstanceResponse.php create mode 100644 src/UDDB/Apis/DeleteUDDBInstanceRequest.php create mode 100644 src/UDDB/Apis/DeleteUDDBInstanceResponse.php create mode 100644 src/UDDB/Apis/DescribeUDDBInstancePriceRequest.php create mode 100644 src/UDDB/Apis/DescribeUDDBInstancePriceResponse.php create mode 100644 src/UDDB/Apis/DescribeUDDBInstanceRequest.php create mode 100644 src/UDDB/Apis/DescribeUDDBInstanceResponse.php create mode 100644 src/UDDB/Apis/DescribeUDDBInstanceUpgradePriceRequest.php create mode 100644 src/UDDB/Apis/DescribeUDDBInstanceUpgradePriceResponse.php create mode 100644 src/UDDB/Apis/RestartUDDBInstanceRequest.php create mode 100644 src/UDDB/Apis/RestartUDDBInstanceResponse.php create mode 100644 src/UDDB/Apis/StartUDDBInstanceRequest.php create mode 100644 src/UDDB/Apis/StartUDDBInstanceResponse.php create mode 100644 src/UDDB/Apis/StopUDDBInstanceRequest.php create mode 100644 src/UDDB/Apis/StopUDDBInstanceResponse.php create mode 100644 src/UDDB/Apis/UpgradeUDDBDataNodeRequest.php create mode 100644 src/UDDB/Apis/UpgradeUDDBDataNodeResponse.php create mode 100644 src/UDDB/Apis/UpgradeUDDBInstanceRequest.php create mode 100644 src/UDDB/Apis/UpgradeUDDBInstanceResponse.php create mode 100644 src/UDDB/Models/DataNodeInfo.php create mode 100644 src/UDDB/Models/DataSetUDDB.php create mode 100644 src/UDDB/Models/PriceDetailInfo.php create mode 100644 src/UDDB/Models/PriceInfo.php create mode 100644 src/UDDB/Models/SlaveInfo.php create mode 100644 src/UDDB/UDDBClient.php create mode 100644 src/UDPN/Apis/AllocateUDPNRequest.php create mode 100644 src/UDPN/Apis/AllocateUDPNResponse.php create mode 100644 src/UDPN/Apis/DescribeUDPNRequest.php create mode 100644 src/UDPN/Apis/DescribeUDPNResponse.php create mode 100644 src/UDPN/Apis/GetUDPNLineListRequest.php create mode 100644 src/UDPN/Apis/GetUDPNLineListResponse.php create mode 100644 src/UDPN/Apis/GetUDPNPriceRequest.php create mode 100644 src/UDPN/Apis/GetUDPNPriceResponse.php create mode 100644 src/UDPN/Apis/GetUDPNUpgradePriceRequest.php create mode 100644 src/UDPN/Apis/GetUDPNUpgradePriceResponse.php create mode 100644 src/UDPN/Apis/ModifyUDPNBandwidthRequest.php create mode 100644 src/UDPN/Apis/ModifyUDPNBandwidthResponse.php create mode 100644 src/UDPN/Apis/ReleaseUDPNRequest.php create mode 100644 src/UDPN/Apis/ReleaseUDPNResponse.php create mode 100644 src/UDPN/Models/UDPNData.php create mode 100644 src/UDPN/Models/UDPNLineSet.php create mode 100644 src/UDPN/UDPNClient.php create mode 100644 src/UDisk/Apis/AttachUDiskRequest.php create mode 100644 src/UDisk/Apis/AttachUDiskResponse.php create mode 100644 src/UDisk/Apis/CloneUDiskRequest.php create mode 100644 src/UDisk/Apis/CloneUDiskResponse.php create mode 100644 src/UDisk/Apis/CloneUDiskSnapshotRequest.php create mode 100644 src/UDisk/Apis/CloneUDiskSnapshotResponse.php create mode 100644 src/UDisk/Apis/CloneUDiskUDataArkRequest.php create mode 100644 src/UDisk/Apis/CloneUDiskUDataArkResponse.php create mode 100644 src/UDisk/Apis/CreateAttachUDiskRequest.php create mode 100644 src/UDisk/Apis/CreateAttachUDiskResponse.php create mode 100644 src/UDisk/Apis/CreateUDiskRequest.php create mode 100644 src/UDisk/Apis/CreateUDiskResponse.php create mode 100644 src/UDisk/Apis/CreateUDiskSnapshotRequest.php create mode 100644 src/UDisk/Apis/CreateUDiskSnapshotResponse.php create mode 100644 src/UDisk/Apis/DeleteUDiskRequest.php create mode 100644 src/UDisk/Apis/DeleteUDiskResponse.php create mode 100644 src/UDisk/Apis/DeleteUDiskSnapshotRequest.php create mode 100644 src/UDisk/Apis/DeleteUDiskSnapshotResponse.php create mode 100644 src/UDisk/Apis/DescribeRecycleUDiskRequest.php create mode 100644 src/UDisk/Apis/DescribeRecycleUDiskResponse.php create mode 100644 src/UDisk/Apis/DescribeUDiskPriceRequest.php create mode 100644 src/UDisk/Apis/DescribeUDiskPriceResponse.php create mode 100644 src/UDisk/Apis/DescribeUDiskRequest.php create mode 100644 src/UDisk/Apis/DescribeUDiskResponse.php create mode 100644 src/UDisk/Apis/DescribeUDiskSnapshotRequest.php create mode 100644 src/UDisk/Apis/DescribeUDiskSnapshotResponse.php create mode 100644 src/UDisk/Apis/DescribeUDiskUpgradePriceRequest.php create mode 100644 src/UDisk/Apis/DescribeUDiskUpgradePriceResponse.php create mode 100644 src/UDisk/Apis/DetachUDiskRequest.php create mode 100644 src/UDisk/Apis/DetachUDiskResponse.php create mode 100644 src/UDisk/Apis/RecoverUDiskRequest.php create mode 100644 src/UDisk/Apis/RecoverUDiskResponse.php create mode 100644 src/UDisk/Apis/RenameUDiskRequest.php create mode 100644 src/UDisk/Apis/RenameUDiskResponse.php create mode 100644 src/UDisk/Apis/ResizeUDiskRequest.php create mode 100644 src/UDisk/Apis/ResizeUDiskResponse.php create mode 100644 src/UDisk/Apis/RestoreUDiskRequest.php create mode 100644 src/UDisk/Apis/RestoreUDiskResponse.php create mode 100644 src/UDisk/Apis/SetUDiskUDataArkModeRequest.php create mode 100644 src/UDisk/Apis/SetUDiskUDataArkModeResponse.php create mode 100644 src/UDisk/Models/RecycleUDiskSet.php create mode 100644 src/UDisk/Models/UDiskDataSet.php create mode 100644 src/UDisk/Models/UDiskPriceDataSet.php create mode 100644 src/UDisk/Models/UDiskSnapshotSet.php create mode 100644 src/UDisk/UDiskClient.php create mode 100644 src/UEC/Apis/BindUEcFirewallRequest.php create mode 100644 src/UEC/Apis/BindUEcFirewallResponse.php create mode 100644 src/UEC/Apis/CreateUEcFirewallRequest.php create mode 100644 src/UEC/Apis/CreateUEcFirewallResponse.php create mode 100644 src/UEC/Apis/CreateUEcHolderRequest.php create mode 100644 src/UEC/Apis/CreateUEcHolderResponse.php create mode 100644 src/UEC/Apis/CreateUEcSubnetRequest.php create mode 100644 src/UEC/Apis/CreateUEcSubnetResponse.php create mode 100644 src/UEC/Apis/CreateUEcVHostRequest.php create mode 100644 src/UEC/Apis/CreateUEcVHostResponse.php create mode 100644 src/UEC/Apis/DeleteUEcCustomImageRequest.php create mode 100644 src/UEC/Apis/DeleteUEcCustomImageResponse.php create mode 100644 src/UEC/Apis/DeleteUEcHolderRequest.php create mode 100644 src/UEC/Apis/DeleteUEcHolderResponse.php create mode 100644 src/UEC/Apis/DeleteUEcSubnetRequest.php create mode 100644 src/UEC/Apis/DeleteUEcSubnetResponse.php create mode 100644 src/UEC/Apis/DeleteUEcVHostRequest.php create mode 100644 src/UEC/Apis/DeleteUEcVHostResponse.php create mode 100644 src/UEC/Apis/DescribeUEcFirewallRequest.php create mode 100644 src/UEC/Apis/DescribeUEcFirewallResourceRequest.php create mode 100644 src/UEC/Apis/DescribeUEcFirewallResourceResponse.php create mode 100644 src/UEC/Apis/DescribeUEcFirewallResponse.php create mode 100644 src/UEC/Apis/DescribeUEcHolderIDCRequest.php create mode 100644 src/UEC/Apis/DescribeUEcHolderIDCResponse.php create mode 100644 src/UEC/Apis/DescribeUEcHolderRequest.php create mode 100644 src/UEC/Apis/DescribeUEcHolderResponse.php create mode 100644 src/UEC/Apis/DescribeUEcIDCRequest.php create mode 100644 src/UEC/Apis/DescribeUEcIDCResponse.php create mode 100644 src/UEC/Apis/DescribeUEcSubnetRequest.php create mode 100644 src/UEC/Apis/DescribeUEcSubnetResponse.php create mode 100644 src/UEC/Apis/DescribeUEcVHostISPRequest.php create mode 100644 src/UEC/Apis/DescribeUEcVHostISPResponse.php create mode 100644 src/UEC/Apis/DescribeUEcVHostRequest.php create mode 100644 src/UEC/Apis/DescribeUEcVHostResponse.php create mode 100644 src/UEC/Apis/GetUEcHolderLogRequest.php create mode 100644 src/UEC/Apis/GetUEcHolderLogResponse.php create mode 100644 src/UEC/Apis/GetUEcHolderMetricsRequest.php create mode 100644 src/UEC/Apis/GetUEcHolderMetricsResponse.php create mode 100644 src/UEC/Apis/GetUEcIDCCutInfoRequest.php create mode 100644 src/UEC/Apis/GetUEcIDCCutInfoResponse.php create mode 100644 src/UEC/Apis/GetUEcIDCVHostDataRequest.php create mode 100644 src/UEC/Apis/GetUEcIDCVHostDataResponse.php create mode 100644 src/UEC/Apis/GetUEcImageRequest.php create mode 100644 src/UEC/Apis/GetUEcImageResponse.php create mode 100644 src/UEC/Apis/GetUEcPodPriceRequest.php create mode 100644 src/UEC/Apis/GetUEcPodPriceResponse.php create mode 100644 src/UEC/Apis/GetUEcUpgradePriceRequest.php create mode 100644 src/UEC/Apis/GetUEcUpgradePriceResponse.php create mode 100644 src/UEC/Apis/GetUEcVHostDataRequest.php create mode 100644 src/UEC/Apis/GetUEcVHostDataResponse.php create mode 100644 src/UEC/Apis/GetUEcVHostPriceRequest.php create mode 100644 src/UEC/Apis/GetUEcVHostPriceResponse.php create mode 100644 src/UEC/Apis/ImportUEcCustomImageRequest.php create mode 100644 src/UEC/Apis/ImportUEcCustomImageResponse.php create mode 100644 src/UEC/Apis/LoginUEcDockerRequest.php create mode 100644 src/UEC/Apis/LoginUEcDockerResponse.php create mode 100644 src/UEC/Apis/ModifyUEcBandwidthRequest.php create mode 100644 src/UEC/Apis/ModifyUEcBandwidthResponse.php create mode 100644 src/UEC/Apis/ModifyUEcHolderNameRequest.php create mode 100644 src/UEC/Apis/ModifyUEcHolderNameResponse.php create mode 100644 src/UEC/Apis/ModifyUEcImageNameRequest.php create mode 100644 src/UEC/Apis/ModifyUEcImageNameResponse.php create mode 100644 src/UEC/Apis/PoweroffUEcVHostRequest.php create mode 100644 src/UEC/Apis/PoweroffUEcVHostResponse.php create mode 100644 src/UEC/Apis/ReinstallUEcVHostRequest.php create mode 100644 src/UEC/Apis/ReinstallUEcVHostResponse.php create mode 100644 src/UEC/Apis/RestartUEcHolderRequest.php create mode 100644 src/UEC/Apis/RestartUEcHolderResponse.php create mode 100644 src/UEC/Apis/RestartUEcVHostRequest.php create mode 100644 src/UEC/Apis/RestartUEcVHostResponse.php create mode 100644 src/UEC/Apis/StartUEcVHostRequest.php create mode 100644 src/UEC/Apis/StartUEcVHostResponse.php create mode 100644 src/UEC/Apis/StopUEcVHostRequest.php create mode 100644 src/UEC/Apis/StopUEcVHostResponse.php create mode 100644 src/UEC/Apis/UnBindUEcFirewallRequest.php create mode 100644 src/UEC/Apis/UnBindUEcFirewallResponse.php create mode 100644 src/UEC/Apis/UpdateUEcFirewallAttributeRequest.php create mode 100644 src/UEC/Apis/UpdateUEcFirewallAttributeResponse.php create mode 100644 src/UEC/Apis/UpdateUEcFirewallRequest.php create mode 100644 src/UEC/Apis/UpdateUEcFirewallResponse.php create mode 100644 src/UEC/Apis/UpdateUEcSubnetRequest.php create mode 100644 src/UEC/Apis/UpdateUEcSubnetResponse.php create mode 100644 src/UEC/Models/CfgDictList.php create mode 100644 src/UEC/Models/DataSet.php create mode 100644 src/UEC/Models/DeployImageInfo.php create mode 100644 src/UEC/Models/DockerInfo.php create mode 100644 src/UEC/Models/EnvList.php create mode 100644 src/UEC/Models/FirewallInfo.php create mode 100644 src/UEC/Models/HolderList.php create mode 100644 src/UEC/Models/IDCCutInfo.php create mode 100644 src/UEC/Models/IdcInfo.php create mode 100644 src/UEC/Models/ImageInfo.php create mode 100644 src/UEC/Models/ImageList.php create mode 100644 src/UEC/Models/IpList.php create mode 100644 src/UEC/Models/MetricisDataSet.php create mode 100644 src/UEC/Models/MonitorInfo.php create mode 100644 src/UEC/Models/NodeInfo.php create mode 100644 src/UEC/Models/NodeIpList.php create mode 100644 src/UEC/Models/NodeIspList.php create mode 100644 src/UEC/Models/NodeList.php create mode 100644 src/UEC/Models/ResourceInfo.php create mode 100644 src/UEC/Models/ResourceSet.php create mode 100644 src/UEC/Models/RuleInfo.php create mode 100644 src/UEC/Models/StorVolumeInfo.php create mode 100644 src/UEC/Models/SubnetInfo.php create mode 100644 src/UEC/Params/CreateUEcFirewallParamRule.php create mode 100644 src/UEC/Params/CreateUEcHolderParamImage.php create mode 100644 src/UEC/Params/CreateUEcHolderParamPack.php create mode 100644 src/UEC/Params/CreateUEcHolderParamStorage.php create mode 100644 src/UEC/Params/UpdateUEcFirewallParamRule.php create mode 100644 src/UEC/UECClient.php create mode 100644 src/UFS/Apis/CreateUFSVolumeRequest.php create mode 100644 src/UFS/Apis/CreateUFSVolumeResponse.php create mode 100644 src/UFS/Apis/DescribeUFSVolume2Request.php create mode 100644 src/UFS/Apis/DescribeUFSVolume2Response.php create mode 100644 src/UFS/Apis/ExtendUFSVolumeRequest.php create mode 100644 src/UFS/Apis/ExtendUFSVolumeResponse.php create mode 100644 src/UFS/Apis/RemoveUFSVolumeRequest.php create mode 100644 src/UFS/Apis/RemoveUFSVolumeResponse.php create mode 100644 src/UFS/Models/UFSVolumeInfo2.php create mode 100644 src/UFS/UFSClient.php create mode 100644 src/UFile/Apis/CreateBucketRequest.php create mode 100644 src/UFile/Apis/CreateBucketResponse.php create mode 100644 src/UFile/Apis/CreateUFileTokenRequest.php create mode 100644 src/UFile/Apis/CreateUFileTokenResponse.php create mode 100644 src/UFile/Apis/DeleteBucketRequest.php create mode 100644 src/UFile/Apis/DeleteBucketResponse.php create mode 100644 src/UFile/Apis/DeleteUFileTokenRequest.php create mode 100644 src/UFile/Apis/DeleteUFileTokenResponse.php create mode 100644 src/UFile/Apis/DescribeBucketRequest.php create mode 100644 src/UFile/Apis/DescribeBucketResponse.php create mode 100644 src/UFile/Apis/DescribeUFileTokenRequest.php create mode 100644 src/UFile/Apis/DescribeUFileTokenResponse.php create mode 100644 src/UFile/Apis/GetUFileQuotaInfoRequest.php create mode 100644 src/UFile/Apis/GetUFileQuotaInfoResponse.php create mode 100644 src/UFile/Apis/GetUFileQuotaPriceRequest.php create mode 100644 src/UFile/Apis/GetUFileQuotaPriceResponse.php create mode 100644 src/UFile/Apis/GetUFileQuotaRequest.php create mode 100644 src/UFile/Apis/GetUFileQuotaResponse.php create mode 100644 src/UFile/Apis/GetUFileReportRequest.php create mode 100644 src/UFile/Apis/GetUFileReportResponse.php create mode 100644 src/UFile/Apis/SetUFileRefererRequest.php create mode 100644 src/UFile/Apis/SetUFileRefererResponse.php create mode 100644 src/UFile/Apis/UpdateBucketRequest.php create mode 100644 src/UFile/Apis/UpdateBucketResponse.php create mode 100644 src/UFile/Apis/UpdateUFileTokenRequest.php create mode 100644 src/UFile/Apis/UpdateUFileTokenResponse.php create mode 100644 src/UFile/Models/UFileBucketSet.php create mode 100644 src/UFile/Models/UFileDomainSet.php create mode 100644 src/UFile/Models/UFileQuotaDataSetItem.php create mode 100644 src/UFile/Models/UFileQuotaLeft.php create mode 100644 src/UFile/Models/UFileReportSet.php create mode 100644 src/UFile/Models/UFileTokenSet.php create mode 100644 src/UFile/UFileClient.php create mode 100644 src/UHost/Apis/CopyCustomImageRequest.php create mode 100644 src/UHost/Apis/CopyCustomImageResponse.php create mode 100644 src/UHost/Apis/CreateCustomImageRequest.php create mode 100644 src/UHost/Apis/CreateCustomImageResponse.php create mode 100644 src/UHost/Apis/CreateIsolationGroupRequest.php create mode 100644 src/UHost/Apis/CreateIsolationGroupResponse.php create mode 100644 src/UHost/Apis/CreateUHostInstanceRequest.php create mode 100644 src/UHost/Apis/CreateUHostInstanceResponse.php create mode 100644 src/UHost/Apis/CreateUHostKeyPairRequest.php create mode 100644 src/UHost/Apis/CreateUHostKeyPairResponse.php create mode 100644 src/UHost/Apis/DeleteIsolationGroupRequest.php create mode 100644 src/UHost/Apis/DeleteIsolationGroupResponse.php create mode 100644 src/UHost/Apis/DeleteUHostKeyPairsRequest.php create mode 100644 src/UHost/Apis/DeleteUHostKeyPairsResponse.php create mode 100644 src/UHost/Apis/DescribeImageRequest.php create mode 100644 src/UHost/Apis/DescribeImageResponse.php create mode 100644 src/UHost/Apis/DescribeIsolationGroupRequest.php create mode 100644 src/UHost/Apis/DescribeIsolationGroupResponse.php create mode 100644 src/UHost/Apis/DescribeUHostInstanceRequest.php create mode 100644 src/UHost/Apis/DescribeUHostInstanceResponse.php create mode 100644 src/UHost/Apis/DescribeUHostKeyPairsRequest.php create mode 100644 src/UHost/Apis/DescribeUHostKeyPairsResponse.php create mode 100644 src/UHost/Apis/DescribeUHostTagsRequest.php create mode 100644 src/UHost/Apis/DescribeUHostTagsResponse.php create mode 100644 src/UHost/Apis/GetAttachedDiskUpgradePriceRequest.php create mode 100644 src/UHost/Apis/GetAttachedDiskUpgradePriceResponse.php create mode 100644 src/UHost/Apis/GetUHostInstancePriceRequest.php create mode 100644 src/UHost/Apis/GetUHostInstancePriceResponse.php create mode 100644 src/UHost/Apis/GetUHostInstanceVncInfoRequest.php create mode 100644 src/UHost/Apis/GetUHostInstanceVncInfoResponse.php create mode 100644 src/UHost/Apis/GetUHostUpgradePriceRequest.php create mode 100644 src/UHost/Apis/GetUHostUpgradePriceResponse.php create mode 100644 src/UHost/Apis/ImportCustomImageRequest.php create mode 100644 src/UHost/Apis/ImportCustomImageResponse.php create mode 100644 src/UHost/Apis/ImportUHostKeyPairsRequest.php create mode 100644 src/UHost/Apis/ImportUHostKeyPairsResponse.php create mode 100644 src/UHost/Apis/LeaveIsolationGroupRequest.php create mode 100644 src/UHost/Apis/LeaveIsolationGroupResponse.php create mode 100644 src/UHost/Apis/ModifyUHostIPRequest.php create mode 100644 src/UHost/Apis/ModifyUHostIPResponse.php create mode 100644 src/UHost/Apis/ModifyUHostInstanceNameRequest.php create mode 100644 src/UHost/Apis/ModifyUHostInstanceNameResponse.php create mode 100644 src/UHost/Apis/ModifyUHostInstanceRemarkRequest.php create mode 100644 src/UHost/Apis/ModifyUHostInstanceRemarkResponse.php create mode 100644 src/UHost/Apis/ModifyUHostInstanceTagRequest.php create mode 100644 src/UHost/Apis/ModifyUHostInstanceTagResponse.php create mode 100644 src/UHost/Apis/PoweroffUHostInstanceRequest.php create mode 100644 src/UHost/Apis/PoweroffUHostInstanceResponse.php create mode 100644 src/UHost/Apis/RebootUHostInstanceRequest.php create mode 100644 src/UHost/Apis/RebootUHostInstanceResponse.php create mode 100644 src/UHost/Apis/ReinstallUHostInstanceRequest.php create mode 100644 src/UHost/Apis/ReinstallUHostInstanceResponse.php create mode 100644 src/UHost/Apis/ResetUHostInstancePasswordRequest.php create mode 100644 src/UHost/Apis/ResetUHostInstancePasswordResponse.php create mode 100644 src/UHost/Apis/ResizeAttachedDiskRequest.php create mode 100644 src/UHost/Apis/ResizeAttachedDiskResponse.php create mode 100644 src/UHost/Apis/ResizeUHostInstanceRequest.php create mode 100644 src/UHost/Apis/ResizeUHostInstanceResponse.php create mode 100644 src/UHost/Apis/StartUHostInstanceRequest.php create mode 100644 src/UHost/Apis/StartUHostInstanceResponse.php create mode 100644 src/UHost/Apis/StopUHostInstanceRequest.php create mode 100644 src/UHost/Apis/StopUHostInstanceResponse.php create mode 100644 src/UHost/Apis/TerminateCustomImageRequest.php create mode 100644 src/UHost/Apis/TerminateCustomImageResponse.php create mode 100644 src/UHost/Apis/TerminateUHostInstanceRequest.php create mode 100644 src/UHost/Apis/TerminateUHostInstanceResponse.php create mode 100644 src/UHost/Apis/UpgradeToArkUHostInstanceRequest.php create mode 100644 src/UHost/Apis/UpgradeToArkUHostInstanceResponse.php create mode 100644 src/UHost/Models/IsolationGroup.php create mode 100644 src/UHost/Models/KeyPair.php create mode 100644 src/UHost/Models/SpreadInfo.php create mode 100644 src/UHost/Models/UHostDiskSet.php create mode 100644 src/UHost/Models/UHostIPSet.php create mode 100644 src/UHost/Models/UHostImageSet.php create mode 100644 src/UHost/Models/UHostInstanceSet.php create mode 100644 src/UHost/Models/UHostKeyPair.php create mode 100644 src/UHost/Models/UHostPriceSet.php create mode 100644 src/UHost/Models/UHostTagSet.php create mode 100644 src/UHost/Params/CreateUHostInstanceParamDisks.php create mode 100644 src/UHost/Params/CreateUHostInstanceParamNetworkInterface.php create mode 100644 src/UHost/Params/CreateUHostInstanceParamNetworkInterfaceEIP.php create mode 100644 src/UHost/Params/CreateUHostInstanceParamNetworkInterfaceEIPGlobalSSH.php create mode 100644 src/UHost/Params/CreateUHostInstanceParamNetworkInterfaceIPv6.php create mode 100644 src/UHost/Params/CreateUHostInstanceParamVirtualGpu.php create mode 100644 src/UHost/Params/CreateUHostInstanceParamVolumes.php create mode 100644 src/UHost/Params/GetUHostInstancePriceParamDisks.php create mode 100644 src/UHost/Params/GetUHostInstancePriceParamVirtualGpu.php create mode 100644 src/UHost/Params/GetUHostInstancePriceParamVolumes.php create mode 100644 src/UHost/UHostClient.php create mode 100644 src/UK8S/Apis/AddUK8SExistingUHostRequest.php create mode 100644 src/UK8S/Apis/AddUK8SExistingUHostResponse.php create mode 100644 src/UK8S/Apis/AddUK8SPHostNodeRequest.php create mode 100644 src/UK8S/Apis/AddUK8SPHostNodeResponse.php create mode 100644 src/UK8S/Apis/AddUK8SUHostNodeRequest.php create mode 100644 src/UK8S/Apis/AddUK8SUHostNodeResponse.php create mode 100644 src/UK8S/Apis/CreateUK8SClusterV2Request.php create mode 100644 src/UK8S/Apis/CreateUK8SClusterV2Response.php create mode 100644 src/UK8S/Apis/DelUK8SClusterNodeV2Request.php create mode 100644 src/UK8S/Apis/DelUK8SClusterNodeV2Response.php create mode 100644 src/UK8S/Apis/DelUK8SClusterRequest.php create mode 100644 src/UK8S/Apis/DelUK8SClusterResponse.php create mode 100644 src/UK8S/Apis/DescribeUK8SImageRequest.php create mode 100644 src/UK8S/Apis/DescribeUK8SImageResponse.php create mode 100644 src/UK8S/Apis/DescribeUK8SNodeRequest.php create mode 100644 src/UK8S/Apis/DescribeUK8SNodeResponse.php create mode 100644 src/UK8S/Apis/ListUK8SClusterNodeV2Request.php create mode 100644 src/UK8S/Apis/ListUK8SClusterNodeV2Response.php create mode 100644 src/UK8S/Apis/ListUK8SClusterV2Request.php create mode 100644 src/UK8S/Apis/ListUK8SClusterV2Response.php create mode 100644 src/UK8S/Models/ClusterSet.php create mode 100644 src/UK8S/Models/ImageInfo.php create mode 100644 src/UK8S/Models/K8SNodeCondition.php create mode 100644 src/UK8S/Models/KubeProxy.php create mode 100644 src/UK8S/Models/NodeInfoV2.php create mode 100644 src/UK8S/Models/UHostIPSet.php create mode 100644 src/UK8S/Params/CreateUK8SClusterV2ParamKubeProxy.php create mode 100644 src/UK8S/Params/CreateUK8SClusterV2ParamMaster.php create mode 100644 src/UK8S/Params/CreateUK8SClusterV2ParamNodes.php create mode 100644 src/UK8S/UK8SClient.php create mode 100644 src/ULB/Apis/AllocateBackendRequest.php create mode 100644 src/ULB/Apis/AllocateBackendResponse.php create mode 100644 src/ULB/Apis/BindSSLRequest.php create mode 100644 src/ULB/Apis/BindSSLResponse.php create mode 100644 src/ULB/Apis/CreatePolicyRequest.php create mode 100644 src/ULB/Apis/CreatePolicyResponse.php create mode 100644 src/ULB/Apis/CreateSSLRequest.php create mode 100644 src/ULB/Apis/CreateSSLResponse.php create mode 100644 src/ULB/Apis/CreateULBRequest.php create mode 100644 src/ULB/Apis/CreateULBResponse.php create mode 100644 src/ULB/Apis/CreateVServerRequest.php create mode 100644 src/ULB/Apis/CreateVServerResponse.php create mode 100644 src/ULB/Apis/DeletePolicyRequest.php create mode 100644 src/ULB/Apis/DeletePolicyResponse.php create mode 100644 src/ULB/Apis/DeleteSSLRequest.php create mode 100644 src/ULB/Apis/DeleteSSLResponse.php create mode 100644 src/ULB/Apis/DeleteULBRequest.php create mode 100644 src/ULB/Apis/DeleteULBResponse.php create mode 100644 src/ULB/Apis/DeleteVServerRequest.php create mode 100644 src/ULB/Apis/DeleteVServerResponse.php create mode 100644 src/ULB/Apis/DescribeSSLRequest.php create mode 100644 src/ULB/Apis/DescribeSSLResponse.php create mode 100644 src/ULB/Apis/DescribeULBRequest.php create mode 100644 src/ULB/Apis/DescribeULBResponse.php create mode 100644 src/ULB/Apis/DescribeULBSimpleRequest.php create mode 100644 src/ULB/Apis/DescribeULBSimpleResponse.php create mode 100644 src/ULB/Apis/DescribeVServerRequest.php create mode 100644 src/ULB/Apis/DescribeVServerResponse.php create mode 100644 src/ULB/Apis/ReleaseBackendRequest.php create mode 100644 src/ULB/Apis/ReleaseBackendResponse.php create mode 100644 src/ULB/Apis/UnbindSSLRequest.php create mode 100644 src/ULB/Apis/UnbindSSLResponse.php create mode 100644 src/ULB/Apis/UpdateBackendAttributeRequest.php create mode 100644 src/ULB/Apis/UpdateBackendAttributeResponse.php create mode 100644 src/ULB/Apis/UpdatePolicyRequest.php create mode 100644 src/ULB/Apis/UpdatePolicyResponse.php create mode 100644 src/ULB/Apis/UpdateULBAttributeRequest.php create mode 100644 src/ULB/Apis/UpdateULBAttributeResponse.php create mode 100644 src/ULB/Apis/UpdateVServerAttributeRequest.php create mode 100644 src/ULB/Apis/UpdateVServerAttributeResponse.php create mode 100644 src/ULB/Models/FirewallSet.php create mode 100644 src/ULB/Models/LoggerSet.php create mode 100644 src/ULB/Models/PolicyBackendSet.php create mode 100644 src/ULB/Models/SSLBindedTargetSet.php create mode 100644 src/ULB/Models/ULBBackendSet.php create mode 100644 src/ULB/Models/ULBIPSet.php create mode 100644 src/ULB/Models/ULBPolicySet.php create mode 100644 src/ULB/Models/ULBSSLSet.php create mode 100644 src/ULB/Models/ULBSet.php create mode 100644 src/ULB/Models/ULBSimpleSet.php create mode 100644 src/ULB/Models/ULBVServerSet.php create mode 100644 src/ULB/ULBClient.php create mode 100644 src/UMem/Apis/CheckUDredisSpaceAllowanceRequest.php create mode 100644 src/UMem/Apis/CheckUDredisSpaceAllowanceResponse.php create mode 100644 src/UMem/Apis/CheckURedisAllowanceRequest.php create mode 100644 src/UMem/Apis/CheckURedisAllowanceResponse.php create mode 100644 src/UMem/Apis/CreateUMemBackupRequest.php create mode 100644 src/UMem/Apis/CreateUMemBackupResponse.php create mode 100644 src/UMem/Apis/CreateUMemSpaceRequest.php create mode 100644 src/UMem/Apis/CreateUMemSpaceResponse.php create mode 100644 src/UMem/Apis/CreateUMemcacheGroupRequest.php create mode 100644 src/UMem/Apis/CreateUMemcacheGroupResponse.php create mode 100644 src/UMem/Apis/CreateURedisBackupRequest.php create mode 100644 src/UMem/Apis/CreateURedisBackupResponse.php create mode 100644 src/UMem/Apis/CreateURedisGroupRequest.php create mode 100644 src/UMem/Apis/CreateURedisGroupResponse.php create mode 100644 src/UMem/Apis/DeleteUMemSpaceRequest.php create mode 100644 src/UMem/Apis/DeleteUMemSpaceResponse.php create mode 100644 src/UMem/Apis/DeleteUMemcacheGroupRequest.php create mode 100644 src/UMem/Apis/DeleteUMemcacheGroupResponse.php create mode 100644 src/UMem/Apis/DeleteURedisGroupRequest.php create mode 100644 src/UMem/Apis/DeleteURedisGroupResponse.php create mode 100644 src/UMem/Apis/DescribeUDRedisSlowlogRequest.php create mode 100644 src/UMem/Apis/DescribeUDRedisSlowlogResponse.php create mode 100644 src/UMem/Apis/DescribeUMemBackupRequest.php create mode 100644 src/UMem/Apis/DescribeUMemBackupResponse.php create mode 100644 src/UMem/Apis/DescribeUMemBackupURLRequest.php create mode 100644 src/UMem/Apis/DescribeUMemBackupURLResponse.php create mode 100644 src/UMem/Apis/DescribeUMemBlockInfoRequest.php create mode 100644 src/UMem/Apis/DescribeUMemBlockInfoResponse.php create mode 100644 src/UMem/Apis/DescribeUMemPriceRequest.php create mode 100644 src/UMem/Apis/DescribeUMemPriceResponse.php create mode 100644 src/UMem/Apis/DescribeUMemRequest.php create mode 100644 src/UMem/Apis/DescribeUMemResponse.php create mode 100644 src/UMem/Apis/DescribeUMemSpaceRequest.php create mode 100644 src/UMem/Apis/DescribeUMemSpaceResponse.php create mode 100644 src/UMem/Apis/DescribeUMemUpgradePriceRequest.php create mode 100644 src/UMem/Apis/DescribeUMemUpgradePriceResponse.php create mode 100644 src/UMem/Apis/DescribeUMemcacheGroupRequest.php create mode 100644 src/UMem/Apis/DescribeUMemcacheGroupResponse.php create mode 100644 src/UMem/Apis/DescribeUMemcachePriceRequest.php create mode 100644 src/UMem/Apis/DescribeUMemcachePriceResponse.php create mode 100644 src/UMem/Apis/DescribeUMemcacheUpgradePriceRequest.php create mode 100644 src/UMem/Apis/DescribeUMemcacheUpgradePriceResponse.php create mode 100644 src/UMem/Apis/DescribeURedisBackupRequest.php create mode 100644 src/UMem/Apis/DescribeURedisBackupResponse.php create mode 100644 src/UMem/Apis/DescribeURedisBackupURLRequest.php create mode 100644 src/UMem/Apis/DescribeURedisBackupURLResponse.php create mode 100644 src/UMem/Apis/DescribeURedisConfigRequest.php create mode 100644 src/UMem/Apis/DescribeURedisConfigResponse.php create mode 100644 src/UMem/Apis/DescribeURedisGroupRequest.php create mode 100644 src/UMem/Apis/DescribeURedisGroupResponse.php create mode 100644 src/UMem/Apis/DescribeURedisPriceRequest.php create mode 100644 src/UMem/Apis/DescribeURedisPriceResponse.php create mode 100644 src/UMem/Apis/DescribeURedisSlowlogRequest.php create mode 100644 src/UMem/Apis/DescribeURedisSlowlogResponse.php create mode 100644 src/UMem/Apis/DescribeURedisUpgradePriceRequest.php create mode 100644 src/UMem/Apis/DescribeURedisUpgradePriceResponse.php create mode 100644 src/UMem/Apis/DescribeURedisVersionRequest.php create mode 100644 src/UMem/Apis/DescribeURedisVersionResponse.php create mode 100644 src/UMem/Apis/FlushallURedisGroupRequest.php create mode 100644 src/UMem/Apis/FlushallURedisGroupResponse.php create mode 100644 src/UMem/Apis/GetUMemSpaceStateRequest.php create mode 100644 src/UMem/Apis/GetUMemSpaceStateResponse.php create mode 100644 src/UMem/Apis/ISolationURedisGroupRequest.php create mode 100644 src/UMem/Apis/ISolationURedisGroupResponse.php create mode 100644 src/UMem/Apis/ModifyUMemSpaceNameRequest.php create mode 100644 src/UMem/Apis/ModifyUMemSpaceNameResponse.php create mode 100644 src/UMem/Apis/ModifyURedisGroupNameRequest.php create mode 100644 src/UMem/Apis/ModifyURedisGroupNameResponse.php create mode 100644 src/UMem/Apis/ModifyURedisGroupPasswordRequest.php create mode 100644 src/UMem/Apis/ModifyURedisGroupPasswordResponse.php create mode 100644 src/UMem/Apis/RemoveUDRedisDataRequest.php create mode 100644 src/UMem/Apis/RemoveUDRedisDataResponse.php create mode 100644 src/UMem/Apis/ResizeUMemSpaceRequest.php create mode 100644 src/UMem/Apis/ResizeUMemSpaceResponse.php create mode 100644 src/UMem/Apis/ResizeURedisGroupRequest.php create mode 100644 src/UMem/Apis/ResizeURedisGroupResponse.php create mode 100644 src/UMem/Apis/RestartUMemcacheGroupRequest.php create mode 100644 src/UMem/Apis/RestartUMemcacheGroupResponse.php create mode 100644 src/UMem/Apis/RestartURedisGroupRequest.php create mode 100644 src/UMem/Apis/RestartURedisGroupResponse.php create mode 100644 src/UMem/Apis/UpdateURedisBackupStrategyRequest.php create mode 100644 src/UMem/Apis/UpdateURedisBackupStrategyResponse.php create mode 100644 src/UMem/Models/UDRedisSlowlogSet.php create mode 100644 src/UMem/Models/UMemBackupSet.php create mode 100644 src/UMem/Models/UMemBlockInfo.php create mode 100644 src/UMem/Models/UMemDataSet.php create mode 100644 src/UMem/Models/UMemPriceSet.php create mode 100644 src/UMem/Models/UMemSlaveDataSet.php create mode 100644 src/UMem/Models/UMemSpaceAddressSet.php create mode 100644 src/UMem/Models/UMemSpaceSet.php create mode 100644 src/UMem/Models/UMemcacheGroupSet.php create mode 100644 src/UMem/Models/UMemcachePriceSet.php create mode 100644 src/UMem/Models/URedisBackupSet.php create mode 100644 src/UMem/Models/URedisConfigSet.php create mode 100644 src/UMem/Models/URedisGroupSet.php create mode 100644 src/UMem/Models/URedisPriceSet.php create mode 100644 src/UMem/Models/URedisSlowlogSet.php create mode 100644 src/UMem/Models/URedisVersionSet.php create mode 100644 src/UMem/UMemClient.php create mode 100644 src/UNet/Apis/AllocateEIPRequest.php create mode 100644 src/UNet/Apis/AllocateEIPResponse.php create mode 100644 src/UNet/Apis/AllocateShareBandwidthRequest.php create mode 100644 src/UNet/Apis/AllocateShareBandwidthResponse.php create mode 100644 src/UNet/Apis/AssociateEIPWithShareBandwidthRequest.php create mode 100644 src/UNet/Apis/AssociateEIPWithShareBandwidthResponse.php create mode 100644 src/UNet/Apis/BindEIPRequest.php create mode 100644 src/UNet/Apis/BindEIPResponse.php create mode 100644 src/UNet/Apis/CreateBandwidthPackageRequest.php create mode 100644 src/UNet/Apis/CreateBandwidthPackageResponse.php create mode 100644 src/UNet/Apis/CreateFirewallRequest.php create mode 100644 src/UNet/Apis/CreateFirewallResponse.php create mode 100644 src/UNet/Apis/DeleteBandwidthPackageRequest.php create mode 100644 src/UNet/Apis/DeleteBandwidthPackageResponse.php create mode 100644 src/UNet/Apis/DeleteFirewallRequest.php create mode 100644 src/UNet/Apis/DeleteFirewallResponse.php create mode 100644 src/UNet/Apis/DescribeBandwidthPackageRequest.php create mode 100644 src/UNet/Apis/DescribeBandwidthPackageResponse.php create mode 100644 src/UNet/Apis/DescribeBandwidthUsageRequest.php create mode 100644 src/UNet/Apis/DescribeBandwidthUsageResponse.php create mode 100644 src/UNet/Apis/DescribeEIPRequest.php create mode 100644 src/UNet/Apis/DescribeEIPResponse.php create mode 100644 src/UNet/Apis/DescribeFirewallRequest.php create mode 100644 src/UNet/Apis/DescribeFirewallResourceRequest.php create mode 100644 src/UNet/Apis/DescribeFirewallResourceResponse.php create mode 100644 src/UNet/Apis/DescribeFirewallResponse.php create mode 100644 src/UNet/Apis/DescribeShareBandwidthRequest.php create mode 100644 src/UNet/Apis/DescribeShareBandwidthResponse.php create mode 100644 src/UNet/Apis/DisassociateEIPWithShareBandwidthRequest.php create mode 100644 src/UNet/Apis/DisassociateEIPWithShareBandwidthResponse.php create mode 100644 src/UNet/Apis/GetEIPPayModeRequest.php create mode 100644 src/UNet/Apis/GetEIPPayModeResponse.php create mode 100644 src/UNet/Apis/GetEIPPriceRequest.php create mode 100644 src/UNet/Apis/GetEIPPriceResponse.php create mode 100644 src/UNet/Apis/GetEIPUpgradePriceRequest.php create mode 100644 src/UNet/Apis/GetEIPUpgradePriceResponse.php create mode 100644 src/UNet/Apis/GetThroughputDailyBillingInfoRequest.php create mode 100644 src/UNet/Apis/GetThroughputDailyBillingInfoResponse.php create mode 100644 src/UNet/Apis/GrantFirewallRequest.php create mode 100644 src/UNet/Apis/GrantFirewallResponse.php create mode 100644 src/UNet/Apis/ModifyEIPBandwidthRequest.php create mode 100644 src/UNet/Apis/ModifyEIPBandwidthResponse.php create mode 100644 src/UNet/Apis/ModifyEIPWeightRequest.php create mode 100644 src/UNet/Apis/ModifyEIPWeightResponse.php create mode 100644 src/UNet/Apis/ReleaseEIPRequest.php create mode 100644 src/UNet/Apis/ReleaseEIPResponse.php create mode 100644 src/UNet/Apis/ReleaseShareBandwidthRequest.php create mode 100644 src/UNet/Apis/ReleaseShareBandwidthResponse.php create mode 100644 src/UNet/Apis/ResizeShareBandwidthRequest.php create mode 100644 src/UNet/Apis/ResizeShareBandwidthResponse.php create mode 100644 src/UNet/Apis/SetEIPPayModeRequest.php create mode 100644 src/UNet/Apis/SetEIPPayModeResponse.php create mode 100644 src/UNet/Apis/UnBindEIPRequest.php create mode 100644 src/UNet/Apis/UnBindEIPResponse.php create mode 100644 src/UNet/Apis/UpdateEIPAttributeRequest.php create mode 100644 src/UNet/Apis/UpdateEIPAttributeResponse.php create mode 100644 src/UNet/Apis/UpdateFirewallAttributeRequest.php create mode 100644 src/UNet/Apis/UpdateFirewallAttributeResponse.php create mode 100644 src/UNet/Apis/UpdateFirewallRequest.php create mode 100644 src/UNet/Apis/UpdateFirewallResponse.php create mode 100644 src/UNet/Models/EIPAddrSet.php create mode 100644 src/UNet/Models/EIPPayModeSet.php create mode 100644 src/UNet/Models/EIPPriceDetailSet.php create mode 100644 src/UNet/Models/EIPSetData.php create mode 100644 src/UNet/Models/FirewallDataSet.php create mode 100644 src/UNet/Models/FirewallRuleSet.php create mode 100644 src/UNet/Models/ResourceSet.php create mode 100644 src/UNet/Models/ShareBandwidthSet.php create mode 100644 src/UNet/Models/ThroughputDailyBillingInfo.php create mode 100644 src/UNet/Models/UnetAllocateEIPSet.php create mode 100644 src/UNet/Models/UnetBandwidthPackageSet.php create mode 100644 src/UNet/Models/UnetBandwidthUsageEIPSet.php create mode 100644 src/UNet/Models/UnetEIPAddrSet.php create mode 100644 src/UNet/Models/UnetEIPResourceSet.php create mode 100644 src/UNet/Models/UnetEIPSet.php create mode 100644 src/UNet/Models/UnetShareBandwidthSet.php create mode 100644 src/UNet/UNetClient.php create mode 100644 src/UPHost/Apis/CreatePHostRequest.php create mode 100644 src/UPHost/Apis/CreatePHostResponse.php create mode 100644 src/UPHost/Apis/DescribeBaremetalMachineTypeRequest.php create mode 100644 src/UPHost/Apis/DescribeBaremetalMachineTypeResponse.php create mode 100644 src/UPHost/Apis/DescribePHostImageRequest.php create mode 100644 src/UPHost/Apis/DescribePHostImageResponse.php create mode 100644 src/UPHost/Apis/DescribePHostMachineTypeRequest.php create mode 100644 src/UPHost/Apis/DescribePHostMachineTypeResponse.php create mode 100644 src/UPHost/Apis/DescribePHostRequest.php create mode 100644 src/UPHost/Apis/DescribePHostResponse.php create mode 100644 src/UPHost/Apis/DescribePHostTagsRequest.php create mode 100644 src/UPHost/Apis/DescribePHostTagsResponse.php create mode 100644 src/UPHost/Apis/GetPHostDiskUpgradePriceRequest.php create mode 100644 src/UPHost/Apis/GetPHostDiskUpgradePriceResponse.php create mode 100644 src/UPHost/Apis/GetPHostPriceRequest.php create mode 100644 src/UPHost/Apis/GetPHostPriceResponse.php create mode 100644 src/UPHost/Apis/ModifyPHostInfoRequest.php create mode 100644 src/UPHost/Apis/ModifyPHostInfoResponse.php create mode 100644 src/UPHost/Apis/PoweroffPHostRequest.php create mode 100644 src/UPHost/Apis/PoweroffPHostResponse.php create mode 100644 src/UPHost/Apis/RebootPHostRequest.php create mode 100644 src/UPHost/Apis/RebootPHostResponse.php create mode 100644 src/UPHost/Apis/ReinstallPHostRequest.php create mode 100644 src/UPHost/Apis/ReinstallPHostResponse.php create mode 100644 src/UPHost/Apis/ResetPHostPasswordRequest.php create mode 100644 src/UPHost/Apis/ResetPHostPasswordResponse.php create mode 100644 src/UPHost/Apis/ResizePHostAttachedDiskRequest.php create mode 100644 src/UPHost/Apis/ResizePHostAttachedDiskResponse.php create mode 100644 src/UPHost/Apis/StartPHostRequest.php create mode 100644 src/UPHost/Apis/StartPHostResponse.php create mode 100644 src/UPHost/Apis/TerminatePHostRequest.php create mode 100644 src/UPHost/Apis/TerminatePHostResponse.php create mode 100644 src/UPHost/Models/PHostCPUSet.php create mode 100644 src/UPHost/Models/PHostCloudMachineTypeSet.php create mode 100644 src/UPHost/Models/PHostClusterSet.php create mode 100644 src/UPHost/Models/PHostComponentSet.php create mode 100644 src/UPHost/Models/PHostDescDiskSet.php create mode 100644 src/UPHost/Models/PHostDiskSet.php create mode 100644 src/UPHost/Models/PHostIPSet.php create mode 100644 src/UPHost/Models/PHostImageSet.php create mode 100644 src/UPHost/Models/PHostMachineTypeSet.php create mode 100644 src/UPHost/Models/PHostPriceSet.php create mode 100644 src/UPHost/Models/PHostSet.php create mode 100644 src/UPHost/Models/PHostTagSet.php create mode 100644 src/UPHost/Params/CreatePHostParamDisks.php create mode 100644 src/UPHost/Params/GetPHostPriceParamDisks.php create mode 100644 src/UPHost/UPHostClient.php create mode 100644 src/USMS/Apis/CreateUSMSSignatureRequest.php create mode 100644 src/USMS/Apis/CreateUSMSSignatureResponse.php create mode 100644 src/USMS/Apis/CreateUSMSTemplateRequest.php create mode 100644 src/USMS/Apis/CreateUSMSTemplateResponse.php create mode 100644 src/USMS/Apis/DeleteUSMSSignatureRequest.php create mode 100644 src/USMS/Apis/DeleteUSMSSignatureResponse.php create mode 100644 src/USMS/Apis/DeleteUSMSTemplateRequest.php create mode 100644 src/USMS/Apis/DeleteUSMSTemplateResponse.php create mode 100644 src/USMS/Apis/GetUSMSSendReceiptRequest.php create mode 100644 src/USMS/Apis/GetUSMSSendReceiptResponse.php create mode 100644 src/USMS/Apis/QueryUSMSSignatureRequest.php create mode 100644 src/USMS/Apis/QueryUSMSSignatureResponse.php create mode 100644 src/USMS/Apis/QueryUSMSTemplateRequest.php create mode 100644 src/USMS/Apis/QueryUSMSTemplateResponse.php create mode 100644 src/USMS/Apis/SendBatchUSMSMessageRequest.php create mode 100644 src/USMS/Apis/SendBatchUSMSMessageResponse.php create mode 100644 src/USMS/Apis/SendUSMSMessageRequest.php create mode 100644 src/USMS/Apis/SendUSMSMessageResponse.php create mode 100644 src/USMS/Apis/UpdateUSMSSignatureRequest.php create mode 100644 src/USMS/Apis/UpdateUSMSSignatureResponse.php create mode 100644 src/USMS/Apis/UpdateUSMSTemplateRequest.php create mode 100644 src/USMS/Apis/UpdateUSMSTemplateResponse.php create mode 100644 src/USMS/Models/BatchInfo.php create mode 100644 src/USMS/Models/FailPhoneDetail.php create mode 100644 src/USMS/Models/OutSignature.php create mode 100644 src/USMS/Models/OutTemplate.php create mode 100644 src/USMS/Models/ReceiptPerPhone.php create mode 100644 src/USMS/Models/ReceiptPerSession.php create mode 100644 src/USMS/USMSClient.php create mode 100644 src/VPC/Apis/AddSnatRuleRequest.php create mode 100644 src/VPC/Apis/AddSnatRuleResponse.php create mode 100644 src/VPC/Apis/AddVPCNetworkRequest.php create mode 100644 src/VPC/Apis/AddVPCNetworkResponse.php create mode 100644 src/VPC/Apis/AddWhiteListResourceRequest.php create mode 100644 src/VPC/Apis/AddWhiteListResourceResponse.php create mode 100644 src/VPC/Apis/AllocateSecondaryIpRequest.php create mode 100644 src/VPC/Apis/AllocateSecondaryIpResponse.php create mode 100644 src/VPC/Apis/AllocateVIPRequest.php create mode 100644 src/VPC/Apis/AllocateVIPResponse.php create mode 100644 src/VPC/Apis/AssociateRouteTableRequest.php create mode 100644 src/VPC/Apis/AssociateRouteTableResponse.php create mode 100644 src/VPC/Apis/CloneRouteTableRequest.php create mode 100644 src/VPC/Apis/CloneRouteTableResponse.php create mode 100644 src/VPC/Apis/CreateNATGWPolicyRequest.php create mode 100644 src/VPC/Apis/CreateNATGWPolicyResponse.php create mode 100644 src/VPC/Apis/CreateNATGWRequest.php create mode 100644 src/VPC/Apis/CreateNATGWResponse.php create mode 100644 src/VPC/Apis/CreateNetworkAclAssociationRequest.php create mode 100644 src/VPC/Apis/CreateNetworkAclAssociationResponse.php create mode 100644 src/VPC/Apis/CreateNetworkAclEntryRequest.php create mode 100644 src/VPC/Apis/CreateNetworkAclEntryResponse.php create mode 100644 src/VPC/Apis/CreateNetworkAclRequest.php create mode 100644 src/VPC/Apis/CreateNetworkAclResponse.php create mode 100644 src/VPC/Apis/CreateRouteTableRequest.php create mode 100644 src/VPC/Apis/CreateRouteTableResponse.php create mode 100644 src/VPC/Apis/CreateSubnetRequest.php create mode 100644 src/VPC/Apis/CreateSubnetResponse.php create mode 100644 src/VPC/Apis/CreateVPCIntercomRequest.php create mode 100644 src/VPC/Apis/CreateVPCIntercomResponse.php create mode 100644 src/VPC/Apis/CreateVPCRequest.php create mode 100644 src/VPC/Apis/CreateVPCResponse.php create mode 100644 src/VPC/Apis/DeleteNATGWPolicyRequest.php create mode 100644 src/VPC/Apis/DeleteNATGWPolicyResponse.php create mode 100644 src/VPC/Apis/DeleteNATGWRequest.php create mode 100644 src/VPC/Apis/DeleteNATGWResponse.php create mode 100644 src/VPC/Apis/DeleteNetworkAclAssociationRequest.php create mode 100644 src/VPC/Apis/DeleteNetworkAclAssociationResponse.php create mode 100644 src/VPC/Apis/DeleteNetworkAclEntryRequest.php create mode 100644 src/VPC/Apis/DeleteNetworkAclEntryResponse.php create mode 100644 src/VPC/Apis/DeleteNetworkAclRequest.php create mode 100644 src/VPC/Apis/DeleteNetworkAclResponse.php create mode 100644 src/VPC/Apis/DeleteRouteTableRequest.php create mode 100644 src/VPC/Apis/DeleteRouteTableResponse.php create mode 100644 src/VPC/Apis/DeleteSecondaryIpRequest.php create mode 100644 src/VPC/Apis/DeleteSecondaryIpResponse.php create mode 100644 src/VPC/Apis/DeleteSnatRuleRequest.php create mode 100644 src/VPC/Apis/DeleteSnatRuleResponse.php create mode 100644 src/VPC/Apis/DeleteSubnetRequest.php create mode 100644 src/VPC/Apis/DeleteSubnetResponse.php create mode 100644 src/VPC/Apis/DeleteVPCIntercomRequest.php create mode 100644 src/VPC/Apis/DeleteVPCIntercomResponse.php create mode 100644 src/VPC/Apis/DeleteVPCRequest.php create mode 100644 src/VPC/Apis/DeleteVPCResponse.php create mode 100644 src/VPC/Apis/DeleteWhiteListResourceRequest.php create mode 100644 src/VPC/Apis/DeleteWhiteListResourceResponse.php create mode 100644 src/VPC/Apis/DescribeNATGWPolicyRequest.php create mode 100644 src/VPC/Apis/DescribeNATGWPolicyResponse.php create mode 100644 src/VPC/Apis/DescribeNATGWRequest.php create mode 100644 src/VPC/Apis/DescribeNATGWResponse.php create mode 100644 src/VPC/Apis/DescribeNetworkAclAssociationBySubnetRequest.php create mode 100644 src/VPC/Apis/DescribeNetworkAclAssociationBySubnetResponse.php create mode 100644 src/VPC/Apis/DescribeNetworkAclAssociationRequest.php create mode 100644 src/VPC/Apis/DescribeNetworkAclAssociationResponse.php create mode 100644 src/VPC/Apis/DescribeNetworkAclEntryRequest.php create mode 100644 src/VPC/Apis/DescribeNetworkAclEntryResponse.php create mode 100644 src/VPC/Apis/DescribeNetworkAclRequest.php create mode 100644 src/VPC/Apis/DescribeNetworkAclResponse.php create mode 100644 src/VPC/Apis/DescribeRouteTableRequest.php create mode 100644 src/VPC/Apis/DescribeRouteTableResponse.php create mode 100644 src/VPC/Apis/DescribeSecondaryIpRequest.php create mode 100644 src/VPC/Apis/DescribeSecondaryIpResponse.php create mode 100644 src/VPC/Apis/DescribeSnatRuleRequest.php create mode 100644 src/VPC/Apis/DescribeSnatRuleResponse.php create mode 100644 src/VPC/Apis/DescribeSubnetRequest.php create mode 100644 src/VPC/Apis/DescribeSubnetResourceRequest.php create mode 100644 src/VPC/Apis/DescribeSubnetResourceResponse.php create mode 100644 src/VPC/Apis/DescribeSubnetResponse.php create mode 100644 src/VPC/Apis/DescribeVIPRequest.php create mode 100644 src/VPC/Apis/DescribeVIPResponse.php create mode 100644 src/VPC/Apis/DescribeVPCIntercomRequest.php create mode 100644 src/VPC/Apis/DescribeVPCIntercomResponse.php create mode 100644 src/VPC/Apis/DescribeVPCRequest.php create mode 100644 src/VPC/Apis/DescribeVPCResponse.php create mode 100644 src/VPC/Apis/DescribeWhiteListResourceRequest.php create mode 100644 src/VPC/Apis/DescribeWhiteListResourceResponse.php create mode 100644 src/VPC/Apis/EnableWhiteListRequest.php create mode 100644 src/VPC/Apis/EnableWhiteListResponse.php create mode 100644 src/VPC/Apis/GetAvailableResourceForPolicyRequest.php create mode 100644 src/VPC/Apis/GetAvailableResourceForPolicyResponse.php create mode 100644 src/VPC/Apis/GetAvailableResourceForSnatRuleRequest.php create mode 100644 src/VPC/Apis/GetAvailableResourceForSnatRuleResponse.php create mode 100644 src/VPC/Apis/GetAvailableResourceForWhiteListRequest.php create mode 100644 src/VPC/Apis/GetAvailableResourceForWhiteListResponse.php create mode 100644 src/VPC/Apis/GetNetworkAclTargetResourceRequest.php create mode 100644 src/VPC/Apis/GetNetworkAclTargetResourceResponse.php create mode 100644 src/VPC/Apis/ListSubnetForNATGWRequest.php create mode 100644 src/VPC/Apis/ListSubnetForNATGWResponse.php create mode 100644 src/VPC/Apis/ModifyRouteRuleRequest.php create mode 100644 src/VPC/Apis/ModifyRouteRuleResponse.php create mode 100644 src/VPC/Apis/MoveSecondaryIPMacRequest.php create mode 100644 src/VPC/Apis/MoveSecondaryIPMacResponse.php create mode 100644 src/VPC/Apis/ReleaseVIPRequest.php create mode 100644 src/VPC/Apis/ReleaseVIPResponse.php create mode 100644 src/VPC/Apis/SetGwDefaultExportRequest.php create mode 100644 src/VPC/Apis/SetGwDefaultExportResponse.php create mode 100644 src/VPC/Apis/UpdateNATGWPolicyRequest.php create mode 100644 src/VPC/Apis/UpdateNATGWPolicyResponse.php create mode 100644 src/VPC/Apis/UpdateNATGWSubnetRequest.php create mode 100644 src/VPC/Apis/UpdateNATGWSubnetResponse.php create mode 100644 src/VPC/Apis/UpdateNetworkAclEntryRequest.php create mode 100644 src/VPC/Apis/UpdateNetworkAclEntryResponse.php create mode 100644 src/VPC/Apis/UpdateNetworkAclRequest.php create mode 100644 src/VPC/Apis/UpdateNetworkAclResponse.php create mode 100644 src/VPC/Apis/UpdateRouteTableAttributeRequest.php create mode 100644 src/VPC/Apis/UpdateRouteTableAttributeResponse.php create mode 100644 src/VPC/Apis/UpdateSnatRuleRequest.php create mode 100644 src/VPC/Apis/UpdateSnatRuleResponse.php create mode 100644 src/VPC/Apis/UpdateSubnetAttributeRequest.php create mode 100644 src/VPC/Apis/UpdateSubnetAttributeResponse.php create mode 100644 src/VPC/Apis/UpdateVIPAttributeRequest.php create mode 100644 src/VPC/Apis/UpdateVIPAttributeResponse.php create mode 100644 src/VPC/Apis/UpdateVPCNetworkRequest.php create mode 100644 src/VPC/Apis/UpdateVPCNetworkResponse.php create mode 100644 src/VPC/Models/AclEntryInfo.php create mode 100644 src/VPC/Models/AclInfo.php create mode 100644 src/VPC/Models/AssociationInfo.php create mode 100644 src/VPC/Models/DescribeWhiteListResourceObjectIPInfo.php create mode 100644 src/VPC/Models/GetAvailableResourceForPolicyDataSet.php create mode 100644 src/VPC/Models/GetAvailableResourceForSnatRuleDataSet.php create mode 100644 src/VPC/Models/GetAvailableResourceForWhiteListDataSet.php create mode 100644 src/VPC/Models/IpInfo.php create mode 100644 src/VPC/Models/NATGWPolicyDataSet.php create mode 100644 src/VPC/Models/NATGWSnatRule.php create mode 100644 src/VPC/Models/NatGWIPResInfo.php create mode 100644 src/VPC/Models/NatGWWhitelistDataSet.php create mode 100644 src/VPC/Models/NatGatewayDataSet.php create mode 100644 src/VPC/Models/NatGatewayIPSet.php create mode 100644 src/VPC/Models/NatGatewaySubnetSet.php create mode 100644 src/VPC/Models/NatgwSubnetDataSet.php create mode 100644 src/VPC/Models/RouteRuleInfo.php create mode 100644 src/VPC/Models/RouteTableInfo.php create mode 100644 src/VPC/Models/SubnetInfo.php create mode 100644 src/VPC/Models/SubnetResource.php create mode 100644 src/VPC/Models/TargetResourceInfo.php create mode 100644 src/VPC/Models/VIPDetailSet.php create mode 100644 src/VPC/Models/VIPSet.php create mode 100644 src/VPC/Models/VPCInfo.php create mode 100644 src/VPC/Models/VPCIntercomInfo.php create mode 100644 src/VPC/Models/VPCNetworkInfo.php create mode 100644 src/VPC/VPCClient.php create mode 100644 tests/ClientTest.php create mode 100644 tests/CredentialTest.php create mode 100644 tests/ObjectTest.php diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..e9d9d405 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +/examples export-ignore diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml new file mode 100644 index 00000000..cd7b5460 --- /dev/null +++ b/.github/workflows/php.yml @@ -0,0 +1,32 @@ +name: build + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + + - name: Validate composer.json and composer.lock + run: composer validate + + - name: Install dependencies + run: composer install --prefer-dist --no-progress --no-suggest + + - name: Run code sniffer + run: vendor/bin/phpcs + + - name: Run test suite + run: vendor/bin/phpunit --coverage-clover=coverage.xml + env: + XDEBUG_MODE: coverage + UCLOUD_PUBLIC_KEY: foo + UCLOUD_PRIVATE_KEY: bar + UCLOUD_PROJECT_ID: oas + + - uses: codecov/codecov-action@v1 + with: + file: ./coverage.xml diff --git a/.gitignore b/.gitignore index 4f4773fb..28d0baa4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,11 @@ -config.php +*.lock +package.xml +/vendor +.idea +.php_cs.cache +docs/_build +/.vagrant +*.phar +.phpunit* +build/ +coverage.xml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..78851e22 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,12 @@ +image: hub.ucloudadmin.com/esl_ipdd/composer:latest + +test: + script: + - composer install + - make test-cov + - make lint + tags: + - uaek-c1 + artifacts: + paths: + - build/ diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/LICENSE @@ -0,0 +1,202 @@ + + 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/Makefile b/Makefile new file mode 100644 index 00000000..591a90d2 --- /dev/null +++ b/Makefile @@ -0,0 +1,48 @@ +install: + composer install + +lint: + php vendor/bin/phpcs -n + +fmt: + php vendor/bin/phpcbf + +build: + composer dump-autoload + +test: + php vendor/bin/phpunit tests/* + +test-cov: + UCLOUD_PUBLIC_KEY=foo UCLOUD_PRIVATE_KEY=bar UCLOUD_PROJECT_ID=oas \ + XDEBUG_MODE=coverage php vendor/bin/phpunit --testsuite=unit --coverage-html=build/coverage + +cov-show: + open build/coverage/index.html + +gen: + ucloud-spec create opensdk \ + --only "UFS" \ + --only "UDisk" \ + --only "UHost" \ + --only "PathX" \ + --only "UDDB" \ + --only "UCDN" \ + --only "UNet" \ + --only "VPC2.0" \ + --only "UDB" \ + --only "UMem" \ + --only "ULB" \ + --only "Cube" \ + --only "UK8S" \ + --only "IPSecVPN" \ + --only "UAccount" \ + --only "UDPN" \ + --only "UBill" \ + --only "UPHost" \ + --only "UFile" \ + --only "USMS" \ + --only "UEC" \ + --public \ + -s https://git.ucloudadmin.com/apispec/apispec.git \ + /Users/user/code/oas/plugins/template-opensdk-php . diff --git a/README b/README deleted file mode 100644 index b95d6582..00000000 --- a/README +++ /dev/null @@ -1,22 +0,0 @@ -#监控脚本使用 ucloud 提供短信包服务请先购买短信包否则无法接收短信 - -1. sendsms.php 短信发送脚本 - - -#使用方法 - -打开 cp config.simple.php config.php 修改以下配置 - - -#配置公私钥 公私钥请到用户中心获取 - -define("PUBLIC_KEY" ,"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); -define("PRIVATE_KEY" ,"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); -define("PROJECT_ID" ,"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); # 项目ID 请从 dashbord 获取 - -#配置api地址''' -define("BASE_URL" ,"http://api.ucloud.cn"); - - -sendsms.php 使用示范 -php sendsms.php '137xxxxxxx|138xxxxxxxx' '测试短信' diff --git a/README.md b/README.md new file mode 100644 index 00000000..e8b1b43b --- /dev/null +++ b/README.md @@ -0,0 +1,23 @@ +# UCloud SDK PHP + +[![Build Status](https://github.com/ucloud/ucloud-sdk-php/workflows/build/badge.svg)](https://github.com/ucloud/ucloud-sdk-php/actions) +[![CodeCov](https://codecov.io/gh/ucloud/ucloud-sdk-php/branch/master/graph/badge.svg)](https://codecov.io/gh/ucloud/ucloud-sdk-php) +[![Release](https://img.shields.io/github/release/ucloud/ucloud-sdk-php.svg)](https://github.com/ucloud/ucloud-sdk-php/releases) +[![PHPv](https://img.shields.io/packagist/php-v/ucloud/ucloud.svg)](http://www.php.net) +[![Downloads](https://img.shields.io/packagist/dt/ucloud/ucloud.svg)](https://packagist.org/packages/ucloud/ucloud) + +## Chinese Guide + +* [快速开始](docs/quickstart.md) +* [通用配置](docs/configure.md) +* [错误处理](docs/error.md) +* [类型系统](docs/typesystem.md) +* [请求中间件](docs/middleware.md) +* [泛化调用](docs/generic.md) + +旧版请移步 [backup](https://github.com/ucloud/ucloud-sdk-php/tree/backup) 分支。 + +## Examples + +- [批量创建云主机](examples/uhost) +- [创建基于负载均衡器的两层架构](examples/two-tier) diff --git a/composer.json b/composer.json new file mode 100644 index 00000000..e8eb1e00 --- /dev/null +++ b/composer.json @@ -0,0 +1,43 @@ +{ + "name": "ucloud/ucloud-sdk-php", + "type": "library", + "description": "UCloud", + "keywords": ["php", "ucloud"], + "homepage": "https://github.com/ucloud/ucloud-sdk-php", + "license": "MIT", + "authors": [ + { + "name": "ucloud", + "email": "yufei.li@ucloud.cn" + } + ], + "require": { + "php": ">=5.5", + "guzzlehttp/guzzle": "^6.2.1|^7.0", + "psr/log": "^1.1" + }, + "require-dev": { + "phpunit/phpunit": "^9.0", + "squizlabs/php_codesniffer": "^3.0" + }, + "autoload": { + "psr-4" : { + "UCloud\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { "UCloud\\Tests\\": "tests/" } + }, + "config": { + "preferred-install": "dist", + "sort-packages": true + }, + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "scripts": { + "test": "vendor/bin/phpunit" + } +} diff --git a/config.simple.php b/config.simple.php deleted file mode 100644 index b3acf248..00000000 --- a/config.simple.php +++ /dev/null @@ -1,8 +0,0 @@ - “PHP/8.0.6 PHP-SDK/0.1.0 MyAPP/0.10.1” | +| **timeout** | int | (选填)请求超时时间,默认 30s | +| **maxRetries** | int | (选填)最大重试次数. 默认重试 3 次。设置该值大于 0 将对网络和服务可用性问题进行自动重试,使用指数退避的重试间隔,并自动跳过资源创建类的接口。 | +| **logger** | LoggerInterface | (选填)自定义 Logger,可参考 [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) Logger Interface 的定义 | + +## 进阶配置选项 + +### 修改默认日志 + +关闭日志: + +```php +use UCloud\Core\Client; +use UCloud\Core\Logger\DisabledLogger; + +$client = new Client([ + // ... + "logger" => new DisabledLogger(), +]); +``` + +### 访问专有云/渠道云或其它网关 + +```php +use UCloud\Core\Client; + +$client = new Client([ + // ... + "region" => "专有云地域", // 替换成专有地域 + "base_url" => "foo.api.ucloud.cn", // 替换成专有云网关 +]); +``` diff --git a/docs/error.md b/docs/error.md new file mode 100644 index 00000000..866b3073 --- /dev/null +++ b/docs/error.md @@ -0,0 +1,30 @@ + + +# 错误处理 + +了解如何处理不同类型的 SDK 异常,包括参数错误,RetCode 不为 0 的业务异常等。 + +```php +use UCloud\UHost\Apis\DescribeImageRequest; +use UCloud\UHost\UHostClient; +use UCloud\Core\Exception\UCloudException; + +$client = new UHostClient([ + "publicKey" => getenv("UCLOUD_PUBLIC_KEY"), + "privateKey" => getenv("UCLOUD_PRIVATE_KEY"), + "projectId" => getenv("UCLOUD_PROJECT_ID"), + "region" => "cn-bj2", +]); + +try { + $req = new DescribeImageRequest(); + $req->setZone("cn-bj2-05"); + $resp = $client->describeImage($req); +} catch (UCloudException $e) { + if ($e->getType() == UCloudException::EXC_TYPE_RET_CODE) { + echo $e->getCode(); + echo $e->getRequestId(); + } + echo $e->getMessage(); +} +``` diff --git a/docs/generic.md b/docs/generic.md new file mode 100644 index 00000000..411879d3 --- /dev/null +++ b/docs/generic.md @@ -0,0 +1,35 @@ +# 泛化调用 + +如何调用 SDK 尚未支持的 API ?可以使用泛化调用方式。 + +**NOTE** 如果没有必须使用的理由,不建议使用泛化方式调用 API,因为无法享受 OpenAPI 提供的兼容性保证。 + +## 调用方式 + +```php +use UCloud\Core\Client; +use UCloud\Core\Exception\UCloudException; +use UCloud\Core\Request\Request; + +$client = new Client([ + "publicKey" => getenv("UCLOUD_PUBLIC_KEY"), + "privateKey" => getenv("UCLOUD_PRIVATE_KEY"), + "projectId" => getenv("UCLOUD_PROJECT_ID"), + "region" => "cn-bj2", +]); + +try { + $client->invoke(new Request([ + "Action" => "GetImage", + "Zone" => "cn-bj2-05", + "ImageType" => "Base", + "OsType" => "Linux", + ])); +} catch (UCloudException $e) { + if ($e->getType() == UCloudException::EXC_TYPE_RET_CODE) { + echo $e->getCode(); + echo $e->getRequestId(); + } + echo $e->getMessage(); +} +``` diff --git a/docs/middleware.md b/docs/middleware.md new file mode 100644 index 00000000..d3499037 --- /dev/null +++ b/docs/middleware.md @@ -0,0 +1,49 @@ +# 请求中间件 + +了解如何拦截 SDK 发起的请求,并统一添加额外的逻辑。 + +UCloud SDK 为请求提供了请求中间件的特性。 + +该特性允许在 请求/响应 的生命周期中添加自定义的逻辑。 + +例如,Client 级别的中间件,可以拦截参数/响应字典: + +```php +use UCloud\Core\Middleware\Context; +use UCloud\Core\Middleware\Middleware; +use UCloud\Core\Request\Request; +use UCloud\Core\Response\Response; + +class LogMiddleware extends Middleware +{ + public function handleRequest(Context $ctx): Request + { + $req = $ctx->getRequest(); + $logger = $ctx->getConfig()->getLogger(); + if ($logger != null) { + $logger->info(sprintf("[request] %s", json_encode($req->toArray()))); + } + return $req; + } + + public function handleResponse(Context $ctx): Response + { + $resp = $ctx->getResponse(); + $logger = $ctx->getConfig()->getLogger(); + if ($logger != null) { + $body = $resp->toArray(); + $logger->info(sprintf("[response: %s] %s", $resp->getRequestId(), json_encode($body))); + } + return $resp; + } + + public function handleException(Context $ctx) + { + $e = $ctx->getException(); + $logger = $ctx->getConfig()->getLogger(); + if ($logger != null) { + $logger->error(sprintf("[response: %s] %s Error: %s", $e->getRequestId(), $e->getType(), $e->getMessage())); + } + } +} +``` diff --git a/docs/quickstart.md b/docs/quickstart.md new file mode 100644 index 00000000..0bb4e833 --- /dev/null +++ b/docs/quickstart.md @@ -0,0 +1,81 @@ +# 快速开始 + +## 安装 + +使用 `composer` 安装(推荐): + +```bash +$ composer require ucloud/ucloud-sdk-php +``` + +## 初次使用 + +目前,SDK 使用 PublicKey/PrivateKey 作为唯一的鉴权方式,该公私钥可以从以下途径获取: + +- [UAPI 密钥管理](https://console.ucloud.cn/uapi/apikey) + +下面提供一个简单的示例: + +```php +use UCloud\UHost\UHostClient; +use UCloud\Core\Exception\UCloudException; +use UCloud\UHost\Apis\CreateUHostInstanceRequest; +use UCloud\UHost\Params\CreateUHostInstanceParamDisks; + +$client = new UHostClient([ + "publicKey" => getenv("UCLOUD_PUBLIC_KEY"), + "privateKey" => getenv("UCLOUD_PRIVATE_KEY"), + "projectId" => getenv("UCLOUD_PROJECT_ID"), + "region" => "cn-bj2", +]); +$zone = "cn-bj2-05"; + +// Create Instance +try { + $req = new CreateUHostInstanceRequest(); + $req->setName("sdk-php-example"); + $req->setZone($zone); + $req->setImageId("..."); + $req->setLoginMode("Password"); + $req->setPassword(base64_encode("UCloud1234!")); + $req->setCPU(1); + $req->setMemory(1024); + + $disk = new CreateUHostInstanceParamDisks(); + $disk->setSize(40); + $disk->setType("CLOUD_SSD"); + $disk->setIsBoot("True"); + + $req->setDisks([$disk]); + + $resp = $client->createUHostInstance($req); +} catch (UCloudException $e) { + throw $e; +} +$id = $resp->getUHostIds()[0]; +``` + +将上述代码中 client 相关配置,以及主机的 image id 等,替换成自己的配置,即可创建一台云主机。 + +在该示例中,使用 SDK 完成了一个创建云主机的请求。至此,已经涵盖了 SDK 的基本核心用法,可以构建自己的脚本啦! + +SDK 中的每一个 api 调用都有详细的注释文档, +可以通过 Editor/IDE 跳转到具体的方法中查看(也可以 [查看接口文档](https://docs.ucloud.cn/api/summary/README) ), +并根据 IDE 自动补全和报错信息继续探索 SDK 的用法。 + +如果需要了解这段代码提及但未完全覆盖的使用技巧,请参考: + +- [通用配置](configure.md),了解如何配置 SDK,如日志、重试、服务访问端点(公有云、专有云)等 +- [错误处理](error.md),了解如何处理不同类型的 SDK 异常,包括参数错误,RetCode 不为 0 的业务异常等 +- [类型系统](typesystem.md),了解 SDK 如何校验参数,并规范化 API 的返回值。 +- [请求中间件](middleware.md),了解如何拦截 SDK 发起的请求,并统一添加额外的逻辑。 +- [泛化调用](generic.md),如何调用 SDK 尚未支持的 API(不建议使用此类 API,因为没有兼容性保证) + +## 获取更多示例 + +### 基于场景的示例 + +SDK 提供了部分基于场景的示例,并提供了对应的资源销毁逻辑,可以点击以下链接查看源码: + +- [批量创建云主机](../examples/uhost) +- [创建基于负载均衡器的两层架构](../examples/two-tier),ULB + UHost diff --git a/docs/typesystem.md b/docs/typesystem.md new file mode 100644 index 00000000..98d19070 --- /dev/null +++ b/docs/typesystem.md @@ -0,0 +1,3 @@ +# 类型系统 + +待定。 diff --git a/examples/two-tier/README.md b/examples/two-tier/README.md new file mode 100644 index 00000000..ce2ab65c --- /dev/null +++ b/examples/two-tier/README.md @@ -0,0 +1,19 @@ +# UCloud SDK Two-Tier Example + +## What is the goal + +Build a two-tier architecture with ulb and uhost, and remove all example data. + +## Setup Environment + +```go +export UCLOUD_PUBLIC_KEY="your public key" +export UCLOUD_PRIVATE_KEY="your private key" +export UCLOUD_PROJECT_ID="your project id" +``` + +## How to run + +```sh +php main.php +``` diff --git a/examples/two-tier/main.php b/examples/two-tier/main.php new file mode 100644 index 00000000..68a5e418 --- /dev/null +++ b/examples/two-tier/main.php @@ -0,0 +1,264 @@ + getenv("UCLOUD_PUBLIC_KEY"), + "privateKey" => getenv("UCLOUD_PRIVATE_KEY"), + "projectId" => getenv("UCLOUD_PROJECT_ID"), + "region" => "cn-bj2", + ]; + $this->uhostClient = new UHostClient($cfg); + $this->ulbClient = new ULBClient($cfg); + $this->zone = "cn-bj2-05"; + $this->name = "sdk-php-example-two-tier"; + } + + /** + * @throws UCloudException + */ + public function __invoke() + { + $imageId = $this->describeImage(); + + $uhostIds = $this->createUHostBatch($imageId, 2); + + $ulbId = $this->createUlb(); + + $vserverId = $this->createVServer($ulbId); + + $backendIds = $this->allocateBackendBatch($ulbId, $vserverId, $uhostIds); + + $this->releaseBackendBatch($ulbId, $backendIds); + + $this->deleteVServer($ulbId, $vserverId); + + $this->deleteUlb($ulbId); + + $this->deleteUHostBatch($uhostIds); + } + + /** + * Describe Image + * + * @return string + * @throws UCloudException + */ + private function describeImage(): string + { + $req = new DescribeImageRequest(); + $req->setZone($this->zone); + $req->setImageType("Base"); + $req->setOsType("Linux"); + $resp = $this->uhostClient->describeImage($req); + $image = $resp->getImageSet()[0]; + return $image->getImageId(); + } + + /** + * Create Instance + * + * @param string $imageId + * @param int $count + * @return array + * @throws UCloudException + */ + private function createUHostBatch(string $imageId, int $count): array + { + $ids = []; + foreach(range(1, $count) as $index) { + $req = new CreateUHostInstanceRequest(); + $req->setName($this->name); + $req->setZone($this->zone); + $req->setImageId($imageId); + $req->setLoginMode("Password"); + $req->setPassword(base64_encode("UCloud1234!")); + $req->setCPU(1); + $req->setMemory(1024); + + $resp = $this->uhostClient->createUHostInstance($req); + array_push($ids, $resp->getUHostIds()[0]); + } + $this->waitUHostState($ids, "Running"); + return $ids; + } + + /** + * Create ULB + * + * @return string + * @throws UCloudException + */ + private function createUlb(): string + { + $req = new CreateULBRequest(); + $req->setULBName($this->name); + $resp = $this->ulbClient->createULB($req); + return $resp->getULBId(); + } + + /** + * Create VServer under ULB + * + * @param string $ulbId + * @return string + * @throws UCloudException + */ + private function createVServer(string $ulbId): string + { + + $req = new CreateVServerRequest(); + $req->setVServerName($this->name); + $req->setULBId($ulbId); + $resp = $this->ulbClient->createVServer($req); + return $resp->getVServerId(); + } + + /** + * Create several backends under VServer + * + * @param string $ulbId + * @param string $vserverId + * @param array $uhostIds + * @return array + * @throws UCloudException + */ + private function allocateBackendBatch(string $ulbId, string $vserverId, array $uhostIds): array + { + $backendIds = []; + foreach ($uhostIds as $uhostId) { + $req = new AllocateBackendRequest(); + $req->setULBId($ulbId); + $req->setVServerId($vserverId); + $req->setResourceId($uhostId); + $req->setResourceType("UHost"); + $resp = $this->ulbClient->allocateBackend($req); + array_push($backendIds, $resp->getBackendId()); + } + return $backendIds; + } + + /** + * Delete backends from VServer + * + * @param string $ulbId + * @param string $vserverId + * @param array $backendIds + * @throws UCloudException + */ + private function releaseBackendBatch(string $ulbId, array $backendIds) + { + foreach ($backendIds as $backendId) { + $req = new ReleaseBackendRequest(); + $req->setULBId($ulbId); + $req->setBackendId($backendId); + $this->ulbClient->releaseBackend($req); + } + } + + /** + * Delete VServer from ULB + * + * @param string $ulbId + * @param string $vserverId + * @throws UCloudException + */ + private function deleteVServer(string $ulbId, string $vserverId) + { + $req = new DeleteVServerRequest(); + $req->setULBId($ulbId); + $req->setVServerId($vserverId); + } + + /** + * Delete ULB + * + * @param string $ulbId + * @throws UCloudException + */ + private function deleteUlb(string $ulbId) + { + $req = new DeleteULBRequest(); + $req->setULBId($ulbId); + $this->ulbClient->deleteULB($req); + } + + /** + * Delete UHost instances + * + * @param array $uhostIds + * @throws UCloudException + */ + private function deleteUHostBatch(array $uhostIds) + { + foreach ($uhostIds as $uhostId) { + $req = new StopUHostInstanceRequest(); + $req->setUHostId($uhostId); + $this->uhostClient->stopUHostInstance($req); + } + + $this->waitUHostState($uhostIds, "Stopped"); + + foreach ($uhostIds as $uhostId) { + $req = new TerminateUHostInstanceRequest(); + $req->setUHostId($uhostId); + $this->uhostClient->terminateUHostInstance($req); + } + } + + /** + * @throws UCloudException + */ + private function waitUHostState(array $uhostIds, string $state) + { + while (true) { + $hasNotReady = false; + + $req = new DescribeUHostInstanceRequest(); + $req->setUHostIds($uhostIds); + $resp = $this->uhostClient->describeUHostInstance($req); + foreach ($resp->getUHostSet() as $instance) { + if ($instance->getState() != $state) { + $hasNotReady = true; + } + } + if (!$hasNotReady) { + break; + } + sleep(1); + } + } +} + + +$main = new Main(); +$main(); diff --git a/examples/uhost/README.md b/examples/uhost/README.md new file mode 100644 index 00000000..b308f167 --- /dev/null +++ b/examples/uhost/README.md @@ -0,0 +1,21 @@ +# UCloud SDK UHost Example + +## What is the goal + +Create an uhost, wait it created, and remove all example data. + +## Setup Environment + +```go +export UCLOUD_PUBLIC_KEY="your public key" +export UCLOUD_PRIVATE_KEY="your private key" +export UCLOUD_PROJECT_ID="your project id" +``` + +## How to run + +change directory to here. + +```sh +php main.php +``` diff --git a/examples/uhost/main.php b/examples/uhost/main.php new file mode 100644 index 00000000..276d8b00 --- /dev/null +++ b/examples/uhost/main.php @@ -0,0 +1,124 @@ + getenv("UCLOUD_PUBLIC_KEY"), + "privateKey" => getenv("UCLOUD_PRIVATE_KEY"), + "projectId" => getenv("UCLOUD_PROJECT_ID"), + "region" => "cn-bj2", + ]); + $zone = "cn-bj2-05"; + + // Describe Image + try { + $req = new DescribeImageRequest(); + $req->setZone($zone); + $req->setImageType("Base"); + $req->setOsType("Linux"); + + $resp = $client->describeImage($req); + } catch (UCloudException $e) { + throw $e; + } + $image = $resp->getImageSet()[0]; + + // Create Instance + try { + $req = new CreateUHostInstanceRequest(); + $req->setName("sdk-php-example"); + $req->setZone($zone); + $req->setImageId($image->getImageId()); + $req->setLoginMode("Password"); + $req->setPassword(base64_encode("UCloud1234!")); + $req->setCPU(1); + $req->setMemory(1024); + + $disk = new CreateUHostInstanceParamDisks(); + $disk->setSize($image->getImageSize()); + $disk->setType("CLOUD_SSD"); + $disk->setIsBoot("True"); + + $req->setDisks([$disk]); + + $resp = $client->createUHostInstance($req); + } catch (UCloudException $e) { + throw $e; + } + $id = $resp->getUHostIds()[0]; + + // Wait instance to boot + while (True) { + sleep(3); + + try { + $req = new DescribeUHostInstanceRequest(); + $req->setZone($zone); + $req->setUHostIds([$id]); + $resp = $client->describeUHostInstance($req); + } catch (UCloudException $e) { + break; + } + + $instance = $resp->getUHostSet()[0]; + echo "waiting " . $id . " to boot, got " . $instance->getState() . "\n"; + if (in_array($instance->getState(), ["Running"])) { + break; + } + } + + // Stop the instance + try { + $req = new StopUHostInstanceRequest(); + $req->setZone($zone); + $req->setUHostId($id); + $client->stopUHostInstance($req); + } catch (UCloudException $e) { + throw $e; + } + + // Wait instance to boot + while (True) { + sleep(3); + + try { + $req = new DescribeUHostInstanceRequest(); + $req->setZone($zone); + $req->setUHostIds([$id]); + $resp = $client->describeUHostInstance($req); + } catch (UCloudException $e) { + break; + } + $instance = $resp->getUHostSet()[0]; + echo "waiting " . $id . " to stopped, got " . $instance->getState() . "\n"; + if (in_array($instance->getState(), ["Stopped"])) { + break; + } + } + + // Cleanup the instance + try { + $req = new TerminateUHostInstanceRequest(); + $req->setZone($zone); + $req->setUHostId($id); + $client->terminateUHostInstance($req); + } catch (UCloudException $e) { + throw $e; + } +} + +main(); diff --git a/phpcs.xml b/phpcs.xml new file mode 100644 index 00000000..b0c8cfd2 --- /dev/null +++ b/phpcs.xml @@ -0,0 +1,35 @@ + + + The coding standard for laravel package + + src + + *.json + *.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 00000000..a9b21671 --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,26 @@ + + + + + ./src/Core + + + ./vendor + ./tests + + + + + ./tests/ + + + diff --git a/sdk.php b/sdk.php deleted file mode 100644 index 0a14fef6..00000000 --- a/sdk.php +++ /dev/null @@ -1,311 +0,0 @@ - $value){ - $params_data .= $key; - $params_data .= $value; - } - $params_data .= $private_key; - return sha1($params_data); -} - -class UConnection{ - /** - * Contains the last HTTP status code returned. - * - * @ignore - */ - public $http_code; - /** - * Contains the last API call. - * - * @ignore - */ - public $url; - /** - * Set up the API root URL. - * - * @ignore - */ - public $host; - /** - * Set timeout default. - * - * @ignore - */ - public $timeout = 30; - /** - * Set connect timeout. - * - * @ignore - */ - public $connecttimeout = 30; - /** - * Verify SSL Cert. - * - * @ignore - */ - public $ssl_verifypeer = FALSE; - /** - * Respons format. - * - * @ignore - */ - public $format = 'json'; - /** - * Decode returned json data. - * - * @ignore - */ - public $decode_json = TRUE; - /** - * Contains the last HTTP headers returned. - * - * @ignore - */ - public $http_info; - /** - * Set the useragnet. - * - * @ignore - */ - public $useragent = 'Sae T OAuth2 v0.1'; - - /** - * print the debug info - * - * @ignore - */ - public $debug = false; - - /** - * boundary of multipart - * @ignore - */ - public static $boundary = ''; - - function __construct($base_url) { - $this->host = $base_url; - } - - /** - * GET wrappwer for oAuthRequest. - * - * @return mixed - */ - function get($url, $parameters = array()) { - $response = $this->oAuthRequest($url, 'GET', $parameters); - if ($this->format === 'json' && $this->decode_json) { - return json_decode($response, true); - } - return $response; - } - - /** - * POST wreapper for oAuthRequest. - * - * @return mixed - */ - function post($url, $parameters = array(), $multi = false) { - $response = $this->oAuthRequest($url, 'POST', $parameters, $multi ); - if ($this->format === 'json' && $this->decode_json) { - return json_decode($response, true); - } - return $response; - } - - /** - * DELTE wrapper for oAuthReqeust. - * - * @return mixed - */ - function delete($url, $parameters = array()) { - $response = $this->oAuthRequest($url, 'DELETE', $parameters); - if ($this->format === 'json' && $this->decode_json) { - return json_decode($response, true); - } - return $response; - } - - /** - * Format and sign an OAuth / API request - * - * @return string - * @ignore - */ - function oAuthRequest($url, $method, $parameters, $multi = false) { - if (strrpos($url, 'http://') !== 0 && strrpos($url, 'https://') !== 0) { - $url = "{$this->host}{$url}"; - } - - switch ($method) { - case 'GET': - $url = $url . '?' . http_build_query($parameters); - return $this->http($url, 'GET'); - default: - $headers = array(); - if (!$multi && (is_array($parameters) || is_object($parameters)) ) { - $body = http_build_query($parameters); - } else { - $body = self::build_http_query_multi($parameters); - $headers[] = "Content-Type: multipart/form-data; boundary=" . self::$boundary; - } - return $this->http($url, $method, $body, $headers); - } - } - - /** - * Make an HTTP request - * - * @return string API results - * @ignore - */ - function http($url, $method, $postfields = NULL, $headers = array()) { - $this->http_info = array(); - $ci = curl_init(); - /* Curl settings */ - curl_setopt($ci, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); - curl_setopt($ci, CURLOPT_USERAGENT, $this->useragent); - curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout); - curl_setopt($ci, CURLOPT_TIMEOUT, $this->timeout); - curl_setopt($ci, CURLOPT_RETURNTRANSFER, TRUE); - curl_setopt($ci, CURLOPT_ENCODING, ""); - curl_setopt($ci, CURLOPT_SSL_VERIFYPEER, $this->ssl_verifypeer); - curl_setopt($ci, CURLOPT_HEADERFUNCTION, array($this, 'getHeader')); - curl_setopt($ci, CURLOPT_HEADER, FALSE); - - switch ($method) { - case 'POST': - curl_setopt($ci, CURLOPT_POST, TRUE); - if (!empty($postfields)) { - curl_setopt($ci, CURLOPT_POSTFIELDS, $postfields); - $this->postdata = $postfields; - } - break; - case 'DELETE': - curl_setopt($ci, CURLOPT_CUSTOMREQUEST, 'DELETE'); - if (!empty($postfields)) { - $url = "{$url}?{$postfields}"; - } - } - - curl_setopt($ci, CURLOPT_URL, $url ); - curl_setopt($ci, CURLOPT_HTTPHEADER, $headers ); - curl_setopt($ci, CURLINFO_HEADER_OUT, TRUE ); - - $response = curl_exec($ci); - $this->http_code = curl_getinfo($ci, CURLINFO_HTTP_CODE); - $this->http_info = array_merge($this->http_info, curl_getinfo($ci)); - $this->url = $url; - - if ($this->debug) { - echo "=====http code======\r\n"; - var_dump($this->http_code); - echo "=====post data======\r\n"; - var_dump($postfields); - - echo '=====info====='."\r\n"; - print_r( curl_getinfo($ci) ); - - echo '=====$response====='."\r\n"; - print_r( $response ); - } - curl_close ($ci); - return $response; - } - - /** - * Get the header info to store. - * - * @return int - * @ignore - */ - function getHeader($ch, $header) { - $i = strpos($header, ':'); - if (!empty($i)) { - $key = str_replace('-', '_', strtolower(substr($header, 0, $i))); - $value = trim(substr($header, $i + 2)); - $this->http_header[$key] = $value; - } - return strlen($header); - } - - /** - * @ignore - */ - public static function build_http_query_multi($params) { - if (!$params) return ''; - - uksort($params, 'strcmp'); - - $pairs = array(); - - self::$boundary = $boundary = uniqid('------------------'); - $MPboundary = '--'.$boundary; - $endMPboundary = $MPboundary. '--'; - $multipartbody = ''; - - foreach ($params as $parameter => $value) { - - if( in_array($parameter, array('pic', 'image')) && $value{0} == '@' ) { - $url = ltrim( $value, '@' ); - $content = file_get_contents( $url ); - $array = explode( '?', basename( $url ) ); - $filename = $array[0]; - - $multipartbody .= $MPboundary . "\r\n"; - $multipartbody .= 'Content-Disposition: form-data; name="' . $parameter . '"; filename="' . $filename . '"'. "\r\n"; - $multipartbody .= "Content-Type: image/unknown\r\n\r\n"; - $multipartbody .= $content. "\r\n"; - } else { - $multipartbody .= $MPboundary . "\r\n"; - $multipartbody .= 'content-disposition: form-data; name="' . $parameter . "\"\r\n\r\n"; - $multipartbody .= $value."\r\n"; - } - - } - - $multipartbody .= $endMPboundary; - return $multipartbody; - } -} - - - -class UcloudApiClient { - - function __construct( $base_url, $public_key, $private_key, $project_id) - { - $this->conn = new UConnection($base_url); - $this->public_key = $public_key; - $this->private_key = $private_key; - - if ($project_id !== "") { - $this->project_id = $project_id; - } - } - - function get($api, $params){ - $params["PublicKey"] = $this->public_key; - - if ( isset($this->project_id) && !empty($this->project_id) ) - { - $params["ProjectId"] = $this->project_id; - } - $params["Signature"] = _verfy_ac($this->private_key, $params); - return $this->conn->get($api, $params); - } - - function post($api, $params){ - $params["PublicKey"] = $this->PublicKey; - if ( isset($this->project_id) && !empty($this->project_id) ) - { - $params["ProjectId"] = $this->project_id; - } - $params["Signature"] = _verfy_ac($this->private_key, $params); - return $this->conn->post($api, $params); - } -} - diff --git a/sendsms.php b/sendsms.php deleted file mode 100644 index ee601c15..00000000 --- a/sendsms.php +++ /dev/null @@ -1,23 +0,0 @@ - $val){ - $params["Phone.".$key] = $val; -} - -print_r($response = $conn->get("/", $params)); diff --git a/src/Core/Client.php b/src/Core/Client.php new file mode 100644 index 00000000..1c3b1d2d --- /dev/null +++ b/src/Core/Client.php @@ -0,0 +1,180 @@ + + */ + private array $middlewares; + + /** + * Transport object, customized transport is allowed + * + * @var TransportInterface + */ + private TransportInterface $transport; + + /** + * Client constructor. + * + * @param array $args configuration + */ + public function __construct(array $args) + { + $this->credential = new Credential($args); + $this->config = new Config($args); + $this->middlewares = [ + new DefaultsMiddleware(), + new CredentialMiddleware(), + new LogMiddleware(), + ]; + $ua = sprintf("PHP/%s PHP-SDK/%s", phpversion(), self::VERSION); + if (!empty($this->config->getUserAgent())) { + $ua = $ua . " " . $this->config->getUserAgent(); + } + $this->setTransport(new Transport($this->config->getBaseUrl(), $ua)); + } + + /** + * Invoke an api call from request object + * + * @param Request $req request object + * @return Response response + * @throws UCloudException + */ + public function invoke(Request $req): Response + { + $ctx = new Context(); + $ctx->setConfig($this->getConfig()); + $ctx->setCredential($this->getCredential()); + + // resolve request + $ctx->setRequest($req); + foreach ($this->middlewares as $i => $m) { + $ctx->setRequest($m->handleRequest($ctx)); + } + + // do invoking + $resp = null; + $maxRetries = $req->loadMaxRetries(); + for ($k = 0; $k <= $maxRetries; $k++) { + try { + $resp = $this->getTransport()->invoke($ctx->getRequest()); + break; + } catch (UCloudException $e) { + $ctx->setException($e); + foreach ($this->middlewares as $i => $m) { + $m->handleException($ctx); + } + if ($k == $maxRetries) { + throw $e; + } + } + } + + // resolve response + $ctx->setResponse($resp); + foreach ($this->middlewares as $i => $m) { + $ctx->setResponse($m->handleResponse($ctx)); + } + return $ctx->getResponse(); + } + + /** + * Add a new middleware to client middlewares list + * + * @param Middleware $m middleware + */ + public function useMiddleware(Middleware $m) + { + array_push($this->middlewares, $m); + } + + /** + * Get config + * + * @return Config + */ + public function getConfig(): Config + { + return $this->config; + } + + /** + * Credential will return the credential object of the client + * + * @return Credential + */ + public function getCredential(): Credential + { + return $this->credential; + } + + /** + * Get transport + * + * @return TransportInterface transport + */ + public function getTransport(): TransportInterface + { + return $this->transport; + } + + /** + * Set transport + * + * @param TransportInterface $transport transport + */ + public function setTransport(TransportInterface $transport): void + { + $this->transport = $transport; + } + + /** + * A magic method to call action + * + * @codeCoverageIgnore + * @param string $product Product name, upper camel style + * @param string $action Action name + * @param Request $req Arguments of action + * @return Response + * @throws UCloudException + */ + protected function call(string $product, string $action, Request $req): Response + { + $req->setAction($action); + $outputs = $this->invoke($req)->toArray(); + $respClass = "UCloud"."\\".$product."\\"."Schema"."\\".$action."Response"; + return new $respClass($outputs); + } +} diff --git a/src/Core/ClientInterface.php b/src/Core/ClientInterface.php new file mode 100644 index 00000000..af9681b8 --- /dev/null +++ b/src/Core/ClientInterface.php @@ -0,0 +1,11 @@ + ... + * - zone: (string) Zone is the zone of backend service + * See also ... + * - projectId: (string) ProjectId is the unique identify of project, used for organize resources, + * Most of resources should belong to a project. + * Sub-Account must have an project id. + * See also ... + * - baseUrl: (string) BaseUrl is the url of backend api. + * See also ... + * - userAgent: (string) UserAgent is an attribute for sdk client, used for distinguish who is using sdk. + * See also https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent + * It will be appended to the end of sdk user-agent. + * eg. "Terraform/0.10.1" -> "GO/1.9.1 GO-SDK/0.1.0 Terraform/0.10.1" + * NOTE: it will conflict with the User-Agent of HTTPHeaders + * - timeout: (string) Timeout is timeout for every request. + * - maxRetries: (string) MaxRetries is the number of max retry times. + * Set MaxRetries more than 0 to enable auto-retry for network and service availability problem + * if auto-retry is enabled, it will enable default retry policy using exponential backoff. + * - logger: (LoggerInterface) if logLevel not be set, use INFO level as default. + * + * @param array $args arguments + */ + public function __construct(array $args) + { + $this->setRegion($args["region"] ?? ""); + $this->setProjectId($args["projectId"] ?? ""); + $this->setBaseUrl($args["baseUrl"] ?? "https://api.ucloud.cn"); + $this->setUserAgent($args["userAgent"] ?? ""); + $this->setTimeout($args["timeout"] ?? 30); + $this->setMaxRetries($args["maxRetries"] ?? 0); + $this->setLogger($args["logger"] ?? new DefaultLogger()); + } + + /** + * Get region + * + * @return string + */ + public function getRegion(): string + { + return $this->region; + } + + /** + * Set region + * + * @param string $region region + */ + public function setRegion(string $region) + { + $this->region = $region; + } + + /** + * Get project id + * + * @return string + */ + public function getProjectId(): string + { + return $this->projectId; + } + + /** + * Set project id + * + * @param string $projectId project id + */ + public function setProjectId(string $projectId) + { + $this->projectId = $projectId; + } + + /** + * Get base url + * + * @return string + */ + public function getBaseUrl(): string + { + return $this->baseUrl; + } + + /** + * Set base url + * + * @param string $baseUrl base url + */ + public function setBaseUrl(string $baseUrl) + { + $this->baseUrl = $baseUrl; + } + + /** + * Get user agent + * + * @return string + */ + public function getUserAgent(): string + { + return $this->userAgent; + } + + /** + * Set user agent + * + * @param string $userAgent user agent + */ + public function setUserAgent(string $userAgent) + { + $this->userAgent = $userAgent; + } + + /** + * Get timeout + * + * @return integer + */ + public function getTimeout(): int + { + return $this->timeout; + } + + /** + * Set timeout + * + * @param int $timeout timeout + */ + public function setTimeout(int $timeout) + { + $this->timeout = $timeout; + } + + /** + * Get max retries + * + * @return integer + */ + public function getMaxRetries(): int + { + return $this->maxRetries; + } + + /** + * Set max retries + * + * @param int $maxRetries max retries + */ + public function setMaxRetries(int $maxRetries) + { + $this->maxRetries = $maxRetries; + } + + /** + * Get logger + * + * @return LoggerInterface + */ + public function getLogger(): LoggerInterface + { + return $this->logger; + } + + /** + * Set logger + * + * @param LoggerInterface $logger logger + */ + public function setLogger(LoggerInterface $logger): void + { + $this->logger = $logger; + } +} diff --git a/src/Core/Credential/Credential.php b/src/Core/Credential/Credential.php new file mode 100644 index 00000000..056fb0d8 --- /dev/null +++ b/src/Core/Credential/Credential.php @@ -0,0 +1,103 @@ +setPrivateKey($args["privateKey"]); + $this->setPublicKey($args["publicKey"]); + } + + /** + * Generate signature string from an array + * + * @param array $args arguments to generate signature + * @return string the signature + */ + public function verifyAc(array $args): string + { + $args['PublicKey'] = $this->getPublicKey(); + ksort($args); + $s = ""; + foreach ($args as $key => $value) { + $s .= $key; + $s .= $value; + } + $s .= $this->getPrivateKey(); + return sha1($s); + } + + /** + * Attach signature and additional key fields to an array + * + * @param array $args arguments to by attached + * @return array array with signature and keys + */ + public function sign(array $args): array + { + $args['Signature'] = $this->verifyAc($args); + $args['PublicKey'] = $this->getPublicKey(); + return $args; + } + + /** + * Get public key + * + * @return string + */ + public function getPublicKey(): string + { + return $this->publicKey; + } + + /** + * Set public key + * + * @param string $publicKey Public key + */ + public function setPublicKey(string $publicKey): void + { + $this->publicKey = $publicKey; + } + + /** + * Get private key + * + * @return string + */ + public function getPrivateKey(): string + { + return $this->privateKey; + } + + /** + * Set private key + * + * @param string $privateKey Private key + */ + public function setPrivateKey(string $privateKey): void + { + $this->privateKey = $privateKey; + } +} diff --git a/src/Core/Credential/CredentialInterface.php b/src/Core/Credential/CredentialInterface.php new file mode 100644 index 00000000..57d27bfd --- /dev/null +++ b/src/Core/Credential/CredentialInterface.php @@ -0,0 +1,27 @@ +getRequest(); + $cred = $ctx->getCredential(); + return new Request($cred->sign($req->toArray())); + } +} diff --git a/src/Core/DefaultsMiddleware.php b/src/Core/DefaultsMiddleware.php new file mode 100644 index 00000000..bb345b59 --- /dev/null +++ b/src/Core/DefaultsMiddleware.php @@ -0,0 +1,44 @@ +getRequest(); + $cfg = $ctx->getConfig(); + + if (!$req->has(self::FIELD_REGION) && $cfg->getRegion() != "") { + $req->set(self::FIELD_REGION, $cfg->getRegion()); + } + + if (!$req->has(self::FIELD_PROJECT_ID) && $cfg->getProjectId() != "") { + $req->set(self::FIELD_PROJECT_ID, $cfg->getProjectId()); + } + + if ($req->loadMaxRetries() == 0) { + $req->withMaxRetries($cfg->getMaxRetries()); + } + + if ($req->loadTimeout() == 0) { + $req->withTimeout($cfg->getTimeout()); + } + $req->validate(); + return $req; + } +} diff --git a/src/Core/Exception/UCloudException.php b/src/Core/Exception/UCloudException.php new file mode 100644 index 00000000..2138b870 --- /dev/null +++ b/src/Core/Exception/UCloudException.php @@ -0,0 +1,59 @@ +type = $type; + $this->requestId = $requestId; + parent::__construct($message, $retCode, $previous); + } + + /** + * Get type + * + * @return string + */ + public function getType(): string + { + return $this->type; + } + + /** + * Get request id + * + * @return string + */ + public function getRequestId(): string + { + return $this->requestId; + } +} diff --git a/src/Core/LogMiddleware.php b/src/Core/LogMiddleware.php new file mode 100644 index 00000000..593698dd --- /dev/null +++ b/src/Core/LogMiddleware.php @@ -0,0 +1,42 @@ +getRequest(); + $logger = $ctx->getConfig()->getLogger(); + if ($logger != null) { + $logger->info(sprintf("[request] %s", json_encode($req->toArray()))); + } + return $req; + } + + public function handleResponse(Context $ctx): Response + { + $resp = $ctx->getResponse(); + $logger = $ctx->getConfig()->getLogger(); + if ($logger != null) { + $body = $resp->toArray(); + $logger->info(sprintf("[response: %s] %s", $resp->getRequestId(), json_encode($body))); + } + return $resp; + } + + public function handleException(Context $ctx) + { + $e = $ctx->getException(); + $logger = $ctx->getConfig()->getLogger(); + if ($logger != null) { + $logger->error(sprintf("[response: %s] %s Error: %s", $e->getRequestId(), $e->getType(), $e->getMessage())); + } + } +} diff --git a/src/Core/Logger/DefaultLogger.php b/src/Core/Logger/DefaultLogger.php new file mode 100644 index 00000000..8cdcc9df --- /dev/null +++ b/src/Core/Logger/DefaultLogger.php @@ -0,0 +1,18 @@ +credential; + } + + /** + * Set credential + * + * @param Credential $credential Credential + */ + public function setCredential(Credential $credential): void + { + $this->credential = $credential; + } + + /** + * Get config + * + * @return Config + */ + public function getConfig(): Config + { + return $this->config; + } + + /** + * Set config + * + * @param Config $config Config + */ + public function setConfig(Config $config): void + { + $this->config = $config; + } + + /** + * Get request + * + * @return Request + */ + public function getRequest(): Request + { + return $this->request; + } + + /** + * Set request + * + * @param Request $request Request + */ + public function setRequest(Request $request): void + { + $this->request = $request; + } + + /** + * Get response + * + * @return Response + */ + public function getResponse(): Response + { + return $this->response; + } + + /** + * Set response + * + * @param Response $response Response + */ + public function setResponse(Response $response): void + { + $this->response = $response; + } + + /** + * Get exception + * + * @return UCloudException + */ + public function getException(): UCloudException + { + return $this->exception; + } + + /** + * Set exception + * + * @param UCloudException $exception Exception + */ + public function setException(UCloudException $exception): void + { + $this->exception = $exception; + } +} diff --git a/src/Core/Middleware/Middleware.php b/src/Core/Middleware/Middleware.php new file mode 100644 index 00000000..93b54b09 --- /dev/null +++ b/src/Core/Middleware/Middleware.php @@ -0,0 +1,24 @@ +getRequest(); + } + + public function handleResponse(Context $ctx): Response + { + return $ctx->getResponse(); + } + + public function handleException(Context $ctx) + { + } +} diff --git a/src/Core/Middleware/MiddlewareInterface.php b/src/Core/Middleware/MiddlewareInterface.php new file mode 100644 index 00000000..9f60a1bb --- /dev/null +++ b/src/Core/Middleware/MiddlewareInterface.php @@ -0,0 +1,15 @@ +args = $args ?? []; + } + + /** + * Set any field in first-level of data + * + * @param string $key field name + * @param mixed $value field value + */ + public function set(string $key, mixed $value) + { + $this->args[$key] = $value; + } + + /** + * Get any field in first-level of data + * + * @param string $key field name + * @return mixed + */ + public function get(string $key) + { + return $this->args[$key] ?? null; + } + + /** + * Check any field is exists in first-level of data + * + * @param string $key field name + * @return boolean + */ + public function has(string $key): bool + { + return array_key_exists($key, $this->args); + } + + /** + * Get action name + * + * @return string + */ + public function getAction(): string + { + return $this->get(self::FIELD_ACTION); + } + + /** + * Set action name + * + * @param string $action action name + */ + public function setAction(string $action) + { + $this->set(self::FIELD_ACTION, $action); + } + + /** + * Convert request object to array + * + * @return array + */ + public function toArray(): array + { + return $this->encode($this->args); + } + + /** + * Add required field + * + * @param string $field + */ + public function markRequired(string $field) + { + array_push($this->requiredFields, $field); + } + + /** + * Validate data + * + * @throws UCloudException + */ + public function validate() + { + $fields = []; + foreach ($this->requiredFields as $i => $field) { + if ($this->get($field) != null) { + continue; + } + array_push($fields, $field); + } + + if (!empty($fields)) { + throw new UCloudException( + UCloudException::EXC_TYPE_VALIDATION, + "field " . implode(",", $fields) . " is required", + -1, + ); + } + } + + /** + * Get all data for arguments + * + * @return array + */ + public function getAll(): array + { + return $this->args; + } + + /** + * Encode request data to one-level style + * + * @param array $args array of arguments + * @return array + */ + private static function encode(array $args): array + { + $result = []; + foreach ($args as $key => $value) { + if (is_array($value)) { + $values = Request::encode($value); + foreach ($values as $i => $v) { + $result[$key . '.' . $i] = $v; + } + } else { + $result[$key] = $value; + } + } + return $result; + } + + /** + * Get timeout + * + * @return integer + */ + public function loadTimeout(): int + { + return $this->timeout || 0; + } + + /** + * Set timeout + * + * @param int $timeout timeout + */ + public function withTimeout(int $timeout): void + { + $this->timeout = $timeout; + } + + /** + * Get max retries + * + * @return integer + */ + public function loadMaxRetries(): int + { + return $this->maxRetries || 0; + } + + /** + * Set max retries + * + * @param int $maxRetries max retries + */ + public function withMaxRetries(int $maxRetries): void + { + $this->maxRetries = $maxRetries; + } +} diff --git a/src/Core/Request/RequestInterface.php b/src/Core/Request/RequestInterface.php new file mode 100644 index 00000000..736c4f10 --- /dev/null +++ b/src/Core/Request/RequestInterface.php @@ -0,0 +1,13 @@ +data = $data; + $this->requestId = $requestId; + } + + /** + * Set any field in first-level of data + * + * @param string $key field name + * @param mixed $value field value + */ + public function set(string $key, mixed $value) + { + $this->data[$key] = $value; + } + + /** + * Get any field in first-level of data + * + * @param string $key field name + * @return mixed + */ + public function get(string $key) + { + return $this->data[$key]; + } + + public function toArray(): array + { + return $this->data; + } + + public function getRetCode(): int + { + return $this->data["RetCode"] ?? 0; + } + + public function getMessage(): string + { + return $this->data["Message"] ?? ""; + } + + public function getRequestId() + { + return $this->requestId; + } +} diff --git a/src/Core/Response/ResponseInterface.php b/src/Core/Response/ResponseInterface.php new file mode 100644 index 00000000..a4d0f8c6 --- /dev/null +++ b/src/Core/Response/ResponseInterface.php @@ -0,0 +1,13 @@ +baseUrl = $baseUrl; + $this->userAgent = $userAgent; + $this->client = new Client($options); + } + + /** + * Invoke action with request object + * + * @param Request $req request + * @return Response + * @throws UCloudException + */ + public function invoke(Request $req): Response + { + // do http request + try { + $response = $this->client->post($this->baseUrl, [ + RequestOptions::JSON => $req->toArray(), + RequestOptions::TIMEOUT => $req->loadTimeout(), + RequestOptions::HEADERS => [ + "User-Agent" => $this->userAgent, + ], + ]); + } catch (Throwable $e) { + throw new UCloudException( + UCloudException::EXC_TYPE_TRANSPORT, + $e->getMessage(), + -1, + $e, + ); + } + + // resolve http response + $ids = $response->getHeader(self::HEADER_REQUEST_ID); + $requestId = array_pop($ids) ?? ""; + $resp = new Response(json_decode($response->getBody(), true), $requestId); + if ($resp->getRetCode() != 0) { + throw new UCloudException( + UCloudException::EXC_TYPE_RET_CODE, + $resp->getMessage(), + $resp->getRetCode(), + null, + $requestId, + ); + } + return $resp; + } +} diff --git a/src/Core/Transport/TransportInterface.php b/src/Core/Transport/TransportInterface.php new file mode 100644 index 00000000..1a007238 --- /dev/null +++ b/src/Core/Transport/TransportInterface.php @@ -0,0 +1,12 @@ + "CreateCubeDeployment"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("VPCId"); + $this->markRequired("SubnetId"); + $this->markRequired("Deployment"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VPCId: VPCId + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPCId + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: 子网Id + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网Id + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * Deployment: base64编码的Deployment的yaml。大小不超过16KB + * + * @return string|null + */ + public function getDeployment(): string + { + return $this->get("Deployment"); + } + + /** + * Deployment: base64编码的Deployment的yaml。大小不超过16KB + * + * @param string $deployment + */ + public function setDeployment(string $deployment) + { + $this->set("Deployment", $deployment); + } + + /** + * Name: Deployment名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: Deployment名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * ChargeType: 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Postpay, \\ 后付费;默认为后付费 + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Postpay, \\ 后付费;默认为后付费 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * CpuPlatform: Cpu平台(V6:Intel、A2:AMD),默认V6。支持的地域(北京2B、北京2E、上海2A、广东、香港 、东京)目前北京2E仅有A2,其余地域仅有V6 + * + * @return string|null + */ + public function getCpuPlatform(): string + { + return $this->get("CpuPlatform"); + } + + /** + * CpuPlatform: Cpu平台(V6:Intel、A2:AMD),默认V6。支持的地域(北京2B、北京2E、上海2A、广东、香港 、东京)目前北京2E仅有A2,其余地域仅有V6 + * + * @param string $cpuPlatform + */ + public function setCpuPlatform(string $cpuPlatform) + { + $this->set("CpuPlatform", $cpuPlatform); + } + + /** + * KubeConfig: base64编码的kubeconfig。大小不超过16KB + * + * @return string|null + */ + public function getKubeConfig(): string + { + return $this->get("KubeConfig"); + } + + /** + * KubeConfig: base64编码的kubeconfig。大小不超过16KB + * + * @param string $kubeConfig + */ + public function setKubeConfig(string $kubeConfig) + { + $this->set("KubeConfig", $kubeConfig); + } + + /** + * Quantity: 购买时长。默认:值 1。 月付时,此参数传0,代表购买至月末。 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长。默认:值 1。 月付时,此参数传0,代表购买至月末。 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * Tag: 业务组。默认:Default(Default即为未分组) + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组。默认:Default(Default即为未分组) + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } +} diff --git a/src/Cube/Apis/CreateCubeDeploymentResponse.php b/src/Cube/Apis/CreateCubeDeploymentResponse.php new file mode 100644 index 00000000..199e85f8 --- /dev/null +++ b/src/Cube/Apis/CreateCubeDeploymentResponse.php @@ -0,0 +1,64 @@ +get("DeploymentId"); + } + + /** + * DeploymentId: 控制器ID + * + * @param string $deploymentId + */ + public function setDeploymentId(string $deploymentId) + { + $this->set("DeploymentId", $deploymentId); + } + + /** + * Deployment: 经过base64编码的Deployment的yaml + * + * @return string|null + */ + public function getDeployment(): string + { + return $this->get("Deployment"); + } + + /** + * Deployment: 经过base64编码的Deployment的yaml + * + * @param string $deployment + */ + public function setDeployment(string $deployment) + { + $this->set("Deployment", $deployment); + } +} diff --git a/src/Cube/Apis/CreateCubePodRequest.php b/src/Cube/Apis/CreateCubePodRequest.php new file mode 100644 index 00000000..37476e50 --- /dev/null +++ b/src/Cube/Apis/CreateCubePodRequest.php @@ -0,0 +1,314 @@ + "CreateCubePod"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("VPCId"); + $this->markRequired("SubnetId"); + $this->markRequired("Pod"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VPCId: VPCId + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPCId + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: 子网Id + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网Id + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * Pod: base64编码的Pod的yaml。大小不超过16KB + * + * @return string|null + */ + public function getPod(): string + { + return $this->get("Pod"); + } + + /** + * Pod: base64编码的Pod的yaml。大小不超过16KB + * + * @param string $pod + */ + public function setPod(string $pod) + { + $this->set("Pod", $pod); + } + + /** + * Group: pod所在组 + * + * @return string|null + */ + public function getGroup(): string + { + return $this->get("Group"); + } + + /** + * Group: pod所在组 + * + * @param string $group + */ + public function setGroup(string $group) + { + $this->set("Group", $group); + } + + /** + * Name: pod的名字 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: pod的名字 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Tag: 业务组。默认:Default(Default即为未分组) + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组。默认:Default(Default即为未分组) + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * CpuPlatform: Cpu平台(V6:Intel、A2:AMD、Auto),默认Auto。支持的地域(北京2B、北京2E、上海2A、广东、香港 、东京)目前北京2E仅有A2,其余地域仅有V6 + * + * @return string|null + */ + public function getCpuPlatform(): string + { + return $this->get("CpuPlatform"); + } + + /** + * CpuPlatform: Cpu平台(V6:Intel、A2:AMD、Auto),默认Auto。支持的地域(北京2B、北京2E、上海2A、广东、香港 、东京)目前北京2E仅有A2,其余地域仅有V6 + * + * @param string $cpuPlatform + */ + public function setCpuPlatform(string $cpuPlatform) + { + $this->set("CpuPlatform", $cpuPlatform); + } + + /** + * ChargeType: 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Postpay, \\ 后付费;默认为后付费 + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Postpay, \\ 后付费;默认为后付费 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时长。默认:值 1。 月付时,此参数传0,代表购买至月末。 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长。默认:值 1。 月付时,此参数传0,代表购买至月末。 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * KubeConfig: base64编码的kubeconfig。大小不超过16KB + * + * @return string|null + */ + public function getKubeConfig(): string + { + return $this->get("KubeConfig"); + } + + /** + * KubeConfig: base64编码的kubeconfig。大小不超过16KB + * + * @param string $kubeConfig + */ + public function setKubeConfig(string $kubeConfig) + { + $this->set("KubeConfig", $kubeConfig); + } + + /** + * CouponId: 代金券ID。请通过DescribeCoupon接口查询,或登录用户中心查看 + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 代金券ID。请通过DescribeCoupon接口查询,或登录用户中心查看 + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/Cube/Apis/CreateCubePodResponse.php b/src/Cube/Apis/CreateCubePodResponse.php new file mode 100644 index 00000000..4f7c574c --- /dev/null +++ b/src/Cube/Apis/CreateCubePodResponse.php @@ -0,0 +1,64 @@ +get("Pod"); + } + + /** + * Pod: base64编码的yaml + * + * @param string $pod + */ + public function setPod(string $pod) + { + $this->set("Pod", $pod); + } + + /** + * CubeId: cube的资源Id + * + * @return string|null + */ + public function getCubeId(): string + { + return $this->get("CubeId"); + } + + /** + * CubeId: cube的资源Id + * + * @param string $cubeId + */ + public function setCubeId(string $cubeId) + { + $this->set("CubeId", $cubeId); + } +} diff --git a/src/Cube/Apis/DeleteCubeDeploymentRequest.php b/src/Cube/Apis/DeleteCubeDeploymentRequest.php new file mode 100644 index 00000000..ccde6f41 --- /dev/null +++ b/src/Cube/Apis/DeleteCubeDeploymentRequest.php @@ -0,0 +1,111 @@ + "DeleteCubeDeployment"]); + $this->markRequired("Region"); + $this->markRequired("DeploymentId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DeploymentId: 控制器Id + * + * @return string|null + */ + public function getDeploymentId(): string + { + return $this->get("DeploymentId"); + } + + /** + * DeploymentId: 控制器Id + * + * @param string $deploymentId + */ + public function setDeploymentId(string $deploymentId) + { + $this->set("DeploymentId", $deploymentId); + } +} diff --git a/src/Cube/Apis/DeleteCubeDeploymentResponse.php b/src/Cube/Apis/DeleteCubeDeploymentResponse.php new file mode 100644 index 00000000..461c9fa3 --- /dev/null +++ b/src/Cube/Apis/DeleteCubeDeploymentResponse.php @@ -0,0 +1,26 @@ + "DeleteCubePod"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Uid: cubeid和uid任意一个(必须) + * + * @return string|null + */ + public function getUid(): string + { + return $this->get("Uid"); + } + + /** + * Uid: cubeid和uid任意一个(必须) + * + * @param string $uid + */ + public function setUid(string $uid) + { + $this->set("Uid", $uid); + } + + /** + * CubeId: cubeid和uid任意一个(必须) + * + * @return string|null + */ + public function getCubeId(): string + { + return $this->get("CubeId"); + } + + /** + * CubeId: cubeid和uid任意一个(必须) + * + * @param string $cubeId + */ + public function setCubeId(string $cubeId) + { + $this->set("CubeId", $cubeId); + } + + /** + * ReleaseEIP: 删除cube时是否释放绑定的EIP。默认为false。 + * + * @return boolean|null + */ + public function getReleaseEIP(): bool + { + return $this->get("ReleaseEIP"); + } + + /** + * ReleaseEIP: 删除cube时是否释放绑定的EIP。默认为false。 + * + * @param boolean $releaseEIP + */ + public function setReleaseEIP(bool $releaseEIP) + { + $this->set("ReleaseEIP", $releaseEIP); + } +} diff --git a/src/Cube/Apis/DeleteCubePodResponse.php b/src/Cube/Apis/DeleteCubePodResponse.php new file mode 100644 index 00000000..fa45cd5c --- /dev/null +++ b/src/Cube/Apis/DeleteCubePodResponse.php @@ -0,0 +1,26 @@ + "GetCubeDeployment"]); + $this->markRequired("Region"); + $this->markRequired("DeploymentId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DeploymentId: Deployment的Id + * + * @return string|null + */ + public function getDeploymentId(): string + { + return $this->get("DeploymentId"); + } + + /** + * DeploymentId: Deployment的Id + * + * @param string $deploymentId + */ + public function setDeploymentId(string $deploymentId) + { + $this->set("DeploymentId", $deploymentId); + } +} diff --git a/src/Cube/Apis/GetCubeDeploymentResponse.php b/src/Cube/Apis/GetCubeDeploymentResponse.php new file mode 100644 index 00000000..ef45cf5d --- /dev/null +++ b/src/Cube/Apis/GetCubeDeploymentResponse.php @@ -0,0 +1,44 @@ +get("Deployment"); + } + + /** + * Deployment: 经过base64编码的Deployment的yaml + * + * @param string $deployment + */ + public function setDeployment(string $deployment) + { + $this->set("Deployment", $deployment); + } +} diff --git a/src/Cube/Apis/GetCubeExecTokenRequest.php b/src/Cube/Apis/GetCubeExecTokenRequest.php new file mode 100644 index 00000000..b8a1fefa --- /dev/null +++ b/src/Cube/Apis/GetCubeExecTokenRequest.php @@ -0,0 +1,152 @@ + "GetCubeExecToken"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("ContainerName"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ContainerName: 容器名称 + * + * @return string|null + */ + public function getContainerName(): string + { + return $this->get("ContainerName"); + } + + /** + * ContainerName: 容器名称 + * + * @param string $containerName + */ + public function setContainerName(string $containerName) + { + $this->set("ContainerName", $containerName); + } + + /** + * CubeId: CubeId 和 Uid 中必须填写任意一个。CubeId 是所有 Cube 资源的唯一 ID,如非在 UK8S 通过 Virtual Kubelet 插件创建的 Cube, 则必填 CubeId + * + * @return string|null + */ + public function getCubeId(): string + { + return $this->get("CubeId"); + } + + /** + * CubeId: CubeId 和 Uid 中必须填写任意一个。CubeId 是所有 Cube 资源的唯一 ID,如非在 UK8S 通过 Virtual Kubelet 插件创建的 Cube, 则必填 CubeId + * + * @param string $cubeId + */ + public function setCubeId(string $cubeId) + { + $this->set("CubeId", $cubeId); + } + + /** + * Uid: CubeId 和 Uid 中必须填写任意一个。Uid 是在 UK8S 中通过 Virtual Kubelet 插件创建出的 Cube 的唯一标识 + * + * @return string|null + */ + public function getUid(): string + { + return $this->get("Uid"); + } + + /** + * Uid: CubeId 和 Uid 中必须填写任意一个。Uid 是在 UK8S 中通过 Virtual Kubelet 插件创建出的 Cube 的唯一标识 + * + * @param string $uid + */ + public function setUid(string $uid) + { + $this->set("Uid", $uid); + } +} diff --git a/src/Cube/Apis/GetCubeExecTokenResponse.php b/src/Cube/Apis/GetCubeExecTokenResponse.php new file mode 100644 index 00000000..b7579994 --- /dev/null +++ b/src/Cube/Apis/GetCubeExecTokenResponse.php @@ -0,0 +1,64 @@ +get("Token"); + } + + /** + * Token: 有效时间5min + * + * @param string $token + */ + public function setToken(string $token) + { + $this->set("Token", $token); + } + + /** + * TerminalUrl: terminal的登录连接地址,限单点登录,有效时间5min + * + * @return string|null + */ + public function getTerminalUrl(): string + { + return $this->get("TerminalUrl"); + } + + /** + * TerminalUrl: terminal的登录连接地址,限单点登录,有效时间5min + * + * @param string $terminalUrl + */ + public function setTerminalUrl(string $terminalUrl) + { + $this->set("TerminalUrl", $terminalUrl); + } +} diff --git a/src/Cube/Apis/GetCubeExtendInfoRequest.php b/src/Cube/Apis/GetCubeExtendInfoRequest.php new file mode 100644 index 00000000..78196658 --- /dev/null +++ b/src/Cube/Apis/GetCubeExtendInfoRequest.php @@ -0,0 +1,112 @@ + "GetCubeExtendInfo"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("CubeIds"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * CubeIds: id列表以逗号(,)分割 + * + * @return string|null + */ + public function getCubeIds(): string + { + return $this->get("CubeIds"); + } + + /** + * CubeIds: id列表以逗号(,)分割 + * + * @param string $cubeIds + */ + public function setCubeIds(string $cubeIds) + { + $this->set("CubeIds", $cubeIds); + } +} diff --git a/src/Cube/Apis/GetCubeExtendInfoResponse.php b/src/Cube/Apis/GetCubeExtendInfoResponse.php new file mode 100644 index 00000000..904c3fe8 --- /dev/null +++ b/src/Cube/Apis/GetCubeExtendInfoResponse.php @@ -0,0 +1,56 @@ +get("ExtendInfo") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CubeExtendInfo($item)); + } + return $result; + } + + /** + * ExtendInfo: CubeExtendInfo + * + * @param CubeExtendInfo[] $extendInfo + */ + public function setExtendInfo(array $extendInfo) + { + $result = []; + foreach ($extendInfo as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/Cube/Apis/GetCubeMetricsRequest.php b/src/Cube/Apis/GetCubeMetricsRequest.php new file mode 100644 index 00000000..83383df4 --- /dev/null +++ b/src/Cube/Apis/GetCubeMetricsRequest.php @@ -0,0 +1,196 @@ + "GetCubeMetrics"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ResourceId"); + $this->markRequired("MetricName"); + $this->markRequired("BeginTime"); + $this->markRequired("EndTime"); + $this->markRequired("ContainerName"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ResourceId: Cube实例资源ID + * + * @return string|null + */ + public function getResourceId(): string + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: Cube实例资源ID + * + * @param string $resourceId + */ + public function setResourceId(string $resourceId) + { + $this->set("ResourceId", $resourceId); + } + + /** + * MetricName: 监控指标名称 + * + * @return string[]|null + */ + public function getMetricName(): array + { + return $this->get("MetricName"); + } + + /** + * MetricName: 监控指标名称 + * + * @param string[] $metricName + */ + public function setMetricName(array $metricName) + { + $this->set("MetricName", $metricName); + } + + /** + * BeginTime: 开始时间 + * + * @return integer|null + */ + public function getBeginTime(): int + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 开始时间 + * + * @param int $beginTime + */ + public function setBeginTime(int $beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 结束时间,必须大于开始时间 + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 结束时间,必须大于开始时间 + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } + + /** + * ContainerName: Pod内容器名称 + * + * @return string|null + */ + public function getContainerName(): string + { + return $this->get("ContainerName"); + } + + /** + * ContainerName: Pod内容器名称 + * + * @param string $containerName + */ + public function setContainerName(string $containerName) + { + $this->set("ContainerName", $containerName); + } +} diff --git a/src/Cube/Apis/GetCubeMetricsResponse.php b/src/Cube/Apis/GetCubeMetricsResponse.php new file mode 100644 index 00000000..d4f65f6a --- /dev/null +++ b/src/Cube/Apis/GetCubeMetricsResponse.php @@ -0,0 +1,55 @@ +get("DataSets") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new MetricDataSet($item)); + } + return $result; + } + + /** + * DataSets: 时间序列集合 + * + * @param MetricDataSet[] $dataSets + */ + public function setDataSets(array $dataSets) + { + $result = []; + foreach ($dataSets as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/Cube/Apis/GetCubePodRequest.php b/src/Cube/Apis/GetCubePodRequest.php new file mode 100644 index 00000000..b5f9405e --- /dev/null +++ b/src/Cube/Apis/GetCubePodRequest.php @@ -0,0 +1,131 @@ + "GetCubePod"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * CubeId: CubeId和Uid任意一个 + * + * @return string|null + */ + public function getCubeId(): string + { + return $this->get("CubeId"); + } + + /** + * CubeId: CubeId和Uid任意一个 + * + * @param string $cubeId + */ + public function setCubeId(string $cubeId) + { + $this->set("CubeId", $cubeId); + } + + /** + * Uid: CubeId和Uid任意一个 + * + * @return string|null + */ + public function getUid(): string + { + return $this->get("Uid"); + } + + /** + * Uid: CubeId和Uid任意一个 + * + * @param string $uid + */ + public function setUid(string $uid) + { + $this->set("Uid", $uid); + } +} diff --git a/src/Cube/Apis/GetCubePodResponse.php b/src/Cube/Apis/GetCubePodResponse.php new file mode 100644 index 00000000..64402c14 --- /dev/null +++ b/src/Cube/Apis/GetCubePodResponse.php @@ -0,0 +1,44 @@ +get("Pod"); + } + + /** + * Pod: base64编码的pod的yaml + * + * @param string $pod + */ + public function setPod(string $pod) + { + $this->set("Pod", $pod); + } +} diff --git a/src/Cube/Apis/GetCubePriceRequest.php b/src/Cube/Apis/GetCubePriceRequest.php new file mode 100644 index 00000000..ad7c6f7e --- /dev/null +++ b/src/Cube/Apis/GetCubePriceRequest.php @@ -0,0 +1,196 @@ + "GetCubePrice"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("Count"); + $this->markRequired("Cpu"); + $this->markRequired("Mem"); + $this->markRequired("ChargeType"); + $this->markRequired("Quantity"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Count: 购买数量 + * + * @return string|null + */ + public function getCount(): string + { + return $this->get("Count"); + } + + /** + * Count: 购买数量 + * + * @param string $count + */ + public function setCount(string $count) + { + $this->set("Count", $count); + } + + /** + * Cpu: CPU 配置,单位为毫核,例如如 1 核则须输入 1000 + * + * @return string|null + */ + public function getCpu(): string + { + return $this->get("Cpu"); + } + + /** + * Cpu: CPU 配置,单位为毫核,例如如 1 核则须输入 1000 + * + * @param string $cpu + */ + public function setCpu(string $cpu) + { + $this->set("Cpu", $cpu); + } + + /** + * Mem: 内存配置,单位为 Mi,例如 1Gi 须输入 1024 + * + * @return string|null + */ + public function getMem(): string + { + return $this->get("Mem"); + } + + /** + * Mem: 内存配置,单位为 Mi,例如 1Gi 须输入 1024 + * + * @param string $mem + */ + public function setMem(string $mem) + { + $this->set("Mem", $mem); + } + + /** + * ChargeType: 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按秒后付费,默认为月付 + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按秒后付费,默认为月付 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时长。默认:值 1。按小时购买(Dynamic/Postpay)时无需此参数。 月付时,此参数传0,代表购买至月末。 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长。默认:值 1。按小时购买(Dynamic/Postpay)时无需此参数。 月付时,此参数传0,代表购买至月末。 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } +} diff --git a/src/Cube/Apis/GetCubePriceResponse.php b/src/Cube/Apis/GetCubePriceResponse.php new file mode 100644 index 00000000..177c24af --- /dev/null +++ b/src/Cube/Apis/GetCubePriceResponse.php @@ -0,0 +1,64 @@ +get("Price"); + } + + /** + * Price: 折扣后价格,单位为分 + * + * @param int $price + */ + public function setPrice(int $price) + { + $this->set("Price", $price); + } + + /** + * OriginalPrice: 列表价格,单位为分 + * + * @return integer|null + */ + public function getOriginalPrice(): int + { + return $this->get("OriginalPrice"); + } + + /** + * OriginalPrice: 列表价格,单位为分 + * + * @param int $originalPrice + */ + public function setOriginalPrice(int $originalPrice) + { + $this->set("OriginalPrice", $originalPrice); + } +} diff --git a/src/Cube/Apis/ListCubeDeploymentRequest.php b/src/Cube/Apis/ListCubeDeploymentRequest.php new file mode 100644 index 00000000..54850386 --- /dev/null +++ b/src/Cube/Apis/ListCubeDeploymentRequest.php @@ -0,0 +1,132 @@ + "ListCubeDeployment"]); + $this->markRequired("Region"); + $this->markRequired("Offset"); + $this->markRequired("Limit"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Offset: 默认0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 默认0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 默认20 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 默认20 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/Cube/Apis/ListCubeDeploymentResponse.php b/src/Cube/Apis/ListCubeDeploymentResponse.php new file mode 100644 index 00000000..5a68d4f9 --- /dev/null +++ b/src/Cube/Apis/ListCubeDeploymentResponse.php @@ -0,0 +1,64 @@ +get("TotalCount"); + } + + /** + * TotalCount: + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * Deployments: DeploymentInfo + * + * @return string[]|null + */ + public function getDeployments(): array + { + return $this->get("Deployments"); + } + + /** + * Deployments: DeploymentInfo + * + * @param string[] $deployments + */ + public function setDeployments(array $deployments) + { + $this->set("Deployments", $deployments); + } +} diff --git a/src/Cube/Apis/ListCubePodRequest.php b/src/Cube/Apis/ListCubePodRequest.php new file mode 100644 index 00000000..749286ed --- /dev/null +++ b/src/Cube/Apis/ListCubePodRequest.php @@ -0,0 +1,210 @@ + "ListCubePod"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VPCId: VPC的Id + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPC的Id + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: 子网Id + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网Id + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * Group: 组名称 + * + * @return string|null + */ + public function getGroup(): string + { + return $this->get("Group"); + } + + /** + * Group: 组名称 + * + * @param string $group + */ + public function setGroup(string $group) + { + $this->set("Group", $group); + } + + /** + * Offset: 默认0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 默认0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 默认20 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 默认20 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * DeploymentId: Deployment的Id + * + * @return string|null + */ + public function getDeploymentId(): string + { + return $this->get("DeploymentId"); + } + + /** + * DeploymentId: Deployment的Id + * + * @param string $deploymentId + */ + public function setDeploymentId(string $deploymentId) + { + $this->set("DeploymentId", $deploymentId); + } +} diff --git a/src/Cube/Apis/ListCubePodResponse.php b/src/Cube/Apis/ListCubePodResponse.php new file mode 100644 index 00000000..534c7543 --- /dev/null +++ b/src/Cube/Apis/ListCubePodResponse.php @@ -0,0 +1,64 @@ +get("Pods"); + } + + /** + * Pods: Pod列表,每条数据都做了base64编码 + * + * @param string[] $pods + */ + public function setPods(array $pods) + { + $this->set("Pods", $pods); + } + + /** + * TotalCount: Cube的总数 + * + * @return integer|null + */ + public function getTotalCount(): int + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: Cube的总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/Cube/Apis/ModifyCubeExtendInfoRequest.php b/src/Cube/Apis/ModifyCubeExtendInfoRequest.php new file mode 100644 index 00000000..d5750a04 --- /dev/null +++ b/src/Cube/Apis/ModifyCubeExtendInfoRequest.php @@ -0,0 +1,132 @@ + "ModifyCubeExtendInfo"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("CubeId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * CubeId: cube的id + * + * @return string|null + */ + public function getCubeId(): string + { + return $this->get("CubeId"); + } + + /** + * CubeId: cube的id + * + * @param string $cubeId + */ + public function setCubeId(string $cubeId) + { + $this->set("CubeId", $cubeId); + } + + /** + * Name: 修改的名字,规则(^[a-zA-Z0-9-_.\u4e00-\u9fa5]{1,32}) + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 修改的名字,规则(^[a-zA-Z0-9-_.\u4e00-\u9fa5]{1,32}) + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } +} diff --git a/src/Cube/Apis/ModifyCubeExtendInfoResponse.php b/src/Cube/Apis/ModifyCubeExtendInfoResponse.php new file mode 100644 index 00000000..449e8f1c --- /dev/null +++ b/src/Cube/Apis/ModifyCubeExtendInfoResponse.php @@ -0,0 +1,26 @@ + "ModifyCubeTag"]); + $this->markRequired("Region"); + $this->markRequired("CubeId"); + $this->markRequired("Tag"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * CubeId: CubeId + * + * @return string|null + */ + public function getCubeId(): string + { + return $this->get("CubeId"); + } + + /** + * CubeId: CubeId + * + * @param string $cubeId + */ + public function setCubeId(string $cubeId) + { + $this->set("CubeId", $cubeId); + } + + /** + * Tag: 业务组名称 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组名称 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } +} diff --git a/src/Cube/Apis/ModifyCubeTagResponse.php b/src/Cube/Apis/ModifyCubeTagResponse.php new file mode 100644 index 00000000..3d486251 --- /dev/null +++ b/src/Cube/Apis/ModifyCubeTagResponse.php @@ -0,0 +1,44 @@ +get("CubeId"); + } + + /** + * CubeId: CubeId + * + * @param string $cubeId + */ + public function setCubeId(string $cubeId) + { + $this->set("CubeId", $cubeId); + } +} diff --git a/src/Cube/Apis/RenewCubePodRequest.php b/src/Cube/Apis/RenewCubePodRequest.php new file mode 100644 index 00000000..6fbea83e --- /dev/null +++ b/src/Cube/Apis/RenewCubePodRequest.php @@ -0,0 +1,133 @@ + "RenewCubePod"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("CubeId"); + $this->markRequired("Pod"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * CubeId: 容器Id + * + * @return string|null + */ + public function getCubeId(): string + { + return $this->get("CubeId"); + } + + /** + * CubeId: 容器Id + * + * @param string $cubeId + */ + public function setCubeId(string $cubeId) + { + $this->set("CubeId", $cubeId); + } + + /** + * Pod: base64编码的Pod的yaml + * + * @return string|null + */ + public function getPod(): string + { + return $this->get("Pod"); + } + + /** + * Pod: base64编码的Pod的yaml + * + * @param string $pod + */ + public function setPod(string $pod) + { + $this->set("Pod", $pod); + } +} diff --git a/src/Cube/Apis/RenewCubePodResponse.php b/src/Cube/Apis/RenewCubePodResponse.php new file mode 100644 index 00000000..0c2c7863 --- /dev/null +++ b/src/Cube/Apis/RenewCubePodResponse.php @@ -0,0 +1,44 @@ +get("Pod"); + } + + /** + * Pod: base64编码过的yaml,需要解码获取信息 + * + * @param string $pod + */ + public function setPod(string $pod) + { + $this->set("Pod", $pod); + } +} diff --git a/src/Cube/Apis/UpdateCubeDeploymentRequest.php b/src/Cube/Apis/UpdateCubeDeploymentRequest.php new file mode 100644 index 00000000..a1c2aea8 --- /dev/null +++ b/src/Cube/Apis/UpdateCubeDeploymentRequest.php @@ -0,0 +1,152 @@ + "UpdateCubeDeployment"]); + $this->markRequired("Region"); + $this->markRequired("DeploymentId"); + $this->markRequired("Deployment"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DeploymentId: Deployment的Id + * + * @return string|null + */ + public function getDeploymentId(): string + { + return $this->get("DeploymentId"); + } + + /** + * DeploymentId: Deployment的Id + * + * @param string $deploymentId + */ + public function setDeploymentId(string $deploymentId) + { + $this->set("DeploymentId", $deploymentId); + } + + /** + * Deployment: base64编码的Deployment的yaml。大小不超过16KB + * + * @return string|null + */ + public function getDeployment(): string + { + return $this->get("Deployment"); + } + + /** + * Deployment: base64编码的Deployment的yaml。大小不超过16KB + * + * @param string $deployment + */ + public function setDeployment(string $deployment) + { + $this->set("Deployment", $deployment); + } + + /** + * Name: Deployment的name + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: Deployment的name + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } +} diff --git a/src/Cube/Apis/UpdateCubeDeploymentResponse.php b/src/Cube/Apis/UpdateCubeDeploymentResponse.php new file mode 100644 index 00000000..49b6dbc8 --- /dev/null +++ b/src/Cube/Apis/UpdateCubeDeploymentResponse.php @@ -0,0 +1,44 @@ +get("Deployment"); + } + + /** + * Deployment: 经过base64编码的Deployment的yaml + * + * @param string $deployment + */ + public function setDeployment(string $deployment) + { + $this->set("Deployment", $deployment); + } +} diff --git a/src/Cube/CubeClient.php b/src/Cube/CubeClient.php new file mode 100644 index 00000000..b9ab0b0a --- /dev/null +++ b/src/Cube/CubeClient.php @@ -0,0 +1,587 @@ + (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "VPCId" => (string) VPCId + * "SubnetId" => (string) 子网Id + * "Deployment" => (string) base64编码的Deployment的yaml。大小不超过16KB + * "Name" => (string) Deployment名称 + * "ChargeType" => (string) 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Postpay, \\ 后付费;默认为后付费 + * "CpuPlatform" => (string) Cpu平台(V6:Intel、A2:AMD),默认V6。支持的地域(北京2B、北京2E、上海2A、广东、香港 、东京)目前北京2E仅有A2,其余地域仅有V6 + * "KubeConfig" => (string) base64编码的kubeconfig。大小不超过16KB + * "Quantity" => (integer) 购买时长。默认:值 1。 月付时,此参数传0,代表购买至月末。 + * "Tag" => (string) 业务组。默认:Default(Default即为未分组) + * ] + * + * Outputs: + * + * $outputs = [ + * "DeploymentId" => (string) 控制器ID + * "Deployment" => (string) 经过base64编码的Deployment的yaml + * ] + * + * @throws UCloudException + */ + public function createCubeDeployment(CreateCubeDeploymentRequest $request = null): CreateCubeDeploymentResponse + { + $resp = $this->invoke($request); + return new CreateCubeDeploymentResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateCubePod - 创建Pod + * + * See also: https://docs.ucloud.cn/api/Cube-api/create_cube_pod + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "VPCId" => (string) VPCId + * "SubnetId" => (string) 子网Id + * "Pod" => (string) base64编码的Pod的yaml。大小不超过16KB + * "Group" => (string) pod所在组 + * "Name" => (string) pod的名字 + * "Tag" => (string) 业务组。默认:Default(Default即为未分组) + * "CpuPlatform" => (string) Cpu平台(V6:Intel、A2:AMD、Auto),默认Auto。支持的地域(北京2B、北京2E、上海2A、广东、香港 、东京)目前北京2E仅有A2,其余地域仅有V6 + * "ChargeType" => (string) 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Postpay, \\ 后付费;默认为后付费 + * "Quantity" => (integer) 购买时长。默认:值 1。 月付时,此参数传0,代表购买至月末。 + * "KubeConfig" => (string) base64编码的kubeconfig。大小不超过16KB + * "CouponId" => (string) 代金券ID。请通过DescribeCoupon接口查询,或登录用户中心查看 + * ] + * + * Outputs: + * + * $outputs = [ + * "Pod" => (string) base64编码的yaml + * "CubeId" => (string) cube的资源Id + * ] + * + * @throws UCloudException + */ + public function createCubePod(CreateCubePodRequest $request = null): CreateCubePodResponse + { + $resp = $this->invoke($request); + return new CreateCubePodResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteCubeDeployment - 删除Cube的Deployment + * + * See also: https://docs.ucloud.cn/api/Cube-api/delete_cube_deployment + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "DeploymentId" => (string) 控制器Id + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteCubeDeployment(DeleteCubeDeploymentRequest $request = null): DeleteCubeDeploymentResponse + { + $resp = $this->invoke($request); + return new DeleteCubeDeploymentResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteCubePod - 删除Pod + * + * See also: https://docs.ucloud.cn/api/Cube-api/delete_cube_pod + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Uid" => (string) cubeid和uid任意一个(必须) + * "CubeId" => (string) cubeid和uid任意一个(必须) + * "ReleaseEIP" => (boolean) 删除cube时是否释放绑定的EIP。默认为false。 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteCubePod(DeleteCubePodRequest $request = null): DeleteCubePodResponse + { + $resp = $this->invoke($request); + return new DeleteCubePodResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetCubeDeployment - 获取Deployment的详细信息 + * + * See also: https://docs.ucloud.cn/api/Cube-api/get_cube_deployment + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "DeploymentId" => (string) Deployment的Id + * ] + * + * Outputs: + * + * $outputs = [ + * "Deployment" => (string) 经过base64编码的Deployment的yaml + * ] + * + * @throws UCloudException + */ + public function getCubeDeployment(GetCubeDeploymentRequest $request = null): GetCubeDeploymentResponse + { + $resp = $this->invoke($request); + return new GetCubeDeploymentResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetCubeExecToken - 获取登录容器的token + * + * See also: https://docs.ucloud.cn/api/Cube-api/get_cube_exec_token + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ContainerName" => (string) 容器名称 + * "CubeId" => (string) CubeId 和 Uid 中必须填写任意一个。CubeId 是所有 Cube 资源的唯一 ID,如非在 UK8S 通过 Virtual Kubelet 插件创建的 Cube, 则必填 CubeId + * "Uid" => (string) CubeId 和 Uid 中必须填写任意一个。Uid 是在 UK8S 中通过 Virtual Kubelet 插件创建出的 Cube 的唯一标识 + * ] + * + * Outputs: + * + * $outputs = [ + * "Token" => (string) 有效时间5min + * "TerminalUrl" => (string) terminal的登录连接地址,限单点登录,有效时间5min + * ] + * + * @throws UCloudException + */ + public function getCubeExecToken(GetCubeExecTokenRequest $request = null): GetCubeExecTokenResponse + { + $resp = $this->invoke($request); + return new GetCubeExecTokenResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetCubeExtendInfo - 获取Cube的额外信息 + * + * See also: https://docs.ucloud.cn/api/Cube-api/get_cube_extend_info + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "CubeIds" => (string) id列表以逗号(,)分割 + * ] + * + * Outputs: + * + * $outputs = [ + * "ExtendInfo" => (array) CubeExtendInfo[ + * [ + * "CubeId" => (string) Cube的Id + * "Name" => (string) Cube的名称 + * "Eip" => (array) EIPSet[ + * [ + * "Bandwidth" => (integer) EIP带宽值 + * "BandwidthType" => (integer) 带宽类型0标准普通带宽,1表示共享带宽 + * "CreateTime" => (integer) EIP创建时间 + * "EIPAddr" => (array) EIP地址[ + * [ + * "IP" => (string) IP地址 + * "OperatorName" => (string) 线路名称BGP或者internalation + * ] + * ] + * "EIPId" => (string) EIPId + * "PayMode" => (string) 付费模式,带宽付费或者流量付费 + * "Resource" => (string) EIP绑定对象的资源Id + * "Status" => (string) EIP状态,表示使用中或者空闲 + * "Weight" => (integer) EIP权重 + * ] + * ] + * "Expiration" => (integer) 资源有效期 + * "Tag" => (string) 业务组名称 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getCubeExtendInfo(GetCubeExtendInfoRequest $request = null): GetCubeExtendInfoResponse + { + $resp = $this->invoke($request); + return new GetCubeExtendInfoResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetCubeMetrics - 获取Cube实例(Pod,PodX,Deploy等)监控数据时间序列 + * + * See also: https://docs.ucloud.cn/api/Cube-api/get_cube_metrics + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ResourceId" => (string) Cube实例资源ID + * "MetricName" => (array) 监控指标名称 + * "BeginTime" => (integer) 开始时间 + * "EndTime" => (integer) 结束时间,必须大于开始时间 + * "ContainerName" => (string) Pod内容器名称 + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSets" => (array) 时间序列集合[ + * [ + * "MetricName" => (string) + * "Values" => (array) [ + * [ + * "Value" => (number) + * "Timestamp" => (integer) + * ] + * ] + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getCubeMetrics(GetCubeMetricsRequest $request = null): GetCubeMetricsResponse + { + $resp = $this->invoke($request); + return new GetCubeMetricsResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetCubePod - 获取Pod的详细信息 + * + * See also: https://docs.ucloud.cn/api/Cube-api/get_cube_pod + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "CubeId" => (string) CubeId和Uid任意一个 + * "Uid" => (string) CubeId和Uid任意一个 + * ] + * + * Outputs: + * + * $outputs = [ + * "Pod" => (string) base64编码的pod的yaml + * ] + * + * @throws UCloudException + */ + public function getCubePod(GetCubePodRequest $request = null): GetCubePodResponse + { + $resp = $this->invoke($request); + return new GetCubePodResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetCubePrice - 获取cube的价格 + * + * See also: https://docs.ucloud.cn/api/Cube-api/get_cube_price + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Count" => (string) 购买数量 + * "Cpu" => (string) CPU 配置,单位为毫核,例如如 1 核则须输入 1000 + * "Mem" => (string) 内存配置,单位为 Mi,例如 1Gi 须输入 1024 + * "ChargeType" => (string) 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按秒后付费,默认为月付 + * "Quantity" => (integer) 购买时长。默认:值 1。按小时购买(Dynamic/Postpay)时无需此参数。 月付时,此参数传0,代表购买至月末。 + * ] + * + * Outputs: + * + * $outputs = [ + * "Price" => (integer) 折扣后价格,单位为分 + * "OriginalPrice" => (integer) 列表价格,单位为分 + * ] + * + * @throws UCloudException + */ + public function getCubePrice(GetCubePriceRequest $request = null): GetCubePriceResponse + { + $resp = $this->invoke($request); + return new GetCubePriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListCubeDeployment - 获取Cube的Deployment列表 + * + * See also: https://docs.ucloud.cn/api/Cube-api/list_cube_deployment + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Offset" => (integer) 默认0 + * "Limit" => (integer) 默认20 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) + * "Deployments" => (array) DeploymentInfo + * ] + * + * @throws UCloudException + */ + public function listCubeDeployment(ListCubeDeploymentRequest $request = null): ListCubeDeploymentResponse + { + $resp = $this->invoke($request); + return new ListCubeDeploymentResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListCubePod - 获取Pods列表 + * + * See also: https://docs.ucloud.cn/api/Cube-api/list_cube_pod + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "VPCId" => (string) VPC的Id + * "SubnetId" => (string) 子网Id + * "Group" => (string) 组名称 + * "Offset" => (integer) 默认0 + * "Limit" => (integer) 默认20 + * "DeploymentId" => (string) Deployment的Id + * ] + * + * Outputs: + * + * $outputs = [ + * "Pods" => (array) Pod列表,每条数据都做了base64编码 + * "TotalCount" => (integer) Cube的总数 + * ] + * + * @throws UCloudException + */ + public function listCubePod(ListCubePodRequest $request = null): ListCubePodResponse + { + $resp = $this->invoke($request); + return new ListCubePodResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyCubeExtendInfo - 修改Cube额外信息 + * + * See also: https://docs.ucloud.cn/api/Cube-api/modify_cube_extend_info + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "CubeId" => (string) cube的id + * "Name" => (string) 修改的名字,规则(^[a-zA-Z0-9-_.\u4e00-\u9fa5]{1,32}) + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function modifyCubeExtendInfo(ModifyCubeExtendInfoRequest $request = null): ModifyCubeExtendInfoResponse + { + $resp = $this->invoke($request); + return new ModifyCubeExtendInfoResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyCubeTag - 修改业务组名字 + * + * See also: https://docs.ucloud.cn/api/Cube-api/modify_cube_tag + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "CubeId" => (string) CubeId + * "Tag" => (string) 业务组名称 + * ] + * + * Outputs: + * + * $outputs = [ + * "CubeId" => (string) CubeId + * ] + * + * @throws UCloudException + */ + public function modifyCubeTag(ModifyCubeTagRequest $request = null): ModifyCubeTagResponse + { + $resp = $this->invoke($request); + return new ModifyCubeTagResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * RenewCubePod - 更新Pod + * + * See also: https://docs.ucloud.cn/api/Cube-api/renew_cube_pod + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "CubeId" => (string) 容器Id + * "Pod" => (string) base64编码的Pod的yaml + * ] + * + * Outputs: + * + * $outputs = [ + * "Pod" => (string) base64编码过的yaml,需要解码获取信息 + * ] + * + * @throws UCloudException + */ + public function renewCubePod(RenewCubePodRequest $request = null): RenewCubePodResponse + { + $resp = $this->invoke($request); + return new RenewCubePodResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateCubeDeployment - 更新Deployment + * + * See also: https://docs.ucloud.cn/api/Cube-api/update_cube_deployment + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "DeploymentId" => (string) Deployment的Id + * "Deployment" => (string) base64编码的Deployment的yaml。大小不超过16KB + * "Name" => (string) Deployment的name + * ] + * + * Outputs: + * + * $outputs = [ + * "Deployment" => (string) 经过base64编码的Deployment的yaml + * ] + * + * @throws UCloudException + */ + public function updateCubeDeployment(UpdateCubeDeploymentRequest $request = null): UpdateCubeDeploymentResponse + { + $resp = $this->invoke($request); + return new UpdateCubeDeploymentResponse($resp->toArray(), $resp->getRequestId()); + } +} diff --git a/src/Cube/Models/CubeExtendInfo.php b/src/Cube/Models/CubeExtendInfo.php new file mode 100644 index 00000000..e98333ad --- /dev/null +++ b/src/Cube/Models/CubeExtendInfo.php @@ -0,0 +1,133 @@ +get("CubeId"); + } + + /** + * CubeId: Cube的Id + * + * @param string $cubeId + */ + public function setCubeId(string $cubeId) + { + $this->set("CubeId", $cubeId); + } + + /** + * Name: Cube的名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: Cube的名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Eip: EIPSet + * + * @return EIPSet[]|null + */ + public function getEip(): array + { + $items = $this->get("Eip") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new EIPSet($item)); + } + return $result; + } + + /** + * Eip: EIPSet + * + * @param EIPSet[] $eip + */ + public function setEip(array $eip) + { + $result = []; + foreach ($eip as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * Expiration: 资源有效期 + * + * @return integer|null + */ + public function getExpiration(): int + { + return $this->get("Expiration"); + } + + /** + * Expiration: 资源有效期 + * + * @param int $expiration + */ + public function setExpiration(int $expiration) + { + $this->set("Expiration", $expiration); + } + + /** + * Tag: 业务组名称 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组名称 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } +} diff --git a/src/Cube/Models/EIPAddr.php b/src/Cube/Models/EIPAddr.php new file mode 100644 index 00000000..ba01ba89 --- /dev/null +++ b/src/Cube/Models/EIPAddr.php @@ -0,0 +1,64 @@ +get("IP"); + } + + /** + * IP: IP地址 + * + * @param string $ip + */ + public function setIP(string $ip) + { + $this->set("IP", $ip); + } + + /** + * OperatorName: 线路名称BGP或者internalation + * + * @return string|null + */ + public function getOperatorName(): string + { + return $this->get("OperatorName"); + } + + /** + * OperatorName: 线路名称BGP或者internalation + * + * @param string $operatorName + */ + public function setOperatorName(string $operatorName) + { + $this->set("OperatorName", $operatorName); + } +} diff --git a/src/Cube/Models/EIPSet.php b/src/Cube/Models/EIPSet.php new file mode 100644 index 00000000..01881281 --- /dev/null +++ b/src/Cube/Models/EIPSet.php @@ -0,0 +1,213 @@ +get("Bandwidth"); + } + + /** + * Bandwidth: EIP带宽值 + * + * @param int $bandwidth + */ + public function setBandwidth(int $bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * BandwidthType: 带宽类型0标准普通带宽,1表示共享带宽 + * + * @return integer|null + */ + public function getBandwidthType(): int + { + return $this->get("BandwidthType"); + } + + /** + * BandwidthType: 带宽类型0标准普通带宽,1表示共享带宽 + * + * @param int $bandwidthType + */ + public function setBandwidthType(int $bandwidthType) + { + $this->set("BandwidthType", $bandwidthType); + } + + /** + * CreateTime: EIP创建时间 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: EIP创建时间 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * EIPAddr: EIP地址 + * + * @return EIPAddr[]|null + */ + public function getEIPAddr(): array + { + $items = $this->get("EIPAddr") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new EIPAddr($item)); + } + return $result; + } + + /** + * EIPAddr: EIP地址 + * + * @param EIPAddr[] $eipAddr + */ + public function setEIPAddr(array $eipAddr) + { + $result = []; + foreach ($eipAddr as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * EIPId: EIPId + * + * @return string|null + */ + public function getEIPId(): string + { + return $this->get("EIPId"); + } + + /** + * EIPId: EIPId + * + * @param string $eipId + */ + public function setEIPId(string $eipId) + { + $this->set("EIPId", $eipId); + } + + /** + * PayMode: 付费模式,带宽付费或者流量付费 + * + * @return string|null + */ + public function getPayMode(): string + { + return $this->get("PayMode"); + } + + /** + * PayMode: 付费模式,带宽付费或者流量付费 + * + * @param string $payMode + */ + public function setPayMode(string $payMode) + { + $this->set("PayMode", $payMode); + } + + /** + * Resource: EIP绑定对象的资源Id + * + * @return string|null + */ + public function getResource(): string + { + return $this->get("Resource"); + } + + /** + * Resource: EIP绑定对象的资源Id + * + * @param string $resource + */ + public function setResource(string $resource) + { + $this->set("Resource", $resource); + } + + /** + * Status: EIP状态,表示使用中或者空闲 + * + * @return string|null + */ + public function getStatus(): string + { + return $this->get("Status"); + } + + /** + * Status: EIP状态,表示使用中或者空闲 + * + * @param string $status + */ + public function setStatus(string $status) + { + $this->set("Status", $status); + } + + /** + * Weight: EIP权重 + * + * @return integer|null + */ + public function getWeight(): int + { + return $this->get("Weight"); + } + + /** + * Weight: EIP权重 + * + * @param int $weight + */ + public function setWeight(int $weight) + { + $this->set("Weight", $weight); + } +} diff --git a/src/Cube/Models/MetricDataSet.php b/src/Cube/Models/MetricDataSet.php new file mode 100644 index 00000000..479ec2a3 --- /dev/null +++ b/src/Cube/Models/MetricDataSet.php @@ -0,0 +1,73 @@ +get("MetricName"); + } + + /** + * MetricName: + * + * @param string $metricName + */ + public function setMetricName(string $metricName) + { + $this->set("MetricName", $metricName); + } + + /** + * Values: + * + * @return ValueSet[]|null + */ + public function getValues(): array + { + $items = $this->get("Values") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ValueSet($item)); + } + return $result; + } + + /** + * Values: + * + * @param ValueSet[] $values + */ + public function setValues(array $values) + { + $result = []; + foreach ($values as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/Cube/Models/ValueSet.php b/src/Cube/Models/ValueSet.php new file mode 100644 index 00000000..f96cd579 --- /dev/null +++ b/src/Cube/Models/ValueSet.php @@ -0,0 +1,64 @@ +get("Value"); + } + + /** + * Value: + * + * @param float $value + */ + public function setValue(float $value) + { + $this->set("Value", $value); + } + + /** + * Timestamp: + * + * @return integer|null + */ + public function getTimestamp(): int + { + return $this->get("Timestamp"); + } + + /** + * Timestamp: + * + * @param int $timestamp + */ + public function setTimestamp(int $timestamp) + { + $this->set("Timestamp", $timestamp); + } +} diff --git a/src/IPSecVPN/Apis/CreateRemoteVPNGatewayRequest.php b/src/IPSecVPN/Apis/CreateRemoteVPNGatewayRequest.php new file mode 100644 index 00000000..14a76862 --- /dev/null +++ b/src/IPSecVPN/Apis/CreateRemoteVPNGatewayRequest.php @@ -0,0 +1,153 @@ + "CreateRemoteVPNGateway"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("RemoteVPNGatewayName"); + $this->markRequired("RemoteVPNGatewayAddr"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * RemoteVPNGatewayName: 客户VPN网关名称 + * + * @return string|null + */ + public function getRemoteVPNGatewayName(): string + { + return $this->get("RemoteVPNGatewayName"); + } + + /** + * RemoteVPNGatewayName: 客户VPN网关名称 + * + * @param string $remoteVPNGatewayName + */ + public function setRemoteVPNGatewayName(string $remoteVPNGatewayName) + { + $this->set("RemoteVPNGatewayName", $remoteVPNGatewayName); + } + + /** + * RemoteVPNGatewayAddr: 客户VPN网关地址 + * + * @return string|null + */ + public function getRemoteVPNGatewayAddr(): string + { + return $this->get("RemoteVPNGatewayAddr"); + } + + /** + * RemoteVPNGatewayAddr: 客户VPN网关地址 + * + * @param string $remoteVPNGatewayAddr + */ + public function setRemoteVPNGatewayAddr(string $remoteVPNGatewayAddr) + { + $this->set("RemoteVPNGatewayAddr", $remoteVPNGatewayAddr); + } + + /** + * Tag: 业务组名称,默认为 "Default" + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组名称,默认为 "Default" + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Remark: 备注,默认为空 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 备注,默认为空 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } +} diff --git a/src/IPSecVPN/Apis/CreateRemoteVPNGatewayResponse.php b/src/IPSecVPN/Apis/CreateRemoteVPNGatewayResponse.php new file mode 100644 index 00000000..d8ffd5f2 --- /dev/null +++ b/src/IPSecVPN/Apis/CreateRemoteVPNGatewayResponse.php @@ -0,0 +1,44 @@ +get("RemoteVPNGatewayId"); + } + + /** + * RemoteVPNGatewayId: 新建客户VPN网关的资源ID + * + * @param string $remoteVPNGatewayId + */ + public function setRemoteVPNGatewayId(string $remoteVPNGatewayId) + { + $this->set("RemoteVPNGatewayId", $remoteVPNGatewayId); + } +} diff --git a/src/IPSecVPN/Apis/CreateVPNGatewayRequest.php b/src/IPSecVPN/Apis/CreateVPNGatewayRequest.php new file mode 100644 index 00000000..cba22070 --- /dev/null +++ b/src/IPSecVPN/Apis/CreateVPNGatewayRequest.php @@ -0,0 +1,274 @@ + "CreateVPNGateway"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("VPNGatewayName"); + $this->markRequired("VPCId"); + $this->markRequired("Grade"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VPNGatewayName: 新建VPN网关名称 + * + * @return string|null + */ + public function getVPNGatewayName(): string + { + return $this->get("VPNGatewayName"); + } + + /** + * VPNGatewayName: 新建VPN网关名称 + * + * @param string $vpnGatewayName + */ + public function setVPNGatewayName(string $vpnGatewayName) + { + $this->set("VPNGatewayName", $vpnGatewayName); + } + + /** + * VPCId: 新建VPN网关所属VPC的资源ID + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: 新建VPN网关所属VPC的资源ID + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * Grade: 购买的VPN网关规格,枚举值为: Standard, 标准型; Enhanced, 增强型 + * + * @return string|null + */ + public function getGrade(): string + { + return $this->get("Grade"); + } + + /** + * Grade: 购买的VPN网关规格,枚举值为: Standard, 标准型; Enhanced, 增强型 + * + * @param string $grade + */ + public function setGrade(string $grade) + { + $this->set("Grade", $grade); + } + + /** + * Remark: 备注,默认为空 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 备注,默认为空 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } + + /** + * Tag: 业务组名称,默认为 "Default" + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组名称,默认为 "Default" + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Quantity: 购买时长, 默认: 1 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长, 默认: 1 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * ChargeType: 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费;Dynamic, 按需付费(需开启权限);Trial, 试用(需开启权限);默认为按月付费 + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费;Dynamic, 按需付费(需开启权限);Trial, 试用(需开启权限);默认为按月付费 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * BusinessId: 业务组ID + * + * @return string|null + */ + public function getBusinessId(): string + { + return $this->get("BusinessId"); + } + + /** + * BusinessId: 业务组ID + * + * @param string $businessId + */ + public function setBusinessId(string $businessId) + { + $this->set("BusinessId", $businessId); + } + + /** + * EIPId: 若要绑定EIP,在此填上EIP的资源ID + * + * @return string|null + */ + public function getEIPId(): string + { + return $this->get("EIPId"); + } + + /** + * EIPId: 若要绑定EIP,在此填上EIP的资源ID + * + * @param string $eipId + */ + public function setEIPId(string $eipId) + { + $this->set("EIPId", $eipId); + } + + /** + * CouponId: 代金券ID, 默认不使用 + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 代金券ID, 默认不使用 + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/IPSecVPN/Apis/CreateVPNGatewayResponse.php b/src/IPSecVPN/Apis/CreateVPNGatewayResponse.php new file mode 100644 index 00000000..920009b9 --- /dev/null +++ b/src/IPSecVPN/Apis/CreateVPNGatewayResponse.php @@ -0,0 +1,44 @@ +get("VPNGatewayId"); + } + + /** + * VPNGatewayId: 新建VPN网关的资源ID + * + * @param string $vpnGatewayId + */ + public function setVPNGatewayId(string $vpnGatewayId) + { + $this->set("VPNGatewayId", $vpnGatewayId); + } +} diff --git a/src/IPSecVPN/Apis/CreateVPNTunnelRequest.php b/src/IPSecVPN/Apis/CreateVPNTunnelRequest.php new file mode 100644 index 00000000..626a00d8 --- /dev/null +++ b/src/IPSecVPN/Apis/CreateVPNTunnelRequest.php @@ -0,0 +1,539 @@ + "CreateVPNTunnel"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("VPNTunnelName"); + $this->markRequired("VPNGatewayId"); + $this->markRequired("RemoteVPNGatewayId"); + $this->markRequired("IKEPreSharedKey"); + $this->markRequired("VPCId"); + $this->markRequired("IPSecLocalSubnetIds"); + $this->markRequired("IPSecRemoteSubnets"); + $this->markRequired("IKEVersion"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VPNTunnelName: VPN隧道名称 + * + * @return string|null + */ + public function getVPNTunnelName(): string + { + return $this->get("VPNTunnelName"); + } + + /** + * VPNTunnelName: VPN隧道名称 + * + * @param string $vpnTunnelName + */ + public function setVPNTunnelName(string $vpnTunnelName) + { + $this->set("VPNTunnelName", $vpnTunnelName); + } + + /** + * VPNGatewayId: VPN网关的资源ID + * + * @return string|null + */ + public function getVPNGatewayId(): string + { + return $this->get("VPNGatewayId"); + } + + /** + * VPNGatewayId: VPN网关的资源ID + * + * @param string $vpnGatewayId + */ + public function setVPNGatewayId(string $vpnGatewayId) + { + $this->set("VPNGatewayId", $vpnGatewayId); + } + + /** + * RemoteVPNGatewayId: 客户VPN网关的资源ID + * + * @return string|null + */ + public function getRemoteVPNGatewayId(): string + { + return $this->get("RemoteVPNGatewayId"); + } + + /** + * RemoteVPNGatewayId: 客户VPN网关的资源ID + * + * @param string $remoteVPNGatewayId + */ + public function setRemoteVPNGatewayId(string $remoteVPNGatewayId) + { + $this->set("RemoteVPNGatewayId", $remoteVPNGatewayId); + } + + /** + * IKEPreSharedKey: 预共享密钥 + * + * @return string|null + */ + public function getIKEPreSharedKey(): string + { + return $this->get("IKEPreSharedKey"); + } + + /** + * IKEPreSharedKey: 预共享密钥 + * + * @param string $ikePreSharedKey + */ + public function setIKEPreSharedKey(string $ikePreSharedKey) + { + $this->set("IKEPreSharedKey", $ikePreSharedKey); + } + + /** + * VPCId: vpcId + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: vpcId + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * IPSecLocalSubnetIds: 指定VPN连接的本地子网的资源ID,最多可填写10个。 + * + * @return string[]|null + */ + public function getIPSecLocalSubnetIds(): array + { + return $this->get("IPSecLocalSubnetIds"); + } + + /** + * IPSecLocalSubnetIds: 指定VPN连接的本地子网的资源ID,最多可填写10个。 + * + * @param string[] $ipSecLocalSubnetIds + */ + public function setIPSecLocalSubnetIds(array $ipSecLocalSubnetIds) + { + $this->set("IPSecLocalSubnetIds", $ipSecLocalSubnetIds); + } + + /** + * IPSecRemoteSubnets: 指定VPN连接的客户网段,最多可填写20个。 + * + * @return string[]|null + */ + public function getIPSecRemoteSubnets(): array + { + return $this->get("IPSecRemoteSubnets"); + } + + /** + * IPSecRemoteSubnets: 指定VPN连接的客户网段,最多可填写20个。 + * + * @param string[] $ipSecRemoteSubnets + */ + public function setIPSecRemoteSubnets(array $ipSecRemoteSubnets) + { + $this->set("IPSecRemoteSubnets", $ipSecRemoteSubnets); + } + + /** + * IKEVersion: ike版本,枚举值: "IKE V1","IKE V2",默认v1 + * + * @return string|null + */ + public function getIKEVersion(): string + { + return $this->get("IKEVersion"); + } + + /** + * IKEVersion: ike版本,枚举值: "IKE V1","IKE V2",默认v1 + * + * @param string $ikeVersion + */ + public function setIKEVersion(string $ikeVersion) + { + $this->set("IKEVersion", $ikeVersion); + } + + /** + * Tag: 业务组,默认为“Default” + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组,默认为“Default” + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Remark: 备注,默认为空 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 备注,默认为空 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } + + /** + * IKEEncryptionAlgorithm: IKE协商过程中使用的加密算法,枚举值,"aes128", "aes192", "aes256", "aes512", "3des"。默认值为“aes128” + * + * @return string|null + */ + public function getIKEEncryptionAlgorithm(): string + { + return $this->get("IKEEncryptionAlgorithm"); + } + + /** + * IKEEncryptionAlgorithm: IKE协商过程中使用的加密算法,枚举值,"aes128", "aes192", "aes256", "aes512", "3des"。默认值为“aes128” + * + * @param string $ikeEncryptionAlgorithm + */ + public function setIKEEncryptionAlgorithm(string $ikeEncryptionAlgorithm) + { + $this->set("IKEEncryptionAlgorithm", $ikeEncryptionAlgorithm); + } + + /** + * IKEAuthenticationAlgorithm: IKE协商过程中使用的认证算法,"md5", "sha1", "sha2-256"。默认值为“sha1” + * + * @return string|null + */ + public function getIKEAuthenticationAlgorithm(): string + { + return $this->get("IKEAuthenticationAlgorithm"); + } + + /** + * IKEAuthenticationAlgorithm: IKE协商过程中使用的认证算法,"md5", "sha1", "sha2-256"。默认值为“sha1” + * + * @param string $ikeAuthenticationAlgorithm + */ + public function setIKEAuthenticationAlgorithm(string $ikeAuthenticationAlgorithm) + { + $this->set("IKEAuthenticationAlgorithm", $ikeAuthenticationAlgorithm); + } + + /** + * IKEExchangeMode: IKE协商过程中使用的模式,枚举值,主模式,“main”;野蛮模式,“aggressive”。IKEV1默认为主模式“main”,IKEV2时不使用该参数。 + * + * @return string|null + */ + public function getIKEExchangeMode(): string + { + return $this->get("IKEExchangeMode"); + } + + /** + * IKEExchangeMode: IKE协商过程中使用的模式,枚举值,主模式,“main”;野蛮模式,“aggressive”。IKEV1默认为主模式“main”,IKEV2时不使用该参数。 + * + * @param string $ikeExchangeMode + */ + public function setIKEExchangeMode(string $ikeExchangeMode) + { + $this->set("IKEExchangeMode", $ikeExchangeMode); + } + + /** + * IKELocalId: 本端标识。枚举值,自动识别,“auto”;IP地址或域名。默认为自动识别“auto”。IKEV2必填该参数 + * + * @return string|null + */ + public function getIKELocalId(): string + { + return $this->get("IKELocalId"); + } + + /** + * IKELocalId: 本端标识。枚举值,自动识别,“auto”;IP地址或域名。默认为自动识别“auto”。IKEV2必填该参数 + * + * @param string $ikeLocalId + */ + public function setIKELocalId(string $ikeLocalId) + { + $this->set("IKELocalId", $ikeLocalId); + } + + /** + * IKERemoteId: 客户端标识。枚举值,自动识别,“auto”;IP地址或域名。默认为“自动识别“auto”。IKEV2必填该参数 + * + * @return string|null + */ + public function getIKERemoteId(): string + { + return $this->get("IKERemoteId"); + } + + /** + * IKERemoteId: 客户端标识。枚举值,自动识别,“auto”;IP地址或域名。默认为“自动识别“auto”。IKEV2必填该参数 + * + * @param string $ikeRemoteId + */ + public function setIKERemoteId(string $ikeRemoteId) + { + $this->set("IKERemoteId", $ikeRemoteId); + } + + /** + * IKEDhGroup: IKE协商过程中使用的DH组,枚举值,"1", "2", "5", "14", "15", "16"。默认为“15” + * + * @return string|null + */ + public function getIKEDhGroup(): string + { + return $this->get("IKEDhGroup"); + } + + /** + * IKEDhGroup: IKE协商过程中使用的DH组,枚举值,"1", "2", "5", "14", "15", "16"。默认为“15” + * + * @param string $ikeDhGroup + */ + public function setIKEDhGroup(string $ikeDhGroup) + { + $this->set("IKEDhGroup", $ikeDhGroup); + } + + /** + * IKESALifetime: IKE中SA的生存时间,可填写范围为600-604800。默认为86400。 + * + * @return string|null + */ + public function getIKESALifetime(): string + { + return $this->get("IKESALifetime"); + } + + /** + * IKESALifetime: IKE中SA的生存时间,可填写范围为600-604800。默认为86400。 + * + * @param string $ikesaLifetime + */ + public function setIKESALifetime(string $ikesaLifetime) + { + $this->set("IKESALifetime", $ikesaLifetime); + } + + /** + * IPSecProtocol: 使用的安全协议,枚举值,“esp”,“ah”。默认为“esp” + * + * @return string|null + */ + public function getIPSecProtocol(): string + { + return $this->get("IPSecProtocol"); + } + + /** + * IPSecProtocol: 使用的安全协议,枚举值,“esp”,“ah”。默认为“esp” + * + * @param string $ipSecProtocol + */ + public function setIPSecProtocol(string $ipSecProtocol) + { + $this->set("IPSecProtocol", $ipSecProtocol); + } + + /** + * IPSecEncryptionAlgorithm: IPSec隧道中使用的加密算法,枚举值,"aes128", "aes192", "aes256", "aes512", "3des"。默认值为“aes128” + * + * @return string|null + */ + public function getIPSecEncryptionAlgorithm(): string + { + return $this->get("IPSecEncryptionAlgorithm"); + } + + /** + * IPSecEncryptionAlgorithm: IPSec隧道中使用的加密算法,枚举值,"aes128", "aes192", "aes256", "aes512", "3des"。默认值为“aes128” + * + * @param string $ipSecEncryptionAlgorithm + */ + public function setIPSecEncryptionAlgorithm(string $ipSecEncryptionAlgorithm) + { + $this->set("IPSecEncryptionAlgorithm", $ipSecEncryptionAlgorithm); + } + + /** + * IPSecAuthenticationAlgorithm: IPSec隧道中使用的认证算法,枚举值,"md5", "sha1"。默认值为“sha1” + * + * @return string|null + */ + public function getIPSecAuthenticationAlgorithm(): string + { + return $this->get("IPSecAuthenticationAlgorithm"); + } + + /** + * IPSecAuthenticationAlgorithm: IPSec隧道中使用的认证算法,枚举值,"md5", "sha1"。默认值为“sha1” + * + * @param string $ipSecAuthenticationAlgorithm + */ + public function setIPSecAuthenticationAlgorithm(string $ipSecAuthenticationAlgorithm) + { + $this->set("IPSecAuthenticationAlgorithm", $ipSecAuthenticationAlgorithm); + } + + /** + * IPSecSALifetime: IPSec中SA的生存时间,可填写范围为1200 - 604800。默认为3600 + * + * @return string|null + */ + public function getIPSecSALifetime(): string + { + return $this->get("IPSecSALifetime"); + } + + /** + * IPSecSALifetime: IPSec中SA的生存时间,可填写范围为1200 - 604800。默认为3600 + * + * @param string $ipSecSALifetime + */ + public function setIPSecSALifetime(string $ipSecSALifetime) + { + $this->set("IPSecSALifetime", $ipSecSALifetime); + } + + /** + * IPSecSALifetimeBytes: IPSec中SA的生存时间(以字节计)。可选为8000 – 20000000。默认使用SA生存时间, + * + * @return string|null + */ + public function getIPSecSALifetimeBytes(): string + { + return $this->get("IPSecSALifetimeBytes"); + } + + /** + * IPSecSALifetimeBytes: IPSec中SA的生存时间(以字节计)。可选为8000 – 20000000。默认使用SA生存时间, + * + * @param string $ipSecSALifetimeBytes + */ + public function setIPSecSALifetimeBytes(string $ipSecSALifetimeBytes) + { + $this->set("IPSecSALifetimeBytes", $ipSecSALifetimeBytes); + } + + /** + * IPSecPFSDhGroup: IPSec的PFS是否开启,枚举值,,不开启,"disable";数字表示DH组, "1", "2", "5", "14", "15", "16"。默认为“disable”。 + * + * @return string|null + */ + public function getIPSecPFSDhGroup(): string + { + return $this->get("IPSecPFSDhGroup"); + } + + /** + * IPSecPFSDhGroup: IPSec的PFS是否开启,枚举值,,不开启,"disable";数字表示DH组, "1", "2", "5", "14", "15", "16"。默认为“disable”。 + * + * @param string $ipSecPFSDhGroup + */ + public function setIPSecPFSDhGroup(string $ipSecPFSDhGroup) + { + $this->set("IPSecPFSDhGroup", $ipSecPFSDhGroup); + } +} diff --git a/src/IPSecVPN/Apis/CreateVPNTunnelResponse.php b/src/IPSecVPN/Apis/CreateVPNTunnelResponse.php new file mode 100644 index 00000000..b7068370 --- /dev/null +++ b/src/IPSecVPN/Apis/CreateVPNTunnelResponse.php @@ -0,0 +1,44 @@ +get("VPNTunnelId"); + } + + /** + * VPNTunnelId: VPN隧道的资源ID + * + * @param string $vpnTunnelId + */ + public function setVPNTunnelId(string $vpnTunnelId) + { + $this->set("VPNTunnelId", $vpnTunnelId); + } +} diff --git a/src/IPSecVPN/Apis/DeleteRemoteVPNGatewayRequest.php b/src/IPSecVPN/Apis/DeleteRemoteVPNGatewayRequest.php new file mode 100644 index 00000000..69a55f45 --- /dev/null +++ b/src/IPSecVPN/Apis/DeleteRemoteVPNGatewayRequest.php @@ -0,0 +1,92 @@ + "DeleteRemoteVPNGateway"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("RemoteVPNGatewayId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * RemoteVPNGatewayId: 客户VPN网关的资源ID + * + * @return string|null + */ + public function getRemoteVPNGatewayId(): string + { + return $this->get("RemoteVPNGatewayId"); + } + + /** + * RemoteVPNGatewayId: 客户VPN网关的资源ID + * + * @param string $remoteVPNGatewayId + */ + public function setRemoteVPNGatewayId(string $remoteVPNGatewayId) + { + $this->set("RemoteVPNGatewayId", $remoteVPNGatewayId); + } +} diff --git a/src/IPSecVPN/Apis/DeleteRemoteVPNGatewayResponse.php b/src/IPSecVPN/Apis/DeleteRemoteVPNGatewayResponse.php new file mode 100644 index 00000000..8659811f --- /dev/null +++ b/src/IPSecVPN/Apis/DeleteRemoteVPNGatewayResponse.php @@ -0,0 +1,26 @@ + "DeleteVPNGateway"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("VPNGatewayId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VPNGatewayId: VPN网关的资源ID + * + * @return string|null + */ + public function getVPNGatewayId(): string + { + return $this->get("VPNGatewayId"); + } + + /** + * VPNGatewayId: VPN网关的资源ID + * + * @param string $vpnGatewayId + */ + public function setVPNGatewayId(string $vpnGatewayId) + { + $this->set("VPNGatewayId", $vpnGatewayId); + } + + /** + * ReleaseEip: 删除VPN时是否一并释放EIP。false,只解绑EIP不删除EIP;true,解绑并释放EIP。默认是false + * + * @return boolean|null + */ + public function getReleaseEip(): bool + { + return $this->get("ReleaseEip"); + } + + /** + * ReleaseEip: 删除VPN时是否一并释放EIP。false,只解绑EIP不删除EIP;true,解绑并释放EIP。默认是false + * + * @param boolean $releaseEip + */ + public function setReleaseEip(bool $releaseEip) + { + $this->set("ReleaseEip", $releaseEip); + } +} diff --git a/src/IPSecVPN/Apis/DeleteVPNGatewayResponse.php b/src/IPSecVPN/Apis/DeleteVPNGatewayResponse.php new file mode 100644 index 00000000..595a6296 --- /dev/null +++ b/src/IPSecVPN/Apis/DeleteVPNGatewayResponse.php @@ -0,0 +1,26 @@ + "DeleteVPNTunnel"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("VPNTunnelId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VPNTunnelId: VPN隧道的资源ID + * + * @return string|null + */ + public function getVPNTunnelId(): string + { + return $this->get("VPNTunnelId"); + } + + /** + * VPNTunnelId: VPN隧道的资源ID + * + * @param string $vpnTunnelId + */ + public function setVPNTunnelId(string $vpnTunnelId) + { + $this->set("VPNTunnelId", $vpnTunnelId); + } +} diff --git a/src/IPSecVPN/Apis/DeleteVPNTunnelResponse.php b/src/IPSecVPN/Apis/DeleteVPNTunnelResponse.php new file mode 100644 index 00000000..5c6a04a3 --- /dev/null +++ b/src/IPSecVPN/Apis/DeleteVPNTunnelResponse.php @@ -0,0 +1,26 @@ + "DescribeRemoteVPNGateway"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * RemoteVPNGatewayIds: 客户VPN网关的资源ID,例如RemoteVPNGatewayIds.0代表希望获取客户VPN网关1的信息,RemoteVPNGatewayIds.1代表客户VPN网关2,如果为空,则返回当前Region中所有客户VPN网关实例的信息 + * + * @return string[]|null + */ + public function getRemoteVPNGatewayIds(): array + { + return $this->get("RemoteVPNGatewayIds"); + } + + /** + * RemoteVPNGatewayIds: 客户VPN网关的资源ID,例如RemoteVPNGatewayIds.0代表希望获取客户VPN网关1的信息,RemoteVPNGatewayIds.1代表客户VPN网关2,如果为空,则返回当前Region中所有客户VPN网关实例的信息 + * + * @param string[] $remoteVPNGatewayIds + */ + public function setRemoteVPNGatewayIds(array $remoteVPNGatewayIds) + { + $this->set("RemoteVPNGatewayIds", $remoteVPNGatewayIds); + } + + /** + * Tag: 业务组名称,若指定则返回业务组下所有客户VPN网关信息 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组名称,若指定则返回业务组下所有客户VPN网关信息 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Offset: 数据偏移量, 默认为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 数据偏移量, 默认为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 数据分页值, 默认为20 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 数据分页值, 默认为20 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/IPSecVPN/Apis/DescribeRemoteVPNGatewayResponse.php b/src/IPSecVPN/Apis/DescribeRemoteVPNGatewayResponse.php new file mode 100644 index 00000000..002a9cb7 --- /dev/null +++ b/src/IPSecVPN/Apis/DescribeRemoteVPNGatewayResponse.php @@ -0,0 +1,74 @@ +get("TotalCount"); + } + + /** + * TotalCount: 符合条件的客户VPN网关总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * DataSet: 客户VPN网关列表, 每项参数详见 RemoteVPNGatewayDataSet + * + * @return RemoteVPNGatewayDataSet[]|null + */ + public function getDataSet(): array + { + $items = $this->get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new RemoteVPNGatewayDataSet($item)); + } + return $result; + } + + /** + * DataSet: 客户VPN网关列表, 每项参数详见 RemoteVPNGatewayDataSet + * + * @param RemoteVPNGatewayDataSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/IPSecVPN/Apis/DescribeVPNGatewayRequest.php b/src/IPSecVPN/Apis/DescribeVPNGatewayRequest.php new file mode 100644 index 00000000..ac1d6928 --- /dev/null +++ b/src/IPSecVPN/Apis/DescribeVPNGatewayRequest.php @@ -0,0 +1,171 @@ + "DescribeVPNGateway"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VPNGatewayIds: VPN网关的资源ID,例如VPNGatewayIds.0代表希望获取VPN网关1的信息,VPNGatewayIds.1代表VPN网关2,如果为空,则返回当前Region中所有VPN网关的信息 + * + * @return string[]|null + */ + public function getVPNGatewayIds(): array + { + return $this->get("VPNGatewayIds"); + } + + /** + * VPNGatewayIds: VPN网关的资源ID,例如VPNGatewayIds.0代表希望获取VPN网关1的信息,VPNGatewayIds.1代表VPN网关2,如果为空,则返回当前Region中所有VPN网关的信息 + * + * @param string[] $vpnGatewayIds + */ + public function setVPNGatewayIds(array $vpnGatewayIds) + { + $this->set("VPNGatewayIds", $vpnGatewayIds); + } + + /** + * VPCId: VPC的资源ID,返回指定的VPC下的所有VPN网关的信息。默认返回当前Region中所有VPN网关实例的信息 + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPC的资源ID,返回指定的VPC下的所有VPN网关的信息。默认返回当前Region中所有VPN网关实例的信息 + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * Offset: 数据偏移量。默认为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 数据偏移量。默认为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Tag: 业务组名称,若指定则返回指定的业务组下的所有VPN网关的信息。 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组名称,若指定则返回指定的业务组下的所有VPN网关的信息。 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Limit: 数据分页值。默认为20 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 数据分页值。默认为20 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/IPSecVPN/Apis/DescribeVPNGatewayResponse.php b/src/IPSecVPN/Apis/DescribeVPNGatewayResponse.php new file mode 100644 index 00000000..6aba2b3d --- /dev/null +++ b/src/IPSecVPN/Apis/DescribeVPNGatewayResponse.php @@ -0,0 +1,74 @@ +get("TotalCount"); + } + + /** + * TotalCount: 满足条件的VPN网关总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * DataSet: 获取的VPN网关信息列表,每项参数详见 VPNGatewayDataSet + * + * @return VPNGatewayDataSet[]|null + */ + public function getDataSet(): array + { + $items = $this->get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new VPNGatewayDataSet($item)); + } + return $result; + } + + /** + * DataSet: 获取的VPN网关信息列表,每项参数详见 VPNGatewayDataSet + * + * @param VPNGatewayDataSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/IPSecVPN/Apis/DescribeVPNTunnelRequest.php b/src/IPSecVPN/Apis/DescribeVPNTunnelRequest.php new file mode 100644 index 00000000..1c70968b --- /dev/null +++ b/src/IPSecVPN/Apis/DescribeVPNTunnelRequest.php @@ -0,0 +1,151 @@ + "DescribeVPNTunnel"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VPNTunnelIds: VPN隧道的资源ID,例如VPNTunnelIds.0代表希望获取信息的VPN隧道1,VPNTunneIds.1代表VPN隧道2,如果为空,则返回当前Region中所有的VPN隧道实例 + * + * @return string[]|null + */ + public function getVPNTunnelIds(): array + { + return $this->get("VPNTunnelIds"); + } + + /** + * VPNTunnelIds: VPN隧道的资源ID,例如VPNTunnelIds.0代表希望获取信息的VPN隧道1,VPNTunneIds.1代表VPN隧道2,如果为空,则返回当前Region中所有的VPN隧道实例 + * + * @param string[] $vpnTunnelIds + */ + public function setVPNTunnelIds(array $vpnTunnelIds) + { + $this->set("VPNTunnelIds", $vpnTunnelIds); + } + + /** + * Offset: 数据偏移量, 默认为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 数据偏移量, 默认为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 数据分页值, 默认为20 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 数据分页值, 默认为20 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * Tag: 业务组名称,若指定则返回指定的业务组下的所有VPN网关的信息 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组名称,若指定则返回指定的业务组下的所有VPN网关的信息 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } +} diff --git a/src/IPSecVPN/Apis/DescribeVPNTunnelResponse.php b/src/IPSecVPN/Apis/DescribeVPNTunnelResponse.php new file mode 100644 index 00000000..81d21e18 --- /dev/null +++ b/src/IPSecVPN/Apis/DescribeVPNTunnelResponse.php @@ -0,0 +1,76 @@ +get("TotalCount"); + } + + /** + * TotalCount: VPN隧道总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * DataSet: 获取的VPN隧道信息列表,每项参数详见 VPNTunnelDataSet + * + * @return VPNTunnelDataSet[]|null + */ + public function getDataSet(): array + { + $items = $this->get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new VPNTunnelDataSet($item)); + } + return $result; + } + + /** + * DataSet: 获取的VPN隧道信息列表,每项参数详见 VPNTunnelDataSet + * + * @param VPNTunnelDataSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/IPSecVPN/Apis/GetVPNGatewayPriceRequest.php b/src/IPSecVPN/Apis/GetVPNGatewayPriceRequest.php new file mode 100644 index 00000000..155bd99e --- /dev/null +++ b/src/IPSecVPN/Apis/GetVPNGatewayPriceRequest.php @@ -0,0 +1,132 @@ + "GetVPNGatewayPrice"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("Grade"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Grade: VPN网关规格。枚举值,包括:标准型:Standard,增强型:Enhanced。 + * + * @return string|null + */ + public function getGrade(): string + { + return $this->get("Grade"); + } + + /** + * Grade: VPN网关规格。枚举值,包括:标准型:Standard,增强型:Enhanced。 + * + * @param string $grade + */ + public function setGrade(string $grade) + { + $this->set("Grade", $grade); + } + + /** + * ChargeType: 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按需付费(需开启权限); 默认为获取三种价格 + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按需付费(需开启权限); 默认为获取三种价格 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时长, 默认: 1 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长, 默认: 1 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } +} diff --git a/src/IPSecVPN/Apis/GetVPNGatewayPriceResponse.php b/src/IPSecVPN/Apis/GetVPNGatewayPriceResponse.php new file mode 100644 index 00000000..c7c006c2 --- /dev/null +++ b/src/IPSecVPN/Apis/GetVPNGatewayPriceResponse.php @@ -0,0 +1,54 @@ +get("PriceSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new VPNGatewayPriceSet($item)); + } + return $result; + } + + /** + * PriceSet: 获取的VPN网关价格信息列表,每项参数详见 VPNGatewayPriceSet + * + * @param VPNGatewayPriceSet[] $priceSet + */ + public function setPriceSet(array $priceSet) + { + $result = []; + foreach ($priceSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/IPSecVPN/Apis/GetVPNGatewayUpgradePriceRequest.php b/src/IPSecVPN/Apis/GetVPNGatewayUpgradePriceRequest.php new file mode 100644 index 00000000..49433a56 --- /dev/null +++ b/src/IPSecVPN/Apis/GetVPNGatewayUpgradePriceRequest.php @@ -0,0 +1,113 @@ + "GetVPNGatewayUpgradePrice"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("VPNGatewayId"); + $this->markRequired("Grade"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VPNGatewayId: VPN网关的资源ID + * + * @return string|null + */ + public function getVPNGatewayId(): string + { + return $this->get("VPNGatewayId"); + } + + /** + * VPNGatewayId: VPN网关的资源ID + * + * @param string $vpnGatewayId + */ + public function setVPNGatewayId(string $vpnGatewayId) + { + $this->set("VPNGatewayId", $vpnGatewayId); + } + + /** + * Grade: 更改的VPN网关规格,枚举值为: Standard, 标准型; Enhanced, 增强型。 + * + * @return string|null + */ + public function getGrade(): string + { + return $this->get("Grade"); + } + + /** + * Grade: 更改的VPN网关规格,枚举值为: Standard, 标准型; Enhanced, 增强型。 + * + * @param string $grade + */ + public function setGrade(string $grade) + { + $this->set("Grade", $grade); + } +} diff --git a/src/IPSecVPN/Apis/GetVPNGatewayUpgradePriceResponse.php b/src/IPSecVPN/Apis/GetVPNGatewayUpgradePriceResponse.php new file mode 100644 index 00000000..ce38ff32 --- /dev/null +++ b/src/IPSecVPN/Apis/GetVPNGatewayUpgradePriceResponse.php @@ -0,0 +1,44 @@ +get("Price"); + } + + /** + * Price: 调整规格后的VPN网关价格, 单位为"元", 如需退费此处为负值 + * + * @param float $price + */ + public function setPrice(float $price) + { + $this->set("Price", $price); + } +} diff --git a/src/IPSecVPN/Apis/UpdateVPNGatewayRequest.php b/src/IPSecVPN/Apis/UpdateVPNGatewayRequest.php new file mode 100644 index 00000000..4add37b5 --- /dev/null +++ b/src/IPSecVPN/Apis/UpdateVPNGatewayRequest.php @@ -0,0 +1,113 @@ + "UpdateVPNGateway"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("VPNGatewayId"); + $this->markRequired("Grade"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VPNGatewayId: VPN网关的资源ID + * + * @return string|null + */ + public function getVPNGatewayId(): string + { + return $this->get("VPNGatewayId"); + } + + /** + * VPNGatewayId: VPN网关的资源ID + * + * @param string $vpnGatewayId + */ + public function setVPNGatewayId(string $vpnGatewayId) + { + $this->set("VPNGatewayId", $vpnGatewayId); + } + + /** + * Grade: 网关规格。枚举值为: Standard, 标准型; Enhanced, 增强型。 + * + * @return string|null + */ + public function getGrade(): string + { + return $this->get("Grade"); + } + + /** + * Grade: 网关规格。枚举值为: Standard, 标准型; Enhanced, 增强型。 + * + * @param string $grade + */ + public function setGrade(string $grade) + { + $this->set("Grade", $grade); + } +} diff --git a/src/IPSecVPN/Apis/UpdateVPNGatewayResponse.php b/src/IPSecVPN/Apis/UpdateVPNGatewayResponse.php new file mode 100644 index 00000000..f1bc2e94 --- /dev/null +++ b/src/IPSecVPN/Apis/UpdateVPNGatewayResponse.php @@ -0,0 +1,26 @@ + "UpdateVPNTunnelAttribute"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("VPNTunnelId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VPNTunnelId: VPN隧道的资源ID + * + * @return string|null + */ + public function getVPNTunnelId(): string + { + return $this->get("VPNTunnelId"); + } + + /** + * VPNTunnelId: VPN隧道的资源ID + * + * @param string $vpnTunnelId + */ + public function setVPNTunnelId(string $vpnTunnelId) + { + $this->set("VPNTunnelId", $vpnTunnelId); + } + + /** + * IKEPreSharedKey: 预共享密钥 + * + * @return string|null + */ + public function getIKEPreSharedKey(): string + { + return $this->get("IKEPreSharedKey"); + } + + /** + * IKEPreSharedKey: 预共享密钥 + * + * @param string $ikePreSharedKey + */ + public function setIKEPreSharedKey(string $ikePreSharedKey) + { + $this->set("IKEPreSharedKey", $ikePreSharedKey); + } + + /** + * IKEEncryptionAlgorithm: IKE协商过程中使用的加密算法 + * + * @return string|null + */ + public function getIKEEncryptionAlgorithm(): string + { + return $this->get("IKEEncryptionAlgorithm"); + } + + /** + * IKEEncryptionAlgorithm: IKE协商过程中使用的加密算法 + * + * @param string $ikeEncryptionAlgorithm + */ + public function setIKEEncryptionAlgorithm(string $ikeEncryptionAlgorithm) + { + $this->set("IKEEncryptionAlgorithm", $ikeEncryptionAlgorithm); + } + + /** + * IKEAuthenticationAlgorithm: IKE协商过程中使用的认证算法 + * + * @return string|null + */ + public function getIKEAuthenticationAlgorithm(): string + { + return $this->get("IKEAuthenticationAlgorithm"); + } + + /** + * IKEAuthenticationAlgorithm: IKE协商过程中使用的认证算法 + * + * @param string $ikeAuthenticationAlgorithm + */ + public function setIKEAuthenticationAlgorithm(string $ikeAuthenticationAlgorithm) + { + $this->set("IKEAuthenticationAlgorithm", $ikeAuthenticationAlgorithm); + } + + /** + * IKEExchangeMode: IKE协商过程中使用的模式,可选“主动模式”与“野蛮模式”。IKEV2不使用该参数。 + * + * @return string|null + */ + public function getIKEExchangeMode(): string + { + return $this->get("IKEExchangeMode"); + } + + /** + * IKEExchangeMode: IKE协商过程中使用的模式,可选“主动模式”与“野蛮模式”。IKEV2不使用该参数。 + * + * @param string $ikeExchangeMode + */ + public function setIKEExchangeMode(string $ikeExchangeMode) + { + $this->set("IKEExchangeMode", $ikeExchangeMode); + } + + /** + * IKELocalId: 本端标识。不填时默认使用之前的参数,结合IKEversion进行校验,IKEV2时不能为auto。 + * + * @return string|null + */ + public function getIKELocalId(): string + { + return $this->get("IKELocalId"); + } + + /** + * IKELocalId: 本端标识。不填时默认使用之前的参数,结合IKEversion进行校验,IKEV2时不能为auto。 + * + * @param string $ikeLocalId + */ + public function setIKELocalId(string $ikeLocalId) + { + $this->set("IKELocalId", $ikeLocalId); + } + + /** + * IKERemoteId: 客户端标识。不填时默认使用之前的参数,结合IKEversion进行校验,IKEV2时不能为auto。 + * + * @return string|null + */ + public function getIKERemoteId(): string + { + return $this->get("IKERemoteId"); + } + + /** + * IKERemoteId: 客户端标识。不填时默认使用之前的参数,结合IKEversion进行校验,IKEV2时不能为auto。 + * + * @param string $ikeRemoteId + */ + public function setIKERemoteId(string $ikeRemoteId) + { + $this->set("IKERemoteId", $ikeRemoteId); + } + + /** + * IKEDhGroup: IKE协商过程中使用的DH组 + * + * @return string|null + */ + public function getIKEDhGroup(): string + { + return $this->get("IKEDhGroup"); + } + + /** + * IKEDhGroup: IKE协商过程中使用的DH组 + * + * @param string $ikeDhGroup + */ + public function setIKEDhGroup(string $ikeDhGroup) + { + $this->set("IKEDhGroup", $ikeDhGroup); + } + + /** + * IKESALifetime: IKE中SA的生存时间 + * + * @return string|null + */ + public function getIKESALifetime(): string + { + return $this->get("IKESALifetime"); + } + + /** + * IKESALifetime: IKE中SA的生存时间 + * + * @param string $ikesaLifetime + */ + public function setIKESALifetime(string $ikesaLifetime) + { + $this->set("IKESALifetime", $ikesaLifetime); + } + + /** + * IPSecProtocol: 使用的安全协议,ESP或AH + * + * @return string|null + */ + public function getIPSecProtocol(): string + { + return $this->get("IPSecProtocol"); + } + + /** + * IPSecProtocol: 使用的安全协议,ESP或AH + * + * @param string $ipSecProtocol + */ + public function setIPSecProtocol(string $ipSecProtocol) + { + $this->set("IPSecProtocol", $ipSecProtocol); + } + + /** + * IPSecLocalSubnetIds: 指定VPN连接的本地子网的id,用逗号分隔 + * + * @return string[]|null + */ + public function getIPSecLocalSubnetIds(): array + { + return $this->get("IPSecLocalSubnetIds"); + } + + /** + * IPSecLocalSubnetIds: 指定VPN连接的本地子网的id,用逗号分隔 + * + * @param string[] $ipSecLocalSubnetIds + */ + public function setIPSecLocalSubnetIds(array $ipSecLocalSubnetIds) + { + $this->set("IPSecLocalSubnetIds", $ipSecLocalSubnetIds); + } + + /** + * IPSecRemoteSubnets: 指定VPN连接的客户网段,用逗号分隔 + * + * @return string[]|null + */ + public function getIPSecRemoteSubnets(): array + { + return $this->get("IPSecRemoteSubnets"); + } + + /** + * IPSecRemoteSubnets: 指定VPN连接的客户网段,用逗号分隔 + * + * @param string[] $ipSecRemoteSubnets + */ + public function setIPSecRemoteSubnets(array $ipSecRemoteSubnets) + { + $this->set("IPSecRemoteSubnets", $ipSecRemoteSubnets); + } + + /** + * IPSecEncryptionAlgorithm: IPSec隧道中使用的加密算法 + * + * @return string|null + */ + public function getIPSecEncryptionAlgorithm(): string + { + return $this->get("IPSecEncryptionAlgorithm"); + } + + /** + * IPSecEncryptionAlgorithm: IPSec隧道中使用的加密算法 + * + * @param string $ipSecEncryptionAlgorithm + */ + public function setIPSecEncryptionAlgorithm(string $ipSecEncryptionAlgorithm) + { + $this->set("IPSecEncryptionAlgorithm", $ipSecEncryptionAlgorithm); + } + + /** + * IPSecAuthenticationAlgorithm: IPSec隧道中使用的认证算法 + * + * @return string|null + */ + public function getIPSecAuthenticationAlgorithm(): string + { + return $this->get("IPSecAuthenticationAlgorithm"); + } + + /** + * IPSecAuthenticationAlgorithm: IPSec隧道中使用的认证算法 + * + * @param string $ipSecAuthenticationAlgorithm + */ + public function setIPSecAuthenticationAlgorithm(string $ipSecAuthenticationAlgorithm) + { + $this->set("IPSecAuthenticationAlgorithm", $ipSecAuthenticationAlgorithm); + } + + /** + * IPSecSALifetime: IPSec中SA的生存时间 + * + * @return string|null + */ + public function getIPSecSALifetime(): string + { + return $this->get("IPSecSALifetime"); + } + + /** + * IPSecSALifetime: IPSec中SA的生存时间 + * + * @param string $ipSecSALifetime + */ + public function setIPSecSALifetime(string $ipSecSALifetime) + { + $this->set("IPSecSALifetime", $ipSecSALifetime); + } + + /** + * IPSecSALifetimeBytes: IPSec中SA的生存时间(以字节计) + * + * @return string|null + */ + public function getIPSecSALifetimeBytes(): string + { + return $this->get("IPSecSALifetimeBytes"); + } + + /** + * IPSecSALifetimeBytes: IPSec中SA的生存时间(以字节计) + * + * @param string $ipSecSALifetimeBytes + */ + public function setIPSecSALifetimeBytes(string $ipSecSALifetimeBytes) + { + $this->set("IPSecSALifetimeBytes", $ipSecSALifetimeBytes); + } + + /** + * IPSecPFSDhGroup: IPSec中的PFS是否开启 + * + * @return string|null + */ + public function getIPSecPFSDhGroup(): string + { + return $this->get("IPSecPFSDhGroup"); + } + + /** + * IPSecPFSDhGroup: IPSec中的PFS是否开启 + * + * @param string $ipSecPFSDhGroup + */ + public function setIPSecPFSDhGroup(string $ipSecPFSDhGroup) + { + $this->set("IPSecPFSDhGroup", $ipSecPFSDhGroup); + } + + /** + * IKEVersion: 枚举值:"IKE V1","IKE V2" + * + * @return string|null + */ + public function getIKEVersion(): string + { + return $this->get("IKEVersion"); + } + + /** + * IKEVersion: 枚举值:"IKE V1","IKE V2" + * + * @param string $ikeVersion + */ + public function setIKEVersion(string $ikeVersion) + { + $this->set("IKEVersion", $ikeVersion); + } +} diff --git a/src/IPSecVPN/Apis/UpdateVPNTunnelAttributeResponse.php b/src/IPSecVPN/Apis/UpdateVPNTunnelAttributeResponse.php new file mode 100644 index 00000000..3fd71b5c --- /dev/null +++ b/src/IPSecVPN/Apis/UpdateVPNTunnelAttributeResponse.php @@ -0,0 +1,26 @@ + (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "RemoteVPNGatewayName" => (string) 客户VPN网关名称 + * "RemoteVPNGatewayAddr" => (string) 客户VPN网关地址 + * "Tag" => (string) 业务组名称,默认为 "Default" + * "Remark" => (string) 备注,默认为空 + * ] + * + * Outputs: + * + * $outputs = [ + * "RemoteVPNGatewayId" => (string) 新建客户VPN网关的资源ID + * ] + * + * @throws UCloudException + */ + public function createRemoteVPNGateway(CreateRemoteVPNGatewayRequest $request = null): CreateRemoteVPNGatewayResponse + { + $resp = $this->invoke($request); + return new CreateRemoteVPNGatewayResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateVPNGateway - 创建VPN网关 + * + * See also: https://docs.ucloud.cn/api/IPSecVPN-api/create_vpn_gateway + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "VPNGatewayName" => (string) 新建VPN网关名称 + * "VPCId" => (string) 新建VPN网关所属VPC的资源ID + * "Grade" => (string) 购买的VPN网关规格,枚举值为: Standard, 标准型; Enhanced, 增强型 + * "Remark" => (string) 备注,默认为空 + * "Tag" => (string) 业务组名称,默认为 "Default" + * "Quantity" => (integer) 购买时长, 默认: 1 + * "ChargeType" => (string) 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费;Dynamic, 按需付费(需开启权限);Trial, 试用(需开启权限);默认为按月付费 + * "BusinessId" => (string) 业务组ID + * "EIPId" => (string) 若要绑定EIP,在此填上EIP的资源ID + * "CouponId" => (string) 代金券ID, 默认不使用 + * ] + * + * Outputs: + * + * $outputs = [ + * "VPNGatewayId" => (string) 新建VPN网关的资源ID + * ] + * + * @throws UCloudException + */ + public function createVPNGateway(CreateVPNGatewayRequest $request = null): CreateVPNGatewayResponse + { + $resp = $this->invoke($request); + return new CreateVPNGatewayResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateVPNTunnel - 创建VPN隧道 + * + * See also: https://docs.ucloud.cn/api/IPSecVPN-api/create_vpn_tunnel + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "VPNTunnelName" => (string) VPN隧道名称 + * "VPNGatewayId" => (string) VPN网关的资源ID + * "RemoteVPNGatewayId" => (string) 客户VPN网关的资源ID + * "IKEPreSharedKey" => (string) 预共享密钥 + * "VPCId" => (string) vpcId + * "IPSecLocalSubnetIds" => (array) 指定VPN连接的本地子网的资源ID,最多可填写10个。 + * "IPSecRemoteSubnets" => (array) 指定VPN连接的客户网段,最多可填写20个。 + * "IKEVersion" => (string) ike版本,枚举值: "IKE V1","IKE V2",默认v1 + * "Tag" => (string) 业务组,默认为“Default” + * "Remark" => (string) 备注,默认为空 + * "IKEEncryptionAlgorithm" => (string) IKE协商过程中使用的加密算法,枚举值,"aes128", "aes192", "aes256", "aes512", "3des"。默认值为“aes128” + * "IKEAuthenticationAlgorithm" => (string) IKE协商过程中使用的认证算法,"md5", "sha1", "sha2-256"。默认值为“sha1” + * "IKEExchangeMode" => (string) IKE协商过程中使用的模式,枚举值,主模式,“main”;野蛮模式,“aggressive”。IKEV1默认为主模式“main”,IKEV2时不使用该参数。 + * "IKELocalId" => (string) 本端标识。枚举值,自动识别,“auto”;IP地址或域名。默认为自动识别“auto”。IKEV2必填该参数 + * "IKERemoteId" => (string) 客户端标识。枚举值,自动识别,“auto”;IP地址或域名。默认为“自动识别“auto”。IKEV2必填该参数 + * "IKEDhGroup" => (string) IKE协商过程中使用的DH组,枚举值,"1", "2", "5", "14", "15", "16"。默认为“15” + * "IKESALifetime" => (string) IKE中SA的生存时间,可填写范围为600-604800。默认为86400。 + * "IPSecProtocol" => (string) 使用的安全协议,枚举值,“esp”,“ah”。默认为“esp” + * "IPSecEncryptionAlgorithm" => (string) IPSec隧道中使用的加密算法,枚举值,"aes128", "aes192", "aes256", "aes512", "3des"。默认值为“aes128” + * "IPSecAuthenticationAlgorithm" => (string) IPSec隧道中使用的认证算法,枚举值,"md5", "sha1"。默认值为“sha1” + * "IPSecSALifetime" => (string) IPSec中SA的生存时间,可填写范围为1200 - 604800。默认为3600 + * "IPSecSALifetimeBytes" => (string) IPSec中SA的生存时间(以字节计)。可选为8000 – 20000000。默认使用SA生存时间, + * "IPSecPFSDhGroup" => (string) IPSec的PFS是否开启,枚举值,,不开启,"disable";数字表示DH组, "1", "2", "5", "14", "15", "16"。默认为“disable”。 + * ] + * + * Outputs: + * + * $outputs = [ + * "VPNTunnelId" => (string) VPN隧道的资源ID + * ] + * + * @throws UCloudException + */ + public function createVPNTunnel(CreateVPNTunnelRequest $request = null): CreateVPNTunnelResponse + { + $resp = $this->invoke($request); + return new CreateVPNTunnelResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteRemoteVPNGateway - 删除客户VPN网关 + * + * See also: https://docs.ucloud.cn/api/IPSecVPN-api/delete_remote_vpn_gateway + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "RemoteVPNGatewayId" => (string) 客户VPN网关的资源ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteRemoteVPNGateway(DeleteRemoteVPNGatewayRequest $request = null): DeleteRemoteVPNGatewayResponse + { + $resp = $this->invoke($request); + return new DeleteRemoteVPNGatewayResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteVPNGateway - 删除VPN网关 + * + * See also: https://docs.ucloud.cn/api/IPSecVPN-api/delete_vpn_gateway + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "VPNGatewayId" => (string) VPN网关的资源ID + * "ReleaseEip" => (boolean) 删除VPN时是否一并释放EIP。false,只解绑EIP不删除EIP;true,解绑并释放EIP。默认是false + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteVPNGateway(DeleteVPNGatewayRequest $request = null): DeleteVPNGatewayResponse + { + $resp = $this->invoke($request); + return new DeleteVPNGatewayResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteVPNTunnel - 删除VPN隧道 + * + * See also: https://docs.ucloud.cn/api/IPSecVPN-api/delete_vpn_tunnel + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "VPNTunnelId" => (string) VPN隧道的资源ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteVPNTunnel(DeleteVPNTunnelRequest $request = null): DeleteVPNTunnelResponse + { + $resp = $this->invoke($request); + return new DeleteVPNTunnelResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeRemoteVPNGateway - 获取客户VPN网关信息 + * + * See also: https://docs.ucloud.cn/api/IPSecVPN-api/describe_remote_vpn_gateway + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "RemoteVPNGatewayIds" => (array) 客户VPN网关的资源ID,例如RemoteVPNGatewayIds.0代表希望获取客户VPN网关1的信息,RemoteVPNGatewayIds.1代表客户VPN网关2,如果为空,则返回当前Region中所有客户VPN网关实例的信息 + * "Tag" => (string) 业务组名称,若指定则返回业务组下所有客户VPN网关信息 + * "Offset" => (integer) 数据偏移量, 默认为0 + * "Limit" => (integer) 数据分页值, 默认为20 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 符合条件的客户VPN网关总数 + * "DataSet" => (array) 客户VPN网关列表, 每项参数详见 RemoteVPNGatewayDataSet[ + * [ + * "RemoteVPNGatewayId" => (string) 客户网关ID + * "RemoteVPNGatewayName" => (string) 客户网关名称 + * "RemoteVPNGatewayAddr" => (string) 客户网关IP地址 + * "Tag" => (string) 用户组 + * "Remark" => (string) 备注 + * "CreateTime" => (integer) 创建时间 + * "TunnelCount" => (integer) 活跃的隧道数量 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeRemoteVPNGateway(DescribeRemoteVPNGatewayRequest $request = null): DescribeRemoteVPNGatewayResponse + { + $resp = $this->invoke($request); + return new DescribeRemoteVPNGatewayResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeVPNGateway - 获取VPN网关信息 + * + * See also: https://docs.ucloud.cn/api/IPSecVPN-api/describe_vpn_gateway + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "VPNGatewayIds" => (array) VPN网关的资源ID,例如VPNGatewayIds.0代表希望获取VPN网关1的信息,VPNGatewayIds.1代表VPN网关2,如果为空,则返回当前Region中所有VPN网关的信息 + * "VPCId" => (string) VPC的资源ID,返回指定的VPC下的所有VPN网关的信息。默认返回当前Region中所有VPN网关实例的信息 + * "Offset" => (integer) 数据偏移量。默认为0 + * "Tag" => (string) 业务组名称,若指定则返回指定的业务组下的所有VPN网关的信息。 + * "Limit" => (integer) 数据分页值。默认为20 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 满足条件的VPN网关总数 + * "DataSet" => (array) 获取的VPN网关信息列表,每项参数详见 VPNGatewayDataSet[ + * [ + * "VPNGatewayId" => (string) 网关Id + * "VPNGatewayName" => (string) 网关名字 + * "Tag" => (string) 网关业务组 + * "Remark" => (string) 网关备注 + * "VPCId" => (string) 所属VPCId + * "VPCName" => (string) 所属VPC名字 + * "ChargeType" => (string) 付费类型 + * "CreateTime" => (integer) 创建时间 + * "ExpireTime" => (integer) 到期时间 + * "AutoRenew" => (string) 是否自动续费 + * "Grade" => (string) 网关类型 + * "EIP" => (string) 绑定EIP的IP地址 + * "EIPType" => (string) EIP类型 + * "EIPId" => (string) EIPID + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeVPNGateway(DescribeVPNGatewayRequest $request = null): DescribeVPNGatewayResponse + { + $resp = $this->invoke($request); + return new DescribeVPNGatewayResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeVPNTunnel - 获取VPN隧道信息 + * + * See also: https://docs.ucloud.cn/api/IPSecVPN-api/describe_vpn_tunnel + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "VPNTunnelIds" => (array) VPN隧道的资源ID,例如VPNTunnelIds.0代表希望获取信息的VPN隧道1,VPNTunneIds.1代表VPN隧道2,如果为空,则返回当前Region中所有的VPN隧道实例 + * "Offset" => (integer) 数据偏移量, 默认为0 + * "Limit" => (integer) 数据分页值, 默认为20 + * "Tag" => (string) 业务组名称,若指定则返回指定的业务组下的所有VPN网关的信息 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) VPN隧道总数 + * "DataSet" => (array) 获取的VPN隧道信息列表,每项参数详见 VPNTunnelDataSet[ + * [ + * "VPNTunnelId" => (string) 隧道id + * "VPNTunnelName" => (string) 隧道名称 + * "Tag" => (string) 用户组 + * "Remark" => (string) 备注 + * "VPNGatewayId" => (string) 所属VPN网关id + * "RemoteVPNGatewayId" => (string) 对端网关Id + * "VPNGatewayName" => (string) VPN网关名字 + * "RemoteVPNGatewayName" => (string) 对端网关名字 + * "VPCId" => (string) 所属VPCId + * "VPCName" => (string) 所属VOC名字 + * "CreateTime" => (integer) 创建时间 + * "IKEData" => (object) IKE参数[ + * "IKEAuthenticationAlgorithm" => (string) IKE认证算法 + * "IKEDhGroup" => (string) IKEDH组 + * "IKEEncryptionAlgorithm" => (string) IKE加密算法 + * "IKEExchangeMode" => (string) IKEv1协商模式 + * "IKELocalId" => (string) IKE本地ID标识 + * "IKEPreSharedKey" => (string) IKE预共享秘钥 + * "IKERemoteId" => (string) IKE对端ID标识 + * "IKESALifetime" => (string) IKE秘钥生存时间 + * "IKEVersion" => (string) IKE版本 + * ] + * "IPSecData" => (object) IPSec参数[ + * "IPSecAuthenticationAlgorithm" => (string) IPSec通道中使用的认证算法 + * "IPSecEncryptionAlgorithm" => (string) IPSec通道中使用的加密算法 + * "IPSecLocalSubnetIds" => (array) 指定VPN连接的本地子网,用逗号分隔 + * "IPSecProtocol" => (string) 使用的安全协议,ESP或AH + * "IPSecRemoteSubnets" => (array) 指定VPN连接的客户网段,用逗号分隔 + * "IPSecSALifetime" => (string) IPSec中SA的生存时间 + * "IPSecSALifetimeBytes" => (string) IPSec中SA的生存时间(以字节计) + * "IPSecPFSDhGroup" => (string) 是否开启PFS功能,Disable表示关闭,数字表示DH组 + * ] + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeVPNTunnel(DescribeVPNTunnelRequest $request = null): DescribeVPNTunnelResponse + { + $resp = $this->invoke($request); + return new DescribeVPNTunnelResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetVPNGatewayPrice - 获取VPN价格 + * + * See also: https://docs.ucloud.cn/api/IPSecVPN-api/get_vpn_gateway_price + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Grade" => (string) VPN网关规格。枚举值,包括:标准型:Standard,增强型:Enhanced。 + * "ChargeType" => (string) 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按需付费(需开启权限); 默认为获取三种价格 + * "Quantity" => (integer) 购买时长, 默认: 1 + * ] + * + * Outputs: + * + * $outputs = [ + * "PriceSet" => (array) 获取的VPN网关价格信息列表,每项参数详见 VPNGatewayPriceSet[ + * [ + * "ChargeType" => (string) VPN网关付费方式 + * "Price" => (number) VPN网关价格, 单位"元" + * "PurchaseValue" => (integer) 资源有效期, 以Unix Timestamp表示 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getVPNGatewayPrice(GetVPNGatewayPriceRequest $request = null): GetVPNGatewayPriceResponse + { + $resp = $this->invoke($request); + return new GetVPNGatewayPriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetVPNGatewayUpgradePrice - 获取VPN网关规格改动价格 + * + * See also: https://docs.ucloud.cn/api/IPSecVPN-api/get_vpn_gateway_upgrade_price + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "VPNGatewayId" => (string) VPN网关的资源ID + * "Grade" => (string) 更改的VPN网关规格,枚举值为: Standard, 标准型; Enhanced, 增强型。 + * ] + * + * Outputs: + * + * $outputs = [ + * "Price" => (number) 调整规格后的VPN网关价格, 单位为"元", 如需退费此处为负值 + * ] + * + * @throws UCloudException + */ + public function getVPNGatewayUpgradePrice(GetVPNGatewayUpgradePriceRequest $request = null): GetVPNGatewayUpgradePriceResponse + { + $resp = $this->invoke($request); + return new GetVPNGatewayUpgradePriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateVPNGateway - 更改VPN网关规格 + * + * See also: https://docs.ucloud.cn/api/IPSecVPN-api/update_vpn_gateway + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "VPNGatewayId" => (string) VPN网关的资源ID + * "Grade" => (string) 网关规格。枚举值为: Standard, 标准型; Enhanced, 增强型。 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function updateVPNGateway(UpdateVPNGatewayRequest $request = null): UpdateVPNGatewayResponse + { + $resp = $this->invoke($request); + return new UpdateVPNGatewayResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateVPNTunnelAttribute - 更新VPN隧道属性 + * + * See also: https://docs.ucloud.cn/api/IPSecVPN-api/update_vpn_tunnel_attribute + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "VPNTunnelId" => (string) VPN隧道的资源ID + * "IKEPreSharedKey" => (string) 预共享密钥 + * "IKEEncryptionAlgorithm" => (string) IKE协商过程中使用的加密算法 + * "IKEAuthenticationAlgorithm" => (string) IKE协商过程中使用的认证算法 + * "IKEExchangeMode" => (string) IKE协商过程中使用的模式,可选“主动模式”与“野蛮模式”。IKEV2不使用该参数。 + * "IKELocalId" => (string) 本端标识。不填时默认使用之前的参数,结合IKEversion进行校验,IKEV2时不能为auto。 + * "IKERemoteId" => (string) 客户端标识。不填时默认使用之前的参数,结合IKEversion进行校验,IKEV2时不能为auto。 + * "IKEDhGroup" => (string) IKE协商过程中使用的DH组 + * "IKESALifetime" => (string) IKE中SA的生存时间 + * "IPSecProtocol" => (string) 使用的安全协议,ESP或AH + * "IPSecLocalSubnetIds" => (array) 指定VPN连接的本地子网的id,用逗号分隔 + * "IPSecRemoteSubnets" => (array) 指定VPN连接的客户网段,用逗号分隔 + * "IPSecEncryptionAlgorithm" => (string) IPSec隧道中使用的加密算法 + * "IPSecAuthenticationAlgorithm" => (string) IPSec隧道中使用的认证算法 + * "IPSecSALifetime" => (string) IPSec中SA的生存时间 + * "IPSecSALifetimeBytes" => (string) IPSec中SA的生存时间(以字节计) + * "IPSecPFSDhGroup" => (string) IPSec中的PFS是否开启 + * "IKEVersion" => (string) 枚举值:"IKE V1","IKE V2" + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function updateVPNTunnelAttribute(UpdateVPNTunnelAttributeRequest $request = null): UpdateVPNTunnelAttributeResponse + { + $resp = $this->invoke($request); + return new UpdateVPNTunnelAttributeResponse($resp->toArray(), $resp->getRequestId()); + } +} diff --git a/src/IPSecVPN/Models/IKEData.php b/src/IPSecVPN/Models/IKEData.php new file mode 100644 index 00000000..aa982351 --- /dev/null +++ b/src/IPSecVPN/Models/IKEData.php @@ -0,0 +1,204 @@ +get("IKEAuthenticationAlgorithm"); + } + + /** + * IKEAuthenticationAlgorithm: IKE认证算法 + * + * @param string $ikeAuthenticationAlgorithm + */ + public function setIKEAuthenticationAlgorithm(string $ikeAuthenticationAlgorithm) + { + $this->set("IKEAuthenticationAlgorithm", $ikeAuthenticationAlgorithm); + } + + /** + * IKEDhGroup: IKEDH组 + * + * @return string|null + */ + public function getIKEDhGroup(): string + { + return $this->get("IKEDhGroup"); + } + + /** + * IKEDhGroup: IKEDH组 + * + * @param string $ikeDhGroup + */ + public function setIKEDhGroup(string $ikeDhGroup) + { + $this->set("IKEDhGroup", $ikeDhGroup); + } + + /** + * IKEEncryptionAlgorithm: IKE加密算法 + * + * @return string|null + */ + public function getIKEEncryptionAlgorithm(): string + { + return $this->get("IKEEncryptionAlgorithm"); + } + + /** + * IKEEncryptionAlgorithm: IKE加密算法 + * + * @param string $ikeEncryptionAlgorithm + */ + public function setIKEEncryptionAlgorithm(string $ikeEncryptionAlgorithm) + { + $this->set("IKEEncryptionAlgorithm", $ikeEncryptionAlgorithm); + } + + /** + * IKEExchangeMode: IKEv1协商模式 + * + * @return string|null + */ + public function getIKEExchangeMode(): string + { + return $this->get("IKEExchangeMode"); + } + + /** + * IKEExchangeMode: IKEv1协商模式 + * + * @param string $ikeExchangeMode + */ + public function setIKEExchangeMode(string $ikeExchangeMode) + { + $this->set("IKEExchangeMode", $ikeExchangeMode); + } + + /** + * IKELocalId: IKE本地ID标识 + * + * @return string|null + */ + public function getIKELocalId(): string + { + return $this->get("IKELocalId"); + } + + /** + * IKELocalId: IKE本地ID标识 + * + * @param string $ikeLocalId + */ + public function setIKELocalId(string $ikeLocalId) + { + $this->set("IKELocalId", $ikeLocalId); + } + + /** + * IKEPreSharedKey: IKE预共享秘钥 + * + * @return string|null + */ + public function getIKEPreSharedKey(): string + { + return $this->get("IKEPreSharedKey"); + } + + /** + * IKEPreSharedKey: IKE预共享秘钥 + * + * @param string $ikePreSharedKey + */ + public function setIKEPreSharedKey(string $ikePreSharedKey) + { + $this->set("IKEPreSharedKey", $ikePreSharedKey); + } + + /** + * IKERemoteId: IKE对端ID标识 + * + * @return string|null + */ + public function getIKERemoteId(): string + { + return $this->get("IKERemoteId"); + } + + /** + * IKERemoteId: IKE对端ID标识 + * + * @param string $ikeRemoteId + */ + public function setIKERemoteId(string $ikeRemoteId) + { + $this->set("IKERemoteId", $ikeRemoteId); + } + + /** + * IKESALifetime: IKE秘钥生存时间 + * + * @return string|null + */ + public function getIKESALifetime(): string + { + return $this->get("IKESALifetime"); + } + + /** + * IKESALifetime: IKE秘钥生存时间 + * + * @param string $ikesaLifetime + */ + public function setIKESALifetime(string $ikesaLifetime) + { + $this->set("IKESALifetime", $ikesaLifetime); + } + + /** + * IKEVersion: IKE版本 + * + * @return string|null + */ + public function getIKEVersion(): string + { + return $this->get("IKEVersion"); + } + + /** + * IKEVersion: IKE版本 + * + * @param string $ikeVersion + */ + public function setIKEVersion(string $ikeVersion) + { + $this->set("IKEVersion", $ikeVersion); + } +} diff --git a/src/IPSecVPN/Models/IPSecData.php b/src/IPSecVPN/Models/IPSecData.php new file mode 100644 index 00000000..95aa61b9 --- /dev/null +++ b/src/IPSecVPN/Models/IPSecData.php @@ -0,0 +1,184 @@ +get("IPSecAuthenticationAlgorithm"); + } + + /** + * IPSecAuthenticationAlgorithm: IPSec通道中使用的认证算法 + * + * @param string $ipSecAuthenticationAlgorithm + */ + public function setIPSecAuthenticationAlgorithm(string $ipSecAuthenticationAlgorithm) + { + $this->set("IPSecAuthenticationAlgorithm", $ipSecAuthenticationAlgorithm); + } + + /** + * IPSecEncryptionAlgorithm: IPSec通道中使用的加密算法 + * + * @return string|null + */ + public function getIPSecEncryptionAlgorithm(): string + { + return $this->get("IPSecEncryptionAlgorithm"); + } + + /** + * IPSecEncryptionAlgorithm: IPSec通道中使用的加密算法 + * + * @param string $ipSecEncryptionAlgorithm + */ + public function setIPSecEncryptionAlgorithm(string $ipSecEncryptionAlgorithm) + { + $this->set("IPSecEncryptionAlgorithm", $ipSecEncryptionAlgorithm); + } + + /** + * IPSecLocalSubnetIds: 指定VPN连接的本地子网,用逗号分隔 + * + * @return string[]|null + */ + public function getIPSecLocalSubnetIds(): array + { + return $this->get("IPSecLocalSubnetIds"); + } + + /** + * IPSecLocalSubnetIds: 指定VPN连接的本地子网,用逗号分隔 + * + * @param string[] $ipSecLocalSubnetIds + */ + public function setIPSecLocalSubnetIds(array $ipSecLocalSubnetIds) + { + $this->set("IPSecLocalSubnetIds", $ipSecLocalSubnetIds); + } + + /** + * IPSecProtocol: 使用的安全协议,ESP或AH + * + * @return string|null + */ + public function getIPSecProtocol(): string + { + return $this->get("IPSecProtocol"); + } + + /** + * IPSecProtocol: 使用的安全协议,ESP或AH + * + * @param string $ipSecProtocol + */ + public function setIPSecProtocol(string $ipSecProtocol) + { + $this->set("IPSecProtocol", $ipSecProtocol); + } + + /** + * IPSecRemoteSubnets: 指定VPN连接的客户网段,用逗号分隔 + * + * @return string[]|null + */ + public function getIPSecRemoteSubnets(): array + { + return $this->get("IPSecRemoteSubnets"); + } + + /** + * IPSecRemoteSubnets: 指定VPN连接的客户网段,用逗号分隔 + * + * @param string[] $ipSecRemoteSubnets + */ + public function setIPSecRemoteSubnets(array $ipSecRemoteSubnets) + { + $this->set("IPSecRemoteSubnets", $ipSecRemoteSubnets); + } + + /** + * IPSecSALifetime: IPSec中SA的生存时间 + * + * @return string|null + */ + public function getIPSecSALifetime(): string + { + return $this->get("IPSecSALifetime"); + } + + /** + * IPSecSALifetime: IPSec中SA的生存时间 + * + * @param string $ipSecSALifetime + */ + public function setIPSecSALifetime(string $ipSecSALifetime) + { + $this->set("IPSecSALifetime", $ipSecSALifetime); + } + + /** + * IPSecSALifetimeBytes: IPSec中SA的生存时间(以字节计) + * + * @return string|null + */ + public function getIPSecSALifetimeBytes(): string + { + return $this->get("IPSecSALifetimeBytes"); + } + + /** + * IPSecSALifetimeBytes: IPSec中SA的生存时间(以字节计) + * + * @param string $ipSecSALifetimeBytes + */ + public function setIPSecSALifetimeBytes(string $ipSecSALifetimeBytes) + { + $this->set("IPSecSALifetimeBytes", $ipSecSALifetimeBytes); + } + + /** + * IPSecPFSDhGroup: 是否开启PFS功能,Disable表示关闭,数字表示DH组 + * + * @return string|null + */ + public function getIPSecPFSDhGroup(): string + { + return $this->get("IPSecPFSDhGroup"); + } + + /** + * IPSecPFSDhGroup: 是否开启PFS功能,Disable表示关闭,数字表示DH组 + * + * @param string $ipSecPFSDhGroup + */ + public function setIPSecPFSDhGroup(string $ipSecPFSDhGroup) + { + $this->set("IPSecPFSDhGroup", $ipSecPFSDhGroup); + } +} diff --git a/src/IPSecVPN/Models/RemoteVPNGatewayDataSet.php b/src/IPSecVPN/Models/RemoteVPNGatewayDataSet.php new file mode 100644 index 00000000..9cd9578e --- /dev/null +++ b/src/IPSecVPN/Models/RemoteVPNGatewayDataSet.php @@ -0,0 +1,164 @@ +get("RemoteVPNGatewayId"); + } + + /** + * RemoteVPNGatewayId: 客户网关ID + * + * @param string $remoteVPNGatewayId + */ + public function setRemoteVPNGatewayId(string $remoteVPNGatewayId) + { + $this->set("RemoteVPNGatewayId", $remoteVPNGatewayId); + } + + /** + * RemoteVPNGatewayName: 客户网关名称 + * + * @return string|null + */ + public function getRemoteVPNGatewayName(): string + { + return $this->get("RemoteVPNGatewayName"); + } + + /** + * RemoteVPNGatewayName: 客户网关名称 + * + * @param string $remoteVPNGatewayName + */ + public function setRemoteVPNGatewayName(string $remoteVPNGatewayName) + { + $this->set("RemoteVPNGatewayName", $remoteVPNGatewayName); + } + + /** + * RemoteVPNGatewayAddr: 客户网关IP地址 + * + * @return string|null + */ + public function getRemoteVPNGatewayAddr(): string + { + return $this->get("RemoteVPNGatewayAddr"); + } + + /** + * RemoteVPNGatewayAddr: 客户网关IP地址 + * + * @param string $remoteVPNGatewayAddr + */ + public function setRemoteVPNGatewayAddr(string $remoteVPNGatewayAddr) + { + $this->set("RemoteVPNGatewayAddr", $remoteVPNGatewayAddr); + } + + /** + * Tag: 用户组 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 用户组 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } + + /** + * CreateTime: 创建时间 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * TunnelCount: 活跃的隧道数量 + * + * @return integer|null + */ + public function getTunnelCount(): int + { + return $this->get("TunnelCount"); + } + + /** + * TunnelCount: 活跃的隧道数量 + * + * @param int $tunnelCount + */ + public function setTunnelCount(int $tunnelCount) + { + $this->set("TunnelCount", $tunnelCount); + } +} diff --git a/src/IPSecVPN/Models/VPNGatewayDataSet.php b/src/IPSecVPN/Models/VPNGatewayDataSet.php new file mode 100644 index 00000000..c7863c01 --- /dev/null +++ b/src/IPSecVPN/Models/VPNGatewayDataSet.php @@ -0,0 +1,304 @@ +get("VPNGatewayId"); + } + + /** + * VPNGatewayId: 网关Id + * + * @param string $vpnGatewayId + */ + public function setVPNGatewayId(string $vpnGatewayId) + { + $this->set("VPNGatewayId", $vpnGatewayId); + } + + /** + * VPNGatewayName: 网关名字 + * + * @return string|null + */ + public function getVPNGatewayName(): string + { + return $this->get("VPNGatewayName"); + } + + /** + * VPNGatewayName: 网关名字 + * + * @param string $vpnGatewayName + */ + public function setVPNGatewayName(string $vpnGatewayName) + { + $this->set("VPNGatewayName", $vpnGatewayName); + } + + /** + * Tag: 网关业务组 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 网关业务组 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Remark: 网关备注 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 网关备注 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } + + /** + * VPCId: 所属VPCId + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: 所属VPCId + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * VPCName: 所属VPC名字 + * + * @return string|null + */ + public function getVPCName(): string + { + return $this->get("VPCName"); + } + + /** + * VPCName: 所属VPC名字 + * + * @param string $vpcName + */ + public function setVPCName(string $vpcName) + { + $this->set("VPCName", $vpcName); + } + + /** + * ChargeType: 付费类型 + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费类型 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * CreateTime: 创建时间 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ExpireTime: 到期时间 + * + * @return integer|null + */ + public function getExpireTime(): int + { + return $this->get("ExpireTime"); + } + + /** + * ExpireTime: 到期时间 + * + * @param int $expireTime + */ + public function setExpireTime(int $expireTime) + { + $this->set("ExpireTime", $expireTime); + } + + /** + * AutoRenew: 是否自动续费 + * + * @return string|null + */ + public function getAutoRenew(): string + { + return $this->get("AutoRenew"); + } + + /** + * AutoRenew: 是否自动续费 + * + * @param string $autoRenew + */ + public function setAutoRenew(string $autoRenew) + { + $this->set("AutoRenew", $autoRenew); + } + + /** + * Grade: 网关类型 + * + * @return string|null + */ + public function getGrade(): string + { + return $this->get("Grade"); + } + + /** + * Grade: 网关类型 + * + * @param string $grade + */ + public function setGrade(string $grade) + { + $this->set("Grade", $grade); + } + + /** + * EIP: 绑定EIP的IP地址 + * + * @return string|null + */ + public function getEIP(): string + { + return $this->get("EIP"); + } + + /** + * EIP: 绑定EIP的IP地址 + * + * @param string $eip + */ + public function setEIP(string $eip) + { + $this->set("EIP", $eip); + } + + /** + * EIPType: EIP类型 + * + * @return string|null + */ + public function getEIPType(): string + { + return $this->get("EIPType"); + } + + /** + * EIPType: EIP类型 + * + * @param string $eipType + */ + public function setEIPType(string $eipType) + { + $this->set("EIPType", $eipType); + } + + /** + * EIPId: EIPID + * + * @return string|null + */ + public function getEIPId(): string + { + return $this->get("EIPId"); + } + + /** + * EIPId: EIPID + * + * @param string $eipId + */ + public function setEIPId(string $eipId) + { + $this->set("EIPId", $eipId); + } +} diff --git a/src/IPSecVPN/Models/VPNGatewayPriceSet.php b/src/IPSecVPN/Models/VPNGatewayPriceSet.php new file mode 100644 index 00000000..945cd2da --- /dev/null +++ b/src/IPSecVPN/Models/VPNGatewayPriceSet.php @@ -0,0 +1,84 @@ +get("ChargeType"); + } + + /** + * ChargeType: VPN网关付费方式 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Price: VPN网关价格, 单位"元" + * + * @return float|null + */ + public function getPrice(): float + { + return $this->get("Price"); + } + + /** + * Price: VPN网关价格, 单位"元" + * + * @param float $price + */ + public function setPrice(float $price) + { + $this->set("Price", $price); + } + + /** + * PurchaseValue: 资源有效期, 以Unix Timestamp表示 + * + * @return integer|null + */ + public function getPurchaseValue(): int + { + return $this->get("PurchaseValue"); + } + + /** + * PurchaseValue: 资源有效期, 以Unix Timestamp表示 + * + * @param int $purchaseValue + */ + public function setPurchaseValue(int $purchaseValue) + { + $this->set("PurchaseValue", $purchaseValue); + } +} diff --git a/src/IPSecVPN/Models/VPNTunnelDataSet.php b/src/IPSecVPN/Models/VPNTunnelDataSet.php new file mode 100644 index 00000000..a28c7026 --- /dev/null +++ b/src/IPSecVPN/Models/VPNTunnelDataSet.php @@ -0,0 +1,284 @@ +get("VPNTunnelId"); + } + + /** + * VPNTunnelId: 隧道id + * + * @param string $vpnTunnelId + */ + public function setVPNTunnelId(string $vpnTunnelId) + { + $this->set("VPNTunnelId", $vpnTunnelId); + } + + /** + * VPNTunnelName: 隧道名称 + * + * @return string|null + */ + public function getVPNTunnelName(): string + { + return $this->get("VPNTunnelName"); + } + + /** + * VPNTunnelName: 隧道名称 + * + * @param string $vpnTunnelName + */ + public function setVPNTunnelName(string $vpnTunnelName) + { + $this->set("VPNTunnelName", $vpnTunnelName); + } + + /** + * Tag: 用户组 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 用户组 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } + + /** + * VPNGatewayId: 所属VPN网关id + * + * @return string|null + */ + public function getVPNGatewayId(): string + { + return $this->get("VPNGatewayId"); + } + + /** + * VPNGatewayId: 所属VPN网关id + * + * @param string $vpnGatewayId + */ + public function setVPNGatewayId(string $vpnGatewayId) + { + $this->set("VPNGatewayId", $vpnGatewayId); + } + + /** + * RemoteVPNGatewayId: 对端网关Id + * + * @return string|null + */ + public function getRemoteVPNGatewayId(): string + { + return $this->get("RemoteVPNGatewayId"); + } + + /** + * RemoteVPNGatewayId: 对端网关Id + * + * @param string $remoteVPNGatewayId + */ + public function setRemoteVPNGatewayId(string $remoteVPNGatewayId) + { + $this->set("RemoteVPNGatewayId", $remoteVPNGatewayId); + } + + /** + * VPNGatewayName: VPN网关名字 + * + * @return string|null + */ + public function getVPNGatewayName(): string + { + return $this->get("VPNGatewayName"); + } + + /** + * VPNGatewayName: VPN网关名字 + * + * @param string $vpnGatewayName + */ + public function setVPNGatewayName(string $vpnGatewayName) + { + $this->set("VPNGatewayName", $vpnGatewayName); + } + + /** + * RemoteVPNGatewayName: 对端网关名字 + * + * @return string|null + */ + public function getRemoteVPNGatewayName(): string + { + return $this->get("RemoteVPNGatewayName"); + } + + /** + * RemoteVPNGatewayName: 对端网关名字 + * + * @param string $remoteVPNGatewayName + */ + public function setRemoteVPNGatewayName(string $remoteVPNGatewayName) + { + $this->set("RemoteVPNGatewayName", $remoteVPNGatewayName); + } + + /** + * VPCId: 所属VPCId + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: 所属VPCId + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * VPCName: 所属VOC名字 + * + * @return string|null + */ + public function getVPCName(): string + { + return $this->get("VPCName"); + } + + /** + * VPCName: 所属VOC名字 + * + * @param string $vpcName + */ + public function setVPCName(string $vpcName) + { + $this->set("VPCName", $vpcName); + } + + /** + * CreateTime: 创建时间 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * IKEData: IKE参数 + * + * @return IKEData|null + */ + public function getIKEData(): IKEData + { + return new IKEData($this->get("IKEData")); + } + + /** + * IKEData: IKE参数 + * + * @param IKEData $ikeData + */ + public function setIKEData(IKEData $ikeData) + { + $this->set("IKEData", $ikeData->getAll()); + } + + /** + * IPSecData: IPSec参数 + * + * @return IPSecData|null + */ + public function getIPSecData(): IPSecData + { + return new IPSecData($this->get("IPSecData")); + } + + /** + * IPSecData: IPSec参数 + * + * @param IPSecData $ipSecData + */ + public function setIPSecData(IPSecData $ipSecData) + { + $this->set("IPSecData", $ipSecData->getAll()); + } +} diff --git a/src/PathX/Apis/BindPathXSSLRequest.php b/src/PathX/Apis/BindPathXSSLRequest.php new file mode 100644 index 00000000..2b1bf51d --- /dev/null +++ b/src/PathX/Apis/BindPathXSSLRequest.php @@ -0,0 +1,113 @@ + "BindPathXSSL"]); + $this->markRequired("ProjectId"); + $this->markRequired("SSLId"); + $this->markRequired("UGAId"); + $this->markRequired("Port"); + } + + + + /** + * ProjectId: 项目ID。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SSLId: 证书ID,如果没有指定证书ID也没有申请免费证书,HTTPS接入无法正常工作 + * + * @return string|null + */ + public function getSSLId(): string + { + return $this->get("SSLId"); + } + + /** + * SSLId: 证书ID,如果没有指定证书ID也没有申请免费证书,HTTPS接入无法正常工作 + * + * @param string $sslId + */ + public function setSSLId(string $sslId) + { + $this->set("SSLId", $sslId); + } + + /** + * UGAId: UGA实例ID + * + * @return string|null + */ + public function getUGAId(): string + { + return $this->get("UGAId"); + } + + /** + * UGAId: UGA实例ID + * + * @param string $ugaId + */ + public function setUGAId(string $ugaId) + { + $this->set("UGAId", $ugaId); + } + + /** + * Port: 绑定SSL证书的HTTPS端口。Port.0 Port.1对应多个Port。如果Port不存在则不会绑定 + * + * @return int[]|null + */ + public function getPort(): array + { + return $this->get("Port"); + } + + /** + * Port: 绑定SSL证书的HTTPS端口。Port.0 Port.1对应多个Port。如果Port不存在则不会绑定 + * + * @param int[] $port + */ + public function setPort(array $port) + { + $this->set("Port", $port); + } +} diff --git a/src/PathX/Apis/BindPathXSSLResponse.php b/src/PathX/Apis/BindPathXSSLResponse.php new file mode 100644 index 00000000..8dde0440 --- /dev/null +++ b/src/PathX/Apis/BindPathXSSLResponse.php @@ -0,0 +1,26 @@ + "CreateGlobalSSHInstance"]); + $this->markRequired("ProjectId"); + $this->markRequired("Area"); + $this->markRequired("TargetIP"); + $this->markRequired("Port"); + $this->markRequired("AreaCode"); + } + + + + /** + * ProjectId: 项目ID,如org-xxxx。请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID,如org-xxxx。请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Area: 填写支持SSH访问IP的地区名称,如“洛杉矶”,“新加坡”,“香港”,“东京”,“华盛顿”,“法兰克福”。Area和AreaCode两者必填一个 + * + * @return string|null + */ + public function getArea(): string + { + return $this->get("Area"); + } + + /** + * Area: 填写支持SSH访问IP的地区名称,如“洛杉矶”,“新加坡”,“香港”,“东京”,“华盛顿”,“法兰克福”。Area和AreaCode两者必填一个 + * + * @param string $area + */ + public function setArea(string $area) + { + $this->set("Area", $area); + } + + /** + * TargetIP: 被SSH访问的源站IP,仅支持IPv4地址。 + * + * @return string|null + */ + public function getTargetIP(): string + { + return $this->get("TargetIP"); + } + + /** + * TargetIP: 被SSH访问的源站IP,仅支持IPv4地址。 + * + * @param string $targetIP + */ + public function setTargetIP(string $targetIP) + { + $this->set("TargetIP", $targetIP); + } + + /** + * Port: 源站服务器监听的SSH端口,可取范围[1-65535],不能使用80,443, 65123端口。如果InstanceType=Free,取值范围缩小为[22,3389],linux系统选择22,windows系统自动选3389。 + * + * @return integer|null + */ + public function getPort(): int + { + return $this->get("Port"); + } + + /** + * Port: 源站服务器监听的SSH端口,可取范围[1-65535],不能使用80,443, 65123端口。如果InstanceType=Free,取值范围缩小为[22,3389],linux系统选择22,windows系统自动选3389。 + * + * @param int $port + */ + public function setPort(int $port) + { + $this->set("Port", $port); + } + + /** + * AreaCode: AreaCode, 区域航空港国际通用代码。Area和AreaCode两者必填一个 + * + * @return string|null + */ + public function getAreaCode(): string + { + return $this->get("AreaCode"); + } + + /** + * AreaCode: AreaCode, 区域航空港国际通用代码。Area和AreaCode两者必填一个 + * + * @param string $areaCode + */ + public function setAreaCode(string $areaCode) + { + $this->set("AreaCode", $areaCode); + } + + /** + * Remark: 备注信息 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 备注信息 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } + + /** + * ChargeType: 支付方式,如按月、按年、按时 + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 支付方式,如按月、按年、按时 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买数量 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买数量 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * InstanceType: 枚举值:["Enterprise","Basic","Free"], 分别代表企业版,基础版,免费版 + * + * @return string|null + */ + public function getInstanceType(): string + { + return $this->get("InstanceType"); + } + + /** + * InstanceType: 枚举值:["Enterprise","Basic","Free"], 分别代表企业版,基础版,免费版 + * + * @param string $instanceType + */ + public function setInstanceType(string $instanceType) + { + $this->set("InstanceType", $instanceType); + } + + /** + * BandwidthPackage: Ultimate版本带宽包大小,枚举值:[0,20,40]。单位MB + * + * @return integer|null + */ + public function getBandwidthPackage(): int + { + return $this->get("BandwidthPackage"); + } + + /** + * BandwidthPackage: Ultimate版本带宽包大小,枚举值:[0,20,40]。单位MB + * + * @param int $bandwidthPackage + */ + public function setBandwidthPackage(int $bandwidthPackage) + { + $this->set("BandwidthPackage", $bandwidthPackage); + } + + /** + * ForwardRegion: InstanceType等于Basic时可以在["cn-bj2","cn-sh2","cn-gd"]中选择1个作为转发机房,Free版本固定为cn-bj2,其他付费版默认配置三个转发机房 + * + * @return string|null + */ + public function getForwardRegion(): string + { + return $this->get("ForwardRegion"); + } + + /** + * ForwardRegion: InstanceType等于Basic时可以在["cn-bj2","cn-sh2","cn-gd"]中选择1个作为转发机房,Free版本固定为cn-bj2,其他付费版默认配置三个转发机房 + * + * @param string $forwardRegion + */ + public function setForwardRegion(string $forwardRegion) + { + $this->set("ForwardRegion", $forwardRegion); + } + + /** + * CouponId: 使用代金券可冲抵部分费用 + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 使用代金券可冲抵部分费用 + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/PathX/Apis/CreateGlobalSSHInstanceResponse.php b/src/PathX/Apis/CreateGlobalSSHInstanceResponse.php new file mode 100644 index 00000000..44156ae0 --- /dev/null +++ b/src/PathX/Apis/CreateGlobalSSHInstanceResponse.php @@ -0,0 +1,64 @@ +get("InstanceId"); + } + + /** + * InstanceId: 实例ID,资源唯一标识 + * + * @param string $instanceId + */ + public function setInstanceId(string $instanceId) + { + $this->set("InstanceId", $instanceId); + } + + /** + * AcceleratingDomain: 加速域名,访问该域名可就近接入 + * + * @return string|null + */ + public function getAcceleratingDomain(): string + { + return $this->get("AcceleratingDomain"); + } + + /** + * AcceleratingDomain: 加速域名,访问该域名可就近接入 + * + * @param string $acceleratingDomain + */ + public function setAcceleratingDomain(string $acceleratingDomain) + { + $this->set("AcceleratingDomain", $acceleratingDomain); + } +} diff --git a/src/PathX/Apis/CreatePathXSSLRequest.php b/src/PathX/Apis/CreatePathXSSLRequest.php new file mode 100644 index 00000000..638c30d9 --- /dev/null +++ b/src/PathX/Apis/CreatePathXSSLRequest.php @@ -0,0 +1,171 @@ + "CreatePathXSSL"]); + $this->markRequired("ProjectId"); + $this->markRequired("SSLName"); + } + + + + /** + * ProjectId: 项目ID org-xxx格式。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID org-xxx格式。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SSLName: SSL证书的名字 + * + * @return string|null + */ + public function getSSLName(): string + { + return $this->get("SSLName"); + } + + /** + * SSLName: SSL证书的名字 + * + * @param string $sslName + */ + public function setSSLName(string $sslName) + { + $this->set("SSLName", $sslName); + } + + /** + * SSLType: 所添加的SSL证书类型,目前只支持Pem格式 + * + * @return string|null + */ + public function getSSLType(): string + { + return $this->get("SSLType"); + } + + /** + * SSLType: 所添加的SSL证书类型,目前只支持Pem格式 + * + * @param string $sslType + */ + public function setSSLType(string $sslType) + { + $this->set("SSLType", $sslType); + } + + /** + * SSLContent: SSL证书的完整内容,私钥不可使用密码,包括加密证书的私钥、用户证书或CA证书等 + * + * @return string|null + */ + public function getSSLContent(): string + { + return $this->get("SSLContent"); + } + + /** + * SSLContent: SSL证书的完整内容,私钥不可使用密码,包括加密证书的私钥、用户证书或CA证书等 + * + * @param string $sslContent + */ + public function setSSLContent(string $sslContent) + { + $this->set("SSLContent", $sslContent); + } + + /** + * UserCert: 用户自签证书内容 + * + * @return string|null + */ + public function getUserCert(): string + { + return $this->get("UserCert"); + } + + /** + * UserCert: 用户自签证书内容 + * + * @param string $userCert + */ + public function setUserCert(string $userCert) + { + $this->set("UserCert", $userCert); + } + + /** + * PrivateKey: 加密证书的私钥,不可使用密码保护,开启密码保护后,重启服务需要输入密码 + * + * @return string|null + */ + public function getPrivateKey(): string + { + return $this->get("PrivateKey"); + } + + /** + * PrivateKey: 加密证书的私钥,不可使用密码保护,开启密码保护后,重启服务需要输入密码 + * + * @param string $privateKey + */ + public function setPrivateKey(string $privateKey) + { + $this->set("PrivateKey", $privateKey); + } + + /** + * CACert: CA颁发证书内容 + * + * @return string|null + */ + public function getCACert(): string + { + return $this->get("CACert"); + } + + /** + * CACert: CA颁发证书内容 + * + * @param string $caCert + */ + public function setCACert(string $caCert) + { + $this->set("CACert", $caCert); + } +} diff --git a/src/PathX/Apis/CreatePathXSSLResponse.php b/src/PathX/Apis/CreatePathXSSLResponse.php new file mode 100644 index 00000000..b53b7eb1 --- /dev/null +++ b/src/PathX/Apis/CreatePathXSSLResponse.php @@ -0,0 +1,44 @@ +get("SSLId"); + } + + /** + * SSLId: SSL证书的Id + * + * @param string $sslId + */ + public function setSSLId(string $sslId) + { + $this->set("SSLId", $sslId); + } +} diff --git a/src/PathX/Apis/CreateUGAForwarderRequest.php b/src/PathX/Apis/CreateUGAForwarderRequest.php new file mode 100644 index 00000000..bf2ebaab --- /dev/null +++ b/src/PathX/Apis/CreateUGAForwarderRequest.php @@ -0,0 +1,271 @@ + "CreateUGAForwarder"]); + $this->markRequired("ProjectId"); + $this->markRequired("UGAId"); + } + + + + /** + * ProjectId: 项目ID。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UGAId: 加速配置实例ID + * + * @return string|null + */ + public function getUGAId(): string + { + return $this->get("UGAId"); + } + + /** + * UGAId: 加速配置实例ID + * + * @param string $ugaId + */ + public function setUGAId(string $ugaId) + { + $this->set("UGAId", $ugaId); + } + + /** + * HTTPHTTP: HTTP接入HTTP回源转发,接入端口。禁用65123端口 + * + * @return int[]|null + */ + public function getHTTPHTTP(): array + { + return $this->get("HTTPHTTP"); + } + + /** + * HTTPHTTP: HTTP接入HTTP回源转发,接入端口。禁用65123端口 + * + * @param int[] $httphttp + */ + public function setHTTPHTTP(array $httphttp) + { + $this->set("HTTPHTTP", $httphttp); + } + + /** + * HTTPHTTPRS: HTTP接入HTTP回源转发,源站监听端口 + * + * @return int[]|null + */ + public function getHTTPHTTPRS(): array + { + return $this->get("HTTPHTTPRS"); + } + + /** + * HTTPHTTPRS: HTTP接入HTTP回源转发,源站监听端口 + * + * @param int[] $httphttprs + */ + public function setHTTPHTTPRS(array $httphttprs) + { + $this->set("HTTPHTTPRS", $httphttprs); + } + + /** + * HTTPSHTTP: HTTPS接入HTTP回源转发,接入端口。禁用65123端口 + * + * @return int[]|null + */ + public function getHTTPSHTTP(): array + { + return $this->get("HTTPSHTTP"); + } + + /** + * HTTPSHTTP: HTTPS接入HTTP回源转发,接入端口。禁用65123端口 + * + * @param int[] $httpshttp + */ + public function setHTTPSHTTP(array $httpshttp) + { + $this->set("HTTPSHTTP", $httpshttp); + } + + /** + * HTTPSHTTPRS: HTTPS接入HTTP回源转发,回源端口 + * + * @return int[]|null + */ + public function getHTTPSHTTPRS(): array + { + return $this->get("HTTPSHTTPRS"); + } + + /** + * HTTPSHTTPRS: HTTPS接入HTTP回源转发,回源端口 + * + * @param int[] $httpshttprs + */ + public function setHTTPSHTTPRS(array $httpshttprs) + { + $this->set("HTTPSHTTPRS", $httpshttprs); + } + + /** + * HTTPSHTTPS: HTTPS接入HTTPS回源转发,接入端口。禁用65123端口 + * + * @return int[]|null + */ + public function getHTTPSHTTPS(): array + { + return $this->get("HTTPSHTTPS"); + } + + /** + * HTTPSHTTPS: HTTPS接入HTTPS回源转发,接入端口。禁用65123端口 + * + * @param int[] $httpshttps + */ + public function setHTTPSHTTPS(array $httpshttps) + { + $this->set("HTTPSHTTPS", $httpshttps); + } + + /** + * HTTPSHTTPSRS: HTTPS接入HTTPS回源转发,源站监听端口 + * + * @return int[]|null + */ + public function getHTTPSHTTPSRS(): array + { + return $this->get("HTTPSHTTPSRS"); + } + + /** + * HTTPSHTTPSRS: HTTPS接入HTTPS回源转发,源站监听端口 + * + * @param int[] $httpshttpsrs + */ + public function setHTTPSHTTPSRS(array $httpshttpsrs) + { + $this->set("HTTPSHTTPSRS", $httpshttpsrs); + } + + /** + * TCP: TCP接入端口 + * + * @return int[]|null + */ + public function getTCP(): array + { + return $this->get("TCP"); + } + + /** + * TCP: TCP接入端口 + * + * @param int[] $tcp + */ + public function setTCP(array $tcp) + { + $this->set("TCP", $tcp); + } + + /** + * TCPRS: TCP回源端口 + * + * @return int[]|null + */ + public function getTCPRS(): array + { + return $this->get("TCPRS"); + } + + /** + * TCPRS: TCP回源端口 + * + * @param int[] $tcprs + */ + public function setTCPRS(array $tcprs) + { + $this->set("TCPRS", $tcprs); + } + + /** + * UDP: UDP接入端口 + * + * @return int[]|null + */ + public function getUDP(): array + { + return $this->get("UDP"); + } + + /** + * UDP: UDP接入端口 + * + * @param int[] $udp + */ + public function setUDP(array $udp) + { + $this->set("UDP", $udp); + } + + /** + * UDPRS: UDP回源端口 + * + * @return int[]|null + */ + public function getUDPRS(): array + { + return $this->get("UDPRS"); + } + + /** + * UDPRS: UDP回源端口 + * + * @param int[] $udprs + */ + public function setUDPRS(array $udprs) + { + $this->set("UDPRS", $udprs); + } +} diff --git a/src/PathX/Apis/CreateUGAForwarderResponse.php b/src/PathX/Apis/CreateUGAForwarderResponse.php new file mode 100644 index 00000000..986af719 --- /dev/null +++ b/src/PathX/Apis/CreateUGAForwarderResponse.php @@ -0,0 +1,26 @@ + "CreateUGAInstance"]); + $this->markRequired("ProjectId"); + $this->markRequired("Name"); + } + + + + /** + * ProjectId: 项目ID,如org-xxxx。请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID,如org-xxxx。请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Name: 加速配置实例名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 加速配置实例名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * IPList: 加速源IP,多个IP用英文半角逗号(,)隔开;IPList和Domain二选一必填 + * + * @return string|null + */ + public function getIPList(): string + { + return $this->get("IPList"); + } + + /** + * IPList: 加速源IP,多个IP用英文半角逗号(,)隔开;IPList和Domain二选一必填 + * + * @param string $ipList + */ + public function setIPList(string $ipList) + { + $this->set("IPList", $ipList); + } + + /** + * Domain: 加速源域名,IPList和Domain二选一必填 + * + * @return string|null + */ + public function getDomain(): string + { + return $this->get("Domain"); + } + + /** + * Domain: 加速源域名,IPList和Domain二选一必填 + * + * @param string $domain + */ + public function setDomain(string $domain) + { + $this->set("Domain", $domain); + } + + /** + * TCP: TCP端口号,已废弃。请使用 CreateUGAForwarder API 创建端口 + * + * @return string[]|null + */ + public function getTCP(): array + { + return $this->get("TCP"); + } + + /** + * TCP: TCP端口号,已废弃。请使用 CreateUGAForwarder API 创建端口 + * + * @param string[] $tcp + */ + public function setTCP(array $tcp) + { + $this->set("TCP", $tcp); + } + + /** + * UDP: UDP端口号,已废弃。请使用 CreateUGAForwarder API 创建端口 + * + * @return string[]|null + */ + public function getUDP(): array + { + return $this->get("UDP"); + } + + /** + * UDP: UDP端口号,已废弃。请使用 CreateUGAForwarder API 创建端口 + * + * @param string[] $udp + */ + public function setUDP(array $udp) + { + $this->set("UDP", $udp); + } +} diff --git a/src/PathX/Apis/CreateUGAInstanceResponse.php b/src/PathX/Apis/CreateUGAInstanceResponse.php new file mode 100644 index 00000000..6e4b8757 --- /dev/null +++ b/src/PathX/Apis/CreateUGAInstanceResponse.php @@ -0,0 +1,64 @@ +get("UGAId"); + } + + /** + * UGAId: 加速配置ID + * + * @param string $ugaId + */ + public function setUGAId(string $ugaId) + { + $this->set("UGAId", $ugaId); + } + + /** + * CName: 加速域名 用户可把业务域名CName到此域名上。注意:未绑定线路情况时 加速域名解析不出IP。 + * + * @return string|null + */ + public function getCName(): string + { + return $this->get("CName"); + } + + /** + * CName: 加速域名 用户可把业务域名CName到此域名上。注意:未绑定线路情况时 加速域名解析不出IP。 + * + * @param string $cName + */ + public function setCName(string $cName) + { + $this->set("CName", $cName); + } +} diff --git a/src/PathX/Apis/CreateUPathRequest.php b/src/PathX/Apis/CreateUPathRequest.php new file mode 100644 index 00000000..4f457028 --- /dev/null +++ b/src/PathX/Apis/CreateUPathRequest.php @@ -0,0 +1,193 @@ + "CreateUPath"]); + $this->markRequired("ProjectId"); + $this->markRequired("Name"); + $this->markRequired("LineId"); + $this->markRequired("Bandwidth"); + } + + + + /** + * ProjectId: 项目ID,如org-xxxx。请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID,如org-xxxx。请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Name: UPath名字 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: UPath名字 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * LineId: 选择的线路 + * + * @return string|null + */ + public function getLineId(): string + { + return $this->get("LineId"); + } + + /** + * LineId: 选择的线路 + * + * @param string $lineId + */ + public function setLineId(string $lineId) + { + $this->set("LineId", $lineId); + } + + /** + * Bandwidth: 线路带宽,最小1Mbps,最大带宽由 DescribePathXLineConfig 接口获得。如需更大带宽,请联系产品团队。 + * + * @return integer|null + */ + public function getBandwidth(): int + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: 线路带宽,最小1Mbps,最大带宽由 DescribePathXLineConfig 接口获得。如需更大带宽,请联系产品团队。 + * + * @param int $bandwidth + */ + public function setBandwidth(int $bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * ChargeType: 计费模式,默认为Month 按月收费,可选范围['Month','Year','Dynamic'] + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式,默认为Month 按月收费,可选范围['Month','Year','Dynamic'] + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买周期,ChargeType为Month时,Quantity默认为0代表购买到月底,按时和按年付费该参数必须大于0 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买周期,ChargeType为Month时,Quantity默认为0代表购买到月底,按时和按年付费该参数必须大于0 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * PostPaid: 是否开启后付费, 默认为false + * + * @return boolean|null + */ + public function getPostPaid(): bool + { + return $this->get("PostPaid"); + } + + /** + * PostPaid: 是否开启后付费, 默认为false + * + * @param boolean $postPaid + */ + public function setPostPaid(bool $postPaid) + { + $this->set("PostPaid", $postPaid); + } + + /** + * CouponId: 代金券Id + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 代金券Id + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/PathX/Apis/CreateUPathResponse.php b/src/PathX/Apis/CreateUPathResponse.php new file mode 100644 index 00000000..db3a0e9a --- /dev/null +++ b/src/PathX/Apis/CreateUPathResponse.php @@ -0,0 +1,44 @@ +get("UPathId"); + } + + /** + * UPathId: 加速线路实例Id + * + * @param string $uPathId + */ + public function setUPathId(string $uPathId) + { + $this->set("UPathId", $uPathId); + } +} diff --git a/src/PathX/Apis/DeleteGlobalSSHInstanceRequest.php b/src/PathX/Apis/DeleteGlobalSSHInstanceRequest.php new file mode 100644 index 00000000..332608a2 --- /dev/null +++ b/src/PathX/Apis/DeleteGlobalSSHInstanceRequest.php @@ -0,0 +1,71 @@ + "DeleteGlobalSSHInstance"]); + $this->markRequired("ProjectId"); + $this->markRequired("InstanceId"); + } + + + + /** + * ProjectId: 项目ID,如org-xxxx。请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID,如org-xxxx。请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * InstanceId: 实例Id,资源的唯一标识 + * + * @return string|null + */ + public function getInstanceId(): string + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 实例Id,资源的唯一标识 + * + * @param string $instanceId + */ + public function setInstanceId(string $instanceId) + { + $this->set("InstanceId", $instanceId); + } +} diff --git a/src/PathX/Apis/DeleteGlobalSSHInstanceResponse.php b/src/PathX/Apis/DeleteGlobalSSHInstanceResponse.php new file mode 100644 index 00000000..e8b4ff28 --- /dev/null +++ b/src/PathX/Apis/DeleteGlobalSSHInstanceResponse.php @@ -0,0 +1,26 @@ + "DeletePathXSSL"]); + $this->markRequired("ProjectId"); + $this->markRequired("SSLId"); + } + + + + /** + * ProjectId: 项目ID。请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SSLId: SSL证书的ID + * + * @return string|null + */ + public function getSSLId(): string + { + return $this->get("SSLId"); + } + + /** + * SSLId: SSL证书的ID + * + * @param string $sslId + */ + public function setSSLId(string $sslId) + { + $this->set("SSLId", $sslId); + } +} diff --git a/src/PathX/Apis/DeletePathXSSLResponse.php b/src/PathX/Apis/DeletePathXSSLResponse.php new file mode 100644 index 00000000..ae8fc442 --- /dev/null +++ b/src/PathX/Apis/DeletePathXSSLResponse.php @@ -0,0 +1,26 @@ + "DeleteUGAForwarder"]); + $this->markRequired("ProjectId"); + $this->markRequired("UGAId"); + } + + + + /** + * ProjectId: 项目ID。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UGAId: 加速配置实例ID + * + * @return string|null + */ + public function getUGAId(): string + { + return $this->get("UGAId"); + } + + /** + * UGAId: 加速配置实例ID + * + * @param string $ugaId + */ + public function setUGAId(string $ugaId) + { + $this->set("UGAId", $ugaId); + } + + /** + * HTTPHTTP: HTTP接入HTTP回源,接入端口。禁用65123端口 + * + * @return int[]|null + */ + public function getHTTPHTTP(): array + { + return $this->get("HTTPHTTP"); + } + + /** + * HTTPHTTP: HTTP接入HTTP回源,接入端口。禁用65123端口 + * + * @param int[] $httphttp + */ + public function setHTTPHTTP(array $httphttp) + { + $this->set("HTTPHTTP", $httphttp); + } + + /** + * HTTPSHTTP: HTTPS接入HTTP回源, 接入端口。禁用65123端口 + * + * @return int[]|null + */ + public function getHTTPSHTTP(): array + { + return $this->get("HTTPSHTTP"); + } + + /** + * HTTPSHTTP: HTTPS接入HTTP回源, 接入端口。禁用65123端口 + * + * @param int[] $httpshttp + */ + public function setHTTPSHTTP(array $httpshttp) + { + $this->set("HTTPSHTTP", $httpshttp); + } + + /** + * HTTPSHTTPS: HTTPS接入HTTPS回源, 接入端口。禁用65123端口 + * + * @return int[]|null + */ + public function getHTTPSHTTPS(): array + { + return $this->get("HTTPSHTTPS"); + } + + /** + * HTTPSHTTPS: HTTPS接入HTTPS回源, 接入端口。禁用65123端口 + * + * @param int[] $httpshttps + */ + public function setHTTPSHTTPS(array $httpshttps) + { + $this->set("HTTPSHTTPS", $httpshttps); + } + + /** + * TCP: TCP接入端口 + * + * @return int[]|null + */ + public function getTCP(): array + { + return $this->get("TCP"); + } + + /** + * TCP: TCP接入端口 + * + * @param int[] $tcp + */ + public function setTCP(array $tcp) + { + $this->set("TCP", $tcp); + } + + /** + * UDP: UDP接入端口 + * + * @return int[]|null + */ + public function getUDP(): array + { + return $this->get("UDP"); + } + + /** + * UDP: UDP接入端口 + * + * @param int[] $udp + */ + public function setUDP(array $udp) + { + $this->set("UDP", $udp); + } +} diff --git a/src/PathX/Apis/DeleteUGAForwarderResponse.php b/src/PathX/Apis/DeleteUGAForwarderResponse.php new file mode 100644 index 00000000..b92d63c7 --- /dev/null +++ b/src/PathX/Apis/DeleteUGAForwarderResponse.php @@ -0,0 +1,26 @@ + "DeleteUGAInstance"]); + $this->markRequired("ProjectId"); + $this->markRequired("UGAId"); + } + + + + /** + * ProjectId: 项目ID,如org-xxxx。请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID,如org-xxxx。请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UGAId: 加速配置实例ID + * + * @return string|null + */ + public function getUGAId(): string + { + return $this->get("UGAId"); + } + + /** + * UGAId: 加速配置实例ID + * + * @param string $ugaId + */ + public function setUGAId(string $ugaId) + { + $this->set("UGAId", $ugaId); + } +} diff --git a/src/PathX/Apis/DeleteUGAInstanceResponse.php b/src/PathX/Apis/DeleteUGAInstanceResponse.php new file mode 100644 index 00000000..0aadcd00 --- /dev/null +++ b/src/PathX/Apis/DeleteUGAInstanceResponse.php @@ -0,0 +1,26 @@ + "DeleteUPath"]); + $this->markRequired("ProjectId"); + $this->markRequired("UPathId"); + } + + + + /** + * ProjectId: 项目ID。请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UPathId: 加速线路实例ID + * + * @return string|null + */ + public function getUPathId(): string + { + return $this->get("UPathId"); + } + + /** + * UPathId: 加速线路实例ID + * + * @param string $uPathId + */ + public function setUPathId(string $uPathId) + { + $this->set("UPathId", $uPathId); + } +} diff --git a/src/PathX/Apis/DeleteUPathResponse.php b/src/PathX/Apis/DeleteUPathResponse.php new file mode 100644 index 00000000..75ee9f94 --- /dev/null +++ b/src/PathX/Apis/DeleteUPathResponse.php @@ -0,0 +1,26 @@ + "DescribeGlobalSSHInstance"]); + $this->markRequired("ProjectId"); + } + + + + /** + * ProjectId: 项目ID,如org-xxxx。请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID,如org-xxxx。请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * InstanceId: 实例ID,资源唯一标识 + * + * @return string|null + */ + public function getInstanceId(): string + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 实例ID,资源唯一标识 + * + * @param string $instanceId + */ + public function setInstanceId(string $instanceId) + { + $this->set("InstanceId", $instanceId); + } +} diff --git a/src/PathX/Apis/DescribeGlobalSSHInstanceResponse.php b/src/PathX/Apis/DescribeGlobalSSHInstanceResponse.php new file mode 100644 index 00000000..6d2ebda6 --- /dev/null +++ b/src/PathX/Apis/DescribeGlobalSSHInstanceResponse.php @@ -0,0 +1,54 @@ +get("InstanceSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new GlobalSSHInfo($item)); + } + return $result; + } + + /** + * InstanceSet: GlobalSSH实例列表,实例的属性参考GlobalSSHInfo模型 + * + * @param GlobalSSHInfo[] $instanceSet + */ + public function setInstanceSet(array $instanceSet) + { + $result = []; + foreach ($instanceSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/PathX/Apis/DescribePathXLineConfigRequest.php b/src/PathX/Apis/DescribePathXLineConfigRequest.php new file mode 100644 index 00000000..9ffae405 --- /dev/null +++ b/src/PathX/Apis/DescribePathXLineConfigRequest.php @@ -0,0 +1,50 @@ + "DescribePathXLineConfig"]); + $this->markRequired("ProjectId"); + } + + + + /** + * ProjectId: 项目ID,如org-xxxx。请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID,如org-xxxx。请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } +} diff --git a/src/PathX/Apis/DescribePathXLineConfigResponse.php b/src/PathX/Apis/DescribePathXLineConfigResponse.php new file mode 100644 index 00000000..09b34b24 --- /dev/null +++ b/src/PathX/Apis/DescribePathXLineConfigResponse.php @@ -0,0 +1,55 @@ +get("LineSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UGAALine($item)); + } + return $result; + } + + /** + * LineSet: UGAA线路列表,参考UGAALine字段定义 + * + * @param UGAALine[] $lineSet + */ + public function setLineSet(array $lineSet) + { + $result = []; + foreach ($lineSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/PathX/Apis/DescribePathXSSLRequest.php b/src/PathX/Apis/DescribePathXSSLRequest.php new file mode 100644 index 00000000..9521464e --- /dev/null +++ b/src/PathX/Apis/DescribePathXSSLRequest.php @@ -0,0 +1,130 @@ + "DescribePathXSSL"]); + $this->markRequired("ProjectId"); + } + + + + /** + * ProjectId: 项目ID。请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SSLId: SSL证书的Id,不传分页获取证书列表 + * + * @return string|null + */ + public function getSSLId(): string + { + return $this->get("SSLId"); + } + + /** + * SSLId: SSL证书的Id,不传分页获取证书列表 + * + * @param string $sslId + */ + public function setSSLId(string $sslId) + { + $this->set("SSLId", $sslId); + } + + /** + * SearchValue: 不为空则按证书名称、证书域名模糊搜索 分页返回结果 + * + * @return string|null + */ + public function getSearchValue(): string + { + return $this->get("SearchValue"); + } + + /** + * SearchValue: 不为空则按证书名称、证书域名模糊搜索 分页返回结果 + * + * @param string $searchValue + */ + public function setSearchValue(string $searchValue) + { + $this->set("SearchValue", $searchValue); + } + + /** + * Limit: 最大返回条数,默认100,最大400 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 最大返回条数,默认100,最大400 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * Offset: 偏移值 默认为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 偏移值 默认为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } +} diff --git a/src/PathX/Apis/DescribePathXSSLResponse.php b/src/PathX/Apis/DescribePathXSSLResponse.php new file mode 100644 index 00000000..8f587431 --- /dev/null +++ b/src/PathX/Apis/DescribePathXSSLResponse.php @@ -0,0 +1,75 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new PathXSSLSet($item)); + } + return $result; + } + + /** + * DataSet: SSL证书详细信息,具体结构见 PathXSSLSet + * + * @param PathXSSLSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalCount: 符合条件的证书总数 + * + * @return integer|null + */ + public function getTotalCount(): int + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 符合条件的证书总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/PathX/Apis/DescribeUGAInstanceRequest.php b/src/PathX/Apis/DescribeUGAInstanceRequest.php new file mode 100644 index 00000000..0659d776 --- /dev/null +++ b/src/PathX/Apis/DescribeUGAInstanceRequest.php @@ -0,0 +1,110 @@ + "DescribeUGAInstance"]); + $this->markRequired("ProjectId"); + } + + + + /** + * ProjectId: 项目ID。请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UGAId: 加速配置实例ID,如果传了实例ID 则返回匹配实例ID的记录;如果没传则返回 ProjectId 下全部实例且符合分页要求 + * + * @return string|null + */ + public function getUGAId(): string + { + return $this->get("UGAId"); + } + + /** + * UGAId: 加速配置实例ID,如果传了实例ID 则返回匹配实例ID的记录;如果没传则返回 ProjectId 下全部实例且符合分页要求 + * + * @param string $ugaId + */ + public function setUGAId(string $ugaId) + { + $this->set("UGAId", $ugaId); + } + + /** + * Limit: 返回的最大条数,默认为100,最大值400 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 返回的最大条数,默认为100,最大值400 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * Offset: 偏移量,默认为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 偏移量,默认为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } +} diff --git a/src/PathX/Apis/DescribeUGAInstanceResponse.php b/src/PathX/Apis/DescribeUGAInstanceResponse.php new file mode 100644 index 00000000..e87153c4 --- /dev/null +++ b/src/PathX/Apis/DescribeUGAInstanceResponse.php @@ -0,0 +1,79 @@ +get("UGAList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UGAAInfo($item)); + } + return $result; + } + + /** + * UGAList: 全球加速实例信息列表 + * + * @param UGAAInfo[] $ugaList + */ + public function setUGAList(array $ugaList) + { + $result = []; + foreach ($ugaList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalCount: 符合条件的总数 + * + * @return integer|null + */ + public function getTotalCount(): int + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 符合条件的总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/PathX/Apis/DescribeUPathRequest.php b/src/PathX/Apis/DescribeUPathRequest.php new file mode 100644 index 00000000..1ac8b9bf --- /dev/null +++ b/src/PathX/Apis/DescribeUPathRequest.php @@ -0,0 +1,70 @@ + "DescribeUPath"]); + $this->markRequired("ProjectId"); + } + + + + /** + * ProjectId: 项目ID。请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UPathId: 如果不填参数 返回 ProjectId 下所有的线路资源,填此参数则返回upath实例ID匹配的线路 + * + * @return string|null + */ + public function getUPathId(): string + { + return $this->get("UPathId"); + } + + /** + * UPathId: 如果不填参数 返回 ProjectId 下所有的线路资源,填此参数则返回upath实例ID匹配的线路 + * + * @param string $uPathId + */ + public function setUPathId(string $uPathId) + { + $this->set("UPathId", $uPathId); + } +} diff --git a/src/PathX/Apis/DescribeUPathResponse.php b/src/PathX/Apis/DescribeUPathResponse.php new file mode 100644 index 00000000..60354b3a --- /dev/null +++ b/src/PathX/Apis/DescribeUPathResponse.php @@ -0,0 +1,56 @@ +get("UPathSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UPathInfo($item)); + } + return $result; + } + + /** + * UPathSet: 线路信息数组 + * + * @param UPathInfo[] $uPathSet + */ + public function setUPathSet(array $uPathSet) + { + $result = []; + foreach ($uPathSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/PathX/Apis/DescribeUPathTemplateRequest.php b/src/PathX/Apis/DescribeUPathTemplateRequest.php new file mode 100644 index 00000000..dbd089f7 --- /dev/null +++ b/src/PathX/Apis/DescribeUPathTemplateRequest.php @@ -0,0 +1,71 @@ + "DescribeUPathTemplate"]); + $this->markRequired("ProjectId"); + $this->markRequired("UPathId"); + } + + + + /** + * ProjectId: 项目ID。请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UPathId: 加速线路实例ID,格式 upath-xxxx + * + * @return string|null + */ + public function getUPathId(): string + { + return $this->get("UPathId"); + } + + /** + * UPathId: 加速线路实例ID,格式 upath-xxxx + * + * @param string $uPathId + */ + public function setUPathId(string $uPathId) + { + $this->set("UPathId", $uPathId); + } +} diff --git a/src/PathX/Apis/DescribeUPathTemplateResponse.php b/src/PathX/Apis/DescribeUPathTemplateResponse.php new file mode 100644 index 00000000..d496b29b --- /dev/null +++ b/src/PathX/Apis/DescribeUPathTemplateResponse.php @@ -0,0 +1,54 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new AlarmRuler($item)); + } + return $result; + } + + /** + * DataSet: 监控模板详情 + * + * @param AlarmRuler[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/PathX/Apis/GetGlobalSSHPriceRequest.php b/src/PathX/Apis/GetGlobalSSHPriceRequest.php new file mode 100644 index 00000000..bddaa334 --- /dev/null +++ b/src/PathX/Apis/GetGlobalSSHPriceRequest.php @@ -0,0 +1,110 @@ + "GetGlobalSSHPrice"]); + $this->markRequired("ProjectId"); + } + + + + /** + * ProjectId: 项目ID,如org-xxxx。请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID,如org-xxxx。请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Quantity: 购买周期,如果ChargeType为Month,Quantity默认为0;其他情况必须为大于0的整数 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买周期,如果ChargeType为Month,Quantity默认为0;其他情况必须为大于0的整数 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * ChargeType: 计费类型:Dynamic,Month,Year + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费类型:Dynamic,Month,Year + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * InstanceType: 版本类型。枚举值,Enterprise:企业版;Basic:基础版。可不填,默认为Basic。 + * + * @return string|null + */ + public function getInstanceType(): string + { + return $this->get("InstanceType"); + } + + /** + * InstanceType: 版本类型。枚举值,Enterprise:企业版;Basic:基础版。可不填,默认为Basic。 + * + * @param string $instanceType + */ + public function setInstanceType(string $instanceType) + { + $this->set("InstanceType", $instanceType); + } +} diff --git a/src/PathX/Apis/GetGlobalSSHPriceResponse.php b/src/PathX/Apis/GetGlobalSSHPriceResponse.php new file mode 100644 index 00000000..f531cf7f --- /dev/null +++ b/src/PathX/Apis/GetGlobalSSHPriceResponse.php @@ -0,0 +1,44 @@ +get("Price"); + } + + /** + * Price: 价格,返回单位为元 + * + * @param float $price + */ + public function setPrice(float $price) + { + $this->set("Price", $price); + } +} diff --git a/src/PathX/Apis/GetGlobalSSHUpdatePriceRequest.php b/src/PathX/Apis/GetGlobalSSHUpdatePriceRequest.php new file mode 100644 index 00000000..486b804a --- /dev/null +++ b/src/PathX/Apis/GetGlobalSSHUpdatePriceRequest.php @@ -0,0 +1,131 @@ + "GetGlobalSSHUpdatePrice"]); + $this->markRequired("ProjectId"); + $this->markRequired("InstanceType"); + } + + + + /** + * ProjectId: 项目ID,如org-xxxx。请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID,如org-xxxx。请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * InstanceType: 升级后的实例类型。枚举值,Enterprise:企业版;Basic:基础版。 + * + * @return string|null + */ + public function getInstanceType(): string + { + return $this->get("InstanceType"); + } + + /** + * InstanceType: 升级后的实例类型。枚举值,Enterprise:企业版;Basic:基础版。 + * + * @param string $instanceType + */ + public function setInstanceType(string $instanceType) + { + $this->set("InstanceType", $instanceType); + } + + /** + * InstanceId: 实例ID,唯一资源标识。从免费版升级到付费版可不填,其他情况必填。 + * + * @return string|null + */ + public function getInstanceId(): string + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 实例ID,唯一资源标识。从免费版升级到付费版可不填,其他情况必填。 + * + * @param string $instanceId + */ + public function setInstanceId(string $instanceId) + { + $this->set("InstanceId", $instanceId); + } + + /** + * Quantity: 购买周期,如果ChargeType为Month,Quantity可以不填默认为0;其他情况必须为正整数。 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买周期,如果ChargeType为Month,Quantity可以不填默认为0;其他情况必须为正整数。 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * ChargeType: 计费类型:Dynamic,Month,Year。从免费版升级到付费版必须传,其他情况不需要传 + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费类型:Dynamic,Month,Year。从免费版升级到付费版必须传,其他情况不需要传 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } +} diff --git a/src/PathX/Apis/GetGlobalSSHUpdatePriceResponse.php b/src/PathX/Apis/GetGlobalSSHUpdatePriceResponse.php new file mode 100644 index 00000000..b4786583 --- /dev/null +++ b/src/PathX/Apis/GetGlobalSSHUpdatePriceResponse.php @@ -0,0 +1,44 @@ +get("Price"); + } + + /** + * Price: 价格,返回单位为元。正数表示付费升级,负数表示降级退费。 + * + * @param float $price + */ + public function setPrice(float $price) + { + $this->set("Price", $price); + } +} diff --git a/src/PathX/Apis/GetPathXMetricRequest.php b/src/PathX/Apis/GetPathXMetricRequest.php new file mode 100644 index 00000000..e4c95057 --- /dev/null +++ b/src/PathX/Apis/GetPathXMetricRequest.php @@ -0,0 +1,176 @@ + "GetPathXMetric"]); + $this->markRequired("ProjectId"); + $this->markRequired("ResourceId"); + $this->markRequired("BeginTime"); + $this->markRequired("EndTime"); + $this->markRequired("MetricName"); + $this->markRequired("ResourceType"); + $this->markRequired("LineId"); + } + + + + /** + * ProjectId: 项目ID。请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ResourceId: ResourceId,如upath ID 和 uga ID + * + * @return string|null + */ + public function getResourceId(): string + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: ResourceId,如upath ID 和 uga ID + * + * @param string $resourceId + */ + public function setResourceId(string $resourceId) + { + $this->set("ResourceId", $resourceId); + } + + /** + * BeginTime: 查询起始时间,10位长度时间戳 + * + * @return integer|null + */ + public function getBeginTime(): int + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 查询起始时间,10位长度时间戳 + * + * @param int $beginTime + */ + public function setBeginTime(int $beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 查询结束时间,10位长度时间戳 + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 查询结束时间,10位长度时间戳 + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } + + /** + * MetricName: 查询监控的指标项。目前仅允许以下四项:NetworkOut:出向带宽,NetworkIn:入向带宽,NetworkOutUsage:出向带宽使用率,NetworkInUsage:入向带宽使用率 + * + * @return string[]|null + */ + public function getMetricName(): array + { + return $this->get("MetricName"); + } + + /** + * MetricName: 查询监控的指标项。目前仅允许以下四项:NetworkOut:出向带宽,NetworkIn:入向带宽,NetworkOutUsage:出向带宽使用率,NetworkInUsage:入向带宽使用率 + * + * @param string[] $metricName + */ + public function setMetricName(array $metricName) + { + $this->set("MetricName", $metricName); + } + + /** + * ResourceType: upath:加速线路,uga:加速实例 + * + * @return string|null + */ + public function getResourceType(): string + { + return $this->get("ResourceType"); + } + + /** + * ResourceType: upath:加速线路,uga:加速实例 + * + * @param string $resourceType + */ + public function setResourceType(string $resourceType) + { + $this->set("ResourceType", $resourceType); + } + + /** + * LineId: 具体线路id,调用DescribePathXLineConfig接口获取线路列表 + * + * @return string|null + */ + public function getLineId(): string + { + return $this->get("LineId"); + } + + /** + * LineId: 具体线路id,调用DescribePathXLineConfig接口获取线路列表 + * + * @param string $lineId + */ + public function setLineId(string $lineId) + { + $this->set("LineId", $lineId); + } +} diff --git a/src/PathX/Apis/GetPathXMetricResponse.php b/src/PathX/Apis/GetPathXMetricResponse.php new file mode 100644 index 00000000..0252acf6 --- /dev/null +++ b/src/PathX/Apis/GetPathXMetricResponse.php @@ -0,0 +1,49 @@ +get("DataSet")); + } + + /** + * DataSet: 监控数据结果集 + * + * @param MetricPeriod $dataSet + */ + public function setDataSet(MetricPeriod $dataSet) + { + $this->set("DataSet", $dataSet->getAll()); + } +} diff --git a/src/PathX/Apis/ModifyGlobalSSHPortRequest.php b/src/PathX/Apis/ModifyGlobalSSHPortRequest.php new file mode 100644 index 00000000..8a9540cd --- /dev/null +++ b/src/PathX/Apis/ModifyGlobalSSHPortRequest.php @@ -0,0 +1,92 @@ + "ModifyGlobalSSHPort"]); + $this->markRequired("ProjectId"); + $this->markRequired("InstanceId"); + $this->markRequired("Port"); + } + + + + /** + * ProjectId: 项目ID,如org-xxxx。请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID,如org-xxxx。请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * InstanceId: 实例ID,资源唯一标识。当前仅收费版GlobalSSH实例可以修改端口。 + * + * @return string|null + */ + public function getInstanceId(): string + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 实例ID,资源唯一标识。当前仅收费版GlobalSSH实例可以修改端口。 + * + * @param string $instanceId + */ + public function setInstanceId(string $instanceId) + { + $this->set("InstanceId", $instanceId); + } + + /** + * Port: 源站服务器监听的SSH端口号。收费版本端口范围[1,65535]且不能为80,443,65123端口。免费版不支持修改端口。 + * + * @return integer|null + */ + public function getPort(): int + { + return $this->get("Port"); + } + + /** + * Port: 源站服务器监听的SSH端口号。收费版本端口范围[1,65535]且不能为80,443,65123端口。免费版不支持修改端口。 + * + * @param int $port + */ + public function setPort(int $port) + { + $this->set("Port", $port); + } +} diff --git a/src/PathX/Apis/ModifyGlobalSSHPortResponse.php b/src/PathX/Apis/ModifyGlobalSSHPortResponse.php new file mode 100644 index 00000000..6ccbf349 --- /dev/null +++ b/src/PathX/Apis/ModifyGlobalSSHPortResponse.php @@ -0,0 +1,26 @@ + "ModifyGlobalSSHType"]); + $this->markRequired("ProjectId"); + $this->markRequired("InstanceId"); + $this->markRequired("InstanceType"); + } + + + + /** + * ProjectId: 项目ID,如org-xxxx。请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID,如org-xxxx。请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * InstanceId: 实例ID,资源唯一标识 + * + * @return string|null + */ + public function getInstanceId(): string + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 实例ID,资源唯一标识 + * + * @param string $instanceId + */ + public function setInstanceId(string $instanceId) + { + $this->set("InstanceId", $instanceId); + } + + /** + * InstanceType: 取值范围["Enterprise","Basic"],分别对应企业版和基础版,表示升级后的实例类型。比如从Free版本升级为Basic版或Enterprise版,不可从收费版降级为免费版,或从企业版降级为基础版 + * + * @return string|null + */ + public function getInstanceType(): string + { + return $this->get("InstanceType"); + } + + /** + * InstanceType: 取值范围["Enterprise","Basic"],分别对应企业版和基础版,表示升级后的实例类型。比如从Free版本升级为Basic版或Enterprise版,不可从收费版降级为免费版,或从企业版降级为基础版 + * + * @param string $instanceType + */ + public function setInstanceType(string $instanceType) + { + $this->set("InstanceType", $instanceType); + } + + /** + * ChargeType: 支付方式,如按月、按年、按时 + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 支付方式,如按月、按年、按时 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时间,当ChargeType为Month,Quantity为0代表购买到月底 + * + * @return string|null + */ + public function getQuantity(): string + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时间,当ChargeType为Month,Quantity为0代表购买到月底 + * + * @param string $quantity + */ + public function setQuantity(string $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * CouponId: 可抵扣费用的券,通常不使用 + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 可抵扣费用的券,通常不使用 + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/PathX/Apis/ModifyGlobalSSHTypeResponse.php b/src/PathX/Apis/ModifyGlobalSSHTypeResponse.php new file mode 100644 index 00000000..c6b4bb2b --- /dev/null +++ b/src/PathX/Apis/ModifyGlobalSSHTypeResponse.php @@ -0,0 +1,26 @@ + "ModifyUPathBandwidth"]); + $this->markRequired("ProjectId"); + $this->markRequired("UPathId"); + $this->markRequired("Bandwidth"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UPathId: UPath 加速线路实例Id + * + * @return string|null + */ + public function getUPathId(): string + { + return $this->get("UPathId"); + } + + /** + * UPathId: UPath 加速线路实例Id + * + * @param string $uPathId + */ + public function setUPathId(string $uPathId) + { + $this->set("UPathId", $uPathId); + } + + /** + * Bandwidth: 线路带宽,单位Mbps。最小1Mbps,最大带宽由 DescribePathXLineConfig 接口获得。如需更大带宽,请联系产品团队。 + * + * @return integer|null + */ + public function getBandwidth(): int + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: 线路带宽,单位Mbps。最小1Mbps,最大带宽由 DescribePathXLineConfig 接口获得。如需更大带宽,请联系产品团队。 + * + * @param int $bandwidth + */ + public function setBandwidth(int $bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } +} diff --git a/src/PathX/Apis/ModifyUPathBandwidthResponse.php b/src/PathX/Apis/ModifyUPathBandwidthResponse.php new file mode 100644 index 00000000..196a3516 --- /dev/null +++ b/src/PathX/Apis/ModifyUPathBandwidthResponse.php @@ -0,0 +1,26 @@ + "ModifyUPathTemplate"]); + $this->markRequired("ProjectId"); + $this->markRequired("UPathId"); + } + + + + /** + * ProjectId: 项目ID。请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UPathId: 加速线路实例ID + * + * @return string|null + */ + public function getUPathId(): string + { + return $this->get("UPathId"); + } + + /** + * UPathId: 加速线路实例ID + * + * @param string $uPathId + */ + public function setUPathId(string $uPathId) + { + $this->set("UPathId", $uPathId); + } + + /** + * MetricName: 告警指标名称, 所有n的个数必须一致。目前仅允许以下四项:UpathNetworkOut:出向带宽,UpathNetworkIn:入向带宽,UpathNetworkOutUsage:出向带宽使用率,UpathNetworkInUsage:入向带宽使用率 + * + * @return string[]|null + */ + public function getMetricName(): array + { + return $this->get("MetricName"); + } + + /** + * MetricName: 告警指标名称, 所有n的个数必须一致。目前仅允许以下四项:UpathNetworkOut:出向带宽,UpathNetworkIn:入向带宽,UpathNetworkOutUsage:出向带宽使用率,UpathNetworkInUsage:入向带宽使用率 + * + * @param string[] $metricName + */ + public function setMetricName(array $metricName) + { + $this->set("MetricName", $metricName); + } + + /** + * Threshold: 告警阈值,带宽使用率的阈值范围是[50,100]的正整数,带宽告警阈值为1000000的倍数, 如大于2Mbps则告警 阈值应该传 2000000 + * + * @return int[]|null + */ + public function getThreshold(): array + { + return $this->get("Threshold"); + } + + /** + * Threshold: 告警阈值,带宽使用率的阈值范围是[50,100]的正整数,带宽告警阈值为1000000的倍数, 如大于2Mbps则告警 阈值应该传 2000000 + * + * @param int[] $threshold + */ + public function setThreshold(array $threshold) + { + $this->set("Threshold", $threshold); + } + + /** + * AlarmFrequency: 告警探测周期,单位:秒 + * + * @return int[]|null + */ + public function getAlarmFrequency(): array + { + return $this->get("AlarmFrequency"); + } + + /** + * AlarmFrequency: 告警探测周期,单位:秒 + * + * @param int[] $alarmFrequency + */ + public function setAlarmFrequency(array $alarmFrequency) + { + $this->set("AlarmFrequency", $alarmFrequency); + } + + /** + * ContactGroupId: 告警组id + * + * @return int[]|null + */ + public function getContactGroupId(): array + { + return $this->get("ContactGroupId"); + } + + /** + * ContactGroupId: 告警组id + * + * @param int[] $contactGroupId + */ + public function setContactGroupId(array $contactGroupId) + { + $this->set("ContactGroupId", $contactGroupId); + } + + /** + * Compare: 比较策略,可选 ['GE','LE'] 分别代表不小于和不大于 + * + * @return string[]|null + */ + public function getCompare(): array + { + return $this->get("Compare"); + } + + /** + * Compare: 比较策略,可选 ['GE','LE'] 分别代表不小于和不大于 + * + * @param string[] $compare + */ + public function setCompare(array $compare) + { + $this->set("Compare", $compare); + } + + /** + * AlarmStrategy: 收敛策略,可选范围 ['Exponential','Continuous','Once'],分别对应指数递增、连续告警、单次告警 + * + * @return string[]|null + */ + public function getAlarmStrategy(): array + { + return $this->get("AlarmStrategy"); + } + + /** + * AlarmStrategy: 收敛策略,可选范围 ['Exponential','Continuous','Once'],分别对应指数递增、连续告警、单次告警 + * + * @param string[] $alarmStrategy + */ + public function setAlarmStrategy(array $alarmStrategy) + { + $this->set("AlarmStrategy", $alarmStrategy); + } + + /** + * TriggerCount: 告警触发周期(次数) + * + * @return int[]|null + */ + public function getTriggerCount(): array + { + return $this->get("TriggerCount"); + } + + /** + * TriggerCount: 告警触发周期(次数) + * + * @param int[] $triggerCount + */ + public function setTriggerCount(array $triggerCount) + { + $this->set("TriggerCount", $triggerCount); + } +} diff --git a/src/PathX/Apis/ModifyUPathTemplateResponse.php b/src/PathX/Apis/ModifyUPathTemplateResponse.php new file mode 100644 index 00000000..f6ecfa4a --- /dev/null +++ b/src/PathX/Apis/ModifyUPathTemplateResponse.php @@ -0,0 +1,26 @@ + "UGABindUPath"]); + $this->markRequired("ProjectId"); + $this->markRequired("UGAId"); + $this->markRequired("UPathId"); + } + + + + /** + * ProjectId: 项目ID。请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UGAId: 加速配置实例ID,格式uga-xxxx + * + * @return string|null + */ + public function getUGAId(): string + { + return $this->get("UGAId"); + } + + /** + * UGAId: 加速配置实例ID,格式uga-xxxx + * + * @param string $ugaId + */ + public function setUGAId(string $ugaId) + { + $this->set("UGAId", $ugaId); + } + + /** + * UPathId: 加速线路实例ID,格式upath-xxx + * + * @return string|null + */ + public function getUPathId(): string + { + return $this->get("UPathId"); + } + + /** + * UPathId: 加速线路实例ID,格式upath-xxx + * + * @param string $uPathId + */ + public function setUPathId(string $uPathId) + { + $this->set("UPathId", $uPathId); + } + + /** + * CouponId: 代金券 + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 代金券 + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/PathX/Apis/UGABindUPathResponse.php b/src/PathX/Apis/UGABindUPathResponse.php new file mode 100644 index 00000000..1f194c29 --- /dev/null +++ b/src/PathX/Apis/UGABindUPathResponse.php @@ -0,0 +1,26 @@ + "UGAUnBindUPath"]); + $this->markRequired("ProjectId"); + $this->markRequired("UGAId"); + $this->markRequired("UPathId"); + } + + + + /** + * ProjectId: 项目ID。请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UGAId: 加速配置实例ID 格式uga-xxx + * + * @return string|null + */ + public function getUGAId(): string + { + return $this->get("UGAId"); + } + + /** + * UGAId: 加速配置实例ID 格式uga-xxx + * + * @param string $ugaId + */ + public function setUGAId(string $ugaId) + { + $this->set("UGAId", $ugaId); + } + + /** + * UPathId: 加速线路实例ID 格式upath-xxx + * + * @return string|null + */ + public function getUPathId(): string + { + return $this->get("UPathId"); + } + + /** + * UPathId: 加速线路实例ID 格式upath-xxx + * + * @param string $uPathId + */ + public function setUPathId(string $uPathId) + { + $this->set("UPathId", $uPathId); + } +} diff --git a/src/PathX/Apis/UGAUnBindUPathResponse.php b/src/PathX/Apis/UGAUnBindUPathResponse.php new file mode 100644 index 00000000..f3dddb0b --- /dev/null +++ b/src/PathX/Apis/UGAUnBindUPathResponse.php @@ -0,0 +1,26 @@ + "UnBindPathXSSL"]); + $this->markRequired("ProjectId"); + $this->markRequired("UGAId"); + $this->markRequired("SSLId"); + $this->markRequired("Port"); + } + + + + /** + * ProjectId: 项目ID。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UGAId: UGA实例ID。 + * + * @return string|null + */ + public function getUGAId(): string + { + return $this->get("UGAId"); + } + + /** + * UGAId: UGA实例ID。 + * + * @param string $ugaId + */ + public function setUGAId(string $ugaId) + { + $this->set("UGAId", $ugaId); + } + + /** + * SSLId: SSL证书ID。 + * + * @return string|null + */ + public function getSSLId(): string + { + return $this->get("SSLId"); + } + + /** + * SSLId: SSL证书ID。 + * + * @param string $sslId + */ + public function setSSLId(string $sslId) + { + $this->set("SSLId", $sslId); + } + + /** + * Port: 解绑SSL证书的HTTPS端口。Port.0 Port.1格式 端口错误则解绑失败。 + * + * @return int[]|null + */ + public function getPort(): array + { + return $this->get("Port"); + } + + /** + * Port: 解绑SSL证书的HTTPS端口。Port.0 Port.1格式 端口错误则解绑失败。 + * + * @param int[] $port + */ + public function setPort(array $port) + { + $this->set("Port", $port); + } +} diff --git a/src/PathX/Apis/UnBindPathXSSLResponse.php b/src/PathX/Apis/UnBindPathXSSLResponse.php new file mode 100644 index 00000000..fcefeb60 --- /dev/null +++ b/src/PathX/Apis/UnBindPathXSSLResponse.php @@ -0,0 +1,26 @@ +get("AlarmStrategy"); + } + + /** + * AlarmStrategy: 收敛策略,可选范围 ['Exponential','Continuous','Once'],分别对应指数递增、连续告警、单次告警 + * + * @param string $alarmStrategy + */ + public function setAlarmStrategy(string $alarmStrategy) + { + $this->set("AlarmStrategy", $alarmStrategy); + } + + /** + * AlarmFrequency: 告警探测周期,单位秒 + * + * @return integer|null + */ + public function getAlarmFrequency(): int + { + return $this->get("AlarmFrequency"); + } + + /** + * AlarmFrequency: 告警探测周期,单位秒 + * + * @param int $alarmFrequency + */ + public function setAlarmFrequency(int $alarmFrequency) + { + $this->set("AlarmFrequency", $alarmFrequency); + } + + /** + * Compare: 比较策略,可选 ['GE','LE'] 分别代表不小于和不大于 + * + * @return string|null + */ + public function getCompare(): string + { + return $this->get("Compare"); + } + + /** + * Compare: 比较策略,可选 ['GE','LE'] 分别代表不小于和不大于 + * + * @param string $compare + */ + public function setCompare(string $compare) + { + $this->set("Compare", $compare); + } + + /** + * ContactGroupId: 联系组ID + * + * @return integer|null + */ + public function getContactGroupId(): int + { + return $this->get("ContactGroupId"); + } + + /** + * ContactGroupId: 联系组ID + * + * @param int $contactGroupId + */ + public function setContactGroupId(int $contactGroupId) + { + $this->set("ContactGroupId", $contactGroupId); + } + + /** + * MetricName: 告警指标名称, 所有n的个数必须一致。目前仅允许以下四项:UpathNetworkOut:出向带宽,UpathNetworkIn:入向带宽,UpathNetworkOutUsage:出向带宽使用率,UpathNetworkInUsage:入向带宽使用率 + * + * @return string|null + */ + public function getMetricName(): string + { + return $this->get("MetricName"); + } + + /** + * MetricName: 告警指标名称, 所有n的个数必须一致。目前仅允许以下四项:UpathNetworkOut:出向带宽,UpathNetworkIn:入向带宽,UpathNetworkOutUsage:出向带宽使用率,UpathNetworkInUsage:入向带宽使用率 + * + * @param string $metricName + */ + public function setMetricName(string $metricName) + { + $this->set("MetricName", $metricName); + } + + /** + * Threshold: 告警阈值,带宽使用率的阈值范围是[50,100]的正整数,带宽告警阈值为1000000的倍数, 如大于2Mbps则告警 阈值应该传 2000000 + * + * @return integer|null + */ + public function getThreshold(): int + { + return $this->get("Threshold"); + } + + /** + * Threshold: 告警阈值,带宽使用率的阈值范围是[50,100]的正整数,带宽告警阈值为1000000的倍数, 如大于2Mbps则告警 阈值应该传 2000000 + * + * @param int $threshold + */ + public function setThreshold(int $threshold) + { + $this->set("Threshold", $threshold); + } + + /** + * TriggerCount: 告警触发周期(次数) + * + * @return integer|null + */ + public function getTriggerCount(): int + { + return $this->get("TriggerCount"); + } + + /** + * TriggerCount: 告警触发周期(次数) + * + * @param int $triggerCount + */ + public function setTriggerCount(int $triggerCount) + { + $this->set("TriggerCount", $triggerCount); + } + + /** + * AlarmTemplateRuleId: 告警模板策略ID + * + * @return integer|null + */ + public function getAlarmTemplateRuleId(): int + { + return $this->get("AlarmTemplateRuleId"); + } + + /** + * AlarmTemplateRuleId: 告警模板策略ID + * + * @param int $alarmTemplateRuleId + */ + public function setAlarmTemplateRuleId(int $alarmTemplateRuleId) + { + $this->set("AlarmTemplateRuleId", $alarmTemplateRuleId); + } + + /** + * ResourceType: 资源类型 + * + * @return string|null + */ + public function getResourceType(): string + { + return $this->get("ResourceType"); + } + + /** + * ResourceType: 资源类型 + * + * @param string $resourceType + */ + public function setResourceType(string $resourceType) + { + $this->set("ResourceType", $resourceType); + } +} diff --git a/src/PathX/Models/GlobalSSHInfo.php b/src/PathX/Models/GlobalSSHInfo.php new file mode 100644 index 00000000..5fce9bbd --- /dev/null +++ b/src/PathX/Models/GlobalSSHInfo.php @@ -0,0 +1,304 @@ +get("InstanceId"); + } + + /** + * InstanceId: 实例ID,资源唯一标识 + * + * @param string $instanceId + */ + public function setInstanceId(string $instanceId) + { + $this->set("InstanceId", $instanceId); + } + + /** + * InstanceType: 枚举值:["Enterprise","Basic","Free","Welfare"], 分别代表企业版,基础版本,免费版本,较早的公测免费版 + * + * @return string|null + */ + public function getInstanceType(): string + { + return $this->get("InstanceType"); + } + + /** + * InstanceType: 枚举值:["Enterprise","Basic","Free","Welfare"], 分别代表企业版,基础版本,免费版本,较早的公测免费版 + * + * @param string $instanceType + */ + public function setInstanceType(string $instanceType) + { + $this->set("InstanceType", $instanceType); + } + + /** + * AcceleratingDomain: GlobalSSH分配的加速域名。 + * + * @return string|null + */ + public function getAcceleratingDomain(): string + { + return $this->get("AcceleratingDomain"); + } + + /** + * AcceleratingDomain: GlobalSSH分配的加速域名。 + * + * @param string $acceleratingDomain + */ + public function setAcceleratingDomain(string $acceleratingDomain) + { + $this->set("AcceleratingDomain", $acceleratingDomain); + } + + /** + * Area: 被SSH访问的IP所在地区 + * + * @return string|null + */ + public function getArea(): string + { + return $this->get("Area"); + } + + /** + * Area: 被SSH访问的IP所在地区 + * + * @param string $area + */ + public function setArea(string $area) + { + $this->set("Area", $area); + } + + /** + * TargetIP: 被SSH访问的源站 IPv4地址。 + * + * @return string|null + */ + public function getTargetIP(): string + { + return $this->get("TargetIP"); + } + + /** + * TargetIP: 被SSH访问的源站 IPv4地址。 + * + * @param string $targetIP + */ + public function setTargetIP(string $targetIP) + { + $this->set("TargetIP", $targetIP); + } + + /** + * Remark: 备注信息 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 备注信息 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } + + /** + * Port: 源站服务器监听的SSH端口,windows系统为RDP端口 + * + * @return integer|null + */ + public function getPort(): int + { + return $this->get("Port"); + } + + /** + * Port: 源站服务器监听的SSH端口,windows系统为RDP端口 + * + * @param int $port + */ + public function setPort(int $port) + { + $this->set("Port", $port); + } + + /** + * GlobalSSHPort: InstanceType等于Free时,由系统自动分配,不等于源站Port值。InstanceType不等于Free时,与源站Port值相同。 + * + * @return integer|null + */ + public function getGlobalSSHPort(): int + { + return $this->get("GlobalSSHPort"); + } + + /** + * GlobalSSHPort: InstanceType等于Free时,由系统自动分配,不等于源站Port值。InstanceType不等于Free时,与源站Port值相同。 + * + * @param int $globalSSHPort + */ + public function setGlobalSSHPort(int $globalSSHPort) + { + $this->set("GlobalSSHPort", $globalSSHPort); + } + + /** + * ChargeType: 支付周期,如Month,Year,Dynamic等 + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 支付周期,如Month,Year,Dynamic等 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * CreateTime: 资源创建时间戳 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 资源创建时间戳 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ExpireTime: 资源过期时间戳 + * + * @return integer|null + */ + public function getExpireTime(): int + { + return $this->get("ExpireTime"); + } + + /** + * ExpireTime: 资源过期时间戳 + * + * @param int $expireTime + */ + public function setExpireTime(int $expireTime) + { + $this->set("ExpireTime", $expireTime); + } + + /** + * Expire: 是否过期 + * + * @return boolean|null + */ + public function getExpire(): bool + { + return $this->get("Expire"); + } + + /** + * Expire: 是否过期 + * + * @param boolean $expire + */ + public function setExpire(bool $expire) + { + $this->set("Expire", $expire); + } + + /** + * BandwidthPackage: globalssh Ultimate带宽包大小 + * + * @return integer|null + */ + public function getBandwidthPackage(): int + { + return $this->get("BandwidthPackage"); + } + + /** + * BandwidthPackage: globalssh Ultimate带宽包大小 + * + * @param int $bandwidthPackage + */ + public function setBandwidthPackage(int $bandwidthPackage) + { + $this->set("BandwidthPackage", $bandwidthPackage); + } + + /** + * ForwardRegion: InstanceType为Basic版本时,需要展示具体分配的转发机房 + * + * @return string|null + */ + public function getForwardRegion(): string + { + return $this->get("ForwardRegion"); + } + + /** + * ForwardRegion: InstanceType为Basic版本时,需要展示具体分配的转发机房 + * + * @param string $forwardRegion + */ + public function setForwardRegion(string $forwardRegion) + { + $this->set("ForwardRegion", $forwardRegion); + } +} diff --git a/src/PathX/Models/LineDetail.php b/src/PathX/Models/LineDetail.php new file mode 100644 index 00000000..ba9af896 --- /dev/null +++ b/src/PathX/Models/LineDetail.php @@ -0,0 +1,124 @@ +get("LineFrom"); + } + + /** + * LineFrom: 线路源 + * + * @param string $lineFrom + */ + public function setLineFrom(string $lineFrom) + { + $this->set("LineFrom", $lineFrom); + } + + /** + * LineTo: 线路目的 + * + * @return string|null + */ + public function getLineTo(): string + { + return $this->get("LineTo"); + } + + /** + * LineTo: 线路目的 + * + * @param string $lineTo + */ + public function setLineTo(string $lineTo) + { + $this->set("LineTo", $lineTo); + } + + /** + * LineId: 线路计费Id + * + * @return string|null + */ + public function getLineId(): string + { + return $this->get("LineId"); + } + + /** + * LineId: 线路计费Id + * + * @param string $lineId + */ + public function setLineId(string $lineId) + { + $this->set("LineId", $lineId); + } + + /** + * LineFromName: 线路源中文名称 + * + * @return string|null + */ + public function getLineFromName(): string + { + return $this->get("LineFromName"); + } + + /** + * LineFromName: 线路源中文名称 + * + * @param string $lineFromName + */ + public function setLineFromName(string $lineFromName) + { + $this->set("LineFromName", $lineFromName); + } + + /** + * LineToName: 线路目的中文名称 + * + * @return string|null + */ + public function getLineToName(): string + { + return $this->get("LineToName"); + } + + /** + * LineToName: 线路目的中文名称 + * + * @param string $lineToName + */ + public function setLineToName(string $lineToName) + { + $this->set("LineToName", $lineToName); + } +} diff --git a/src/PathX/Models/MatricPoint.php b/src/PathX/Models/MatricPoint.php new file mode 100644 index 00000000..b5cd6000 --- /dev/null +++ b/src/PathX/Models/MatricPoint.php @@ -0,0 +1,64 @@ +get("Timestamp"); + } + + /** + * Timestamp: 时间戳 + * + * @param int $timestamp + */ + public function setTimestamp(int $timestamp) + { + $this->set("Timestamp", $timestamp); + } + + /** + * Value: 监控点数值 + * + * @return integer|null + */ + public function getValue(): int + { + return $this->get("Value"); + } + + /** + * Value: 监控点数值 + * + * @param int $value + */ + public function setValue(int $value) + { + $this->set("Value", $value); + } +} diff --git a/src/PathX/Models/MetricPeriod.php b/src/PathX/Models/MetricPeriod.php new file mode 100644 index 00000000..1cbeedbe --- /dev/null +++ b/src/PathX/Models/MetricPeriod.php @@ -0,0 +1,140 @@ +get("NetworkOut") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new MatricPoint($item)); + } + return $result; + } + + /** + * NetworkOut: 出向带宽 + * + * @param MatricPoint[] $networkOut + */ + public function setNetworkOut(array $networkOut) + { + $result = []; + foreach ($networkOut as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * NetworkIn: 入向带宽 + * + * @return MatricPoint[]|null + */ + public function getNetworkIn(): array + { + $items = $this->get("NetworkIn") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new MatricPoint($item)); + } + return $result; + } + + /** + * NetworkIn: 入向带宽 + * + * @param MatricPoint[] $networkIn + */ + public function setNetworkIn(array $networkIn) + { + $result = []; + foreach ($networkIn as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * NetworkOutUsage: 出向带宽使用率 + * + * @return MatricPoint[]|null + */ + public function getNetworkOutUsage(): array + { + $items = $this->get("NetworkOutUsage") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new MatricPoint($item)); + } + return $result; + } + + /** + * NetworkOutUsage: 出向带宽使用率 + * + * @param MatricPoint[] $networkOutUsage + */ + public function setNetworkOutUsage(array $networkOutUsage) + { + $result = []; + foreach ($networkOutUsage as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * NetworkInUsage: 入向带宽使用率 + * + * @return MatricPoint[]|null + */ + public function getNetworkInUsage(): array + { + $items = $this->get("NetworkInUsage") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new MatricPoint($item)); + } + return $result; + } + + /** + * NetworkInUsage: 入向带宽使用率 + * + * @param MatricPoint[] $networkInUsage + */ + public function setNetworkInUsage(array $networkInUsage) + { + $result = []; + foreach ($networkInUsage as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/PathX/Models/OutPublicIpInfo.php b/src/PathX/Models/OutPublicIpInfo.php new file mode 100644 index 00000000..26b5fcff --- /dev/null +++ b/src/PathX/Models/OutPublicIpInfo.php @@ -0,0 +1,64 @@ +get("IP"); + } + + /** + * IP: 线路出口EIP + * + * @param string $ip + */ + public function setIP(string $ip) + { + $this->set("IP", $ip); + } + + /** + * Area: 线路出口机房代号 + * + * @return string|null + */ + public function getArea(): string + { + return $this->get("Area"); + } + + /** + * Area: 线路出口机房代号 + * + * @param string $area + */ + public function setArea(string $area) + { + $this->set("Area", $area); + } +} diff --git a/src/PathX/Models/PathXSSLSet.php b/src/PathX/Models/PathXSSLSet.php new file mode 100644 index 00000000..b57f8508 --- /dev/null +++ b/src/PathX/Models/PathXSSLSet.php @@ -0,0 +1,213 @@ +get("SSLId"); + } + + /** + * SSLId: SSL证书的Id + * + * @param string $sslId + */ + public function setSSLId(string $sslId) + { + $this->set("SSLId", $sslId); + } + + /** + * SSLName: SSL证书的名字 + * + * @return string|null + */ + public function getSSLName(): string + { + return $this->get("SSLName"); + } + + /** + * SSLName: SSL证书的名字 + * + * @param string $sslName + */ + public function setSSLName(string $sslName) + { + $this->set("SSLName", $sslName); + } + + /** + * SubjectName: 证书域名 + * + * @return string|null + */ + public function getSubjectName(): string + { + return $this->get("SubjectName"); + } + + /** + * SubjectName: 证书域名 + * + * @param string $subjectName + */ + public function setSubjectName(string $subjectName) + { + $this->set("SubjectName", $subjectName); + } + + /** + * ExpireTime: 证书过期时间 时间戳 + * + * @return integer|null + */ + public function getExpireTime(): int + { + return $this->get("ExpireTime"); + } + + /** + * ExpireTime: 证书过期时间 时间戳 + * + * @param int $expireTime + */ + public function setExpireTime(int $expireTime) + { + $this->set("ExpireTime", $expireTime); + } + + /** + * SourceType: 证书来源,0:用户上传 1: 免费颁发 + * + * @return integer|null + */ + public function getSourceType(): int + { + return $this->get("SourceType"); + } + + /** + * SourceType: 证书来源,0:用户上传 1: 免费颁发 + * + * @param int $sourceType + */ + public function setSourceType(int $sourceType) + { + $this->set("SourceType", $sourceType); + } + + /** + * SSLMD5: SSL证书(用户证书、私钥、ca证书合并)内容md5值 + * + * @return string|null + */ + public function getSSLMD5(): string + { + return $this->get("SSLMD5"); + } + + /** + * SSLMD5: SSL证书(用户证书、私钥、ca证书合并)内容md5值 + * + * @param string $sslmd5 + */ + public function setSSLMD5(string $sslmd5) + { + $this->set("SSLMD5", $sslmd5); + } + + /** + * CreateTime: SSL证书的创建时间 时间戳 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: SSL证书的创建时间 时间戳 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * SSLBindedTargetSet: SSL证书绑定的对象 + * + * @return SSLBindedTargetSet[]|null + */ + public function getSSLBindedTargetSet(): array + { + $items = $this->get("SSLBindedTargetSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new SSLBindedTargetSet($item)); + } + return $result; + } + + /** + * SSLBindedTargetSet: SSL证书绑定的对象 + * + * @param SSLBindedTargetSet[] $sslBindedTargetSet + */ + public function setSSLBindedTargetSet(array $sslBindedTargetSet) + { + $result = []; + foreach ($sslBindedTargetSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * SSLContent: SSL证书内容 + * + * @return string|null + */ + public function getSSLContent(): string + { + return $this->get("SSLContent"); + } + + /** + * SSLContent: SSL证书内容 + * + * @param string $sslContent + */ + public function setSSLContent(string $sslContent) + { + $this->set("SSLContent", $sslContent); + } +} diff --git a/src/PathX/Models/PathXUGAInfo.php b/src/PathX/Models/PathXUGAInfo.php new file mode 100644 index 00000000..58adb84f --- /dev/null +++ b/src/PathX/Models/PathXUGAInfo.php @@ -0,0 +1,84 @@ +get("UGAId"); + } + + /** + * UGAId: 加速配置ID + * + * @param string $ugaId + */ + public function setUGAId(string $ugaId) + { + $this->set("UGAId", $ugaId); + } + + /** + * IPList: 源站IP列表,多个值由半角英文逗号相隔 + * + * @return string[]|null + */ + public function getIPList(): array + { + return $this->get("IPList"); + } + + /** + * IPList: 源站IP列表,多个值由半角英文逗号相隔 + * + * @param string[] $ipList + */ + public function setIPList(array $ipList) + { + $this->set("IPList", $ipList); + } + + /** + * Domain: 源站域名 + * + * @return string|null + */ + public function getDomain(): string + { + return $this->get("Domain"); + } + + /** + * Domain: 源站域名 + * + * @param string $domain + */ + public function setDomain(string $domain) + { + $this->set("Domain", $domain); + } +} diff --git a/src/PathX/Models/SSLBindedTargetSet.php b/src/PathX/Models/SSLBindedTargetSet.php new file mode 100644 index 00000000..64dbccbd --- /dev/null +++ b/src/PathX/Models/SSLBindedTargetSet.php @@ -0,0 +1,64 @@ +get("ResourceId"); + } + + /** + * ResourceId: SSL证书绑定到的实例ID + * + * @param string $resourceId + */ + public function setResourceId(string $resourceId) + { + $this->set("ResourceId", $resourceId); + } + + /** + * ResourceName: SSL证书绑定到的实例名称 + * + * @return string|null + */ + public function getResourceName(): string + { + return $this->get("ResourceName"); + } + + /** + * ResourceName: SSL证书绑定到的实例名称 + * + * @param string $resourceName + */ + public function setResourceName(string $resourceName) + { + $this->set("ResourceName", $resourceName); + } +} diff --git a/src/PathX/Models/UGAAInfo.php b/src/PathX/Models/UGAAInfo.php new file mode 100644 index 00000000..9c862138 --- /dev/null +++ b/src/PathX/Models/UGAAInfo.php @@ -0,0 +1,289 @@ +get("UGAId"); + } + + /** + * UGAId: 加速配置实例ID + * + * @param string $ugaId + */ + public function setUGAId(string $ugaId) + { + $this->set("UGAId", $ugaId); + } + + /** + * CName: 加速域名,请在加速区域配置您的业务域名的CName记录值为加速域名 + * + * @return string|null + */ + public function getCName(): string + { + return $this->get("CName"); + } + + /** + * CName: 加速域名,请在加速区域配置您的业务域名的CName记录值为加速域名 + * + * @param string $cName + */ + public function setCName(string $cName) + { + $this->set("CName", $cName); + } + + /** + * UGAName: 加速配置名称 + * + * @return string|null + */ + public function getUGAName(): string + { + return $this->get("UGAName"); + } + + /** + * UGAName: 加速配置名称 + * + * @param string $ugaName + */ + public function setUGAName(string $ugaName) + { + $this->set("UGAName", $ugaName); + } + + /** + * IPList: 源站IP列表,多个值由半角英文逗号相隔 + * + * @return string[]|null + */ + public function getIPList(): array + { + return $this->get("IPList"); + } + + /** + * IPList: 源站IP列表,多个值由半角英文逗号相隔 + * + * @param string[] $ipList + */ + public function setIPList(array $ipList) + { + $this->set("IPList", $ipList); + } + + /** + * Domain: 源站域名 + * + * @return string|null + */ + public function getDomain(): string + { + return $this->get("Domain"); + } + + /** + * Domain: 源站域名 + * + * @param string $domain + */ + public function setDomain(string $domain) + { + $this->set("Domain", $domain); + } + + /** + * Location: 源站所在区域,加速实例在绑定线路后会自动设置该值。console页面上通过该值过滤加速实例可以绑定的upath实例。注意:缺少该值会导致在console上无法修改线路 + * + * @return string|null + */ + public function getLocation(): string + { + return $this->get("Location"); + } + + /** + * Location: 源站所在区域,加速实例在绑定线路后会自动设置该值。console页面上通过该值过滤加速实例可以绑定的upath实例。注意:缺少该值会导致在console上无法修改线路 + * + * @param string $location + */ + public function setLocation(string $location) + { + $this->set("Location", $location); + } + + /** + * UPathSet: 绑定的加速线路 + * + * @return UPathSet[]|null + */ + public function getUPathSet(): array + { + $items = $this->get("UPathSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UPathSet($item)); + } + return $result; + } + + /** + * UPathSet: 绑定的加速线路 + * + * @param UPathSet[] $uPathSet + */ + public function setUPathSet(array $uPathSet) + { + $result = []; + foreach ($uPathSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TaskSet: 端口配置信息(不再维护,建议使用ForwarderSet) + * + * @return UGAATask[]|null + */ + public function getTaskSet(): array + { + $items = $this->get("TaskSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UGAATask($item)); + } + return $result; + } + + /** + * TaskSet: 端口配置信息(不再维护,建议使用ForwarderSet) + * + * @param UGAATask[] $taskSet + */ + public function setTaskSet(array $taskSet) + { + $result = []; + foreach ($taskSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * L4ForwarderSet: UGA 4层转发器配置,记录接入或回源端口,接入或回源协议信息 + * + * @return UGAL4Forwarder[]|null + */ + public function getL4ForwarderSet(): array + { + $items = $this->get("L4ForwarderSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UGAL4Forwarder($item)); + } + return $result; + } + + /** + * L4ForwarderSet: UGA 4层转发器配置,记录接入或回源端口,接入或回源协议信息 + * + * @param UGAL4Forwarder[] $l4ForwarderSet + */ + public function setL4ForwarderSet(array $l4ForwarderSet) + { + $result = []; + foreach ($l4ForwarderSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * L7ForwarderSet: UGA 7层转发器配置,记录接入或回源端口,接入或回源协议信息 如绑定证书会返回证书ID + * + * @return UGAL7Forwarder[]|null + */ + public function getL7ForwarderSet(): array + { + $items = $this->get("L7ForwarderSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UGAL7Forwarder($item)); + } + return $result; + } + + /** + * L7ForwarderSet: UGA 7层转发器配置,记录接入或回源端口,接入或回源协议信息 如绑定证书会返回证书ID + * + * @param UGAL7Forwarder[] $l7ForwarderSet + */ + public function setL7ForwarderSet(array $l7ForwarderSet) + { + $result = []; + foreach ($l7ForwarderSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * OutPublicIpList: 线路出口IP地址 + * + * @return OutPublicIpInfo[]|null + */ + public function getOutPublicIpList(): array + { + $items = $this->get("OutPublicIpList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new OutPublicIpInfo($item)); + } + return $result; + } + + /** + * OutPublicIpList: 线路出口IP地址 + * + * @param OutPublicIpInfo[] $outPublicIpList + */ + public function setOutPublicIpList(array $outPublicIpList) + { + $result = []; + foreach ($outPublicIpList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/PathX/Models/UGAALine.php b/src/PathX/Models/UGAALine.php new file mode 100644 index 00000000..86eb77ce --- /dev/null +++ b/src/PathX/Models/UGAALine.php @@ -0,0 +1,173 @@ +get("LineFrom"); + } + + /** + * LineFrom: 线路源 + * + * @param string $lineFrom + */ + public function setLineFrom(string $lineFrom) + { + $this->set("LineFrom", $lineFrom); + } + + /** + * LineTo: 线路目的 + * + * @return string|null + */ + public function getLineTo(): string + { + return $this->get("LineTo"); + } + + /** + * LineTo: 线路目的 + * + * @param string $lineTo + */ + public function setLineTo(string $lineTo) + { + $this->set("LineTo", $lineTo); + } + + /** + * LineFromName: 线路源中文名称 + * + * @return string|null + */ + public function getLineFromName(): string + { + return $this->get("LineFromName"); + } + + /** + * LineFromName: 线路源中文名称 + * + * @param string $lineFromName + */ + public function setLineFromName(string $lineFromName) + { + $this->set("LineFromName", $lineFromName); + } + + /** + * LineToName: 线路目的中文名称 + * + * @return string|null + */ + public function getLineToName(): string + { + return $this->get("LineToName"); + } + + /** + * LineToName: 线路目的中文名称 + * + * @param string $lineToName + */ + public function setLineToName(string $lineToName) + { + $this->set("LineToName", $lineToName); + } + + /** + * MaxBandwidth: 线路可售最大带宽 + * + * @return integer|null + */ + public function getMaxBandwidth(): int + { + return $this->get("MaxBandwidth"); + } + + /** + * MaxBandwidth: 线路可售最大带宽 + * + * @param int $maxBandwidth + */ + public function setMaxBandwidth(int $maxBandwidth) + { + $this->set("MaxBandwidth", $maxBandwidth); + } + + /** + * LineId: 线路计费Id + * + * @return string|null + */ + public function getLineId(): string + { + return $this->get("LineId"); + } + + /** + * LineId: 线路计费Id + * + * @param string $lineId + */ + public function setLineId(string $lineId) + { + $this->set("LineId", $lineId); + } + + /** + * LineDetail: 子线路信息 + * + * @return LineDetail[]|null + */ + public function getLineDetail(): array + { + $items = $this->get("LineDetail") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new LineDetail($item)); + } + return $result; + } + + /** + * LineDetail: 子线路信息 + * + * @param LineDetail[] $lineDetail + */ + public function setLineDetail(array $lineDetail) + { + $result = []; + foreach ($lineDetail as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/PathX/Models/UGAATask.php b/src/PathX/Models/UGAATask.php new file mode 100644 index 00000000..8eaa26c3 --- /dev/null +++ b/src/PathX/Models/UGAATask.php @@ -0,0 +1,64 @@ +get("Port"); + } + + /** + * Port: 接入端口 + * + * @param int $port + */ + public function setPort(int $port) + { + $this->set("Port", $port); + } + + /** + * Protocol: 转发协议,枚举值["TCP","UDP","HTTPHTTP","HTTPSHTTP","HTTPSHTTPS"]。TCP和UDP代表四层转发,其余为七层转发 + * + * @return string|null + */ + public function getProtocol(): string + { + return $this->get("Protocol"); + } + + /** + * Protocol: 转发协议,枚举值["TCP","UDP","HTTPHTTP","HTTPSHTTP","HTTPSHTTPS"]。TCP和UDP代表四层转发,其余为七层转发 + * + * @param string $protocol + */ + public function setProtocol(string $protocol) + { + $this->set("Protocol", $protocol); + } +} diff --git a/src/PathX/Models/UGAL4Forwarder.php b/src/PathX/Models/UGAL4Forwarder.php new file mode 100644 index 00000000..6e23a90f --- /dev/null +++ b/src/PathX/Models/UGAL4Forwarder.php @@ -0,0 +1,84 @@ +get("Port"); + } + + /** + * Port: 接入端口 + * + * @param int $port + */ + public function setPort(int $port) + { + $this->set("Port", $port); + } + + /** + * Protocol: 转发协议,枚举值["TCP","UDP","HTTPHTTP","HTTPSHTTP","HTTPSHTTPS"]。TCP和UDP代表四层转发,其余为七层转发 + * + * @return string|null + */ + public function getProtocol(): string + { + return $this->get("Protocol"); + } + + /** + * Protocol: 转发协议,枚举值["TCP","UDP","HTTPHTTP","HTTPSHTTP","HTTPSHTTPS"]。TCP和UDP代表四层转发,其余为七层转发 + * + * @param string $protocol + */ + public function setProtocol(string $protocol) + { + $this->set("Protocol", $protocol); + } + + /** + * RSPort: RSPort,源站监听端口 + * + * @return integer|null + */ + public function getRSPort(): int + { + return $this->get("RSPort"); + } + + /** + * RSPort: RSPort,源站监听端口 + * + * @param int $rsPort + */ + public function setRSPort(int $rsPort) + { + $this->set("RSPort", $rsPort); + } +} diff --git a/src/PathX/Models/UGAL7Forwarder.php b/src/PathX/Models/UGAL7Forwarder.php new file mode 100644 index 00000000..42254f3a --- /dev/null +++ b/src/PathX/Models/UGAL7Forwarder.php @@ -0,0 +1,124 @@ +get("Port"); + } + + /** + * Port: 接入端口 + * + * @param int $port + */ + public function setPort(int $port) + { + $this->set("Port", $port); + } + + /** + * Protocol: 转发协议,枚举值["TCP","UDP","HTTPHTTP","HTTPSHTTP","HTTPSHTTPS"]。TCP和UDP代表四层转发,其余为七层转发 + * + * @return string|null + */ + public function getProtocol(): string + { + return $this->get("Protocol"); + } + + /** + * Protocol: 转发协议,枚举值["TCP","UDP","HTTPHTTP","HTTPSHTTP","HTTPSHTTPS"]。TCP和UDP代表四层转发,其余为七层转发 + * + * @param string $protocol + */ + public function setProtocol(string $protocol) + { + $this->set("Protocol", $protocol); + } + + /** + * RSPort: RSPort,源站监听端口 + * + * @return integer|null + */ + public function getRSPort(): int + { + return $this->get("RSPort"); + } + + /** + * RSPort: RSPort,源站监听端口 + * + * @param int $rsPort + */ + public function setRSPort(int $rsPort) + { + $this->set("RSPort", $rsPort); + } + + /** + * SSLId: 证书ID + * + * @return string|null + */ + public function getSSLId(): string + { + return $this->get("SSLId"); + } + + /** + * SSLId: 证书ID + * + * @param string $sslId + */ + public function setSSLId(string $sslId) + { + $this->set("SSLId", $sslId); + } + + /** + * SSLName: 证书名称 + * + * @return string|null + */ + public function getSSLName(): string + { + return $this->get("SSLName"); + } + + /** + * SSLName: 证书名称 + * + * @param string $sslName + */ + public function setSSLName(string $sslName) + { + $this->set("SSLName", $sslName); + } +} diff --git a/src/PathX/Models/UPathInfo.php b/src/PathX/Models/UPathInfo.php new file mode 100644 index 00000000..0733bbdb --- /dev/null +++ b/src/PathX/Models/UPathInfo.php @@ -0,0 +1,282 @@ +get("PostPaid"); + } + + /** + * PostPaid: 是否为后付费实例 + * + * @param boolean $postPaid + */ + public function setPostPaid(bool $postPaid) + { + $this->set("PostPaid", $postPaid); + } + + /** + * ChargeType: 计费模式,默认为Month 按月收费,可选范围['Month','Year','Dynamic'] + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式,默认为Month 按月收费,可选范围['Month','Year','Dynamic'] + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Name: UPath实例名字 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: UPath实例名字 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * UPathId: UPath加速线路实例ID + * + * @return string|null + */ + public function getUPathId(): string + { + return $this->get("UPathId"); + } + + /** + * UPathId: UPath加速线路实例ID + * + * @param string $uPathId + */ + public function setUPathId(string $uPathId) + { + $this->set("UPathId", $uPathId); + } + + /** + * Bandwidth: 带宽,单位Mbps + * + * @return integer|null + */ + public function getBandwidth(): int + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: 带宽,单位Mbps + * + * @param int $bandwidth + */ + public function setBandwidth(int $bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * LineId: 选择的线路 + * + * @return string|null + */ + public function getLineId(): string + { + return $this->get("LineId"); + } + + /** + * LineId: 选择的线路 + * + * @param string $lineId + */ + public function setLineId(string $lineId) + { + $this->set("LineId", $lineId); + } + + /** + * UGAList: 与该UPath绑定的UGA列表 + * + * @return PathXUGAInfo[]|null + */ + public function getUGAList(): array + { + $items = $this->get("UGAList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new PathXUGAInfo($item)); + } + return $result; + } + + /** + * UGAList: 与该UPath绑定的UGA列表 + * + * @param PathXUGAInfo[] $ugaList + */ + public function setUGAList(array $ugaList) + { + $result = []; + foreach ($ugaList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * CreateTime: UPath创建的时间,10位时间戳 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: UPath创建的时间,10位时间戳 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ExpireTime: UPath的过期时间,10位时间戳 + * + * @return integer|null + */ + public function getExpireTime(): int + { + return $this->get("ExpireTime"); + } + + /** + * ExpireTime: UPath的过期时间,10位时间戳 + * + * @param int $expireTime + */ + public function setExpireTime(int $expireTime) + { + $this->set("ExpireTime", $expireTime); + } + + /** + * LineFromName: 线路入口名称 + * + * @return string|null + */ + public function getLineFromName(): string + { + return $this->get("LineFromName"); + } + + /** + * LineFromName: 线路入口名称 + * + * @param string $lineFromName + */ + public function setLineFromName(string $lineFromName) + { + $this->set("LineFromName", $lineFromName); + } + + /** + * LineToName: 线路出口名称 + * + * @return string|null + */ + public function getLineToName(): string + { + return $this->get("LineToName"); + } + + /** + * LineToName: 线路出口名称 + * + * @param string $lineToName + */ + public function setLineToName(string $lineToName) + { + $this->set("LineToName", $lineToName); + } + + /** + * OutPublicIpList: 线路出口IP数组 + * + * @return OutPublicIpInfo[]|null + */ + public function getOutPublicIpList(): array + { + $items = $this->get("OutPublicIpList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new OutPublicIpInfo($item)); + } + return $result; + } + + /** + * OutPublicIpList: 线路出口IP数组 + * + * @param OutPublicIpInfo[] $outPublicIpList + */ + public function setOutPublicIpList(array $outPublicIpList) + { + $result = []; + foreach ($outPublicIpList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/PathX/Models/UPathSet.php b/src/PathX/Models/UPathSet.php new file mode 100644 index 00000000..9bf56e17 --- /dev/null +++ b/src/PathX/Models/UPathSet.php @@ -0,0 +1,184 @@ +get("UPathName"); + } + + /** + * UPathName: UPath名字 + * + * @param string $uPathName + */ + public function setUPathName(string $uPathName) + { + $this->set("UPathName", $uPathName); + } + + /** + * UPathId: UPath 实例ID + * + * @return string|null + */ + public function getUPathId(): string + { + return $this->get("UPathId"); + } + + /** + * UPathId: UPath 实例ID + * + * @param string $uPathId + */ + public function setUPathId(string $uPathId) + { + $this->set("UPathId", $uPathId); + } + + /** + * Bandwidth: 带宽 Mbps, 1~800Mbps + * + * @return integer|null + */ + public function getBandwidth(): int + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: 带宽 Mbps, 1~800Mbps + * + * @param int $bandwidth + */ + public function setBandwidth(int $bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * LineId: 线路ID + * + * @return string|null + */ + public function getLineId(): string + { + return $this->get("LineId"); + } + + /** + * LineId: 线路ID + * + * @param string $lineId + */ + public function setLineId(string $lineId) + { + $this->set("LineId", $lineId); + } + + /** + * LineFromName: 线路起点中文名字,加速区域 + * + * @return string|null + */ + public function getLineFromName(): string + { + return $this->get("LineFromName"); + } + + /** + * LineFromName: 线路起点中文名字,加速区域 + * + * @param string $lineFromName + */ + public function setLineFromName(string $lineFromName) + { + $this->set("LineFromName", $lineFromName); + } + + /** + * LineToName: 线路对端中文名字,源站区域 + * + * @return string|null + */ + public function getLineToName(): string + { + return $this->get("LineToName"); + } + + /** + * LineToName: 线路对端中文名字,源站区域 + * + * @param string $lineToName + */ + public function setLineToName(string $lineToName) + { + $this->set("LineToName", $lineToName); + } + + /** + * LineFrom: 线路起点英文代号,加速区域 + * + * @return string|null + */ + public function getLineFrom(): string + { + return $this->get("LineFrom"); + } + + /** + * LineFrom: 线路起点英文代号,加速区域 + * + * @param string $lineFrom + */ + public function setLineFrom(string $lineFrom) + { + $this->set("LineFrom", $lineFrom); + } + + /** + * LineTo: 线路对端英文代号,源站区域 + * + * @return string|null + */ + public function getLineTo(): string + { + return $this->get("LineTo"); + } + + /** + * LineTo: 线路对端英文代号,源站区域 + * + * @param string $lineTo + */ + public function setLineTo(string $lineTo) + { + $this->set("LineTo", $lineTo); + } +} diff --git a/src/PathX/PathXClient.php b/src/PathX/PathXClient.php new file mode 100644 index 00000000..650c662a --- /dev/null +++ b/src/PathX/PathXClient.php @@ -0,0 +1,1011 @@ + (string) 项目ID。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "SSLId" => (string) 证书ID,如果没有指定证书ID也没有申请免费证书,HTTPS接入无法正常工作 + * "UGAId" => (string) UGA实例ID + * "Port" => (array) 绑定SSL证书的HTTPS端口。Port.0 Port.1对应多个Port。如果Port不存在则不会绑定 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function bindPathXSSL(BindPathXSSLRequest $request = null): BindPathXSSLResponse + { + $resp = $this->invoke($request); + return new BindPathXSSLResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateGlobalSSHInstance - 创建GlobalSSH实例 + * + * See also: https://docs.ucloud.cn/api/PathX-api/create_global_ssh_instance + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID,如org-xxxx。请参考[GetProjectList接口](../summary/get_project_list.html) + * "Area" => (string) 填写支持SSH访问IP的地区名称,如“洛杉矶”,“新加坡”,“香港”,“东京”,“华盛顿”,“法兰克福”。Area和AreaCode两者必填一个 + * "TargetIP" => (string) 被SSH访问的源站IP,仅支持IPv4地址。 + * "Port" => (integer) 源站服务器监听的SSH端口,可取范围[1-65535],不能使用80,443, 65123端口。如果InstanceType=Free,取值范围缩小为[22,3389],linux系统选择22,windows系统自动选3389。 + * "AreaCode" => (string) AreaCode, 区域航空港国际通用代码。Area和AreaCode两者必填一个 + * "Remark" => (string) 备注信息 + * "ChargeType" => (string) 支付方式,如按月、按年、按时 + * "Quantity" => (integer) 购买数量 + * "InstanceType" => (string) 枚举值:["Enterprise","Basic","Free"], 分别代表企业版,基础版,免费版 + * "BandwidthPackage" => (integer) Ultimate版本带宽包大小,枚举值:[0,20,40]。单位MB + * "ForwardRegion" => (string) InstanceType等于Basic时可以在["cn-bj2","cn-sh2","cn-gd"]中选择1个作为转发机房,Free版本固定为cn-bj2,其他付费版默认配置三个转发机房 + * "CouponId" => (string) 使用代金券可冲抵部分费用 + * ] + * + * Outputs: + * + * $outputs = [ + * "InstanceId" => (string) 实例ID,资源唯一标识 + * "AcceleratingDomain" => (string) 加速域名,访问该域名可就近接入 + * ] + * + * @throws UCloudException + */ + public function createGlobalSSHInstance(CreateGlobalSSHInstanceRequest $request = null): CreateGlobalSSHInstanceResponse + { + $resp = $this->invoke($request); + return new CreateGlobalSSHInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreatePathXSSL - 创建SSL证书,可以把整个 Pem 证书内容传到SSLContent,或者把证书、私钥、CA证书分别传过来 + * + * See also: https://docs.ucloud.cn/api/PathX-api/create_path_xssl + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID org-xxx格式。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "SSLName" => (string) SSL证书的名字 + * "SSLType" => (string) 所添加的SSL证书类型,目前只支持Pem格式 + * "SSLContent" => (string) SSL证书的完整内容,私钥不可使用密码,包括加密证书的私钥、用户证书或CA证书等 + * "UserCert" => (string) 用户自签证书内容 + * "PrivateKey" => (string) 加密证书的私钥,不可使用密码保护,开启密码保护后,重启服务需要输入密码 + * "CACert" => (string) CA颁发证书内容 + * ] + * + * Outputs: + * + * $outputs = [ + * "SSLId" => (string) SSL证书的Id + * ] + * + * @throws UCloudException + */ + public function createPathXSSL(CreatePathXSSLRequest $request = null): CreatePathXSSLResponse + { + $resp = $this->invoke($request); + return new CreatePathXSSLResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUGAForwarder - 创建加速实例转发器,支持HTTPS接入HTTPS回源、HTTPS接入HTTP回源、HTTP接入HTTP回源、TCP接入TCP回源、UDP接入UDP回源、 支持WSS接入WSS回源、WSS接入WS回源、WS接入WS回源 + * + * See also: https://docs.ucloud.cn/api/PathX-api/create_uga_forwarder + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "UGAId" => (string) 加速配置实例ID + * "HTTPHTTP" => (array) HTTP接入HTTP回源转发,接入端口。禁用65123端口 + * "HTTPHTTPRS" => (array) HTTP接入HTTP回源转发,源站监听端口 + * "HTTPSHTTP" => (array) HTTPS接入HTTP回源转发,接入端口。禁用65123端口 + * "HTTPSHTTPRS" => (array) HTTPS接入HTTP回源转发,回源端口 + * "HTTPSHTTPS" => (array) HTTPS接入HTTPS回源转发,接入端口。禁用65123端口 + * "HTTPSHTTPSRS" => (array) HTTPS接入HTTPS回源转发,源站监听端口 + * "TCP" => (array) TCP接入端口 + * "TCPRS" => (array) TCP回源端口 + * "UDP" => (array) UDP接入端口 + * "UDPRS" => (array) UDP回源端口 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function createUGAForwarder(CreateUGAForwarderRequest $request = null): CreateUGAForwarderResponse + { + $resp = $this->invoke($request); + return new CreateUGAForwarderResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUGAInstance - 创建全球加速配置项 + * + * See also: https://docs.ucloud.cn/api/PathX-api/create_uga_instance + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID,如org-xxxx。请参考[GetProjectList接口](../summary/get_project_list.html) + * "Name" => (string) 加速配置实例名称 + * "IPList" => (string) 加速源IP,多个IP用英文半角逗号(,)隔开;IPList和Domain二选一必填 + * "Domain" => (string) 加速源域名,IPList和Domain二选一必填 + * "TCP" => (array) TCP端口号,已废弃。请使用 CreateUGAForwarder API 创建端口 + * "UDP" => (array) UDP端口号,已废弃。请使用 CreateUGAForwarder API 创建端口 + * ] + * + * Outputs: + * + * $outputs = [ + * "UGAId" => (string) 加速配置ID + * "CName" => (string) 加速域名 用户可把业务域名CName到此域名上。注意:未绑定线路情况时 加速域名解析不出IP。 + * ] + * + * @throws UCloudException + */ + public function createUGAInstance(CreateUGAInstanceRequest $request = null): CreateUGAInstanceResponse + { + $resp = $this->invoke($request); + return new CreateUGAInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUPath - 创建UPath + * + * See also: https://docs.ucloud.cn/api/PathX-api/create_upath + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID,如org-xxxx。请参考[GetProjectList接口](../summary/get_project_list.html) + * "Name" => (string) UPath名字 + * "LineId" => (string) 选择的线路 + * "Bandwidth" => (integer) 线路带宽,最小1Mbps,最大带宽由 DescribePathXLineConfig 接口获得。如需更大带宽,请联系产品团队。 + * "ChargeType" => (string) 计费模式,默认为Month 按月收费,可选范围['Month','Year','Dynamic'] + * "Quantity" => (integer) 购买周期,ChargeType为Month时,Quantity默认为0代表购买到月底,按时和按年付费该参数必须大于0 + * "PostPaid" => (boolean) 是否开启后付费, 默认为false + * "CouponId" => (string) 代金券Id + * ] + * + * Outputs: + * + * $outputs = [ + * "UPathId" => (string) 加速线路实例Id + * ] + * + * @throws UCloudException + */ + public function createUPath(CreateUPathRequest $request = null): CreateUPathResponse + { + $resp = $this->invoke($request); + return new CreateUPathResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteGlobalSSHInstance - 删除GlobalSSH实例 + * + * See also: https://docs.ucloud.cn/api/PathX-api/delete_global_ssh_instance + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID,如org-xxxx。请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "InstanceId" => (string) 实例Id,资源的唯一标识 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteGlobalSSHInstance(DeleteGlobalSSHInstanceRequest $request = null): DeleteGlobalSSHInstanceResponse + { + $resp = $this->invoke($request); + return new DeleteGlobalSSHInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeletePathXSSL - 删除PathX SSL证书 + * + * See also: https://docs.ucloud.cn/api/PathX-api/delete_path_xssl + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。请参考[GetProjectList接口](../summary/get_project_list.html) + * "SSLId" => (string) SSL证书的ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deletePathXSSL(DeletePathXSSLRequest $request = null): DeletePathXSSLResponse + { + $resp = $this->invoke($request); + return new DeletePathXSSLResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteUGAForwarder - 删除加速实例转发器 按接入端口删除 + * + * See also: https://docs.ucloud.cn/api/PathX-api/delete_uga_forwarder + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "UGAId" => (string) 加速配置实例ID + * "HTTPHTTP" => (array) HTTP接入HTTP回源,接入端口。禁用65123端口 + * "HTTPSHTTP" => (array) HTTPS接入HTTP回源, 接入端口。禁用65123端口 + * "HTTPSHTTPS" => (array) HTTPS接入HTTPS回源, 接入端口。禁用65123端口 + * "TCP" => (array) TCP接入端口 + * "UDP" => (array) UDP接入端口 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteUGAForwarder(DeleteUGAForwarderRequest $request = null): DeleteUGAForwarderResponse + { + $resp = $this->invoke($request); + return new DeleteUGAForwarderResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteUGAInstance - 删除全球加速服务加速配置 + * + * See also: https://docs.ucloud.cn/api/PathX-api/delete_uga_instance + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID,如org-xxxx。请参考[GetProjectList接口](../summary/get_project_list.html) + * "UGAId" => (string) 加速配置实例ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteUGAInstance(DeleteUGAInstanceRequest $request = null): DeleteUGAInstanceResponse + { + $resp = $this->invoke($request); + return new DeleteUGAInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteUPath - 删除UPath + * + * See also: https://docs.ucloud.cn/api/PathX-api/delete_upath + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。请参考[GetProjectList接口](../summary/get_project_list.html) + * "UPathId" => (string) 加速线路实例ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteUPath(DeleteUPathRequest $request = null): DeleteUPathResponse + { + $resp = $this->invoke($request); + return new DeleteUPathResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeGlobalSSHInstance - 获取GlobalSSH实例列表(传实例ID获取单个实例信息,不传获取项目下全部实例) + * + * See also: https://docs.ucloud.cn/api/PathX-api/describe_global_ssh_instance + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID,如org-xxxx。请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "InstanceId" => (string) 实例ID,资源唯一标识 + * ] + * + * Outputs: + * + * $outputs = [ + * "InstanceSet" => (array) GlobalSSH实例列表,实例的属性参考GlobalSSHInfo模型[ + * [ + * "InstanceId" => (string) 实例ID,资源唯一标识 + * "InstanceType" => (string) 枚举值:["Enterprise","Basic","Free","Welfare"], 分别代表企业版,基础版本,免费版本,较早的公测免费版 + * "AcceleratingDomain" => (string) GlobalSSH分配的加速域名。 + * "Area" => (string) 被SSH访问的IP所在地区 + * "TargetIP" => (string) 被SSH访问的源站 IPv4地址。 + * "Remark" => (string) 备注信息 + * "Port" => (integer) 源站服务器监听的SSH端口,windows系统为RDP端口 + * "GlobalSSHPort" => (integer) InstanceType等于Free时,由系统自动分配,不等于源站Port值。InstanceType不等于Free时,与源站Port值相同。 + * "ChargeType" => (string) 支付周期,如Month,Year,Dynamic等 + * "CreateTime" => (integer) 资源创建时间戳 + * "ExpireTime" => (integer) 资源过期时间戳 + * "Expire" => (boolean) 是否过期 + * "BandwidthPackage" => (integer) globalssh Ultimate带宽包大小 + * "ForwardRegion" => (string) InstanceType为Basic版本时,需要展示具体分配的转发机房 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeGlobalSSHInstance(DescribeGlobalSSHInstanceRequest $request = null): DescribeGlobalSSHInstanceResponse + { + $resp = $this->invoke($request); + return new DescribeGlobalSSHInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribePathXLineConfig - 获取全球加速线路信息 + * + * See also: https://docs.ucloud.cn/api/PathX-api/describe_path_x_line_config + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID,如org-xxxx。请参考[GetProjectList接口](../summary/get_project_list.html) + * ] + * + * Outputs: + * + * $outputs = [ + * "LineSet" => (array) UGAA线路列表,参考UGAALine字段定义[ + * [ + * "LineFrom" => (string) 线路源 + * "LineTo" => (string) 线路目的 + * "LineFromName" => (string) 线路源中文名称 + * "LineToName" => (string) 线路目的中文名称 + * "MaxBandwidth" => (integer) 线路可售最大带宽 + * "LineId" => (string) 线路计费Id + * "LineDetail" => (array) 子线路信息[ + * [ + * "LineFrom" => (string) 线路源 + * "LineTo" => (string) 线路目的 + * "LineId" => (string) 线路计费Id + * "LineFromName" => (string) 线路源中文名称 + * "LineToName" => (string) 线路目的中文名称 + * ] + * ] + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describePathXLineConfig(DescribePathXLineConfigRequest $request = null): DescribePathXLineConfigResponse + { + $resp = $this->invoke($request); + return new DescribePathXLineConfigResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribePathXSSL - 获取SSL证书信息,支持分页,支持按证书名称 证书域名模糊搜索 + * + * See also: https://docs.ucloud.cn/api/PathX-api/describe_path_xssl + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。请参考[GetProjectList接口](../summary/get_project_list.html) + * "SSLId" => (string) SSL证书的Id,不传分页获取证书列表 + * "SearchValue" => (string) 不为空则按证书名称、证书域名模糊搜索 分页返回结果 + * "Limit" => (integer) 最大返回条数,默认100,最大400 + * "Offset" => (integer) 偏移值 默认为0 + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) SSL证书详细信息,具体结构见 PathXSSLSet[ + * [ + * "SSLId" => (string) SSL证书的Id + * "SSLName" => (string) SSL证书的名字 + * "SubjectName" => (string) 证书域名 + * "ExpireTime" => (integer) 证书过期时间 时间戳 + * "SourceType" => (integer) 证书来源,0:用户上传 1: 免费颁发 + * "SSLMD5" => (string) SSL证书(用户证书、私钥、ca证书合并)内容md5值 + * "CreateTime" => (integer) SSL证书的创建时间 时间戳 + * "SSLBindedTargetSet" => (array) SSL证书绑定的对象[ + * [ + * "ResourceId" => (string) SSL证书绑定到的实例ID + * "ResourceName" => (string) SSL证书绑定到的实例名称 + * ] + * ] + * "SSLContent" => (string) SSL证书内容 + * ] + * ] + * "TotalCount" => (integer) 符合条件的证书总数 + * ] + * + * @throws UCloudException + */ + public function describePathXSSL(DescribePathXSSLRequest $request = null): DescribePathXSSLResponse + { + $resp = $this->invoke($request); + return new DescribePathXSSLResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUGAInstance - 获取全球加速服务加速配置信息,指定实例ID返回单个实例。未指定实例ID时 指定分页参数 则按创建时间降序 返回记录 + * + * See also: https://docs.ucloud.cn/api/PathX-api/describe_uga_instance + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。请参考[GetProjectList接口](../summary/get_project_list.html) + * "UGAId" => (string) 加速配置实例ID,如果传了实例ID 则返回匹配实例ID的记录;如果没传则返回 ProjectId 下全部实例且符合分页要求 + * "Limit" => (integer) 返回的最大条数,默认为100,最大值400 + * "Offset" => (integer) 偏移量,默认为0 + * ] + * + * Outputs: + * + * $outputs = [ + * "UGAList" => (array) 全球加速实例信息列表[ + * [ + * "UGAId" => (string) 加速配置实例ID + * "CName" => (string) 加速域名,请在加速区域配置您的业务域名的CName记录值为加速域名 + * "UGAName" => (string) 加速配置名称 + * "IPList" => (array) 源站IP列表,多个值由半角英文逗号相隔 + * "Domain" => (string) 源站域名 + * "Location" => (string) 源站所在区域,加速实例在绑定线路后会自动设置该值。console页面上通过该值过滤加速实例可以绑定的upath实例。注意:缺少该值会导致在console上无法修改线路 + * "UPathSet" => (array) 绑定的加速线路[ + * [ + * "UPathName" => (string) UPath名字 + * "UPathId" => (string) UPath 实例ID + * "Bandwidth" => (integer) 带宽 Mbps, 1~800Mbps + * "LineId" => (string) 线路ID + * "LineFromName" => (string) 线路起点中文名字,加速区域 + * "LineToName" => (string) 线路对端中文名字,源站区域 + * "LineFrom" => (string) 线路起点英文代号,加速区域 + * "LineTo" => (string) 线路对端英文代号,源站区域 + * ] + * ] + * "TaskSet" => (array) 端口配置信息(不再维护,建议使用ForwarderSet)[ + * [ + * "Port" => (integer) 接入端口 + * "Protocol" => (string) 转发协议,枚举值["TCP","UDP","HTTPHTTP","HTTPSHTTP","HTTPSHTTPS"]。TCP和UDP代表四层转发,其余为七层转发 + * ] + * ] + * "L4ForwarderSet" => (array) UGA 4层转发器配置,记录接入或回源端口,接入或回源协议信息[ + * [ + * "Port" => (integer) 接入端口 + * "Protocol" => (string) 转发协议,枚举值["TCP","UDP","HTTPHTTP","HTTPSHTTP","HTTPSHTTPS"]。TCP和UDP代表四层转发,其余为七层转发 + * "RSPort" => (integer) RSPort,源站监听端口 + * ] + * ] + * "L7ForwarderSet" => (array) UGA 7层转发器配置,记录接入或回源端口,接入或回源协议信息 如绑定证书会返回证书ID[ + * [ + * "Port" => (integer) 接入端口 + * "Protocol" => (string) 转发协议,枚举值["TCP","UDP","HTTPHTTP","HTTPSHTTP","HTTPSHTTPS"]。TCP和UDP代表四层转发,其余为七层转发 + * "RSPort" => (integer) RSPort,源站监听端口 + * "SSLId" => (string) 证书ID + * "SSLName" => (string) 证书名称 + * ] + * ] + * "OutPublicIpList" => (array) 线路出口IP地址[ + * [ + * "IP" => (string) 线路出口EIP + * "Area" => (string) 线路出口机房代号 + * ] + * ] + * ] + * ] + * "TotalCount" => (integer) 符合条件的总数 + * ] + * + * @throws UCloudException + */ + public function describeUGAInstance(DescribeUGAInstanceRequest $request = null): DescribeUGAInstanceResponse + { + $resp = $this->invoke($request); + return new DescribeUGAInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUPath - 获取加速线路信息 + * + * See also: https://docs.ucloud.cn/api/PathX-api/describe_upath + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。请参考[GetProjectList接口](../summary/get_project_list.html) + * "UPathId" => (string) 如果不填参数 返回 ProjectId 下所有的线路资源,填此参数则返回upath实例ID匹配的线路 + * ] + * + * Outputs: + * + * $outputs = [ + * "UPathSet" => (array) 线路信息数组[ + * [ + * "PostPaid" => (boolean) 是否为后付费实例 + * "ChargeType" => (string) 计费模式,默认为Month 按月收费,可选范围['Month','Year','Dynamic'] + * "Name" => (string) UPath实例名字 + * "UPathId" => (string) UPath加速线路实例ID + * "Bandwidth" => (integer) 带宽,单位Mbps + * "LineId" => (string) 选择的线路 + * "UGAList" => (array) 与该UPath绑定的UGA列表[ + * [ + * "UGAId" => (string) 加速配置ID + * "IPList" => (array) 源站IP列表,多个值由半角英文逗号相隔 + * "Domain" => (string) 源站域名 + * ] + * ] + * "CreateTime" => (integer) UPath创建的时间,10位时间戳 + * "ExpireTime" => (integer) UPath的过期时间,10位时间戳 + * "LineFromName" => (string) 线路入口名称 + * "LineToName" => (string) 线路出口名称 + * "OutPublicIpList" => (array) 线路出口IP数组[ + * [ + * "IP" => (string) 线路出口EIP + * "Area" => (string) 线路出口机房代号 + * ] + * ] + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeUPath(DescribeUPathRequest $request = null): DescribeUPathResponse + { + $resp = $this->invoke($request); + return new DescribeUPathResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUPathTemplate - 查询UPath的监控模板 + * + * See also: https://docs.ucloud.cn/api/PathX-api/describe_upath_template + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "UPathId" => (string) 加速线路实例ID,格式 upath-xxxx + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 监控模板详情[ + * [ + * "AlarmStrategy" => (string) 收敛策略,可选范围 ['Exponential','Continuous','Once'],分别对应指数递增、连续告警、单次告警 + * "AlarmFrequency" => (integer) 告警探测周期,单位秒 + * "Compare" => (string) 比较策略,可选 ['GE','LE'] 分别代表不小于和不大于 + * "ContactGroupId" => (integer) 联系组ID + * "MetricName" => (string) 告警指标名称, 所有n的个数必须一致。目前仅允许以下四项:UpathNetworkOut:出向带宽,UpathNetworkIn:入向带宽,UpathNetworkOutUsage:出向带宽使用率,UpathNetworkInUsage:入向带宽使用率 + * "Threshold" => (integer) 告警阈值,带宽使用率的阈值范围是[50,100]的正整数,带宽告警阈值为1000000的倍数, 如大于2Mbps则告警 阈值应该传 2000000 + * "TriggerCount" => (integer) 告警触发周期(次数) + * "AlarmTemplateRuleId" => (integer) 告警模板策略ID + * "ResourceType" => (string) 资源类型 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeUPathTemplate(DescribeUPathTemplateRequest $request = null): DescribeUPathTemplateResponse + { + $resp = $this->invoke($request); + return new DescribeUPathTemplateResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetGlobalSSHPrice - 获取GlobalSSH价格 + * + * See also: https://docs.ucloud.cn/api/PathX-api/get_global_ssh_price + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID,如org-xxxx。请参考[GetProjectList接口](../summary/get_project_list.html) + * "Quantity" => (integer) 购买周期,如果ChargeType为Month,Quantity默认为0;其他情况必须为大于0的整数 + * "ChargeType" => (string) 计费类型:Dynamic,Month,Year + * "InstanceType" => (string) 版本类型。枚举值,Enterprise:企业版;Basic:基础版。可不填,默认为Basic。 + * ] + * + * Outputs: + * + * $outputs = [ + * "Price" => (number) 价格,返回单位为元 + * ] + * + * @throws UCloudException + */ + public function getGlobalSSHPrice(GetGlobalSSHPriceRequest $request = null): GetGlobalSSHPriceResponse + { + $resp = $this->invoke($request); + return new GetGlobalSSHPriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetGlobalSSHUpdatePrice - 获取GlobalSSH升级价格 + * + * See also: https://docs.ucloud.cn/api/PathX-api/get_global_ssh_update_price + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID,如org-xxxx。请参考[GetProjectList接口](../summary/get_project_list.html) + * "InstanceType" => (string) 升级后的实例类型。枚举值,Enterprise:企业版;Basic:基础版。 + * "InstanceId" => (string) 实例ID,唯一资源标识。从免费版升级到付费版可不填,其他情况必填。 + * "Quantity" => (integer) 购买周期,如果ChargeType为Month,Quantity可以不填默认为0;其他情况必须为正整数。 + * "ChargeType" => (string) 计费类型:Dynamic,Month,Year。从免费版升级到付费版必须传,其他情况不需要传 + * ] + * + * Outputs: + * + * $outputs = [ + * "Price" => (number) 价格,返回单位为元。正数表示付费升级,负数表示降级退费。 + * ] + * + * @throws UCloudException + */ + public function getGlobalSSHUpdatePrice(GetGlobalSSHUpdatePriceRequest $request = null): GetGlobalSSHUpdatePriceResponse + { + $resp = $this->invoke($request); + return new GetGlobalSSHUpdatePriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetPathXMetric - 获取全球加速监控信息 + * + * See also: https://docs.ucloud.cn/api/PathX-api/get_path_x_metric + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ResourceId" => (string) ResourceId,如upath ID 和 uga ID + * "BeginTime" => (integer) 查询起始时间,10位长度时间戳 + * "EndTime" => (integer) 查询结束时间,10位长度时间戳 + * "MetricName" => (array) 查询监控的指标项。目前仅允许以下四项:NetworkOut:出向带宽,NetworkIn:入向带宽,NetworkOutUsage:出向带宽使用率,NetworkInUsage:入向带宽使用率 + * "ResourceType" => (string) upath:加速线路,uga:加速实例 + * "LineId" => (string) 具体线路id,调用DescribePathXLineConfig接口获取线路列表 + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (object) 监控数据结果集[ + * "NetworkOut" => (array) 出向带宽[ + * [ + * "Timestamp" => (integer) 时间戳 + * "Value" => (integer) 监控点数值 + * ] + * ] + * "NetworkIn" => (array) 入向带宽[ + * [ + * "Timestamp" => (integer) 时间戳 + * "Value" => (integer) 监控点数值 + * ] + * ] + * "NetworkOutUsage" => (array) 出向带宽使用率[ + * [ + * "Timestamp" => (integer) 时间戳 + * "Value" => (integer) 监控点数值 + * ] + * ] + * "NetworkInUsage" => (array) 入向带宽使用率[ + * [ + * "Timestamp" => (integer) 时间戳 + * "Value" => (integer) 监控点数值 + * ] + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getPathXMetric(GetPathXMetricRequest $request = null): GetPathXMetricResponse + { + $resp = $this->invoke($request); + return new GetPathXMetricResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyGlobalSSHPort - 修改GlobalSSH端口 + * + * See also: https://docs.ucloud.cn/api/PathX-api/modify_global_ssh_port + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID,如org-xxxx。请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "InstanceId" => (string) 实例ID,资源唯一标识。当前仅收费版GlobalSSH实例可以修改端口。 + * "Port" => (integer) 源站服务器监听的SSH端口号。收费版本端口范围[1,65535]且不能为80,443,65123端口。免费版不支持修改端口。 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function modifyGlobalSSHPort(ModifyGlobalSSHPortRequest $request = null): ModifyGlobalSSHPortResponse + { + $resp = $this->invoke($request); + return new ModifyGlobalSSHPortResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyGlobalSSHType - 修改GlobalSSH实例类型,仅支持低版本升级到高版本,不支持高版本降级到低版本 + * + * See also: https://docs.ucloud.cn/api/PathX-api/modify_global_ssh_type + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID,如org-xxxx。请参考[GetProjectList接口](../summary/get_project_list.html) + * "InstanceId" => (string) 实例ID,资源唯一标识 + * "InstanceType" => (string) 取值范围["Enterprise","Basic"],分别对应企业版和基础版,表示升级后的实例类型。比如从Free版本升级为Basic版或Enterprise版,不可从收费版降级为免费版,或从企业版降级为基础版 + * "ChargeType" => (string) 支付方式,如按月、按年、按时 + * "Quantity" => (string) 购买时间,当ChargeType为Month,Quantity为0代表购买到月底 + * "CouponId" => (string) 可抵扣费用的券,通常不使用 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function modifyGlobalSSHType(ModifyGlobalSSHTypeRequest $request = null): ModifyGlobalSSHTypeResponse + { + $resp = $this->invoke($request); + return new ModifyGlobalSSHTypeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyUPathBandwidth - 修改加速线路带宽 + * + * See also: https://docs.ucloud.cn/api/PathX-api/modify_upath_bandwidth + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "UPathId" => (string) UPath 加速线路实例Id + * "Bandwidth" => (integer) 线路带宽,单位Mbps。最小1Mbps,最大带宽由 DescribePathXLineConfig 接口获得。如需更大带宽,请联系产品团队。 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function modifyUPathBandwidth(ModifyUPathBandwidthRequest $request = null): ModifyUPathBandwidthResponse + { + $resp = $this->invoke($request); + return new ModifyUPathBandwidthResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyUPathTemplate - 修改UPath监控告警项 + * + * See also: https://docs.ucloud.cn/api/PathX-api/modify_upath_template + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。请参考[GetProjectList接口](../summary/get_project_list.html) + * "UPathId" => (string) 加速线路实例ID + * "MetricName" => (array) 告警指标名称, 所有n的个数必须一致。目前仅允许以下四项:UpathNetworkOut:出向带宽,UpathNetworkIn:入向带宽,UpathNetworkOutUsage:出向带宽使用率,UpathNetworkInUsage:入向带宽使用率 + * "Threshold" => (array) 告警阈值,带宽使用率的阈值范围是[50,100]的正整数,带宽告警阈值为1000000的倍数, 如大于2Mbps则告警 阈值应该传 2000000 + * "AlarmFrequency" => (array) 告警探测周期,单位:秒 + * "ContactGroupId" => (array) 告警组id + * "Compare" => (array) 比较策略,可选 ['GE','LE'] 分别代表不小于和不大于 + * "AlarmStrategy" => (array) 收敛策略,可选范围 ['Exponential','Continuous','Once'],分别对应指数递增、连续告警、单次告警 + * "TriggerCount" => (array) 告警触发周期(次数) + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function modifyUPathTemplate(ModifyUPathTemplateRequest $request = null): ModifyUPathTemplateResponse + { + $resp = $this->invoke($request); + return new ModifyUPathTemplateResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UGABindUPath - UGA绑定UPath + * + * See also: https://docs.ucloud.cn/api/PathX-api/uga_bind_upath + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。请参考[GetProjectList接口](../summary/get_project_list.html) + * "UGAId" => (string) 加速配置实例ID,格式uga-xxxx + * "UPathId" => (string) 加速线路实例ID,格式upath-xxx + * "CouponId" => (string) 代金券 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function ugaBindUPath(UGABindUPathRequest $request = null): UGABindUPathResponse + { + $resp = $this->invoke($request); + return new UGABindUPathResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UGAUnBindUPath - UGA与UPath解绑 + * + * See also: https://docs.ucloud.cn/api/PathX-api/uga_un_bind_upath + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。请参考[GetProjectList接口](../summary/get_project_list.html) + * "UGAId" => (string) 加速配置实例ID 格式uga-xxx + * "UPathId" => (string) 加速线路实例ID 格式upath-xxx + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function ugaUnBindUPath(UGAUnBindUPathRequest $request = null): UGAUnBindUPathResponse + { + $resp = $this->invoke($request); + return new UGAUnBindUPathResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UnBindPathXSSL - 解绑PathX SSL 证书 + * + * See also: https://docs.ucloud.cn/api/PathX-api/un_bind_path_xssl + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "UGAId" => (string) UGA实例ID。 + * "SSLId" => (string) SSL证书ID。 + * "Port" => (array) 解绑SSL证书的HTTPS端口。Port.0 Port.1格式 端口错误则解绑失败。 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function unBindPathXSSL(UnBindPathXSSLRequest $request = null): UnBindPathXSSLResponse + { + $resp = $this->invoke($request); + return new UnBindPathXSSLResponse($resp->toArray(), $resp->getRequestId()); + } +} diff --git a/src/UAccount/Apis/AddMemberToProjectRequest.php b/src/UAccount/Apis/AddMemberToProjectRequest.php new file mode 100644 index 00000000..3db93f01 --- /dev/null +++ b/src/UAccount/Apis/AddMemberToProjectRequest.php @@ -0,0 +1,91 @@ + "AddMemberToProject"]); + $this->markRequired("MemberEmail"); + $this->markRequired("CharacterId"); + } + + + + /** + * ProjectId: 项目ID,请参考[GetProjectList接口](../summary/get_project_list.html)的描述。不填写为创建时间最早的项目。 + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID,请参考[GetProjectList接口](../summary/get_project_list.html)的描述。不填写为创建时间最早的项目。 + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * MemberEmail: 被加入成员Email + * + * @return string|null + */ + public function getMemberEmail(): string + { + return $this->get("MemberEmail"); + } + + /** + * MemberEmail: 被加入成员Email + * + * @param string $memberEmail + */ + public function setMemberEmail(string $memberEmail) + { + $this->set("MemberEmail", $memberEmail); + } + + /** + * CharacterId: 被加入成员归属角色ID + * + * @return string|null + */ + public function getCharacterId(): string + { + return $this->get("CharacterId"); + } + + /** + * CharacterId: 被加入成员归属角色ID + * + * @param string $characterId + */ + public function setCharacterId(string $characterId) + { + $this->set("CharacterId", $characterId); + } +} diff --git a/src/UAccount/Apis/AddMemberToProjectResponse.php b/src/UAccount/Apis/AddMemberToProjectResponse.php new file mode 100644 index 00000000..c8e49354 --- /dev/null +++ b/src/UAccount/Apis/AddMemberToProjectResponse.php @@ -0,0 +1,26 @@ + "CreateProject"]); + $this->markRequired("ProjectName"); + } + + + + /** + * ProjectName: 项目名称,不得与现有项目重名 + * + * @return string|null + */ + public function getProjectName(): string + { + return $this->get("ProjectName"); + } + + /** + * ProjectName: 项目名称,不得与现有项目重名 + * + * @param string $projectName + */ + public function setProjectName(string $projectName) + { + $this->set("ProjectName", $projectName); + } +} diff --git a/src/UAccount/Apis/CreateProjectResponse.php b/src/UAccount/Apis/CreateProjectResponse.php new file mode 100644 index 00000000..e763530a --- /dev/null +++ b/src/UAccount/Apis/CreateProjectResponse.php @@ -0,0 +1,44 @@ +get("ProjectId"); + } + + /** + * ProjectId: 所创建项目的Id + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } +} diff --git a/src/UAccount/Apis/FreezeMemberRequest.php b/src/UAccount/Apis/FreezeMemberRequest.php new file mode 100644 index 00000000..921fc34c --- /dev/null +++ b/src/UAccount/Apis/FreezeMemberRequest.php @@ -0,0 +1,50 @@ + "FreezeMember"]); + $this->markRequired("MemberEmail"); + } + + + + /** + * MemberEmail: 需要被冻结的成员Email + * + * @return string|null + */ + public function getMemberEmail(): string + { + return $this->get("MemberEmail"); + } + + /** + * MemberEmail: 需要被冻结的成员Email + * + * @param string $memberEmail + */ + public function setMemberEmail(string $memberEmail) + { + $this->set("MemberEmail", $memberEmail); + } +} diff --git a/src/UAccount/Apis/FreezeMemberResponse.php b/src/UAccount/Apis/FreezeMemberResponse.php new file mode 100644 index 00000000..3d2ccd2f --- /dev/null +++ b/src/UAccount/Apis/FreezeMemberResponse.php @@ -0,0 +1,26 @@ + "GetNetworkMask"]); + } +} diff --git a/src/UAccount/Apis/GetNetworkMaskResponse.php b/src/UAccount/Apis/GetNetworkMaskResponse.php new file mode 100644 index 00000000..4b61d96d --- /dev/null +++ b/src/UAccount/Apis/GetNetworkMaskResponse.php @@ -0,0 +1,45 @@ +get("Data")); + } + + /** + * Data: 接口返回数据 + * + * @param NetworkMask $data + */ + public function setData(NetworkMask $data) + { + $this->set("Data", $data->getAll()); + } +} diff --git a/src/UAccount/Apis/GetProjectListRequest.php b/src/UAccount/Apis/GetProjectListRequest.php new file mode 100644 index 00000000..4d3b41e7 --- /dev/null +++ b/src/UAccount/Apis/GetProjectListRequest.php @@ -0,0 +1,49 @@ + "GetProjectList"]); + } + + + + /** + * IsFinance: 是否是财务账号(Yes:是,No:否) + * + * @return string|null + */ + public function getIsFinance(): string + { + return $this->get("IsFinance"); + } + + /** + * IsFinance: 是否是财务账号(Yes:是,No:否) + * + * @param string $isFinance + */ + public function setIsFinance(string $isFinance) + { + $this->set("IsFinance", $isFinance); + } +} diff --git a/src/UAccount/Apis/GetProjectListResponse.php b/src/UAccount/Apis/GetProjectListResponse.php new file mode 100644 index 00000000..c9e7ba0a --- /dev/null +++ b/src/UAccount/Apis/GetProjectListResponse.php @@ -0,0 +1,74 @@ +get("ProjectCount"); + } + + /** + * ProjectCount: 项目总数 + * + * @param int $projectCount + */ + public function setProjectCount(int $projectCount) + { + $this->set("ProjectCount", $projectCount); + } + + /** + * ProjectSet: JSON格式的项目列表实例 + * + * @return ProjectListInfo[]|null + */ + public function getProjectSet(): array + { + $items = $this->get("ProjectSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ProjectListInfo($item)); + } + return $result; + } + + /** + * ProjectSet: JSON格式的项目列表实例 + * + * @param ProjectListInfo[] $projectSet + */ + public function setProjectSet(array $projectSet) + { + $result = []; + foreach ($projectSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UAccount/Apis/GetRegionRequest.php b/src/UAccount/Apis/GetRegionRequest.php new file mode 100644 index 00000000..f7dbab44 --- /dev/null +++ b/src/UAccount/Apis/GetRegionRequest.php @@ -0,0 +1,27 @@ + "GetRegion"]); + } +} diff --git a/src/UAccount/Apis/GetRegionResponse.php b/src/UAccount/Apis/GetRegionResponse.php new file mode 100644 index 00000000..2a2ad9cc --- /dev/null +++ b/src/UAccount/Apis/GetRegionResponse.php @@ -0,0 +1,54 @@ +get("Regions") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new RegionInfo($item)); + } + return $result; + } + + /** + * Regions: 各数据中心信息 + * + * @param RegionInfo[] $regions + */ + public function setRegions(array $regions) + { + $result = []; + foreach ($regions as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UAccount/Apis/InviteSubaccountRequest.php b/src/UAccount/Apis/InviteSubaccountRequest.php new file mode 100644 index 00000000..effa2e23 --- /dev/null +++ b/src/UAccount/Apis/InviteSubaccountRequest.php @@ -0,0 +1,113 @@ + "InviteSubaccount"]); + $this->markRequired("UserEmail"); + $this->markRequired("UserPhone"); + $this->markRequired("UserName"); + $this->markRequired("IsFinance"); + } + + + + /** + * UserEmail: 受邀成员邮箱地址,不得重复 + * + * @return string|null + */ + public function getUserEmail(): string + { + return $this->get("UserEmail"); + } + + /** + * UserEmail: 受邀成员邮箱地址,不得重复 + * + * @param string $userEmail + */ + public function setUserEmail(string $userEmail) + { + $this->set("UserEmail", $userEmail); + } + + /** + * UserPhone: 受邀成员手机号码 + * + * @return string|null + */ + public function getUserPhone(): string + { + return $this->get("UserPhone"); + } + + /** + * UserPhone: 受邀成员手机号码 + * + * @param string $userPhone + */ + public function setUserPhone(string $userPhone) + { + $this->set("UserPhone", $userPhone); + } + + /** + * UserName: 受邀成员姓名 + * + * @return string|null + */ + public function getUserName(): string + { + return $this->get("UserName"); + } + + /** + * UserName: 受邀成员姓名 + * + * @param string $userName + */ + public function setUserName(string $userName) + { + $this->set("UserName", $userName); + } + + /** + * IsFinance: 是否有财务权限(true:是,false:否,默认为否) + * + * @return string|null + */ + public function getIsFinance(): string + { + return $this->get("IsFinance"); + } + + /** + * IsFinance: 是否有财务权限(true:是,false:否,默认为否) + * + * @param string $isFinance + */ + public function setIsFinance(string $isFinance) + { + $this->set("IsFinance", $isFinance); + } +} diff --git a/src/UAccount/Apis/InviteSubaccountResponse.php b/src/UAccount/Apis/InviteSubaccountResponse.php new file mode 100644 index 00000000..77dc6ece --- /dev/null +++ b/src/UAccount/Apis/InviteSubaccountResponse.php @@ -0,0 +1,26 @@ + "RemoveMemberFromProject"]); + $this->markRequired("ProjectId"); + $this->markRequired("MemberEmail"); + } + + + + /** + * ProjectId: 项目ID,请参考[GetProjectList接口](../summary/get_project_list.html)的描述。不填写为默认项目,子帐号必须填写。 + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID,请参考[GetProjectList接口](../summary/get_project_list.html)的描述。不填写为默认项目,子帐号必须填写。 + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * MemberEmail: 需要被移除成员Email + * + * @return string|null + */ + public function getMemberEmail(): string + { + return $this->get("MemberEmail"); + } + + /** + * MemberEmail: 需要被移除成员Email + * + * @param string $memberEmail + */ + public function setMemberEmail(string $memberEmail) + { + $this->set("MemberEmail", $memberEmail); + } +} diff --git a/src/UAccount/Apis/RemoveMemberFromProjectResponse.php b/src/UAccount/Apis/RemoveMemberFromProjectResponse.php new file mode 100644 index 00000000..e60471e6 --- /dev/null +++ b/src/UAccount/Apis/RemoveMemberFromProjectResponse.php @@ -0,0 +1,26 @@ + "SetNetworkMask"]); + $this->markRequired("Code"); + } + + + + /** + * Code: 短信验证码 + * + * @return string|null + */ + public function getCode(): string + { + return $this->get("Code"); + } + + /** + * Code: 短信验证码 + * + * @param string $code + */ + public function setCode(string $code) + { + $this->set("Code", $code); + } + + /** + * APINetworkMask: API调用网络掩码,多个IP以英文逗号分隔。默认空字符串,不限制登录IP。 + * + * @return string|null + */ + public function getAPINetworkMask(): string + { + return $this->get("APINetworkMask"); + } + + /** + * APINetworkMask: API调用网络掩码,多个IP以英文逗号分隔。默认空字符串,不限制登录IP。 + * + * @param string $apiNetworkMask + */ + public function setAPINetworkMask(string $apiNetworkMask) + { + $this->set("APINetworkMask", $apiNetworkMask); + } + + /** + * LoginNetworkMask: 登录网络掩码,多个IP以英文逗号分隔。默认空字符串,不限制登录IP。 + * + * @return string|null + */ + public function getLoginNetworkMask(): string + { + return $this->get("LoginNetworkMask"); + } + + /** + * LoginNetworkMask: 登录网络掩码,多个IP以英文逗号分隔。默认空字符串,不限制登录IP。 + * + * @param string $loginNetworkMask + */ + public function setLoginNetworkMask(string $loginNetworkMask) + { + $this->set("LoginNetworkMask", $loginNetworkMask); + } +} diff --git a/src/UAccount/Apis/SetNetworkMaskResponse.php b/src/UAccount/Apis/SetNetworkMaskResponse.php new file mode 100644 index 00000000..1bb7a8f4 --- /dev/null +++ b/src/UAccount/Apis/SetNetworkMaskResponse.php @@ -0,0 +1,26 @@ +get("APINetworkMask"); + } + + /** + * APINetworkMask: API调用网络掩码,默认空字符串,不限制登录IP,多个IP以英文逗号分隔。 + * + * @param string $apiNetworkMask + */ + public function setAPINetworkMask(string $apiNetworkMask) + { + $this->set("APINetworkMask", $apiNetworkMask); + } + + /** + * LoginNetworkMask: 登录网络掩码,默认空字符串,不限制登录IP,多个IP以英文逗号分隔。 + * + * @return string|null + */ + public function getLoginNetworkMask(): string + { + return $this->get("LoginNetworkMask"); + } + + /** + * LoginNetworkMask: 登录网络掩码,默认空字符串,不限制登录IP,多个IP以英文逗号分隔。 + * + * @param string $loginNetworkMask + */ + public function setLoginNetworkMask(string $loginNetworkMask) + { + $this->set("LoginNetworkMask", $loginNetworkMask); + } +} diff --git a/src/UAccount/Models/ProjectListInfo.php b/src/UAccount/Models/ProjectListInfo.php new file mode 100644 index 00000000..d1793032 --- /dev/null +++ b/src/UAccount/Models/ProjectListInfo.php @@ -0,0 +1,184 @@ +get("ProjectId"); + } + + /** + * ProjectId: 项目ID + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ProjectName: 项目名称 + * + * @return string|null + */ + public function getProjectName(): string + { + return $this->get("ProjectName"); + } + + /** + * ProjectName: 项目名称 + * + * @param string $projectName + */ + public function setProjectName(string $projectName) + { + $this->set("ProjectName", $projectName); + } + + /** + * CreateTime: 创建时间(Unix时间戳) + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间(Unix时间戳) + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * IsDefault: 是否为默认项目 + * + * @return boolean|null + */ + public function getIsDefault(): bool + { + return $this->get("IsDefault"); + } + + /** + * IsDefault: 是否为默认项目 + * + * @param boolean $isDefault + */ + public function setIsDefault(bool $isDefault) + { + $this->set("IsDefault", $isDefault); + } + + /** + * ResourceCount: 项目下资源数量(已废弃,不建议使用) + * + * @return integer|null + */ + public function getResourceCount(): int + { + return $this->get("ResourceCount"); + } + + /** + * ResourceCount: 项目下资源数量(已废弃,不建议使用) + * + * @param int $resourceCount + */ + public function setResourceCount(int $resourceCount) + { + $this->set("ResourceCount", $resourceCount); + } + + /** + * MemberCount: 项目下成员数量 + * + * @return integer|null + */ + public function getMemberCount(): int + { + return $this->get("MemberCount"); + } + + /** + * MemberCount: 项目下成员数量 + * + * @param int $memberCount + */ + public function setMemberCount(int $memberCount) + { + $this->set("MemberCount", $memberCount); + } + + /** + * ParentId: 父项目ID(已废弃) + * + * @return string|null + */ + public function getParentId(): string + { + return $this->get("ParentId"); + } + + /** + * ParentId: 父项目ID(已废弃) + * + * @param string $parentId + */ + public function setParentId(string $parentId) + { + $this->set("ParentId", $parentId); + } + + /** + * ParentName: 父项目名称(已废弃) + * + * @return string|null + */ + public function getParentName(): string + { + return $this->get("ParentName"); + } + + /** + * ParentName: 父项目名称(已废弃) + * + * @param string $parentName + */ + public function setParentName(string $parentName) + { + $this->set("ParentName", $parentName); + } +} diff --git a/src/UAccount/Models/RegionInfo.php b/src/UAccount/Models/RegionInfo.php new file mode 100644 index 00000000..00e451e2 --- /dev/null +++ b/src/UAccount/Models/RegionInfo.php @@ -0,0 +1,144 @@ +get("RegionId"); + } + + /** + * RegionId: 数据中心ID + * + * @param int $regionId + */ + public function setRegionId(int $regionId) + { + $this->set("RegionId", $regionId); + } + + /** + * RegionName: 数据中心名称 + * + * @return string|null + */ + public function getRegionName(): string + { + return $this->get("RegionName"); + } + + /** + * RegionName: 数据中心名称 + * + * @param string $regionName + */ + public function setRegionName(string $regionName) + { + $this->set("RegionName", $regionName); + } + + /** + * IsDefault: 是否用户当前默认数据中心 + * + * @return boolean|null + */ + public function getIsDefault(): bool + { + return $this->get("IsDefault"); + } + + /** + * IsDefault: 是否用户当前默认数据中心 + * + * @param boolean $isDefault + */ + public function setIsDefault(bool $isDefault) + { + $this->set("IsDefault", $isDefault); + } + + /** + * BitMaps: 用户在此数据中心的权限位 + * + * @return string|null + */ + public function getBitMaps(): string + { + return $this->get("BitMaps"); + } + + /** + * BitMaps: 用户在此数据中心的权限位 + * + * @param string $bitMaps + */ + public function setBitMaps(string $bitMaps) + { + $this->set("BitMaps", $bitMaps); + } + + /** + * Region: 地域名字,如cn-bj + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域名字,如cn-bj + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区名字,如cn-bj-01 + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区名字,如cn-bj-01 + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } +} diff --git a/src/UAccount/UAccountClient.php b/src/UAccount/UAccountClient.php new file mode 100644 index 00000000..8a5fcfc8 --- /dev/null +++ b/src/UAccount/UAccountClient.php @@ -0,0 +1,295 @@ + (string) 项目ID,请参考[GetProjectList接口](../summary/get_project_list.html)的描述。不填写为创建时间最早的项目。 + * "MemberEmail" => (string) 被加入成员Email + * "CharacterId" => (string) 被加入成员归属角色ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function addMemberToProject(AddMemberToProjectRequest $request = null): AddMemberToProjectResponse + { + $resp = $this->invoke($request); + return new AddMemberToProjectResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateProject - 创建项目 + * + * See also: https://docs.ucloud.cn/api/UAccount-api/create_project + * + * Arguments: + * + * $args = [ + * "ProjectName" => (string) 项目名称,不得与现有项目重名 + * ] + * + * Outputs: + * + * $outputs = [ + * "ProjectId" => (string) 所创建项目的Id + * ] + * + * @throws UCloudException + */ + public function createProject(CreateProjectRequest $request = null): CreateProjectResponse + { + $resp = $this->invoke($request); + return new CreateProjectResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * FreezeMember - 冻结成员 + * + * See also: https://docs.ucloud.cn/api/UAccount-api/freeze_member + * + * Arguments: + * + * $args = [ + * "MemberEmail" => (string) 需要被冻结的成员Email + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function freezeMember(FreezeMemberRequest $request = null): FreezeMemberResponse + { + $resp = $this->invoke($request); + return new FreezeMemberResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetNetworkMask - 查询登录与API调用的网络掩码 + * + * See also: https://docs.ucloud.cn/api/UAccount-api/get_network_mask + * + * Arguments: + * + * $args = [ + * ] + * + * Outputs: + * + * $outputs = [ + * "Data" => (object) 接口返回数据[ + * "APINetworkMask" => (string) API调用网络掩码,默认空字符串,不限制登录IP,多个IP以英文逗号分隔。 + * "LoginNetworkMask" => (string) 登录网络掩码,默认空字符串,不限制登录IP,多个IP以英文逗号分隔。 + * ] + * ] + * + * @throws UCloudException + */ + public function getNetworkMask(GetNetworkMaskRequest $request = null): GetNetworkMaskResponse + { + $resp = $this->invoke($request); + return new GetNetworkMaskResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetProjectList - 获取项目列表 + * + * See also: https://docs.ucloud.cn/api/UAccount-api/get_project_list + * + * Arguments: + * + * $args = [ + * "IsFinance" => (string) 是否是财务账号(Yes:是,No:否) + * ] + * + * Outputs: + * + * $outputs = [ + * "ProjectCount" => (integer) 项目总数 + * "ProjectSet" => (array) JSON格式的项目列表实例[ + * [ + * "ProjectId" => (string) 项目ID + * "ProjectName" => (string) 项目名称 + * "CreateTime" => (integer) 创建时间(Unix时间戳) + * "IsDefault" => (boolean) 是否为默认项目 + * "ResourceCount" => (integer) 项目下资源数量(已废弃,不建议使用) + * "MemberCount" => (integer) 项目下成员数量 + * "ParentId" => (string) 父项目ID(已废弃) + * "ParentName" => (string) 父项目名称(已废弃) + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getProjectList(GetProjectListRequest $request = null): GetProjectListResponse + { + $resp = $this->invoke($request); + return new GetProjectListResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetRegion - 获取用户在各数据中心的权限等信息 + * + * See also: https://docs.ucloud.cn/api/UAccount-api/get_region + * + * Arguments: + * + * $args = [ + * ] + * + * Outputs: + * + * $outputs = [ + * "Regions" => (array) 各数据中心信息[ + * [ + * "RegionId" => (integer) 数据中心ID + * "RegionName" => (string) 数据中心名称 + * "IsDefault" => (boolean) 是否用户当前默认数据中心 + * "BitMaps" => (string) 用户在此数据中心的权限位 + * "Region" => (string) 地域名字,如cn-bj + * "Zone" => (string) 可用区名字,如cn-bj-01 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getRegion(GetRegionRequest $request = null): GetRegionResponse + { + $resp = $this->invoke($request); + return new GetRegionResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * InviteSubaccount - 邀请子帐号成员 + * + * See also: https://docs.ucloud.cn/api/UAccount-api/invite_subaccount + * + * Arguments: + * + * $args = [ + * "UserEmail" => (string) 受邀成员邮箱地址,不得重复 + * "UserPhone" => (string) 受邀成员手机号码 + * "UserName" => (string) 受邀成员姓名 + * "IsFinance" => (string) 是否有财务权限(true:是,false:否,默认为否) + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function inviteSubaccount(InviteSubaccountRequest $request = null): InviteSubaccountResponse + { + $resp = $this->invoke($request); + return new InviteSubaccountResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * RemoveMemberFromProject - 从项目中移除成员 + * + * See also: https://docs.ucloud.cn/api/UAccount-api/remove_member_from_project + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID,请参考[GetProjectList接口](../summary/get_project_list.html)的描述。不填写为默认项目,子帐号必须填写。 + * "MemberEmail" => (string) 需要被移除成员Email + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function removeMemberFromProject(RemoveMemberFromProjectRequest $request = null): RemoveMemberFromProjectResponse + { + $resp = $this->invoke($request); + return new RemoveMemberFromProjectResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * SetNetworkMask - 设置登录与API调用的网络掩码 + * + * See also: https://docs.ucloud.cn/api/UAccount-api/set_network_mask + * + * Arguments: + * + * $args = [ + * "Code" => (string) 短信验证码 + * "APINetworkMask" => (string) API调用网络掩码,多个IP以英文逗号分隔。默认空字符串,不限制登录IP。 + * "LoginNetworkMask" => (string) 登录网络掩码,多个IP以英文逗号分隔。默认空字符串,不限制登录IP。 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function setNetworkMask(SetNetworkMaskRequest $request = null): SetNetworkMaskResponse + { + $resp = $this->invoke($request); + return new SetNetworkMaskResponse($resp->toArray(), $resp->getRequestId()); + } +} diff --git a/src/UBill/Apis/GetBalanceRequest.php b/src/UBill/Apis/GetBalanceRequest.php new file mode 100644 index 00000000..0cee16bf --- /dev/null +++ b/src/UBill/Apis/GetBalanceRequest.php @@ -0,0 +1,27 @@ + "GetBalance"]); + } +} diff --git a/src/UBill/Apis/GetBalanceResponse.php b/src/UBill/Apis/GetBalanceResponse.php new file mode 100644 index 00000000..f9e109e7 --- /dev/null +++ b/src/UBill/Apis/GetBalanceResponse.php @@ -0,0 +1,45 @@ +get("AccountInfo")); + } + + /** + * AccountInfo: 账户余额信息 + * + * @param AccountInfo $accountInfo + */ + public function setAccountInfo(AccountInfo $accountInfo) + { + $this->set("AccountInfo", $accountInfo->getAll()); + } +} diff --git a/src/UBill/Apis/GetBillDataFileUrlRequest.php b/src/UBill/Apis/GetBillDataFileUrlRequest.php new file mode 100644 index 00000000..18b3903a --- /dev/null +++ b/src/UBill/Apis/GetBillDataFileUrlRequest.php @@ -0,0 +1,111 @@ + "GetBillDataFileUrl"]); + $this->markRequired("BillPeriod"); + $this->markRequired("BillType"); + } + + + + /** + * BillPeriod: 账期(时间戳格式) + * + * @return integer|null + */ + public function getBillPeriod(): int + { + return $this->get("BillPeriod"); + } + + /** + * BillPeriod: 账期(时间戳格式) + * + * @param int $billPeriod + */ + public function setBillPeriod(int $billPeriod) + { + $this->set("BillPeriod", $billPeriod); + } + + /** + * BillType: 账单类型,传 0 时获取账单总览报表,传 1 获取账单明细报表 + * + * @return integer|null + */ + public function getBillType(): int + { + return $this->get("BillType"); + } + + /** + * BillType: 账单类型,传 0 时获取账单总览报表,传 1 获取账单明细报表 + * + * @param int $billType + */ + public function setBillType(int $billType) + { + $this->set("BillType", $billType); + } + + /** + * PaidType: 获取账单总览报表时,账单的支付状态,传 0 时获取待支付账单,传 1 时获取已支付账单。获取账单明细报表时该参数无效 + * + * @return integer|null + */ + public function getPaidType(): int + { + return $this->get("PaidType"); + } + + /** + * PaidType: 获取账单总览报表时,账单的支付状态,传 0 时获取待支付账单,传 1 时获取已支付账单。获取账单明细报表时该参数无效 + * + * @param int $paidType + */ + public function setPaidType(int $paidType) + { + $this->set("PaidType", $paidType); + } + + /** + * RequireVersion: 如需求其他语言版本的账单则使用此参数。默认中文。如 RequireVersion = "EN",则提供英文版本账单。 + * + * @return string|null + */ + public function getRequireVersion(): string + { + return $this->get("RequireVersion"); + } + + /** + * RequireVersion: 如需求其他语言版本的账单则使用此参数。默认中文。如 RequireVersion = "EN",则提供英文版本账单。 + * + * @param string $requireVersion + */ + public function setRequireVersion(string $requireVersion) + { + $this->set("RequireVersion", $requireVersion); + } +} diff --git a/src/UBill/Apis/GetBillDataFileUrlResponse.php b/src/UBill/Apis/GetBillDataFileUrlResponse.php new file mode 100644 index 00000000..d43b7fdf --- /dev/null +++ b/src/UBill/Apis/GetBillDataFileUrlResponse.php @@ -0,0 +1,64 @@ +get("FileUrl"); + } + + /** + * FileUrl: 交易账单数据下载URL + * + * @param string $fileUrl + */ + public function setFileUrl(string $fileUrl) + { + $this->set("FileUrl", $fileUrl); + } + + /** + * IsValid: 生成的 URL是否有效,即有对应数据文件 + * + * @return string|null + */ + public function getIsValid(): string + { + return $this->get("IsValid"); + } + + /** + * IsValid: 生成的 URL是否有效,即有对应数据文件 + * + * @param string $isValid + */ + public function setIsValid(string $isValid) + { + $this->set("IsValid", $isValid); + } +} diff --git a/src/UBill/Models/AccountInfo.php b/src/UBill/Models/AccountInfo.php new file mode 100644 index 00000000..7a82e658 --- /dev/null +++ b/src/UBill/Models/AccountInfo.php @@ -0,0 +1,124 @@ +get("AmountFreeze"); + } + + /** + * AmountFreeze: 冻结账户金额 + * + * @param string $amountFreeze + */ + public function setAmountFreeze(string $amountFreeze) + { + $this->set("AmountFreeze", $amountFreeze); + } + + /** + * AmountCredit: 信用账户余额 + * + * @return string|null + */ + public function getAmountCredit(): string + { + return $this->get("AmountCredit"); + } + + /** + * AmountCredit: 信用账户余额 + * + * @param string $amountCredit + */ + public function setAmountCredit(string $amountCredit) + { + $this->set("AmountCredit", $amountCredit); + } + + /** + * AmountFree: 赠送账户余额 + * + * @return string|null + */ + public function getAmountFree(): string + { + return $this->get("AmountFree"); + } + + /** + * AmountFree: 赠送账户余额 + * + * @param string $amountFree + */ + public function setAmountFree(string $amountFree) + { + $this->set("AmountFree", $amountFree); + } + + /** + * Amount: 账户余额 + * + * @return string|null + */ + public function getAmount(): string + { + return $this->get("Amount"); + } + + /** + * Amount: 账户余额 + * + * @param string $amount + */ + public function setAmount(string $amount) + { + $this->set("Amount", $amount); + } + + /** + * AmountAvailable: 账户可用余额 + * + * @return string|null + */ + public function getAmountAvailable(): string + { + return $this->get("AmountAvailable"); + } + + /** + * AmountAvailable: 账户可用余额 + * + * @param string $amountAvailable + */ + public function setAmountAvailable(string $amountAvailable) + { + $this->set("AmountAvailable", $amountAvailable); + } +} diff --git a/src/UBill/UBillClient.php b/src/UBill/UBillClient.php new file mode 100644 index 00000000..5739852e --- /dev/null +++ b/src/UBill/UBillClient.php @@ -0,0 +1,90 @@ + (object) 账户余额信息[ + * "AmountFreeze" => (string) 冻结账户金额 + * "AmountCredit" => (string) 信用账户余额 + * "AmountFree" => (string) 赠送账户余额 + * "Amount" => (string) 账户余额 + * "AmountAvailable" => (string) 账户可用余额 + * ] + * ] + * + * @throws UCloudException + */ + public function getBalance(GetBalanceRequest $request = null): GetBalanceResponse + { + $resp = $this->invoke($request); + return new GetBalanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetBillDataFileUrl - 生成账单数据文件下载的 url + * + * See also: https://docs.ucloud.cn/api/UBill-api/get_bill_data_file_url + * + * Arguments: + * + * $args = [ + * "BillPeriod" => (integer) 账期(时间戳格式) + * "BillType" => (integer) 账单类型,传 0 时获取账单总览报表,传 1 获取账单明细报表 + * "PaidType" => (integer) 获取账单总览报表时,账单的支付状态,传 0 时获取待支付账单,传 1 时获取已支付账单。获取账单明细报表时该参数无效 + * "RequireVersion" => (string) 如需求其他语言版本的账单则使用此参数。默认中文。如 RequireVersion = "EN",则提供英文版本账单。 + * ] + * + * Outputs: + * + * $outputs = [ + * "FileUrl" => (string) 交易账单数据下载URL + * "IsValid" => (string) 生成的 URL是否有效,即有对应数据文件 + * ] + * + * @throws UCloudException + */ + public function getBillDataFileUrl(GetBillDataFileUrlRequest $request = null): GetBillDataFileUrlResponse + { + $resp = $this->invoke($request); + return new GetBillDataFileUrlResponse($resp->toArray(), $resp->getRequestId()); + } +} diff --git a/src/UCDN/Apis/DescribeNewUcdnPrefetchCacheTaskRequest.php b/src/UCDN/Apis/DescribeNewUcdnPrefetchCacheTaskRequest.php new file mode 100644 index 00000000..3f689c1c --- /dev/null +++ b/src/UCDN/Apis/DescribeNewUcdnPrefetchCacheTaskRequest.php @@ -0,0 +1,169 @@ + "DescribeNewUcdnPrefetchCacheTask"]); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * TaskId: 提交任务时返回的任务ID + * + * @return string[]|null + */ + public function getTaskId(): array + { + return $this->get("TaskId"); + } + + /** + * TaskId: 提交任务时返回的任务ID + * + * @param string[] $taskId + */ + public function setTaskId(array $taskId) + { + $this->set("TaskId", $taskId); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值 + * + * @return integer|null + */ + public function getBeginTime(): int + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值 + * + * @param int $beginTime + */ + public function setBeginTime(int $beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } + + /** + * Status: 需要获取的内容预热的状态,枚举值:success:成功;wait:等待处理;process:正在处理;failure:失败; unknow:未知,默认选择所有状态 + * + * @return string|null + */ + public function getStatus(): string + { + return $this->get("Status"); + } + + /** + * Status: 需要获取的内容预热的状态,枚举值:success:成功;wait:等待处理;process:正在处理;failure:失败; unknow:未知,默认选择所有状态 + * + * @param string $status + */ + public function setStatus(string $status) + { + $this->set("Status", $status); + } + + /** + * Offset: 数据偏移量,默认为0,自然数 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 数据偏移量,默认为0,自然数 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 返回数据长度,默认全部,自然数 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数据长度,默认全部,自然数 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/UCDN/Apis/DescribeNewUcdnPrefetchCacheTaskResponse.php b/src/UCDN/Apis/DescribeNewUcdnPrefetchCacheTaskResponse.php new file mode 100644 index 00000000..3658734e --- /dev/null +++ b/src/UCDN/Apis/DescribeNewUcdnPrefetchCacheTaskResponse.php @@ -0,0 +1,75 @@ +get("TotalCount"); + } + + /** + * TotalCount: 预热任务的总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * TaskList: 预热任务信息,参考TaskInfo + * + * @return TaskInfo[]|null + */ + public function getTaskList(): array + { + $items = $this->get("TaskList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new TaskInfo($item)); + } + return $result; + } + + /** + * TaskList: 预热任务信息,参考TaskInfo + * + * @param TaskInfo[] $taskList + */ + public function setTaskList(array $taskList) + { + $result = []; + foreach ($taskList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UCDN/Apis/DescribeNewUcdnRefreshCacheTaskRequest.php b/src/UCDN/Apis/DescribeNewUcdnRefreshCacheTaskRequest.php new file mode 100644 index 00000000..9529856f --- /dev/null +++ b/src/UCDN/Apis/DescribeNewUcdnRefreshCacheTaskRequest.php @@ -0,0 +1,169 @@ + "DescribeNewUcdnRefreshCacheTask"]); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * TaskId: 提交任务时返回的任务ID + * + * @return string[]|null + */ + public function getTaskId(): array + { + return $this->get("TaskId"); + } + + /** + * TaskId: 提交任务时返回的任务ID + * + * @param string[] $taskId + */ + public function setTaskId(array $taskId) + { + $this->set("TaskId", $taskId); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值 + * + * @return integer|null + */ + public function getBeginTime(): int + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值 + * + * @param int $beginTime + */ + public function setBeginTime(int $beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } + + /** + * Status: 需要获取的内容刷新的状态,枚举值:success:成功;wait:等待处理;process:正在处理;failure:失败; unknow:未知,默认选择所有状态 + * + * @return string|null + */ + public function getStatus(): string + { + return $this->get("Status"); + } + + /** + * Status: 需要获取的内容刷新的状态,枚举值:success:成功;wait:等待处理;process:正在处理;failure:失败; unknow:未知,默认选择所有状态 + * + * @param string $status + */ + public function setStatus(string $status) + { + $this->set("Status", $status); + } + + /** + * Offset: 数据偏移量,默认为0,自然数 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 数据偏移量,默认为0,自然数 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 返回数据长度,默认全部,自然数 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数据长度,默认全部,自然数 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/UCDN/Apis/DescribeNewUcdnRefreshCacheTaskResponse.php b/src/UCDN/Apis/DescribeNewUcdnRefreshCacheTaskResponse.php new file mode 100644 index 00000000..190f2451 --- /dev/null +++ b/src/UCDN/Apis/DescribeNewUcdnRefreshCacheTaskResponse.php @@ -0,0 +1,75 @@ +get("TotalCount"); + } + + /** + * TotalCount: 刷新任务的总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * TaskList: 刷新任务信息,参考TaskInfo + * + * @return TaskInfo[]|null + */ + public function getTaskList(): array + { + $items = $this->get("TaskList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new TaskInfo($item)); + } + return $result; + } + + /** + * TaskList: 刷新任务信息,参考TaskInfo + * + * @param TaskInfo[] $taskList + */ + public function setTaskList(array $taskList) + { + $result = []; + foreach ($taskList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UCDN/Apis/GetNewUcdnDomainBandwidthRequest.php b/src/UCDN/Apis/GetNewUcdnDomainBandwidthRequest.php new file mode 100644 index 00000000..7f4d6a9c --- /dev/null +++ b/src/UCDN/Apis/GetNewUcdnDomainBandwidthRequest.php @@ -0,0 +1,150 @@ + "GetNewUcdnDomainBandwidth"]); + $this->markRequired("Type"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Type: 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度) + * + * @return integer|null + */ + public function getType(): int + { + return $this->get("Type"); + } + + /** + * Type: 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度) + * + * @param int $type + */ + public function setType(int $type) + { + $this->set("Type", $type); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @return string[]|null + */ + public function getDomainId(): array + { + return $this->get("DomainId"); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @param string[] $domainId + */ + public function setDomainId(array $domainId) + { + $this->set("DomainId", $domainId); + } + + /** + * Areacode: 查询带宽区域 cn代表国内 abroad代表海外 不填默认为全部区域 + * + * @return string|null + */ + public function getAreacode(): string + { + return $this->get("Areacode"); + } + + /** + * Areacode: 查询带宽区域 cn代表国内 abroad代表海外 不填默认为全部区域 + * + * @param string $areacode + */ + public function setAreacode(string $areacode) + { + $this->set("Areacode", $areacode); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + * + * @return integer|null + */ + public function getBeginTime(): int + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + * + * @param int $beginTime + */ + public function setBeginTime(int $beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } +} diff --git a/src/UCDN/Apis/GetNewUcdnDomainBandwidthResponse.php b/src/UCDN/Apis/GetNewUcdnDomainBandwidthResponse.php new file mode 100644 index 00000000..c75ef9ca --- /dev/null +++ b/src/UCDN/Apis/GetNewUcdnDomainBandwidthResponse.php @@ -0,0 +1,74 @@ +get("BandwidthList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new BandwidthInfo($item)); + } + return $result; + } + + /** + * BandwidthList: 带宽信息列表,参见BandwidthInfo + * + * @param BandwidthInfo[] $bandwidthList + */ + public function setBandwidthList(array $bandwidthList) + { + $result = []; + foreach ($bandwidthList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * Traffic: 从起始时间到结束时间内的所使用的CDN总流量,单位GB + * + * @return float|null + */ + public function getTraffic(): float + { + return $this->get("Traffic"); + } + + /** + * Traffic: 从起始时间到结束时间内的所使用的CDN总流量,单位GB + * + * @param float $traffic + */ + public function setTraffic(float $traffic) + { + $this->set("Traffic", $traffic); + } +} diff --git a/src/UCDN/Apis/GetNewUcdnDomainHitRateRequest.php b/src/UCDN/Apis/GetNewUcdnDomainHitRateRequest.php new file mode 100644 index 00000000..5efeb517 --- /dev/null +++ b/src/UCDN/Apis/GetNewUcdnDomainHitRateRequest.php @@ -0,0 +1,149 @@ + "GetNewUcdnDomainHitRate"]); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Type: 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度)默认5分钟 + * + * @return integer|null + */ + public function getType(): int + { + return $this->get("Type"); + } + + /** + * Type: 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度)默认5分钟 + * + * @param int $type + */ + public function setType(int $type) + { + $this->set("Type", $type); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @return string[]|null + */ + public function getDomainId(): array + { + return $this->get("DomainId"); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @param string[] $domainId + */ + public function setDomainId(array $domainId) + { + $this->set("DomainId", $domainId); + } + + /** + * Areacode: 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + * + * @return string|null + */ + public function getAreacode(): string + { + return $this->get("Areacode"); + } + + /** + * Areacode: 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + * + * @param string $areacode + */ + public function setAreacode(string $areacode) + { + $this->set("Areacode", $areacode); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + * + * @return integer|null + */ + public function getBeginTime(): int + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + * + * @param int $beginTime + */ + public function setBeginTime(int $beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } +} diff --git a/src/UCDN/Apis/GetNewUcdnDomainHitRateResponse.php b/src/UCDN/Apis/GetNewUcdnDomainHitRateResponse.php new file mode 100644 index 00000000..cefef322 --- /dev/null +++ b/src/UCDN/Apis/GetNewUcdnDomainHitRateResponse.php @@ -0,0 +1,54 @@ +get("HitRateList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new HitRateInfo($item)); + } + return $result; + } + + /** + * HitRateList: 请求数实例表。 + * + * @param HitRateInfo[] $hitRateList + */ + public function setHitRateList(array $hitRateList) + { + $result = []; + foreach ($hitRateList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UCDN/Apis/GetNewUcdnDomainHttpCodeRequest.php b/src/UCDN/Apis/GetNewUcdnDomainHttpCodeRequest.php new file mode 100644 index 00000000..2caab9fb --- /dev/null +++ b/src/UCDN/Apis/GetNewUcdnDomainHttpCodeRequest.php @@ -0,0 +1,150 @@ + "GetNewUcdnDomainHttpCode"]); + $this->markRequired("Type"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Type: 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度) + * + * @return integer|null + */ + public function getType(): int + { + return $this->get("Type"); + } + + /** + * Type: 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度) + * + * @param int $type + */ + public function setType(int $type) + { + $this->set("Type", $type); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @return string[]|null + */ + public function getDomainId(): array + { + return $this->get("DomainId"); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @param string[] $domainId + */ + public function setDomainId(array $domainId) + { + $this->set("DomainId", $domainId); + } + + /** + * Areacode: 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + * + * @return string|null + */ + public function getAreacode(): string + { + return $this->get("Areacode"); + } + + /** + * Areacode: 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + * + * @param string $areacode + */ + public function setAreacode(string $areacode) + { + $this->set("Areacode", $areacode); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + * + * @return integer|null + */ + public function getBeginTime(): int + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + * + * @param int $beginTime + */ + public function setBeginTime(int $beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } +} diff --git a/src/UCDN/Apis/GetNewUcdnDomainHttpCodeResponse.php b/src/UCDN/Apis/GetNewUcdnDomainHttpCodeResponse.php new file mode 100644 index 00000000..c1a11f9d --- /dev/null +++ b/src/UCDN/Apis/GetNewUcdnDomainHttpCodeResponse.php @@ -0,0 +1,54 @@ +get("HttpCodeDetail") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new HttpCodeInfo($item)); + } + return $result; + } + + /** + * HttpCodeDetail: 状态码实例表。详细见HttpCodeInfo + * + * @param HttpCodeInfo[] $httpCodeDetail + */ + public function setHttpCodeDetail(array $httpCodeDetail) + { + $result = []; + foreach ($httpCodeDetail as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UCDN/Apis/GetNewUcdnDomainHttpCodeV2Request.php b/src/UCDN/Apis/GetNewUcdnDomainHttpCodeV2Request.php new file mode 100644 index 00000000..051581ab --- /dev/null +++ b/src/UCDN/Apis/GetNewUcdnDomainHttpCodeV2Request.php @@ -0,0 +1,152 @@ + "GetNewUcdnDomainHttpCodeV2"]); + $this->markRequired("Type"); + $this->markRequired("BeginTime"); + $this->markRequired("EndTime"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Type: 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天粒度,3表示按照一分钟粒度) + * + * @return integer|null + */ + public function getType(): int + { + return $this->get("Type"); + } + + /** + * Type: 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天粒度,3表示按照一分钟粒度) + * + * @param int $type + */ + public function setType(int $type) + { + $this->set("Type", $type); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp。 + * + * @return integer|null + */ + public function getBeginTime(): int + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp。 + * + * @param int $beginTime + */ + public function setBeginTime(int $beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp。 + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp。 + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @return string[]|null + */ + public function getDomainId(): array + { + return $this->get("DomainId"); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @param string[] $domainId + */ + public function setDomainId(array $domainId) + { + $this->set("DomainId", $domainId); + } + + /** + * Areacode: 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + * + * @return string|null + */ + public function getAreacode(): string + { + return $this->get("Areacode"); + } + + /** + * Areacode: 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + * + * @param string $areacode + */ + public function setAreacode(string $areacode) + { + $this->set("Areacode", $areacode); + } +} diff --git a/src/UCDN/Apis/GetNewUcdnDomainHttpCodeV2Response.php b/src/UCDN/Apis/GetNewUcdnDomainHttpCodeV2Response.php new file mode 100644 index 00000000..8c521af7 --- /dev/null +++ b/src/UCDN/Apis/GetNewUcdnDomainHttpCodeV2Response.php @@ -0,0 +1,54 @@ +get("HttpCodeV2Detail") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new HttpCodeV2Detail($item)); + } + return $result; + } + + /** + * HttpCodeV2Detail: 状态码详情 + * + * @param HttpCodeV2Detail[] $httpCodeV2Detail + */ + public function setHttpCodeV2Detail(array $httpCodeV2Detail) + { + $result = []; + foreach ($httpCodeV2Detail as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UCDN/Apis/GetUcdnDomain95BandwidthV2Request.php b/src/UCDN/Apis/GetUcdnDomain95BandwidthV2Request.php new file mode 100644 index 00000000..efc0f9b1 --- /dev/null +++ b/src/UCDN/Apis/GetUcdnDomain95BandwidthV2Request.php @@ -0,0 +1,131 @@ + "GetUcdnDomain95BandwidthV2"]); + $this->markRequired("BeginTime"); + $this->markRequired("EndTime"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * BeginTime: 查询的起始日期,格式为Unix Timestamp + * + * @return integer|null + */ + public function getBeginTime(): int + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 查询的起始日期,格式为Unix Timestamp + * + * @param int $beginTime + */ + public function setBeginTime(int $beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 查询的结束日期,格式为Unix Timestamp + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 查询的结束日期,格式为Unix Timestamp + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @return string[]|null + */ + public function getDomainId(): array + { + return $this->get("DomainId"); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @param string[] $domainId + */ + public function setDomainId(array $domainId) + { + $this->set("DomainId", $domainId); + } + + /** + * Areacode: 查询带宽区域 cn代表国内 abroad代表海外 不填默认为全部区域 + * + * @return string|null + */ + public function getAreacode(): string + { + return $this->get("Areacode"); + } + + /** + * Areacode: 查询带宽区域 cn代表国内 abroad代表海外 不填默认为全部区域 + * + * @param string $areacode + */ + public function setAreacode(string $areacode) + { + $this->set("Areacode", $areacode); + } +} diff --git a/src/UCDN/Apis/GetUcdnDomain95BandwidthV2Response.php b/src/UCDN/Apis/GetUcdnDomain95BandwidthV2Response.php new file mode 100644 index 00000000..78bb1727 --- /dev/null +++ b/src/UCDN/Apis/GetUcdnDomain95BandwidthV2Response.php @@ -0,0 +1,64 @@ +get("Time"); + } + + /** + * Time: 查询时间期间的95带宽时间点 Unix时间戳 + * + * @param int $time + */ + public function setTime(int $time) + { + $this->set("Time", $time); + } + + /** + * CdnBandwidth: 查询期间的CDN的95带宽值,单位Mbps + * + * @return float|null + */ + public function getCdnBandwidth(): float + { + return $this->get("CdnBandwidth"); + } + + /** + * CdnBandwidth: 查询期间的CDN的95带宽值,单位Mbps + * + * @param float $cdnBandwidth + */ + public function setCdnBandwidth(float $cdnBandwidth) + { + $this->set("CdnBandwidth", $cdnBandwidth); + } +} diff --git a/src/UCDN/Apis/GetUcdnDomainBandwidthV2Request.php b/src/UCDN/Apis/GetUcdnDomainBandwidthV2Request.php new file mode 100644 index 00000000..4a3bd681 --- /dev/null +++ b/src/UCDN/Apis/GetUcdnDomainBandwidthV2Request.php @@ -0,0 +1,189 @@ + "GetUcdnDomainBandwidthV2"]); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Type: 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度,3表示按照1分钟粒度) + * + * @return integer|null + */ + public function getType(): int + { + return $this->get("Type"); + } + + /** + * Type: 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度,3表示按照1分钟粒度) + * + * @param int $type + */ + public function setType(int $type) + { + $this->set("Type", $type); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @return string[]|null + */ + public function getDomainId(): array + { + return $this->get("DomainId"); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @param string[] $domainId + */ + public function setDomainId(array $domainId) + { + $this->set("DomainId", $domainId); + } + + /** + * Areacode: 查询带宽区域 cn代表国内 abroad代表海外 不填默认为全部区域 + * + * @return string|null + */ + public function getAreacode(): string + { + return $this->get("Areacode"); + } + + /** + * Areacode: 查询带宽区域 cn代表国内 abroad代表海外 不填默认为全部区域 + * + * @param string $areacode + */ + public function setAreacode(string $areacode) + { + $this->set("Areacode", $areacode); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + * + * @return integer|null + */ + public function getBeginTime(): int + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + * + * @param int $beginTime + */ + public function setBeginTime(int $beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } + + /** + * Protocol: 协议,http、https 不传则查所有协议的带宽 + * + * @return string|null + */ + public function getProtocol(): string + { + return $this->get("Protocol"); + } + + /** + * Protocol: 协议,http、https 不传则查所有协议的带宽 + * + * @param string $protocol + */ + public function setProtocol(string $protocol) + { + $this->set("Protocol", $protocol); + } + + /** + * Primeval: 原始带宽,不为0则获取原始带宽,默认为0 + * + * @return integer|null + */ + public function getPrimeval(): int + { + return $this->get("Primeval"); + } + + /** + * Primeval: 原始带宽,不为0则获取原始带宽,默认为0 + * + * @param int $primeval + */ + public function setPrimeval(int $primeval) + { + $this->set("Primeval", $primeval); + } +} diff --git a/src/UCDN/Apis/GetUcdnDomainBandwidthV2Response.php b/src/UCDN/Apis/GetUcdnDomainBandwidthV2Response.php new file mode 100644 index 00000000..43c9a589 --- /dev/null +++ b/src/UCDN/Apis/GetUcdnDomainBandwidthV2Response.php @@ -0,0 +1,54 @@ +get("BandwidthTrafficList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new BandwidthTrafficInfo($item)); + } + return $result; + } + + /** + * BandwidthTrafficList: 带宽信息列表,参见BandwidthTrafficInfo + * + * @param BandwidthTrafficInfo[] $bandwidthTrafficList + */ + public function setBandwidthTrafficList(array $bandwidthTrafficList) + { + $result = []; + foreach ($bandwidthTrafficList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UCDN/Apis/GetUcdnDomainConfigRequest.php b/src/UCDN/Apis/GetUcdnDomainConfigRequest.php new file mode 100644 index 00000000..14f2e755 --- /dev/null +++ b/src/UCDN/Apis/GetUcdnDomainConfigRequest.php @@ -0,0 +1,129 @@ + "GetUcdnDomainConfig"]); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Offset: 数据偏移量,默认0,非负整数 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 数据偏移量,默认0,非负整数 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 返回数据长度, 默认全部,非负整数 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数据长度, 默认全部,非负整数 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认获取账号下的所有域名信息,n为自然数,从DomainId.0开始。 + * + * @return string[]|null + */ + public function getDomainId(): array + { + return $this->get("DomainId"); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认获取账号下的所有域名信息,n为自然数,从DomainId.0开始。 + * + * @param string[] $domainId + */ + public function setDomainId(array $domainId) + { + $this->set("DomainId", $domainId); + } + + /** + * ChannelType: 产品类型ucdn,可不填,默认为ucdn + * + * @return string|null + */ + public function getChannelType(): string + { + return $this->get("ChannelType"); + } + + /** + * ChannelType: 产品类型ucdn,可不填,默认为ucdn + * + * @param string $channelType + */ + public function setChannelType(string $channelType) + { + $this->set("ChannelType", $channelType); + } +} diff --git a/src/UCDN/Apis/GetUcdnDomainConfigResponse.php b/src/UCDN/Apis/GetUcdnDomainConfigResponse.php new file mode 100644 index 00000000..a9c65bde --- /dev/null +++ b/src/UCDN/Apis/GetUcdnDomainConfigResponse.php @@ -0,0 +1,62 @@ +get("DomainList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new DomainConfigInfo($item)); + } + return $result; + } + + /** + * DomainList: 获取的域名信息,具体参考下面DomainConfig + * + * @param DomainConfigInfo[] $domainList + */ + public function setDomainList(array $domainList) + { + $result = []; + foreach ($domainList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UCDN/Apis/GetUcdnDomainHitRateRequest.php b/src/UCDN/Apis/GetUcdnDomainHitRateRequest.php new file mode 100644 index 00000000..19cb39c2 --- /dev/null +++ b/src/UCDN/Apis/GetUcdnDomainHitRateRequest.php @@ -0,0 +1,170 @@ + "GetUcdnDomainHitRate"]); + $this->markRequired("Type"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Type: 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度,3表示按照一分钟的粒度)默认5分钟 + * + * @return integer|null + */ + public function getType(): int + { + return $this->get("Type"); + } + + /** + * Type: 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度,3表示按照一分钟的粒度)默认5分钟 + * + * @param int $type + */ + public function setType(int $type) + { + $this->set("Type", $type); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @return string[]|null + */ + public function getDomainId(): array + { + return $this->get("DomainId"); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @param string[] $domainId + */ + public function setDomainId(array $domainId) + { + $this->set("DomainId", $domainId); + } + + /** + * Areacode: 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + * + * @return string|null + */ + public function getAreacode(): string + { + return $this->get("Areacode"); + } + + /** + * Areacode: 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + * + * @param string $areacode + */ + public function setAreacode(string $areacode) + { + $this->set("Areacode", $areacode); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + * + * @return integer|null + */ + public function getBeginTime(): int + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + * + * @param int $beginTime + */ + public function setBeginTime(int $beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } + + /** + * HitType: 命中类型:0=整体命中 1=边缘命中 默认是0 + * + * @return integer|null + */ + public function getHitType(): int + { + return $this->get("HitType"); + } + + /** + * HitType: 命中类型:0=整体命中 1=边缘命中 默认是0 + * + * @param int $hitType + */ + public function setHitType(int $hitType) + { + $this->set("HitType", $hitType); + } +} diff --git a/src/UCDN/Apis/GetUcdnDomainHitRateResponse.php b/src/UCDN/Apis/GetUcdnDomainHitRateResponse.php new file mode 100644 index 00000000..fdc86759 --- /dev/null +++ b/src/UCDN/Apis/GetUcdnDomainHitRateResponse.php @@ -0,0 +1,54 @@ +get("HitRateList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new HitRateInfoV2($item)); + } + return $result; + } + + /** + * HitRateList: 请求数实例表。 + * + * @param HitRateInfoV2[] $hitRateList + */ + public function setHitRateList(array $hitRateList) + { + $result = []; + foreach ($hitRateList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UCDN/Apis/GetUcdnDomainHttpCodeV2Request.php b/src/UCDN/Apis/GetUcdnDomainHttpCodeV2Request.php new file mode 100644 index 00000000..2f48c61e --- /dev/null +++ b/src/UCDN/Apis/GetUcdnDomainHttpCodeV2Request.php @@ -0,0 +1,170 @@ + "GetUcdnDomainHttpCodeV2"]); + $this->markRequired("Type"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Type: 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度,3表示1分钟粒度) + * + * @return integer|null + */ + public function getType(): int + { + return $this->get("Type"); + } + + /** + * Type: 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度,3表示1分钟粒度) + * + * @param int $type + */ + public function setType(int $type) + { + $this->set("Type", $type); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @return string[]|null + */ + public function getDomainId(): array + { + return $this->get("DomainId"); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @param string[] $domainId + */ + public function setDomainId(array $domainId) + { + $this->set("DomainId", $domainId); + } + + /** + * Areacode: 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + * + * @return string|null + */ + public function getAreacode(): string + { + return $this->get("Areacode"); + } + + /** + * Areacode: 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + * + * @param string $areacode + */ + public function setAreacode(string $areacode) + { + $this->set("Areacode", $areacode); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + * + * @return integer|null + */ + public function getBeginTime(): int + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + * + * @param int $beginTime + */ + public function setBeginTime(int $beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } + + /** + * Layer: 指定获取的状态码是边缘还是上层 edge 表示边缘 layer 表示上层 + * + * @return string|null + */ + public function getLayer(): string + { + return $this->get("Layer"); + } + + /** + * Layer: 指定获取的状态码是边缘还是上层 edge 表示边缘 layer 表示上层 + * + * @param string $layer + */ + public function setLayer(string $layer) + { + $this->set("Layer", $layer); + } +} diff --git a/src/UCDN/Apis/GetUcdnDomainHttpCodeV2Response.php b/src/UCDN/Apis/GetUcdnDomainHttpCodeV2Response.php new file mode 100644 index 00000000..38a8ab31 --- /dev/null +++ b/src/UCDN/Apis/GetUcdnDomainHttpCodeV2Response.php @@ -0,0 +1,60 @@ +get("HttpCodeDetail") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new HttpCodeInfoV2($item)); + } + return $result; + } + + /** + * HttpCodeDetail: 状态码实例表。详细见HttpCodeInfoV2 + * + * @param HttpCodeInfoV2[] $httpCodeDetail + */ + public function setHttpCodeDetail(array $httpCodeDetail) + { + $result = []; + foreach ($httpCodeDetail as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UCDN/Apis/GetUcdnDomainInfoListRequest.php b/src/UCDN/Apis/GetUcdnDomainInfoListRequest.php new file mode 100644 index 00000000..ab62a6c1 --- /dev/null +++ b/src/UCDN/Apis/GetUcdnDomainInfoListRequest.php @@ -0,0 +1,89 @@ + "GetUcdnDomainInfoList"]); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * PageSize: 分页的大小,不填默认每页20个 + * + * @return integer|null + */ + public function getPageSize(): int + { + return $this->get("PageSize"); + } + + /** + * PageSize: 分页的大小,不填默认每页20个 + * + * @param int $pageSize + */ + public function setPageSize(int $pageSize) + { + $this->set("PageSize", $pageSize); + } + + /** + * PageIndex: 返回第几页,不填默认是第1页 + * + * @return integer|null + */ + public function getPageIndex(): int + { + return $this->get("PageIndex"); + } + + /** + * PageIndex: 返回第几页,不填默认是第1页 + * + * @param int $pageIndex + */ + public function setPageIndex(int $pageIndex) + { + $this->set("PageIndex", $pageIndex); + } +} diff --git a/src/UCDN/Apis/GetUcdnDomainInfoListResponse.php b/src/UCDN/Apis/GetUcdnDomainInfoListResponse.php new file mode 100644 index 00000000..b2ade964 --- /dev/null +++ b/src/UCDN/Apis/GetUcdnDomainInfoListResponse.php @@ -0,0 +1,74 @@ +get("TotalCount"); + } + + /** + * TotalCount: 账户下域名总个数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * DomainInfoList: 域名基本信息 + * + * @return DomainBaseInfo[]|null + */ + public function getDomainInfoList(): array + { + $items = $this->get("DomainInfoList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new DomainBaseInfo($item)); + } + return $result; + } + + /** + * DomainInfoList: 域名基本信息 + * + * @param DomainBaseInfo[] $domainInfoList + */ + public function setDomainInfoList(array $domainInfoList) + { + $result = []; + foreach ($domainInfoList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UCDN/Apis/GetUcdnDomainLogRequest.php b/src/UCDN/Apis/GetUcdnDomainLogRequest.php new file mode 100644 index 00000000..383b875e --- /dev/null +++ b/src/UCDN/Apis/GetUcdnDomainLogRequest.php @@ -0,0 +1,129 @@ + "GetUcdnDomainLog"]); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DomainId: 域名ID,创建加速域名时生成。默认全部域名 + * + * @return string[]|null + */ + public function getDomainId(): array + { + return $this->get("DomainId"); + } + + /** + * DomainId: 域名ID,创建加速域名时生成。默认全部域名 + * + * @param string[] $domainId + */ + public function setDomainId(array $domainId) + { + $this->set("DomainId", $domainId); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。 + * + * @return integer|null + */ + public function getBeginTime(): int + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。 + * + * @param int $beginTime + */ + public function setBeginTime(int $beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } + + /** + * Type: 查询粒度 0=default(没有粒度) 1=按小时 2=按天 + * + * @return integer|null + */ + public function getType(): int + { + return $this->get("Type"); + } + + /** + * Type: 查询粒度 0=default(没有粒度) 1=按小时 2=按天 + * + * @param int $type + */ + public function setType(int $type) + { + $this->set("Type", $type); + } +} diff --git a/src/UCDN/Apis/GetUcdnDomainLogResponse.php b/src/UCDN/Apis/GetUcdnDomainLogResponse.php new file mode 100644 index 00000000..c33590b7 --- /dev/null +++ b/src/UCDN/Apis/GetUcdnDomainLogResponse.php @@ -0,0 +1,55 @@ +get("LogSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new LogSetList($item)); + } + return $result; + } + + /** + * LogSet: 获取日志的连接地址。具体参考下面LogSetList + * + * @param LogSetList[] $logSet + */ + public function setLogSet(array $logSet) + { + $result = []; + foreach ($logSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UCDN/Apis/GetUcdnDomainOriginHttpCodeDetailRequest.php b/src/UCDN/Apis/GetUcdnDomainOriginHttpCodeDetailRequest.php new file mode 100644 index 00000000..ddc05853 --- /dev/null +++ b/src/UCDN/Apis/GetUcdnDomainOriginHttpCodeDetailRequest.php @@ -0,0 +1,152 @@ + "GetUcdnDomainOriginHttpCodeDetail"]); + $this->markRequired("Type"); + $this->markRequired("BeginTime"); + $this->markRequired("EndTime"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Type: 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天粒度,3表示按照一分钟粒度) + * + * @return integer|null + */ + public function getType(): int + { + return $this->get("Type"); + } + + /** + * Type: 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天粒度,3表示按照一分钟粒度) + * + * @param int $type + */ + public function setType(int $type) + { + $this->set("Type", $type); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp。 + * + * @return integer|null + */ + public function getBeginTime(): int + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp。 + * + * @param int $beginTime + */ + public function setBeginTime(int $beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp。 + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp。 + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @return string[]|null + */ + public function getDomainId(): array + { + return $this->get("DomainId"); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @param string[] $domainId + */ + public function setDomainId(array $domainId) + { + $this->set("DomainId", $domainId); + } + + /** + * Areacode: 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + * + * @return string|null + */ + public function getAreacode(): string + { + return $this->get("Areacode"); + } + + /** + * Areacode: 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + * + * @param string $areacode + */ + public function setAreacode(string $areacode) + { + $this->set("Areacode", $areacode); + } +} diff --git a/src/UCDN/Apis/GetUcdnDomainOriginHttpCodeDetailResponse.php b/src/UCDN/Apis/GetUcdnDomainOriginHttpCodeDetailResponse.php new file mode 100644 index 00000000..9e3d8b1b --- /dev/null +++ b/src/UCDN/Apis/GetUcdnDomainOriginHttpCodeDetailResponse.php @@ -0,0 +1,54 @@ +get("HttpCodeV2Detail") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new HttpCodeV2Detail($item)); + } + return $result; + } + + /** + * HttpCodeV2Detail: 状态码详情 + * + * @param HttpCodeV2Detail[] $httpCodeV2Detail + */ + public function setHttpCodeV2Detail(array $httpCodeV2Detail) + { + $result = []; + foreach ($httpCodeV2Detail as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UCDN/Apis/GetUcdnDomainOriginHttpCodeRequest.php b/src/UCDN/Apis/GetUcdnDomainOriginHttpCodeRequest.php new file mode 100644 index 00000000..f0538f1a --- /dev/null +++ b/src/UCDN/Apis/GetUcdnDomainOriginHttpCodeRequest.php @@ -0,0 +1,150 @@ + "GetUcdnDomainOriginHttpCode"]); + $this->markRequired("Type"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Type: 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度,3表示按照1分钟粒度) + * + * @return integer|null + */ + public function getType(): int + { + return $this->get("Type"); + } + + /** + * Type: 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度,3表示按照1分钟粒度) + * + * @param int $type + */ + public function setType(int $type) + { + $this->set("Type", $type); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @return string[]|null + */ + public function getDomainId(): array + { + return $this->get("DomainId"); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @param string[] $domainId + */ + public function setDomainId(array $domainId) + { + $this->set("DomainId", $domainId); + } + + /** + * Areacode: 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + * + * @return string|null + */ + public function getAreacode(): string + { + return $this->get("Areacode"); + } + + /** + * Areacode: 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + * + * @param string $areacode + */ + public function setAreacode(string $areacode) + { + $this->set("Areacode", $areacode); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + * + * @return integer|null + */ + public function getBeginTime(): int + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + * + * @param int $beginTime + */ + public function setBeginTime(int $beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } +} diff --git a/src/UCDN/Apis/GetUcdnDomainOriginHttpCodeResponse.php b/src/UCDN/Apis/GetUcdnDomainOriginHttpCodeResponse.php new file mode 100644 index 00000000..10f5bf2a --- /dev/null +++ b/src/UCDN/Apis/GetUcdnDomainOriginHttpCodeResponse.php @@ -0,0 +1,54 @@ +get("HttpCodeDetail") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new HttpCodeInfo($item)); + } + return $result; + } + + /** + * HttpCodeDetail: 状态码实例表。详细见HttpCodeInfo + * + * @param HttpCodeInfo[] $httpCodeDetail + */ + public function setHttpCodeDetail(array $httpCodeDetail) + { + $result = []; + foreach ($httpCodeDetail as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UCDN/Apis/GetUcdnDomainOriginRequestNumRequest.php b/src/UCDN/Apis/GetUcdnDomainOriginRequestNumRequest.php new file mode 100644 index 00000000..5e3c6fd4 --- /dev/null +++ b/src/UCDN/Apis/GetUcdnDomainOriginRequestNumRequest.php @@ -0,0 +1,152 @@ + "GetUcdnDomainOriginRequestNum"]); + $this->markRequired("Type"); + $this->markRequired("BeginTime"); + $this->markRequired("EndTime"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Type: 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度, 3=按1分钟) + * + * @return integer|null + */ + public function getType(): int + { + return $this->get("Type"); + } + + /** + * Type: 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度, 3=按1分钟) + * + * @param int $type + */ + public function setType(int $type) + { + $this->set("Type", $type); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp + * + * @return integer|null + */ + public function getBeginTime(): int + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp + * + * @param int $beginTime + */ + public function setBeginTime(int $beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @return string[]|null + */ + public function getDomainId(): array + { + return $this->get("DomainId"); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @param string[] $domainId + */ + public function setDomainId(array $domainId) + { + $this->set("DomainId", $domainId); + } + + /** + * Areacode: 查询区域 cn代表国内 abroad代表海外,只支持国内 + * + * @return string|null + */ + public function getAreacode(): string + { + return $this->get("Areacode"); + } + + /** + * Areacode: 查询区域 cn代表国内 abroad代表海外,只支持国内 + * + * @param string $areacode + */ + public function setAreacode(string $areacode) + { + $this->set("Areacode", $areacode); + } +} diff --git a/src/UCDN/Apis/GetUcdnDomainOriginRequestNumResponse.php b/src/UCDN/Apis/GetUcdnDomainOriginRequestNumResponse.php new file mode 100644 index 00000000..b99caa36 --- /dev/null +++ b/src/UCDN/Apis/GetUcdnDomainOriginRequestNumResponse.php @@ -0,0 +1,54 @@ +get("RequestList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new RequestInfoV2($item)); + } + return $result; + } + + /** + * RequestList: 请求数实例表。 + * + * @param RequestInfoV2[] $requestList + */ + public function setRequestList(array $requestList) + { + $result = []; + foreach ($requestList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UCDN/Apis/GetUcdnDomainPrefetchEnableRequest.php b/src/UCDN/Apis/GetUcdnDomainPrefetchEnableRequest.php new file mode 100644 index 00000000..212112c4 --- /dev/null +++ b/src/UCDN/Apis/GetUcdnDomainPrefetchEnableRequest.php @@ -0,0 +1,70 @@ + "GetUcdnDomainPrefetchEnable"]); + $this->markRequired("DomainId"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DomainId: 域名ID,创建加速域名时生成。 + * + * @return string|null + */ + public function getDomainId(): string + { + return $this->get("DomainId"); + } + + /** + * DomainId: 域名ID,创建加速域名时生成。 + * + * @param string $domainId + */ + public function setDomainId(string $domainId) + { + $this->set("DomainId", $domainId); + } +} diff --git a/src/UCDN/Apis/GetUcdnDomainPrefetchEnableResponse.php b/src/UCDN/Apis/GetUcdnDomainPrefetchEnableResponse.php new file mode 100644 index 00000000..6925432d --- /dev/null +++ b/src/UCDN/Apis/GetUcdnDomainPrefetchEnableResponse.php @@ -0,0 +1,44 @@ +get("Enable"); + } + + /** + * Enable: 0表示该域名未开启预取,1表示该域名已开启预取 + * + * @param int $enable + */ + public function setEnable(int $enable) + { + $this->set("Enable", $enable); + } +} diff --git a/src/UCDN/Apis/GetUcdnDomainRequestNumV2Request.php b/src/UCDN/Apis/GetUcdnDomainRequestNumV2Request.php new file mode 100644 index 00000000..011f8742 --- /dev/null +++ b/src/UCDN/Apis/GetUcdnDomainRequestNumV2Request.php @@ -0,0 +1,152 @@ + "GetUcdnDomainRequestNumV2"]); + $this->markRequired("Type"); + $this->markRequired("BeginTime"); + $this->markRequired("EndTime"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Type: 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度, 3=按1分钟) + * + * @return integer|null + */ + public function getType(): int + { + return $this->get("Type"); + } + + /** + * Type: 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度, 3=按1分钟) + * + * @param int $type + */ + public function setType(int $type) + { + $this->set("Type", $type); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp + * + * @return integer|null + */ + public function getBeginTime(): int + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp + * + * @param int $beginTime + */ + public function setBeginTime(int $beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @return string[]|null + */ + public function getDomainId(): array + { + return $this->get("DomainId"); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @param string[] $domainId + */ + public function setDomainId(array $domainId) + { + $this->set("DomainId", $domainId); + } + + /** + * Areacode: 查询区域 cn代表国内 abroad代表海外,只支持国内 + * + * @return string|null + */ + public function getAreacode(): string + { + return $this->get("Areacode"); + } + + /** + * Areacode: 查询区域 cn代表国内 abroad代表海外,只支持国内 + * + * @param string $areacode + */ + public function setAreacode(string $areacode) + { + $this->set("Areacode", $areacode); + } +} diff --git a/src/UCDN/Apis/GetUcdnDomainRequestNumV2Response.php b/src/UCDN/Apis/GetUcdnDomainRequestNumV2Response.php new file mode 100644 index 00000000..c1d16090 --- /dev/null +++ b/src/UCDN/Apis/GetUcdnDomainRequestNumV2Response.php @@ -0,0 +1,54 @@ +get("RequestList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new RequestInfo($item)); + } + return $result; + } + + /** + * RequestList: 请求数实例表。 + * + * @param RequestInfo[] $requestList + */ + public function setRequestList(array $requestList) + { + $result = []; + foreach ($requestList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UCDN/Apis/GetUcdnDomainRequestNumV3Request.php b/src/UCDN/Apis/GetUcdnDomainRequestNumV3Request.php new file mode 100644 index 00000000..cb5a38c8 --- /dev/null +++ b/src/UCDN/Apis/GetUcdnDomainRequestNumV3Request.php @@ -0,0 +1,172 @@ + "GetUcdnDomainRequestNumV3"]); + $this->markRequired("Type"); + $this->markRequired("BeginTime"); + $this->markRequired("EndTime"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Type: 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度, 3=按1分钟) + * + * @return integer|null + */ + public function getType(): int + { + return $this->get("Type"); + } + + /** + * Type: 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度, 3=按1分钟) + * + * @param int $type + */ + public function setType(int $type) + { + $this->set("Type", $type); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp + * + * @return integer|null + */ + public function getBeginTime(): int + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp + * + * @param int $beginTime + */ + public function setBeginTime(int $beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @return string[]|null + */ + public function getDomainId(): array + { + return $this->get("DomainId"); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @param string[] $domainId + */ + public function setDomainId(array $domainId) + { + $this->set("DomainId", $domainId); + } + + /** + * Areacode: 查询区域 cn代表国内 abroad代表海外,只支持国内 + * + * @return string|null + */ + public function getAreacode(): string + { + return $this->get("Areacode"); + } + + /** + * Areacode: 查询区域 cn代表国内 abroad代表海外,只支持国内 + * + * @param string $areacode + */ + public function setAreacode(string $areacode) + { + $this->set("Areacode", $areacode); + } + + /** + * Protocol: 协议,http、https 不传则查所有协议的带宽 + * + * @return string|null + */ + public function getProtocol(): string + { + return $this->get("Protocol"); + } + + /** + * Protocol: 协议,http、https 不传则查所有协议的带宽 + * + * @param string $protocol + */ + public function setProtocol(string $protocol) + { + $this->set("Protocol", $protocol); + } +} diff --git a/src/UCDN/Apis/GetUcdnDomainRequestNumV3Response.php b/src/UCDN/Apis/GetUcdnDomainRequestNumV3Response.php new file mode 100644 index 00000000..06a21286 --- /dev/null +++ b/src/UCDN/Apis/GetUcdnDomainRequestNumV3Response.php @@ -0,0 +1,54 @@ +get("RequestList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new RequestInfoV2($item)); + } + return $result; + } + + /** + * RequestList: 请求数实例表。 + * + * @param RequestInfoV2[] $requestList + */ + public function setRequestList(array $requestList) + { + $result = []; + foreach ($requestList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UCDN/Apis/GetUcdnDomainTrafficRequest.php b/src/UCDN/Apis/GetUcdnDomainTrafficRequest.php new file mode 100644 index 00000000..6dfd134b --- /dev/null +++ b/src/UCDN/Apis/GetUcdnDomainTrafficRequest.php @@ -0,0 +1,149 @@ + "GetUcdnDomainTraffic"]); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * AccountType: 指定按项目查询,还是按整个账户查询 取值 top 表示按整个账户查询,取值org表示按项目查询 + * + * @return string|null + */ + public function getAccountType(): string + { + return $this->get("AccountType"); + } + + /** + * AccountType: 指定按项目查询,还是按整个账户查询 取值 top 表示按整个账户查询,取值org表示按项目查询 + * + * @param string $accountType + */ + public function setAccountType(string $accountType) + { + $this->set("AccountType", $accountType); + } + + /** + * DomainId: 域名ID,创建加速域名时生成,n从自然数0开始。默认全部域名 + * + * @return string[]|null + */ + public function getDomainId(): array + { + return $this->get("DomainId"); + } + + /** + * DomainId: 域名ID,创建加速域名时生成,n从自然数0开始。默认全部域名 + * + * @param string[] $domainId + */ + public function setDomainId(array $domainId) + { + $this->set("DomainId", $domainId); + } + + /** + * Areacode: 查询流量区域 cn代表国内 abroad代表海外,默认全部区域 + * + * @return string|null + */ + public function getAreacode(): string + { + return $this->get("Areacode"); + } + + /** + * Areacode: 查询流量区域 cn代表国内 abroad代表海外,默认全部区域 + * + * @param string $areacode + */ + public function setAreacode(string $areacode) + { + $this->set("Areacode", $areacode); + } + + /** + * BeginTime: 查询的起始日期,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值 + * + * @return integer|null + */ + public function getBeginTime(): int + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 查询的起始日期,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值 + * + * @param int $beginTime + */ + public function setBeginTime(int $beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 查询的结束日期,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天 + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 查询的结束日期,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天 + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } +} diff --git a/src/UCDN/Apis/GetUcdnDomainTrafficResponse.php b/src/UCDN/Apis/GetUcdnDomainTrafficResponse.php new file mode 100644 index 00000000..6321ecf0 --- /dev/null +++ b/src/UCDN/Apis/GetUcdnDomainTrafficResponse.php @@ -0,0 +1,54 @@ +get("TrafficSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UcdnDomainTrafficSet($item)); + } + return $result; + } + + /** + * TrafficSet: 流量实例表,具体结构见 UcdnDomainTrafficSet + * + * @param UcdnDomainTrafficSet[] $trafficSet + */ + public function setTrafficSet(array $trafficSet) + { + $result = []; + foreach ($trafficSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UCDN/Apis/GetUcdnPassBandwidthRequest.php b/src/UCDN/Apis/GetUcdnPassBandwidthRequest.php new file mode 100644 index 00000000..fd257c19 --- /dev/null +++ b/src/UCDN/Apis/GetUcdnPassBandwidthRequest.php @@ -0,0 +1,150 @@ + "GetUcdnPassBandwidth"]); + $this->markRequired("Type"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Type: 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度) + * + * @return integer|null + */ + public function getType(): int + { + return $this->get("Type"); + } + + /** + * Type: 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度) + * + * @param int $type + */ + public function setType(int $type) + { + $this->set("Type", $type); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @return string[]|null + */ + public function getDomainId(): array + { + return $this->get("DomainId"); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @param string[] $domainId + */ + public function setDomainId(array $domainId) + { + $this->set("DomainId", $domainId); + } + + /** + * Areacode: 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + * + * @return string|null + */ + public function getAreacode(): string + { + return $this->get("Areacode"); + } + + /** + * Areacode: 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + * + * @param string $areacode + */ + public function setAreacode(string $areacode) + { + $this->set("Areacode", $areacode); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + * + * @return integer|null + */ + public function getBeginTime(): int + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + * + * @param int $beginTime + */ + public function setBeginTime(int $beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } +} diff --git a/src/UCDN/Apis/GetUcdnPassBandwidthResponse.php b/src/UCDN/Apis/GetUcdnPassBandwidthResponse.php new file mode 100644 index 00000000..e41c7032 --- /dev/null +++ b/src/UCDN/Apis/GetUcdnPassBandwidthResponse.php @@ -0,0 +1,54 @@ +get("BandwidthDetail") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new BandwidthInfoDetail($item)); + } + return $result; + } + + /** + * BandwidthDetail: 回源带宽数据 + * + * @param BandwidthInfoDetail[] $bandwidthDetail + */ + public function setBandwidthDetail(array $bandwidthDetail) + { + $result = []; + foreach ($bandwidthDetail as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UCDN/Apis/GetUcdnPassBandwidthV2Request.php b/src/UCDN/Apis/GetUcdnPassBandwidthV2Request.php new file mode 100644 index 00000000..b40fe17f --- /dev/null +++ b/src/UCDN/Apis/GetUcdnPassBandwidthV2Request.php @@ -0,0 +1,150 @@ + "GetUcdnPassBandwidthV2"]); + $this->markRequired("Type"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Type: 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度,3表示按照1分钟粒度) + * + * @return integer|null + */ + public function getType(): int + { + return $this->get("Type"); + } + + /** + * Type: 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度,3表示按照1分钟粒度) + * + * @param int $type + */ + public function setType(int $type) + { + $this->set("Type", $type); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @return string[]|null + */ + public function getDomainId(): array + { + return $this->get("DomainId"); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @param string[] $domainId + */ + public function setDomainId(array $domainId) + { + $this->set("DomainId", $domainId); + } + + /** + * Areacode: 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + * + * @return string|null + */ + public function getAreacode(): string + { + return $this->get("Areacode"); + } + + /** + * Areacode: 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + * + * @param string $areacode + */ + public function setAreacode(string $areacode) + { + $this->set("Areacode", $areacode); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + * + * @return integer|null + */ + public function getBeginTime(): int + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + * + * @param int $beginTime + */ + public function setBeginTime(int $beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } +} diff --git a/src/UCDN/Apis/GetUcdnPassBandwidthV2Response.php b/src/UCDN/Apis/GetUcdnPassBandwidthV2Response.php new file mode 100644 index 00000000..877d7690 --- /dev/null +++ b/src/UCDN/Apis/GetUcdnPassBandwidthV2Response.php @@ -0,0 +1,54 @@ +get("BandwidthList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new BandwidthInfoDetail($item)); + } + return $result; + } + + /** + * BandwidthList: 回源带宽数据 + * + * @param BandwidthInfoDetail[] $bandwidthList + */ + public function setBandwidthList(array $bandwidthList) + { + $result = []; + foreach ($bandwidthList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UCDN/Apis/GetUcdnProIspBandwidthV2Request.php b/src/UCDN/Apis/GetUcdnProIspBandwidthV2Request.php new file mode 100644 index 00000000..7ee110de --- /dev/null +++ b/src/UCDN/Apis/GetUcdnProIspBandwidthV2Request.php @@ -0,0 +1,172 @@ + "GetUcdnProIspBandwidthV2"]); + $this->markRequired("BeginTime"); + $this->markRequired("EndTime"); + $this->markRequired("Type"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * BeginTime: 查询的起始日期,格式为Unix Timestamp + * + * @return integer|null + */ + public function getBeginTime(): int + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 查询的起始日期,格式为Unix Timestamp + * + * @param int $beginTime + */ + public function setBeginTime(int $beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 查询的结束日期,格式为Unix Timestamp + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 查询的结束日期,格式为Unix Timestamp + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } + + /** + * Type: 时间粒度0 (按5分钟粒度)1 (按小时粒度)2(按天粒度)3(按分钟粒度) + * + * @return integer|null + */ + public function getType(): int + { + return $this->get("Type"); + } + + /** + * Type: 时间粒度0 (按5分钟粒度)1 (按小时粒度)2(按天粒度)3(按分钟粒度) + * + * @param int $type + */ + public function setType(int $type) + { + $this->set("Type", $type); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @return string[]|null + */ + public function getDomainId(): array + { + return $this->get("DomainId"); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @param string[] $domainId + */ + public function setDomainId(array $domainId) + { + $this->set("DomainId", $domainId); + } + + /** + * Province: 省份代码(省份拼音),可以传多个,不传则查询所有省份 + * + * @return string[]|null + */ + public function getProvince(): array + { + return $this->get("Province"); + } + + /** + * Province: 省份代码(省份拼音),可以传多个,不传则查询所有省份 + * + * @param string[] $province + */ + public function setProvince(array $province) + { + $this->set("Province", $province); + } + + /** + * Isp: 运营商代码(运营商拼音),一次只能查询一个运营商,不传递默认取所有运营商 + * + * @return string|null + */ + public function getIsp(): string + { + return $this->get("Isp"); + } + + /** + * Isp: 运营商代码(运营商拼音),一次只能查询一个运营商,不传递默认取所有运营商 + * + * @param string $isp + */ + public function setIsp(string $isp) + { + $this->set("Isp", $isp); + } +} diff --git a/src/UCDN/Apis/GetUcdnProIspBandwidthV2Response.php b/src/UCDN/Apis/GetUcdnProIspBandwidthV2Response.php new file mode 100644 index 00000000..f121db72 --- /dev/null +++ b/src/UCDN/Apis/GetUcdnProIspBandwidthV2Response.php @@ -0,0 +1,55 @@ +get("BandwidthSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ProIspBandwidthSet($item)); + } + return $result; + } + + /** + * BandwidthSet: 按省份的带宽流量实例表。具体参考下面BandwidthSet + * + * @param ProIspBandwidthSet[] $bandwidthSet + */ + public function setBandwidthSet(array $bandwidthSet) + { + $result = []; + foreach ($bandwidthSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UCDN/Apis/GetUcdnProIspRequestNumV2Request.php b/src/UCDN/Apis/GetUcdnProIspRequestNumV2Request.php new file mode 100644 index 00000000..33fd8e5b --- /dev/null +++ b/src/UCDN/Apis/GetUcdnProIspRequestNumV2Request.php @@ -0,0 +1,171 @@ + "GetUcdnProIspRequestNumV2"]); + $this->markRequired("BeginTime"); + $this->markRequired("EndTime"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * BeginTime: 查询的起始日期,格式为Unix Timestamp 忽略时间部分 + * + * @return integer|null + */ + public function getBeginTime(): int + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 查询的起始日期,格式为Unix Timestamp 忽略时间部分 + * + * @param int $beginTime + */ + public function setBeginTime(int $beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 查询的结束日期,格式为Unix Timestamp 忽略时间部分 + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 查询的结束日期,格式为Unix Timestamp 忽略时间部分 + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @return string[]|null + */ + public function getDomainId(): array + { + return $this->get("DomainId"); + } + + /** + * DomainId: 域名id,创建域名时生成的id。默认全部域名 + * + * @param string[] $domainId + */ + public function setDomainId(array $domainId) + { + $this->set("DomainId", $domainId); + } + + /** + * Province: 省份代码,可以传多个,不传则查询所有省份 + * + * @return string[]|null + */ + public function getProvince(): array + { + return $this->get("Province"); + } + + /** + * Province: 省份代码,可以传多个,不传则查询所有省份 + * + * @param string[] $province + */ + public function setProvince(array $province) + { + $this->set("Province", $province); + } + + /** + * Isp: 运营商代码,一次只能查询一个运营商,不传递默认取所有运营商 + * + * @return string|null + */ + public function getIsp(): string + { + return $this->get("Isp"); + } + + /** + * Isp: 运营商代码,一次只能查询一个运营商,不传递默认取所有运营商 + * + * @param string $isp + */ + public function setIsp(string $isp) + { + $this->set("Isp", $isp); + } + + /** + * Type: 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天粒度,3表示按照一分钟粒度) + * + * @return integer|null + */ + public function getType(): int + { + return $this->get("Type"); + } + + /** + * Type: 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天粒度,3表示按照一分钟粒度) + * + * @param int $type + */ + public function setType(int $type) + { + $this->set("Type", $type); + } +} diff --git a/src/UCDN/Apis/GetUcdnProIspRequestNumV2Response.php b/src/UCDN/Apis/GetUcdnProIspRequestNumV2Response.php new file mode 100644 index 00000000..ae529410 --- /dev/null +++ b/src/UCDN/Apis/GetUcdnProIspRequestNumV2Response.php @@ -0,0 +1,55 @@ +get("RequestNumSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ProIspRequestNumSetV2($item)); + } + return $result; + } + + /** + * RequestNumSet: 按省份的请求数实例表。具体参考下面RequestList + * + * @param ProIspRequestNumSetV2[] $requestNumSet + */ + public function setRequestNumSet(array $requestNumSet) + { + $result = []; + foreach ($requestNumSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UCDN/Apis/GetUcdnTrafficRequest.php b/src/UCDN/Apis/GetUcdnTrafficRequest.php new file mode 100644 index 00000000..817282c9 --- /dev/null +++ b/src/UCDN/Apis/GetUcdnTrafficRequest.php @@ -0,0 +1,49 @@ + "GetUcdnTraffic"]); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } +} diff --git a/src/UCDN/Apis/GetUcdnTrafficResponse.php b/src/UCDN/Apis/GetUcdnTrafficResponse.php new file mode 100644 index 00000000..ae359a1f --- /dev/null +++ b/src/UCDN/Apis/GetUcdnTrafficResponse.php @@ -0,0 +1,54 @@ +get("TrafficSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new TrafficSet($item)); + } + return $result; + } + + /** + * TrafficSet: 用户不同区域的流量信息, 具体结构参见TrafficSet部分 + * + * @param TrafficSet[] $trafficSet + */ + public function setTrafficSet(array $trafficSet) + { + $result = []; + foreach ($trafficSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UCDN/Apis/GetUcdnTrafficV2Request.php b/src/UCDN/Apis/GetUcdnTrafficV2Request.php new file mode 100644 index 00000000..6b75f291 --- /dev/null +++ b/src/UCDN/Apis/GetUcdnTrafficV2Request.php @@ -0,0 +1,49 @@ + "GetUcdnTrafficV2"]); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } +} diff --git a/src/UCDN/Apis/GetUcdnTrafficV2Response.php b/src/UCDN/Apis/GetUcdnTrafficV2Response.php new file mode 100644 index 00000000..280117b4 --- /dev/null +++ b/src/UCDN/Apis/GetUcdnTrafficV2Response.php @@ -0,0 +1,54 @@ +get("TrafficSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new TrafficSet($item)); + } + return $result; + } + + /** + * TrafficSet: 用户不同区域的流量信息, 具体结构参见TrafficSet部分 + * + * @param TrafficSet[] $trafficSet + */ + public function setTrafficSet(array $trafficSet) + { + $result = []; + foreach ($trafficSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UCDN/Apis/PrefetchNewUcdnDomainCacheRequest.php b/src/UCDN/Apis/PrefetchNewUcdnDomainCacheRequest.php new file mode 100644 index 00000000..c099a707 --- /dev/null +++ b/src/UCDN/Apis/PrefetchNewUcdnDomainCacheRequest.php @@ -0,0 +1,70 @@ + "PrefetchNewUcdnDomainCache"]); + $this->markRequired("UrlList"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UrlList: 预热URL列表,n从自然数0开始。UrlList.n字段必须以”http://域名/”开始。如刷新文件目录a下面img.png文件, 格式为http://abc.ucloud.cn/a/img.png。请正确提交需要刷新的域名 + * + * @return string[]|null + */ + public function getUrlList(): array + { + return $this->get("UrlList"); + } + + /** + * UrlList: 预热URL列表,n从自然数0开始。UrlList.n字段必须以”http://域名/”开始。如刷新文件目录a下面img.png文件, 格式为http://abc.ucloud.cn/a/img.png。请正确提交需要刷新的域名 + * + * @param string[] $urlList + */ + public function setUrlList(array $urlList) + { + $this->set("UrlList", $urlList); + } +} diff --git a/src/UCDN/Apis/PrefetchNewUcdnDomainCacheResponse.php b/src/UCDN/Apis/PrefetchNewUcdnDomainCacheResponse.php new file mode 100644 index 00000000..1e321e3f --- /dev/null +++ b/src/UCDN/Apis/PrefetchNewUcdnDomainCacheResponse.php @@ -0,0 +1,44 @@ +get("TaskId"); + } + + /** + * TaskId: 本次提交url对应的任务id + * + * @param string $taskId + */ + public function setTaskId(string $taskId) + { + $this->set("TaskId", $taskId); + } +} diff --git a/src/UCDN/Apis/QueryIpLocationRequest.php b/src/UCDN/Apis/QueryIpLocationRequest.php new file mode 100644 index 00000000..ba255088 --- /dev/null +++ b/src/UCDN/Apis/QueryIpLocationRequest.php @@ -0,0 +1,50 @@ + "QueryIpLocation"]); + $this->markRequired("Ip"); + } + + + + /** + * Ip: ip列表 + * + * @return string[]|null + */ + public function getIp(): array + { + return $this->get("Ip"); + } + + /** + * Ip: ip列表 + * + * @param string[] $ip + */ + public function setIp(array $ip) + { + $this->set("Ip", $ip); + } +} diff --git a/src/UCDN/Apis/QueryIpLocationResponse.php b/src/UCDN/Apis/QueryIpLocationResponse.php new file mode 100644 index 00000000..8c2c91c0 --- /dev/null +++ b/src/UCDN/Apis/QueryIpLocationResponse.php @@ -0,0 +1,54 @@ +get("Data") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new IpLocationInfo($item)); + } + return $result; + } + + /** + * Data: IP信息列表 + * + * @param IpLocationInfo[] $data + */ + public function setData(array $data) + { + $result = []; + foreach ($data as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UCDN/Apis/RefreshNewUcdnDomainCacheRequest.php b/src/UCDN/Apis/RefreshNewUcdnDomainCacheRequest.php new file mode 100644 index 00000000..06cc43c1 --- /dev/null +++ b/src/UCDN/Apis/RefreshNewUcdnDomainCacheRequest.php @@ -0,0 +1,91 @@ + "RefreshNewUcdnDomainCache"]); + $this->markRequired("Type"); + $this->markRequired("UrlList"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Type: 刷新类型,file代表文件刷新,dir 代表路径刷新 + * + * @return string|null + */ + public function getType(): string + { + return $this->get("Type"); + } + + /** + * Type: 刷新类型,file代表文件刷新,dir 代表路径刷新 + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } + + /** + * UrlList: 需要刷新的URL,n 从自然数0开始,刷新多个URL列表时,一次最多提交30个。必须以”http://域名/”开始。目录要以”/”结尾, 如刷新目录a下所有文件,格式为:http://abc.ucloud.cn/a/;如刷新文件目录a下面img.png文件, 格式为http://abc.ucloud.cn/a/img.png。请正确提交需要刷新的域名 + * + * @return string[]|null + */ + public function getUrlList(): array + { + return $this->get("UrlList"); + } + + /** + * UrlList: 需要刷新的URL,n 从自然数0开始,刷新多个URL列表时,一次最多提交30个。必须以”http://域名/”开始。目录要以”/”结尾, 如刷新目录a下所有文件,格式为:http://abc.ucloud.cn/a/;如刷新文件目录a下面img.png文件, 格式为http://abc.ucloud.cn/a/img.png。请正确提交需要刷新的域名 + * + * @param string[] $urlList + */ + public function setUrlList(array $urlList) + { + $this->set("UrlList", $urlList); + } +} diff --git a/src/UCDN/Apis/RefreshNewUcdnDomainCacheResponse.php b/src/UCDN/Apis/RefreshNewUcdnDomainCacheResponse.php new file mode 100644 index 00000000..dac66fcd --- /dev/null +++ b/src/UCDN/Apis/RefreshNewUcdnDomainCacheResponse.php @@ -0,0 +1,44 @@ +get("TaskId"); + } + + /** + * TaskId: 本次提交url对应的任务id + * + * @param string $taskId + */ + public function setTaskId(string $taskId) + { + $this->set("TaskId", $taskId); + } +} diff --git a/src/UCDN/Apis/SwitchUcdnChargeTypeRequest.php b/src/UCDN/Apis/SwitchUcdnChargeTypeRequest.php new file mode 100644 index 00000000..ead40c27 --- /dev/null +++ b/src/UCDN/Apis/SwitchUcdnChargeTypeRequest.php @@ -0,0 +1,70 @@ + "SwitchUcdnChargeType"]); + $this->markRequired("ChargeType"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ChargeType: 计费方式。traffic代表按流量包计费,bandwidth按带宽付费 + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费方式。traffic代表按流量包计费,bandwidth按带宽付费 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } +} diff --git a/src/UCDN/Apis/SwitchUcdnChargeTypeResponse.php b/src/UCDN/Apis/SwitchUcdnChargeTypeResponse.php new file mode 100644 index 00000000..f2ca4d6f --- /dev/null +++ b/src/UCDN/Apis/SwitchUcdnChargeTypeResponse.php @@ -0,0 +1,26 @@ +get("IpBlackList"); + } + + /** + * IpBlackList: ip黑名单,多个ip,可表示为:IpBlackList.0=1.1.1.1,IpBlackList.1=2.2.2.2 + * + * @param string[] $ipBlackList + */ + public function setIpBlackList(array $ipBlackList) + { + $this->set("IpBlackList", $ipBlackList); + } + + /** + * ReferConf: refer配置 + * + * @return ReferConf|null + */ + public function getReferConf(): ReferConf + { + return new ReferConf($this->get("ReferConf")); + } + + /** + * ReferConf: refer配置 + * + * @param ReferConf $referConf + */ + public function setReferConf(ReferConf $referConf) + { + $this->set("ReferConf", $referConf->getAll()); + } +} diff --git a/src/UCDN/Models/AdvancedConf.php b/src/UCDN/Models/AdvancedConf.php new file mode 100644 index 00000000..35137708 --- /dev/null +++ b/src/UCDN/Models/AdvancedConf.php @@ -0,0 +1,84 @@ +get("HttpClientHeader"); + } + + /** + * HttpClientHeader: 客户端响应http头列表 + * + * @param string[] $httpClientHeader + */ + public function setHttpClientHeader(array $httpClientHeader) + { + $this->set("HttpClientHeader", $httpClientHeader); + } + + /** + * HttpOriginHeader: 源站http头列表 + * + * @return string[]|null + */ + public function getHttpOriginHeader(): array + { + return $this->get("HttpOriginHeader"); + } + + /** + * HttpOriginHeader: 源站http头列表 + * + * @param string[] $httpOriginHeader + */ + public function setHttpOriginHeader(array $httpOriginHeader) + { + $this->set("HttpOriginHeader", $httpOriginHeader); + } + + /** + * Http2Https: http转https回源 true是,false否 + * + * @return boolean|null + */ + public function getHttp2Https(): bool + { + return $this->get("Http2Https"); + } + + /** + * Http2Https: http转https回源 true是,false否 + * + * @param boolean $http2Https + */ + public function setHttp2Https(bool $http2Https) + { + $this->set("Http2Https", $http2Https); + } +} diff --git a/src/UCDN/Models/BandwidthInfo.php b/src/UCDN/Models/BandwidthInfo.php new file mode 100644 index 00000000..ec472f4a --- /dev/null +++ b/src/UCDN/Models/BandwidthInfo.php @@ -0,0 +1,64 @@ +get("Time"); + } + + /** + * Time: 带宽获取的时间点。格式:时间戳 + * + * @param int $time + */ + public function setTime(int $time) + { + $this->set("Time", $time); + } + + /** + * CdnBandwidth: 返回值返回指定时间区间内CDN的带宽峰值,单位Mbps(如果请求参数Type为0,则Value是五分钟粒度的带宽值,如果Type为1,则Value是1小时的带宽峰值,如果Type为2,则Value是一天内的带宽峰值) + * + * @return float|null + */ + public function getCdnBandwidth(): float + { + return $this->get("CdnBandwidth"); + } + + /** + * CdnBandwidth: 返回值返回指定时间区间内CDN的带宽峰值,单位Mbps(如果请求参数Type为0,则Value是五分钟粒度的带宽值,如果Type为1,则Value是1小时的带宽峰值,如果Type为2,则Value是一天内的带宽峰值) + * + * @param float $cdnBandwidth + */ + public function setCdnBandwidth(float $cdnBandwidth) + { + $this->set("CdnBandwidth", $cdnBandwidth); + } +} diff --git a/src/UCDN/Models/BandwidthInfoDetail.php b/src/UCDN/Models/BandwidthInfoDetail.php new file mode 100644 index 00000000..2e30c123 --- /dev/null +++ b/src/UCDN/Models/BandwidthInfoDetail.php @@ -0,0 +1,64 @@ +get("Time"); + } + + /** + * Time: 宽获取的时间点。格式:时间戳 + * + * @param int $time + */ + public function setTime(int $time) + { + $this->set("Time", $time); + } + + /** + * Bandwidth: 返回值带宽值数据。 + * + * @return float|null + */ + public function getBandwidth(): float + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: 返回值带宽值数据。 + * + * @param float $bandwidth + */ + public function setBandwidth(float $bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } +} diff --git a/src/UCDN/Models/BandwidthTrafficInfo.php b/src/UCDN/Models/BandwidthTrafficInfo.php new file mode 100644 index 00000000..56213257 --- /dev/null +++ b/src/UCDN/Models/BandwidthTrafficInfo.php @@ -0,0 +1,84 @@ +get("Time"); + } + + /** + * Time: 带宽获取的时间点。格式:时间戳 + * + * @param int $time + */ + public function setTime(int $time) + { + $this->set("Time", $time); + } + + /** + * CdnBandwidth: 返回值返回指定时间区间内CDN的带宽峰值,单位Mbps(如果请求参数Type为0,则Value是五分钟粒度的带宽值,如果Type为1,则Value是1小时的带宽峰值,如果Type为2,则Value是一天内的带宽峰值) + * + * @return float|null + */ + public function getCdnBandwidth(): float + { + return $this->get("CdnBandwidth"); + } + + /** + * CdnBandwidth: 返回值返回指定时间区间内CDN的带宽峰值,单位Mbps(如果请求参数Type为0,则Value是五分钟粒度的带宽值,如果Type为1,则Value是1小时的带宽峰值,如果Type为2,则Value是一天内的带宽峰值) + * + * @param float $cdnBandwidth + */ + public function setCdnBandwidth(float $cdnBandwidth) + { + $this->set("CdnBandwidth", $cdnBandwidth); + } + + /** + * Traffic: 对应时间粒度的流量,单位字节 + * + * @return float|null + */ + public function getTraffic(): float + { + return $this->get("Traffic"); + } + + /** + * Traffic: 对应时间粒度的流量,单位字节 + * + * @param float $traffic + */ + public function setTraffic(float $traffic) + { + $this->set("Traffic", $traffic); + } +} diff --git a/src/UCDN/Models/CacheAllConfig.php b/src/UCDN/Models/CacheAllConfig.php new file mode 100644 index 00000000..d179ff95 --- /dev/null +++ b/src/UCDN/Models/CacheAllConfig.php @@ -0,0 +1,131 @@ +get("CacheHost"); + } + + /** + * CacheHost: 缓存Host,不同的域名可以配置为同一个CacheHost来实现缓存共享,默认为加速域名 + * + * @param string $cacheHost + */ + public function setCacheHost(string $cacheHost) + { + $this->set("CacheHost", $cacheHost); + } + + /** + * CacheList: 缓存配置列表,参见CacheConf + * + * @return CacheConf[]|null + */ + public function getCacheList(): array + { + $items = $this->get("CacheList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CacheConf($item)); + } + return $result; + } + + /** + * CacheList: 缓存配置列表,参见CacheConf + * + * @param CacheConf[] $cacheList + */ + public function setCacheList(array $cacheList) + { + $result = []; + foreach ($cacheList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * HttpCodeCacheList: 状态码缓存配置列表,参见CacheConf + * + * @return CacheConf[]|null + */ + public function getHttpCodeCacheList(): array + { + $items = $this->get("HttpCodeCacheList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CacheConf($item)); + } + return $result; + } + + /** + * HttpCodeCacheList: 状态码缓存配置列表,参见CacheConf + * + * @param CacheConf[] $httpCodeCacheList + */ + public function setHttpCodeCacheList(array $httpCodeCacheList) + { + $result = []; + foreach ($httpCodeCacheList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * CacheKeyList: 忽略参数缓存配置列表,参见CacheKeyInfo + * + * @return CacheKeyInfo[]|null + */ + public function getCacheKeyList(): array + { + $items = $this->get("CacheKeyList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CacheKeyInfo($item)); + } + return $result; + } + + /** + * CacheKeyList: 忽略参数缓存配置列表,参见CacheKeyInfo + * + * @param CacheKeyInfo[] $cacheKeyList + */ + public function setCacheKeyList(array $cacheKeyList) + { + $result = []; + foreach ($cacheKeyList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UCDN/Models/CacheConf.php b/src/UCDN/Models/CacheConf.php new file mode 100644 index 00000000..6c5026ce --- /dev/null +++ b/src/UCDN/Models/CacheConf.php @@ -0,0 +1,164 @@ +get("PathPattern"); + } + + /** + * PathPattern: 路径模式,支持正则 + * + * @param string $pathPattern + */ + public function setPathPattern(string $pathPattern) + { + $this->set("PathPattern", $pathPattern); + } + + /** + * CacheTTL: 缓存时间 + * + * @return integer|null + */ + public function getCacheTTL(): int + { + return $this->get("CacheTTL"); + } + + /** + * CacheTTL: 缓存时间 + * + * @param int $cacheTTL + */ + public function setCacheTTL(int $cacheTTL) + { + $this->set("CacheTTL", $cacheTTL); + } + + /** + * CacheUnit: 缓存时间的单位。sec(秒),min(分钟),hour(小时),day(天)。上限1年。 + * + * @return string|null + */ + public function getCacheUnit(): string + { + return $this->get("CacheUnit"); + } + + /** + * CacheUnit: 缓存时间的单位。sec(秒),min(分钟),hour(小时),day(天)。上限1年。 + * + * @param string $cacheUnit + */ + public function setCacheUnit(string $cacheUnit) + { + $this->set("CacheUnit", $cacheUnit); + } + + /** + * CacheBehavior: 是否缓存,true为缓存,flase为不缓存。为flase的情况下,CacheTTL和CacheUnit强制不生效 + * + * @return boolean|null + */ + public function getCacheBehavior(): bool + { + return $this->get("CacheBehavior"); + } + + /** + * CacheBehavior: 是否缓存,true为缓存,flase为不缓存。为flase的情况下,CacheTTL和CacheUnit强制不生效 + * + * @param boolean $cacheBehavior + */ + public function setCacheBehavior(bool $cacheBehavior) + { + $this->set("CacheBehavior", $cacheBehavior); + } + + /** + * HttpCodePattern: 状态码模式,非200,206状态码,多个状态码用竖线(|)分隔,该属性仅仅在状态码缓存配置列表中返回 + * + * @return string|null + */ + public function getHttpCodePattern(): string + { + return $this->get("HttpCodePattern"); + } + + /** + * HttpCodePattern: 状态码模式,非200,206状态码,多个状态码用竖线(|)分隔,该属性仅仅在状态码缓存配置列表中返回 + * + * @param string $httpCodePattern + */ + public function setHttpCodePattern(string $httpCodePattern) + { + $this->set("HttpCodePattern", $httpCodePattern); + } + + /** + * Description: 缓存规则描述 + * + * @return string|null + */ + public function getDescription(): string + { + return $this->get("Description"); + } + + /** + * Description: 缓存规则描述 + * + * @param string $description + */ + public function setDescription(string $description) + { + $this->set("Description", $description); + } + + /** + * FollowOriginRule: 是否优先遵循源站头部缓存策略,false为不优先遵循源站,true为优先遵循源站缓存头部。默认为0 + * + * @return boolean|null + */ + public function getFollowOriginRule(): bool + { + return $this->get("FollowOriginRule"); + } + + /** + * FollowOriginRule: 是否优先遵循源站头部缓存策略,false为不优先遵循源站,true为优先遵循源站缓存头部。默认为0 + * + * @param boolean $followOriginRule + */ + public function setFollowOriginRule(bool $followOriginRule) + { + $this->set("FollowOriginRule", $followOriginRule); + } +} diff --git a/src/UCDN/Models/CacheKeyInfo.php b/src/UCDN/Models/CacheKeyInfo.php new file mode 100644 index 00000000..121250ef --- /dev/null +++ b/src/UCDN/Models/CacheKeyInfo.php @@ -0,0 +1,84 @@ +get("Ignore"); + } + + /** + * Ignore: 是否忽略 + * + * @param boolean $ignore + */ + public function setIgnore(bool $ignore) + { + $this->set("Ignore", $ignore); + } + + /** + * PathPattern: 路径模式,支持正则 + * + * @return string|null + */ + public function getPathPattern(): string + { + return $this->get("PathPattern"); + } + + /** + * PathPattern: 路径模式,支持正则 + * + * @param string $pathPattern + */ + public function setPathPattern(string $pathPattern) + { + $this->set("PathPattern", $pathPattern); + } + + /** + * QueryString: 自定义变量,以$符号开头,多个变量用加号(+)连接,$querystring表示所有变量 + * + * @return string|null + */ + public function getQueryString(): string + { + return $this->get("QueryString"); + } + + /** + * QueryString: 自定义变量,以$符号开头,多个变量用加号(+)连接,$querystring表示所有变量 + * + * @param string $queryString + */ + public function setQueryString(string $queryString) + { + $this->set("QueryString", $queryString); + } +} diff --git a/src/UCDN/Models/DomainBaseInfo.php b/src/UCDN/Models/DomainBaseInfo.php new file mode 100644 index 00000000..52864554 --- /dev/null +++ b/src/UCDN/Models/DomainBaseInfo.php @@ -0,0 +1,64 @@ +get("Domain"); + } + + /** + * Domain: 域名 + * + * @param string $domain + */ + public function setDomain(string $domain) + { + $this->set("Domain", $domain); + } + + /** + * DomainId: 域名的资源id + * + * @return string|null + */ + public function getDomainId(): string + { + return $this->get("DomainId"); + } + + /** + * DomainId: 域名的资源id + * + * @param string $domainId + */ + public function setDomainId(string $domainId) + { + $this->set("DomainId", $domainId); + } +} diff --git a/src/UCDN/Models/DomainConfigInfo.php b/src/UCDN/Models/DomainConfigInfo.php new file mode 100644 index 00000000..f14f5b23 --- /dev/null +++ b/src/UCDN/Models/DomainConfigInfo.php @@ -0,0 +1,364 @@ +get("AreaCode"); + } + + /** + * AreaCode: 查询带宽区域 cn代表国内 abroad代表海外 all表示全部区域 + * + * @param string $areaCode + */ + public function setAreaCode(string $areaCode) + { + $this->set("AreaCode", $areaCode); + } + + /** + * CdnType: 加速域名的业务类型,web代表网站,stream代表视频 ,download 代表下载 + * + * @return string|null + */ + public function getCdnType(): string + { + return $this->get("CdnType"); + } + + /** + * CdnType: 加速域名的业务类型,web代表网站,stream代表视频 ,download 代表下载 + * + * @param string $cdnType + */ + public function setCdnType(string $cdnType) + { + $this->set("CdnType", $cdnType); + } + + /** + * Status: 创建的加速域名的当前的状态。check代表审核中,checkSuccess代表审核通过,checkFail代表审核失败,enable代表加速中,disable代表停止加速,delete代表删除加速enableing代表正在开启加速,disableing代表正在停止加速中,deleteing代表删除中 + * + * @return string|null + */ + public function getStatus(): string + { + return $this->get("Status"); + } + + /** + * Status: 创建的加速域名的当前的状态。check代表审核中,checkSuccess代表审核通过,checkFail代表审核失败,enable代表加速中,disable代表停止加速,delete代表删除加速enableing代表正在开启加速,disableing代表正在停止加速中,deleteing代表删除中 + * + * @param string $status + */ + public function setStatus(string $status) + { + $this->set("Status", $status); + } + + /** + * Cname: cdn域名。创建加速域名生成的cdn域名,用于设置CNAME记录 + * + * @return string|null + */ + public function getCname(): string + { + return $this->get("Cname"); + } + + /** + * Cname: cdn域名。创建加速域名生成的cdn域名,用于设置CNAME记录 + * + * @param string $cname + */ + public function setCname(string $cname) + { + $this->set("Cname", $cname); + } + + /** + * CreateTime: 域名创建的时间。格式:时间戳 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 域名创建的时间。格式:时间戳 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * TestUrl: 测试url。用于域名创建加速时的测试 + * + * @return string|null + */ + public function getTestUrl(): string + { + return $this->get("TestUrl"); + } + + /** + * TestUrl: 测试url。用于域名创建加速时的测试 + * + * @param string $testUrl + */ + public function setTestUrl(string $testUrl) + { + $this->set("TestUrl", $testUrl); + } + + /** + * HttpsStatusCn: 国内https状态 enableing-开启中 fail-开启失败 enable-启用 disable-未启用 + * + * @return string|null + */ + public function getHttpsStatusCn(): string + { + return $this->get("HttpsStatusCn"); + } + + /** + * HttpsStatusCn: 国内https状态 enableing-开启中 fail-开启失败 enable-启用 disable-未启用 + * + * @param string $httpsStatusCn + */ + public function setHttpsStatusCn(string $httpsStatusCn) + { + $this->set("HttpsStatusCn", $httpsStatusCn); + } + + /** + * HttpsStatusAbroad: 国外https状态 enableing-开启中 fail-开启失败 enable-启用 disable-未启用 + * + * @return string|null + */ + public function getHttpsStatusAbroad(): string + { + return $this->get("HttpsStatusAbroad"); + } + + /** + * HttpsStatusAbroad: 国外https状态 enableing-开启中 fail-开启失败 enable-启用 disable-未启用 + * + * @param string $httpsStatusAbroad + */ + public function setHttpsStatusAbroad(string $httpsStatusAbroad) + { + $this->set("HttpsStatusAbroad", $httpsStatusAbroad); + } + + /** + * CertNameCn: 国内证书名称 + * + * @return string|null + */ + public function getCertNameCn(): string + { + return $this->get("CertNameCn"); + } + + /** + * CertNameCn: 国内证书名称 + * + * @param string $certNameCn + */ + public function setCertNameCn(string $certNameCn) + { + $this->set("CertNameCn", $certNameCn); + } + + /** + * CertNameAbroad: 国外证书名称 + * + * @return string|null + */ + public function getCertNameAbroad(): string + { + return $this->get("CertNameAbroad"); + } + + /** + * CertNameAbroad: 国外证书名称 + * + * @param string $certNameAbroad + */ + public function setCertNameAbroad(string $certNameAbroad) + { + $this->set("CertNameAbroad", $certNameAbroad); + } + + /** + * Tag: 业务组:Default + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组:Default + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * DomainId: 域名Id + * + * @return string|null + */ + public function getDomainId(): string + { + return $this->get("DomainId"); + } + + /** + * DomainId: 域名Id + * + * @param string $domainId + */ + public function setDomainId(string $domainId) + { + $this->set("DomainId", $domainId); + } + + /** + * Domain: 域名 + * + * @return string|null + */ + public function getDomain(): string + { + return $this->get("Domain"); + } + + /** + * Domain: 域名 + * + * @param string $domain + */ + public function setDomain(string $domain) + { + $this->set("Domain", $domain); + } + + /** + * OriginConf: 源站配置 参考OriginConf + * + * @return OriginConf|null + */ + public function getOriginConf(): OriginConf + { + return new OriginConf($this->get("OriginConf")); + } + + /** + * OriginConf: 源站配置 参考OriginConf + * + * @param OriginConf $originConf + */ + public function setOriginConf(OriginConf $originConf) + { + $this->set("OriginConf", $originConf->getAll()); + } + + /** + * AccessControlConf: 访问控制配置 参考AccessControlConf + * + * @return AccessControlConf|null + */ + public function getAccessControlConf(): AccessControlConf + { + return new AccessControlConf($this->get("AccessControlConf")); + } + + /** + * AccessControlConf: 访问控制配置 参考AccessControlConf + * + * @param AccessControlConf $accessControlConf + */ + public function setAccessControlConf(AccessControlConf $accessControlConf) + { + $this->set("AccessControlConf", $accessControlConf->getAll()); + } + + /** + * CacheConf: 缓存配置 参考CacheAllConfig + * + * @return CacheAllConfig|null + */ + public function getCacheConf(): CacheAllConfig + { + return new CacheAllConfig($this->get("CacheConf")); + } + + /** + * CacheConf: 缓存配置 参考CacheAllConfig + * + * @param CacheAllConfig $cacheConf + */ + public function setCacheConf(CacheAllConfig $cacheConf) + { + $this->set("CacheConf", $cacheConf->getAll()); + } + + /** + * AdvancedConf: 高级配置 参考AdvancedConf + * + * @return AdvancedConf|null + */ + public function getAdvancedConf(): AdvancedConf + { + return new AdvancedConf($this->get("AdvancedConf")); + } + + /** + * AdvancedConf: 高级配置 参考AdvancedConf + * + * @param AdvancedConf $advancedConf + */ + public function setAdvancedConf(AdvancedConf $advancedConf) + { + $this->set("AdvancedConf", $advancedConf->getAll()); + } +} diff --git a/src/UCDN/Models/HitRateInfo.php b/src/UCDN/Models/HitRateInfo.php new file mode 100644 index 00000000..750aa0f5 --- /dev/null +++ b/src/UCDN/Models/HitRateInfo.php @@ -0,0 +1,84 @@ +get("Time"); + } + + /** + * Time: 带宽获取的时间点。格式:时间戳 + * + * @param int $time + */ + public function setTime(int $time) + { + $this->set("Time", $time); + } + + /** + * FlowHitRate: 总流量命中率,单位% + * + * @return float|null + */ + public function getFlowHitRate(): float + { + return $this->get("FlowHitRate"); + } + + /** + * FlowHitRate: 总流量命中率,单位% + * + * @param float $flowHitRate + */ + public function setFlowHitRate(float $flowHitRate) + { + $this->set("FlowHitRate", $flowHitRate); + } + + /** + * RequestHitRate: 请求数命中率,单位% + * + * @return float|null + */ + public function getRequestHitRate(): float + { + return $this->get("RequestHitRate"); + } + + /** + * RequestHitRate: 请求数命中率,单位% + * + * @param float $requestHitRate + */ + public function setRequestHitRate(float $requestHitRate) + { + $this->set("RequestHitRate", $requestHitRate); + } +} diff --git a/src/UCDN/Models/HitRateInfoV2.php b/src/UCDN/Models/HitRateInfoV2.php new file mode 100644 index 00000000..d44af3ae --- /dev/null +++ b/src/UCDN/Models/HitRateInfoV2.php @@ -0,0 +1,84 @@ +get("Time"); + } + + /** + * Time: 带宽获取的时间点。格式:时间戳 + * + * @param int $time + */ + public function setTime(int $time) + { + $this->set("Time", $time); + } + + /** + * FlowHitRate: 总流量命中率,单位% + * + * @return float|null + */ + public function getFlowHitRate(): float + { + return $this->get("FlowHitRate"); + } + + /** + * FlowHitRate: 总流量命中率,单位% + * + * @param float $flowHitRate + */ + public function setFlowHitRate(float $flowHitRate) + { + $this->set("FlowHitRate", $flowHitRate); + } + + /** + * RequestHitRate: 请求数命中率,单位% + * + * @return float|null + */ + public function getRequestHitRate(): float + { + return $this->get("RequestHitRate"); + } + + /** + * RequestHitRate: 请求数命中率,单位% + * + * @param float $requestHitRate + */ + public function setRequestHitRate(float $requestHitRate) + { + $this->set("RequestHitRate", $requestHitRate); + } +} diff --git a/src/UCDN/Models/HttpCodeInfo.php b/src/UCDN/Models/HttpCodeInfo.php new file mode 100644 index 00000000..dbaba7d5 --- /dev/null +++ b/src/UCDN/Models/HttpCodeInfo.php @@ -0,0 +1,144 @@ +get("Time"); + } + + /** + * Time: 带宽获取的时间点。格式:时间戳 + * + * @param int $time + */ + public function setTime(int $time) + { + $this->set("Time", $time); + } + + /** + * HttpOneXX: 1xx数量 + * + * @return integer|null + */ + public function getHttpOneXX(): int + { + return $this->get("HttpOneXX"); + } + + /** + * HttpOneXX: 1xx数量 + * + * @param int $httpOneXX + */ + public function setHttpOneXX(int $httpOneXX) + { + $this->set("HttpOneXX", $httpOneXX); + } + + /** + * HttpTwoXX: 2xx数量 + * + * @return integer|null + */ + public function getHttpTwoXX(): int + { + return $this->get("HttpTwoXX"); + } + + /** + * HttpTwoXX: 2xx数量 + * + * @param int $httpTwoXX + */ + public function setHttpTwoXX(int $httpTwoXX) + { + $this->set("HttpTwoXX", $httpTwoXX); + } + + /** + * HttpThreeXX: 3xx数量 + * + * @return integer|null + */ + public function getHttpThreeXX(): int + { + return $this->get("HttpThreeXX"); + } + + /** + * HttpThreeXX: 3xx数量 + * + * @param int $httpThreeXX + */ + public function setHttpThreeXX(int $httpThreeXX) + { + $this->set("HttpThreeXX", $httpThreeXX); + } + + /** + * HttpFourXX: 4xx数量 + * + * @return integer|null + */ + public function getHttpFourXX(): int + { + return $this->get("HttpFourXX"); + } + + /** + * HttpFourXX: 4xx数量 + * + * @param int $httpFourXX + */ + public function setHttpFourXX(int $httpFourXX) + { + $this->set("HttpFourXX", $httpFourXX); + } + + /** + * HttpFiveXX: 5xx数量 + * + * @return integer|null + */ + public function getHttpFiveXX(): int + { + return $this->get("HttpFiveXX"); + } + + /** + * HttpFiveXX: 5xx数量 + * + * @param int $httpFiveXX + */ + public function setHttpFiveXX(int $httpFiveXX) + { + $this->set("HttpFiveXX", $httpFiveXX); + } +} diff --git a/src/UCDN/Models/HttpCodeInfoV2.php b/src/UCDN/Models/HttpCodeInfoV2.php new file mode 100644 index 00000000..e897e20e --- /dev/null +++ b/src/UCDN/Models/HttpCodeInfoV2.php @@ -0,0 +1,164 @@ +get("Time"); + } + + /** + * Time: 带宽获取的时间点。格式:时间戳 + * + * @param int $time + */ + public function setTime(int $time) + { + $this->set("Time", $time); + } + + /** + * Http1XX: 1xx信息,参考HttpCodeV2Detail结构 + * + * @return HttpCodeV2Detail|null + */ + public function getHttp1XX(): HttpCodeV2Detail + { + return new HttpCodeV2Detail($this->get("Http1XX")); + } + + /** + * Http1XX: 1xx信息,参考HttpCodeV2Detail结构 + * + * @param HttpCodeV2Detail $http1XX + */ + public function setHttp1XX(HttpCodeV2Detail $http1XX) + { + $this->set("Http1XX", $http1XX->getAll()); + } + + /** + * Http2XX: 2xx信息,参考HttpCodeV2Detail结构 + * + * @return HttpCodeV2Detail|null + */ + public function getHttp2XX(): HttpCodeV2Detail + { + return new HttpCodeV2Detail($this->get("Http2XX")); + } + + /** + * Http2XX: 2xx信息,参考HttpCodeV2Detail结构 + * + * @param HttpCodeV2Detail $http2XX + */ + public function setHttp2XX(HttpCodeV2Detail $http2XX) + { + $this->set("Http2XX", $http2XX->getAll()); + } + + /** + * Http3XX: 3xx信息,参考HttpCodeV2Detail结构 + * + * @return HttpCodeV2Detail|null + */ + public function getHttp3XX(): HttpCodeV2Detail + { + return new HttpCodeV2Detail($this->get("Http3XX")); + } + + /** + * Http3XX: 3xx信息,参考HttpCodeV2Detail结构 + * + * @param HttpCodeV2Detail $http3XX + */ + public function setHttp3XX(HttpCodeV2Detail $http3XX) + { + $this->set("Http3XX", $http3XX->getAll()); + } + + /** + * Http4XX: 4xx信息,参考HttpCodeV2Detail结构 + * + * @return HttpCodeV2Detail|null + */ + public function getHttp4XX(): HttpCodeV2Detail + { + return new HttpCodeV2Detail($this->get("Http4XX")); + } + + /** + * Http4XX: 4xx信息,参考HttpCodeV2Detail结构 + * + * @param HttpCodeV2Detail $http4XX + */ + public function setHttp4XX(HttpCodeV2Detail $http4XX) + { + $this->set("Http4XX", $http4XX->getAll()); + } + + /** + * Http5XX: 5xx信息,参考HttpCodeV2Detail结构 + * + * @return HttpCodeV2Detail|null + */ + public function getHttp5XX(): HttpCodeV2Detail + { + return new HttpCodeV2Detail($this->get("Http5XX")); + } + + /** + * Http5XX: 5xx信息,参考HttpCodeV2Detail结构 + * + * @param HttpCodeV2Detail $http5XX + */ + public function setHttp5XX(HttpCodeV2Detail $http5XX) + { + $this->set("Http5XX", $http5XX->getAll()); + } + + /** + * Http6XX: 6xx信息,参考HttpCodeV2Detail结构 + * + * @return HttpCodeV2Detail|null + */ + public function getHttp6XX(): HttpCodeV2Detail + { + return new HttpCodeV2Detail($this->get("Http6XX")); + } + + /** + * Http6XX: 6xx信息,参考HttpCodeV2Detail结构 + * + * @param HttpCodeV2Detail $http6XX + */ + public function setHttp6XX(HttpCodeV2Detail $http6XX) + { + $this->set("Http6XX", $http6XX->getAll()); + } +} diff --git a/src/UCDN/Models/HttpCodeV2Detail.php b/src/UCDN/Models/HttpCodeV2Detail.php new file mode 100644 index 00000000..e65cb706 --- /dev/null +++ b/src/UCDN/Models/HttpCodeV2Detail.php @@ -0,0 +1,1184 @@ +get("Time"); + } + + /** + * Time: 时间 + * + * @param int $time + */ + public function setTime(int $time) + { + $this->set("Time", $time); + } + + /** + * Total: 当前分组的总状态码数 + * + * @return integer|null + */ + public function getTotal(): int + { + return $this->get("Total"); + } + + /** + * Total: 当前分组的总状态码数 + * + * @param int $total + */ + public function setTotal(int $total) + { + $this->set("Total", $total); + } + + /** + * Http100: http100数量 + * + * @return integer|null + */ + public function getHttp100(): int + { + return $this->get("Http100"); + } + + /** + * Http100: http100数量 + * + * @param int $http100 + */ + public function setHttp100(int $http100) + { + $this->set("Http100", $http100); + } + + /** + * Http101: http101数量 + * + * @return integer|null + */ + public function getHttp101(): int + { + return $this->get("Http101"); + } + + /** + * Http101: http101数量 + * + * @param int $http101 + */ + public function setHttp101(int $http101) + { + $this->set("Http101", $http101); + } + + /** + * Http102: http102数量 + * + * @return integer|null + */ + public function getHttp102(): int + { + return $this->get("Http102"); + } + + /** + * Http102: http102数量 + * + * @param int $http102 + */ + public function setHttp102(int $http102) + { + $this->set("Http102", $http102); + } + + /** + * Http200: http200数量 + * + * @return integer|null + */ + public function getHttp200(): int + { + return $this->get("Http200"); + } + + /** + * Http200: http200数量 + * + * @param int $http200 + */ + public function setHttp200(int $http200) + { + $this->set("Http200", $http200); + } + + /** + * Http201: http201数量 + * + * @return integer|null + */ + public function getHttp201(): int + { + return $this->get("Http201"); + } + + /** + * Http201: http201数量 + * + * @param int $http201 + */ + public function setHttp201(int $http201) + { + $this->set("Http201", $http201); + } + + /** + * Http202: http202数量 + * + * @return integer|null + */ + public function getHttp202(): int + { + return $this->get("Http202"); + } + + /** + * Http202: http202数量 + * + * @param int $http202 + */ + public function setHttp202(int $http202) + { + $this->set("Http202", $http202); + } + + /** + * Http203: http203数量 + * + * @return integer|null + */ + public function getHttp203(): int + { + return $this->get("Http203"); + } + + /** + * Http203: http203数量 + * + * @param int $http203 + */ + public function setHttp203(int $http203) + { + $this->set("Http203", $http203); + } + + /** + * Http204: http204数量 + * + * @return integer|null + */ + public function getHttp204(): int + { + return $this->get("Http204"); + } + + /** + * Http204: http204数量 + * + * @param int $http204 + */ + public function setHttp204(int $http204) + { + $this->set("Http204", $http204); + } + + /** + * Http205: http205数量 + * + * @return integer|null + */ + public function getHttp205(): int + { + return $this->get("Http205"); + } + + /** + * Http205: http205数量 + * + * @param int $http205 + */ + public function setHttp205(int $http205) + { + $this->set("Http205", $http205); + } + + /** + * Http206: http206数量 + * + * @return integer|null + */ + public function getHttp206(): int + { + return $this->get("Http206"); + } + + /** + * Http206: http206数量 + * + * @param int $http206 + */ + public function setHttp206(int $http206) + { + $this->set("Http206", $http206); + } + + /** + * Http207: http207数量 + * + * @return integer|null + */ + public function getHttp207(): int + { + return $this->get("Http207"); + } + + /** + * Http207: http207数量 + * + * @param int $http207 + */ + public function setHttp207(int $http207) + { + $this->set("Http207", $http207); + } + + /** + * Http300: http300数量 + * + * @return integer|null + */ + public function getHttp300(): int + { + return $this->get("Http300"); + } + + /** + * Http300: http300数量 + * + * @param int $http300 + */ + public function setHttp300(int $http300) + { + $this->set("Http300", $http300); + } + + /** + * Http301: http301数量 + * + * @return integer|null + */ + public function getHttp301(): int + { + return $this->get("Http301"); + } + + /** + * Http301: http301数量 + * + * @param int $http301 + */ + public function setHttp301(int $http301) + { + $this->set("Http301", $http301); + } + + /** + * Http302: http302数量 + * + * @return integer|null + */ + public function getHttp302(): int + { + return $this->get("Http302"); + } + + /** + * Http302: http302数量 + * + * @param int $http302 + */ + public function setHttp302(int $http302) + { + $this->set("Http302", $http302); + } + + /** + * Http303: http303数量 + * + * @return integer|null + */ + public function getHttp303(): int + { + return $this->get("Http303"); + } + + /** + * Http303: http303数量 + * + * @param int $http303 + */ + public function setHttp303(int $http303) + { + $this->set("Http303", $http303); + } + + /** + * Http304: http304数量 + * + * @return integer|null + */ + public function getHttp304(): int + { + return $this->get("Http304"); + } + + /** + * Http304: http304数量 + * + * @param int $http304 + */ + public function setHttp304(int $http304) + { + $this->set("Http304", $http304); + } + + /** + * Http305: http305数量 + * + * @return integer|null + */ + public function getHttp305(): int + { + return $this->get("Http305"); + } + + /** + * Http305: http305数量 + * + * @param int $http305 + */ + public function setHttp305(int $http305) + { + $this->set("Http305", $http305); + } + + /** + * Http306: http306数量 + * + * @return integer|null + */ + public function getHttp306(): int + { + return $this->get("Http306"); + } + + /** + * Http306: http306数量 + * + * @param int $http306 + */ + public function setHttp306(int $http306) + { + $this->set("Http306", $http306); + } + + /** + * Http307: http307数量 + * + * @return integer|null + */ + public function getHttp307(): int + { + return $this->get("Http307"); + } + + /** + * Http307: http307数量 + * + * @param int $http307 + */ + public function setHttp307(int $http307) + { + $this->set("Http307", $http307); + } + + /** + * Http400: http400数量 + * + * @return integer|null + */ + public function getHttp400(): int + { + return $this->get("Http400"); + } + + /** + * Http400: http400数量 + * + * @param int $http400 + */ + public function setHttp400(int $http400) + { + $this->set("Http400", $http400); + } + + /** + * Http401: http401数量 + * + * @return integer|null + */ + public function getHttp401(): int + { + return $this->get("Http401"); + } + + /** + * Http401: http401数量 + * + * @param int $http401 + */ + public function setHttp401(int $http401) + { + $this->set("Http401", $http401); + } + + /** + * Http402: http402数量 + * + * @return integer|null + */ + public function getHttp402(): int + { + return $this->get("Http402"); + } + + /** + * Http402: http402数量 + * + * @param int $http402 + */ + public function setHttp402(int $http402) + { + $this->set("Http402", $http402); + } + + /** + * Http403: http403数量 + * + * @return integer|null + */ + public function getHttp403(): int + { + return $this->get("Http403"); + } + + /** + * Http403: http403数量 + * + * @param int $http403 + */ + public function setHttp403(int $http403) + { + $this->set("Http403", $http403); + } + + /** + * Http404: http404数量 + * + * @return integer|null + */ + public function getHttp404(): int + { + return $this->get("Http404"); + } + + /** + * Http404: http404数量 + * + * @param int $http404 + */ + public function setHttp404(int $http404) + { + $this->set("Http404", $http404); + } + + /** + * Http405: http405数量 + * + * @return integer|null + */ + public function getHttp405(): int + { + return $this->get("Http405"); + } + + /** + * Http405: http405数量 + * + * @param int $http405 + */ + public function setHttp405(int $http405) + { + $this->set("Http405", $http405); + } + + /** + * Http406: http406数量 + * + * @return integer|null + */ + public function getHttp406(): int + { + return $this->get("Http406"); + } + + /** + * Http406: http406数量 + * + * @param int $http406 + */ + public function setHttp406(int $http406) + { + $this->set("Http406", $http406); + } + + /** + * Http407: http407数量 + * + * @return integer|null + */ + public function getHttp407(): int + { + return $this->get("Http407"); + } + + /** + * Http407: http407数量 + * + * @param int $http407 + */ + public function setHttp407(int $http407) + { + $this->set("Http407", $http407); + } + + /** + * Http408: http408数量 + * + * @return integer|null + */ + public function getHttp408(): int + { + return $this->get("Http408"); + } + + /** + * Http408: http408数量 + * + * @param int $http408 + */ + public function setHttp408(int $http408) + { + $this->set("Http408", $http408); + } + + /** + * Http409: http409数量 + * + * @return integer|null + */ + public function getHttp409(): int + { + return $this->get("Http409"); + } + + /** + * Http409: http409数量 + * + * @param int $http409 + */ + public function setHttp409(int $http409) + { + $this->set("Http409", $http409); + } + + /** + * Http410: http410数量 + * + * @return integer|null + */ + public function getHttp410(): int + { + return $this->get("Http410"); + } + + /** + * Http410: http410数量 + * + * @param int $http410 + */ + public function setHttp410(int $http410) + { + $this->set("Http410", $http410); + } + + /** + * Http411: http411数量 + * + * @return integer|null + */ + public function getHttp411(): int + { + return $this->get("Http411"); + } + + /** + * Http411: http411数量 + * + * @param int $http411 + */ + public function setHttp411(int $http411) + { + $this->set("Http411", $http411); + } + + /** + * Http412: http412数量 + * + * @return integer|null + */ + public function getHttp412(): int + { + return $this->get("Http412"); + } + + /** + * Http412: http412数量 + * + * @param int $http412 + */ + public function setHttp412(int $http412) + { + $this->set("Http412", $http412); + } + + /** + * Http413: http413数量 + * + * @return integer|null + */ + public function getHttp413(): int + { + return $this->get("Http413"); + } + + /** + * Http413: http413数量 + * + * @param int $http413 + */ + public function setHttp413(int $http413) + { + $this->set("Http413", $http413); + } + + /** + * Http414: http414数量 + * + * @return integer|null + */ + public function getHttp414(): int + { + return $this->get("Http414"); + } + + /** + * Http414: http414数量 + * + * @param int $http414 + */ + public function setHttp414(int $http414) + { + $this->set("Http414", $http414); + } + + /** + * Http415: http415数量 + * + * @return integer|null + */ + public function getHttp415(): int + { + return $this->get("Http415"); + } + + /** + * Http415: http415数量 + * + * @param int $http415 + */ + public function setHttp415(int $http415) + { + $this->set("Http415", $http415); + } + + /** + * Http416: http416数量 + * + * @return integer|null + */ + public function getHttp416(): int + { + return $this->get("Http416"); + } + + /** + * Http416: http416数量 + * + * @param int $http416 + */ + public function setHttp416(int $http416) + { + $this->set("Http416", $http416); + } + + /** + * Http417: http417数量 + * + * @return integer|null + */ + public function getHttp417(): int + { + return $this->get("Http417"); + } + + /** + * Http417: http417数量 + * + * @param int $http417 + */ + public function setHttp417(int $http417) + { + $this->set("Http417", $http417); + } + + /** + * Http418: http418数量 + * + * @return integer|null + */ + public function getHttp418(): int + { + return $this->get("Http418"); + } + + /** + * Http418: http418数量 + * + * @param int $http418 + */ + public function setHttp418(int $http418) + { + $this->set("Http418", $http418); + } + + /** + * Http421: http421数量 + * + * @return integer|null + */ + public function getHttp421(): int + { + return $this->get("Http421"); + } + + /** + * Http421: http421数量 + * + * @param int $http421 + */ + public function setHttp421(int $http421) + { + $this->set("Http421", $http421); + } + + /** + * Http422: http422数量 + * + * @return integer|null + */ + public function getHttp422(): int + { + return $this->get("Http422"); + } + + /** + * Http422: http422数量 + * + * @param int $http422 + */ + public function setHttp422(int $http422) + { + $this->set("Http422", $http422); + } + + /** + * Http423: http423数量 + * + * @return integer|null + */ + public function getHttp423(): int + { + return $this->get("Http423"); + } + + /** + * Http423: http423数量 + * + * @param int $http423 + */ + public function setHttp423(int $http423) + { + $this->set("Http423", $http423); + } + + /** + * Http424: http424数量 + * + * @return integer|null + */ + public function getHttp424(): int + { + return $this->get("Http424"); + } + + /** + * Http424: http424数量 + * + * @param int $http424 + */ + public function setHttp424(int $http424) + { + $this->set("Http424", $http424); + } + + /** + * Http425: http425数量 + * + * @return integer|null + */ + public function getHttp425(): int + { + return $this->get("Http425"); + } + + /** + * Http425: http425数量 + * + * @param int $http425 + */ + public function setHttp425(int $http425) + { + $this->set("Http425", $http425); + } + + /** + * Http426: http426数量 + * + * @return integer|null + */ + public function getHttp426(): int + { + return $this->get("Http426"); + } + + /** + * Http426: http426数量 + * + * @param int $http426 + */ + public function setHttp426(int $http426) + { + $this->set("Http426", $http426); + } + + /** + * Http449: http449数量 + * + * @return integer|null + */ + public function getHttp449(): int + { + return $this->get("Http449"); + } + + /** + * Http449: http449数量 + * + * @param int $http449 + */ + public function setHttp449(int $http449) + { + $this->set("Http449", $http449); + } + + /** + * Http451: http451数量 + * + * @return integer|null + */ + public function getHttp451(): int + { + return $this->get("Http451"); + } + + /** + * Http451: http451数量 + * + * @param int $http451 + */ + public function setHttp451(int $http451) + { + $this->set("Http451", $http451); + } + + /** + * Http500: http500数量 + * + * @return integer|null + */ + public function getHttp500(): int + { + return $this->get("Http500"); + } + + /** + * Http500: http500数量 + * + * @param int $http500 + */ + public function setHttp500(int $http500) + { + $this->set("Http500", $http500); + } + + /** + * Http501: http501数量 + * + * @return integer|null + */ + public function getHttp501(): int + { + return $this->get("Http501"); + } + + /** + * Http501: http501数量 + * + * @param int $http501 + */ + public function setHttp501(int $http501) + { + $this->set("Http501", $http501); + } + + /** + * Http502: http502数量 + * + * @return integer|null + */ + public function getHttp502(): int + { + return $this->get("Http502"); + } + + /** + * Http502: http502数量 + * + * @param int $http502 + */ + public function setHttp502(int $http502) + { + $this->set("Http502", $http502); + } + + /** + * Http503: http503数量 + * + * @return integer|null + */ + public function getHttp503(): int + { + return $this->get("Http503"); + } + + /** + * Http503: http503数量 + * + * @param int $http503 + */ + public function setHttp503(int $http503) + { + $this->set("Http503", $http503); + } + + /** + * Http504: http504数量 + * + * @return integer|null + */ + public function getHttp504(): int + { + return $this->get("Http504"); + } + + /** + * Http504: http504数量 + * + * @param int $http504 + */ + public function setHttp504(int $http504) + { + $this->set("Http504", $http504); + } + + /** + * Http505: http505数量 + * + * @return integer|null + */ + public function getHttp505(): int + { + return $this->get("Http505"); + } + + /** + * Http505: http505数量 + * + * @param int $http505 + */ + public function setHttp505(int $http505) + { + $this->set("Http505", $http505); + } + + /** + * Http506: http506数量 + * + * @return integer|null + */ + public function getHttp506(): int + { + return $this->get("Http506"); + } + + /** + * Http506: http506数量 + * + * @param int $http506 + */ + public function setHttp506(int $http506) + { + $this->set("Http506", $http506); + } + + /** + * Http507: http507数量 + * + * @return integer|null + */ + public function getHttp507(): int + { + return $this->get("Http507"); + } + + /** + * Http507: http507数量 + * + * @param int $http507 + */ + public function setHttp507(int $http507) + { + $this->set("Http507", $http507); + } + + /** + * Http509: http509数量 + * + * @return integer|null + */ + public function getHttp509(): int + { + return $this->get("Http509"); + } + + /** + * Http509: http509数量 + * + * @param int $http509 + */ + public function setHttp509(int $http509) + { + $this->set("Http509", $http509); + } + + /** + * Http510: http510数量 + * + * @return integer|null + */ + public function getHttp510(): int + { + return $this->get("Http510"); + } + + /** + * Http510: http510数量 + * + * @param int $http510 + */ + public function setHttp510(int $http510) + { + $this->set("Http510", $http510); + } +} diff --git a/src/UCDN/Models/IpLocationInfo.php b/src/UCDN/Models/IpLocationInfo.php new file mode 100644 index 00000000..30b45cfd --- /dev/null +++ b/src/UCDN/Models/IpLocationInfo.php @@ -0,0 +1,124 @@ +get("Ip"); + } + + /** + * Ip: 客户端请求的ip + * + * @param string $ip + */ + public function setIp(string $ip) + { + $this->set("Ip", $ip); + } + + /** + * Area: 地区 + * + * @return string|null + */ + public function getArea(): string + { + return $this->get("Area"); + } + + /** + * Area: 地区 + * + * @param string $area + */ + public function setArea(string $area) + { + $this->set("Area", $area); + } + + /** + * Isp: 运营商 + * + * @return string|null + */ + public function getIsp(): string + { + return $this->get("Isp"); + } + + /** + * Isp: 运营商 + * + * @param string $isp + */ + public function setIsp(string $isp) + { + $this->set("Isp", $isp); + } + + /** + * City: 城市 + * + * @return string|null + */ + public function getCity(): string + { + return $this->get("City"); + } + + /** + * City: 城市 + * + * @param string $city + */ + public function setCity(string $city) + { + $this->set("City", $city); + } + + /** + * Exist: ip是否存在 + * + * @return boolean|null + */ + public function getExist(): bool + { + return $this->get("Exist"); + } + + /** + * Exist: ip是否存在 + * + * @param boolean $exist + */ + public function setExist(bool $exist) + { + $this->set("Exist", $exist); + } +} diff --git a/src/UCDN/Models/LogSetInfo.php b/src/UCDN/Models/LogSetInfo.php new file mode 100644 index 00000000..b9ad9065 --- /dev/null +++ b/src/UCDN/Models/LogSetInfo.php @@ -0,0 +1,84 @@ +get("Time"); + } + + /** + * Time: 日志时间UnixTime + * + * @param int $time + */ + public function setTime(int $time) + { + $this->set("Time", $time); + } + + /** + * CnLog: 国内日志url列表 + * + * @return string[]|null + */ + public function getCnLog(): array + { + return $this->get("CnLog"); + } + + /** + * CnLog: 国内日志url列表 + * + * @param string[] $cnLog + */ + public function setCnLog(array $cnLog) + { + $this->set("CnLog", $cnLog); + } + + /** + * AbroadLog: 国外日志url列表 + * + * @return string[]|null + */ + public function getAbroadLog(): array + { + return $this->get("AbroadLog"); + } + + /** + * AbroadLog: 国外日志url列表 + * + * @param string[] $abroadLog + */ + public function setAbroadLog(array $abroadLog) + { + $this->set("AbroadLog", $abroadLog); + } +} diff --git a/src/UCDN/Models/LogSetList.php b/src/UCDN/Models/LogSetList.php new file mode 100644 index 00000000..8a6aa760 --- /dev/null +++ b/src/UCDN/Models/LogSetList.php @@ -0,0 +1,73 @@ +get("Domain"); + } + + /** + * Domain: 域名 + * + * @param string $domain + */ + public function setDomain(string $domain) + { + $this->set("Domain", $domain); + } + + /** + * Logs: 域名信息列表,参考LogSetInfo + * + * @return LogSetInfo[]|null + */ + public function getLogs(): array + { + $items = $this->get("Logs") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new LogSetInfo($item)); + } + return $result; + } + + /** + * Logs: 域名信息列表,参考LogSetInfo + * + * @param LogSetInfo[] $logs + */ + public function setLogs(array $logs) + { + $result = []; + foreach ($logs as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UCDN/Models/OriginConf.php b/src/UCDN/Models/OriginConf.php new file mode 100644 index 00000000..599b421c --- /dev/null +++ b/src/UCDN/Models/OriginConf.php @@ -0,0 +1,224 @@ +get("OriginIpList"); + } + + /** + * OriginIpList: 源站ip即cdn服务器回源访问的ip地址。多个源站ip,可以这样表述,如:["1.1.1.1","2.2.2.2"] + * + * @param string[] $originIpList + */ + public function setOriginIpList(array $originIpList) + { + $this->set("OriginIpList", $originIpList); + } + + /** + * OriginHost: 回源Http请求头部Host,默认是加速域名 + * + * @return string|null + */ + public function getOriginHost(): string + { + return $this->get("OriginHost"); + } + + /** + * OriginHost: 回源Http请求头部Host,默认是加速域名 + * + * @param string $originHost + */ + public function setOriginHost(string $originHost) + { + $this->set("OriginHost", $originHost); + } + + /** + * OriginPort: 回源端口 + * + * @return integer|null + */ + public function getOriginPort(): int + { + return $this->get("OriginPort"); + } + + /** + * OriginPort: 回源端口 + * + * @param int $originPort + */ + public function setOriginPort(int $originPort) + { + $this->set("OriginPort", $originPort); + } + + /** + * BackupOriginEnable: 1如果为false表示BackupOriginIp为空,表示没有备份源站,忽略BackupOriginIp,BackupOriginHost字段2如果为true表示BackupOriginIp.n必须至少有一个备份源站地址 + * + * @return boolean|null + */ + public function getBackupOriginEnable(): bool + { + return $this->get("BackupOriginEnable"); + } + + /** + * BackupOriginEnable: 1如果为false表示BackupOriginIp为空,表示没有备份源站,忽略BackupOriginIp,BackupOriginHost字段2如果为true表示BackupOriginIp.n必须至少有一个备份源站地址 + * + * @param boolean $backupOriginEnable + */ + public function setBackupOriginEnable(bool $backupOriginEnable) + { + $this->set("BackupOriginEnable", $backupOriginEnable); + } + + /** + * BackupOriginIpList: 备份源站ip即cdn服务器回源访问的ip地址。多个源站ip,可以这样表述,如:["1.1.1.1","2.2.2.2"] + * + * @return string[]|null + */ + public function getBackupOriginIpList(): array + { + return $this->get("BackupOriginIpList"); + } + + /** + * BackupOriginIpList: 备份源站ip即cdn服务器回源访问的ip地址。多个源站ip,可以这样表述,如:["1.1.1.1","2.2.2.2"] + * + * @param string[] $backupOriginIpList + */ + public function setBackupOriginIpList(array $backupOriginIpList) + { + $this->set("BackupOriginIpList", $backupOriginIpList); + } + + /** + * BackupOriginHost: 备份回源Http请求头部Host,默认是加速域名 + * + * @return string|null + */ + public function getBackupOriginHost(): string + { + return $this->get("BackupOriginHost"); + } + + /** + * BackupOriginHost: 备份回源Http请求头部Host,默认是加速域名 + * + * @param string $backupOriginHost + */ + public function setBackupOriginHost(string $backupOriginHost) + { + $this->set("BackupOriginHost", $backupOriginHost); + } + + /** + * OriginErrorCode: 主源响应的回源错误码(如:404|500),默认空字符串 + * + * @return string|null + */ + public function getOriginErrorCode(): string + { + return $this->get("OriginErrorCode"); + } + + /** + * OriginErrorCode: 主源响应的回源错误码(如:404|500),默认空字符串 + * + * @param string $originErrorCode + */ + public function setOriginErrorCode(string $originErrorCode) + { + $this->set("OriginErrorCode", $originErrorCode); + } + + /** + * OriginErrorNum: 回主源的回源失败数,默认1 + * + * @return integer|null + */ + public function getOriginErrorNum(): int + { + return $this->get("OriginErrorNum"); + } + + /** + * OriginErrorNum: 回主源的回源失败数,默认1 + * + * @param int $originErrorNum + */ + public function setOriginErrorNum(int $originErrorNum) + { + $this->set("OriginErrorNum", $originErrorNum); + } + + /** + * OriginProtocol: 源站协议http,http|https 默认http + * + * @return string|null + */ + public function getOriginProtocol(): string + { + return $this->get("OriginProtocol"); + } + + /** + * OriginProtocol: 源站协议http,http|https 默认http + * + * @param string $originProtocol + */ + public function setOriginProtocol(string $originProtocol) + { + $this->set("OriginProtocol", $originProtocol); + } + + /** + * OriginFollow301: 跟随301跳转 0=不跟随 1=跟随 + * + * @return integer|null + */ + public function getOriginFollow301(): int + { + return $this->get("OriginFollow301"); + } + + /** + * OriginFollow301: 跟随301跳转 0=不跟随 1=跟随 + * + * @param int $originFollow301 + */ + public function setOriginFollow301(int $originFollow301) + { + $this->set("OriginFollow301", $originFollow301); + } +} diff --git a/src/UCDN/Models/ProIspBandwidthList.php b/src/UCDN/Models/ProIspBandwidthList.php new file mode 100644 index 00000000..4ddf187c --- /dev/null +++ b/src/UCDN/Models/ProIspBandwidthList.php @@ -0,0 +1,84 @@ +get("Time"); + } + + /** + * Time: 带宽获取的时间点。格式:时间戳 + * + * @param int $time + */ + public function setTime(int $time) + { + $this->set("Time", $time); + } + + /** + * CdnBandwidth: 返回值返回指定时间区间内CDN的带宽峰值,单位Mbps + * + * @return float|null + */ + public function getCdnBandwidth(): float + { + return $this->get("CdnBandwidth"); + } + + /** + * CdnBandwidth: 返回值返回指定时间区间内CDN的带宽峰值,单位Mbps + * + * @param float $cdnBandwidth + */ + public function setCdnBandwidth(float $cdnBandwidth) + { + $this->set("CdnBandwidth", $cdnBandwidth); + } + + /** + * Traffic: 对应时间粒度的流量,单位字节 + * + * @return float|null + */ + public function getTraffic(): float + { + return $this->get("Traffic"); + } + + /** + * Traffic: 对应时间粒度的流量,单位字节 + * + * @param float $traffic + */ + public function setTraffic(float $traffic) + { + $this->set("Traffic", $traffic); + } +} diff --git a/src/UCDN/Models/ProIspBandwidthSet.php b/src/UCDN/Models/ProIspBandwidthSet.php new file mode 100644 index 00000000..27ed25d0 --- /dev/null +++ b/src/UCDN/Models/ProIspBandwidthSet.php @@ -0,0 +1,73 @@ +get("Province"); + } + + /** + * Province: 省份代码 + * + * @param string $province + */ + public function setProvince(string $province) + { + $this->set("Province", $province); + } + + /** + * BandwidthTrafficList: 省份带宽流量实例表 + * + * @return ProIspBandwidthList[]|null + */ + public function getBandwidthTrafficList(): array + { + $items = $this->get("BandwidthTrafficList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ProIspBandwidthList($item)); + } + return $result; + } + + /** + * BandwidthTrafficList: 省份带宽流量实例表 + * + * @param ProIspBandwidthList[] $bandwidthTrafficList + */ + public function setBandwidthTrafficList(array $bandwidthTrafficList) + { + $result = []; + foreach ($bandwidthTrafficList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UCDN/Models/ProIspRequestListV2.php b/src/UCDN/Models/ProIspRequestListV2.php new file mode 100644 index 00000000..f1777a7a --- /dev/null +++ b/src/UCDN/Models/ProIspRequestListV2.php @@ -0,0 +1,64 @@ +get("Time"); + } + + /** + * Time: 带宽获取的时间点。格式:时间戳 + * + * @param int $time + */ + public function setTime(int $time) + { + $this->set("Time", $time); + } + + /** + * CdnRequest: 返回值返回指定时间区间内的请求数 + * + * @return float|null + */ + public function getCdnRequest(): float + { + return $this->get("CdnRequest"); + } + + /** + * CdnRequest: 返回值返回指定时间区间内的请求数 + * + * @param float $cdnRequest + */ + public function setCdnRequest(float $cdnRequest) + { + $this->set("CdnRequest", $cdnRequest); + } +} diff --git a/src/UCDN/Models/ProIspRequestNumSetV2.php b/src/UCDN/Models/ProIspRequestNumSetV2.php new file mode 100644 index 00000000..3f2ec2e0 --- /dev/null +++ b/src/UCDN/Models/ProIspRequestNumSetV2.php @@ -0,0 +1,73 @@ +get("Province"); + } + + /** + * Province: 省份代码 + * + * @param string $province + */ + public function setProvince(string $province) + { + $this->set("Province", $province); + } + + /** + * RequestList: 省份请求数实例表 ProIspRequestListV2 + * + * @return ProIspRequestListV2[]|null + */ + public function getRequestList(): array + { + $items = $this->get("RequestList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ProIspRequestListV2($item)); + } + return $result; + } + + /** + * RequestList: 省份请求数实例表 ProIspRequestListV2 + * + * @param ProIspRequestListV2[] $requestList + */ + public function setRequestList(array $requestList) + { + $result = []; + foreach ($requestList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UCDN/Models/ReferConf.php b/src/UCDN/Models/ReferConf.php new file mode 100644 index 00000000..61605bb7 --- /dev/null +++ b/src/UCDN/Models/ReferConf.php @@ -0,0 +1,84 @@ +get("ReferType"); + } + + /** + * ReferType: Refer防盗链配置 0白名单,1黑名单 + * + * @param int $referType + */ + public function setReferType(int $referType) + { + $this->set("ReferType", $referType); + } + + /** + * NullRefer: ReferType为白名单时(删除),NullRefer为0代表不允许NULL refer访问,为1代表允许Null refer访问 + * + * @return integer|null + */ + public function getNullRefer(): int + { + return $this->get("NullRefer"); + } + + /** + * NullRefer: ReferType为白名单时(删除),NullRefer为0代表不允许NULL refer访问,为1代表允许Null refer访问 + * + * @param int $nullRefer + */ + public function setNullRefer(int $nullRefer) + { + $this->set("NullRefer", $nullRefer); + } + + /** + * ReferList: Refer防盗链规则列表,支持正则表达式 + * + * @return string[]|null + */ + public function getReferList(): array + { + return $this->get("ReferList"); + } + + /** + * ReferList: Refer防盗链规则列表,支持正则表达式 + * + * @param string[] $referList + */ + public function setReferList(array $referList) + { + $this->set("ReferList", $referList); + } +} diff --git a/src/UCDN/Models/RequestInfo.php b/src/UCDN/Models/RequestInfo.php new file mode 100644 index 00000000..98151680 --- /dev/null +++ b/src/UCDN/Models/RequestInfo.php @@ -0,0 +1,84 @@ +get("Time"); + } + + /** + * Time: 带宽获取的时间点。格式:时间戳 + * + * @param int $time + */ + public function setTime(int $time) + { + $this->set("Time", $time); + } + + /** + * CdnRequest: 返回值返回指定时间区间内的cdn收到的请求次数之和 + * + * @return float|null + */ + public function getCdnRequest(): float + { + return $this->get("CdnRequest"); + } + + /** + * CdnRequest: 返回值返回指定时间区间内的cdn收到的请求次数之和 + * + * @param float $cdnRequest + */ + public function setCdnRequest(float $cdnRequest) + { + $this->set("CdnRequest", $cdnRequest); + } + + /** + * OriginRequest: 返回值返回指定时间区间内的cdn回源的请求次数之和 + * + * @return float|null + */ + public function getOriginRequest(): float + { + return $this->get("OriginRequest"); + } + + /** + * OriginRequest: 返回值返回指定时间区间内的cdn回源的请求次数之和 + * + * @param float $originRequest + */ + public function setOriginRequest(float $originRequest) + { + $this->set("OriginRequest", $originRequest); + } +} diff --git a/src/UCDN/Models/RequestInfoV2.php b/src/UCDN/Models/RequestInfoV2.php new file mode 100644 index 00000000..6ef75ee7 --- /dev/null +++ b/src/UCDN/Models/RequestInfoV2.php @@ -0,0 +1,64 @@ +get("Time"); + } + + /** + * Time: 带宽获取的时间点。格式:时间戳 + * + * @param int $time + */ + public function setTime(int $time) + { + $this->set("Time", $time); + } + + /** + * CdnRequest: 返回值返回指定时间区间内的cdn收到的请求次数之和 + * + * @return float|null + */ + public function getCdnRequest(): float + { + return $this->get("CdnRequest"); + } + + /** + * CdnRequest: 返回值返回指定时间区间内的cdn收到的请求次数之和 + * + * @param float $cdnRequest + */ + public function setCdnRequest(float $cdnRequest) + { + $this->set("CdnRequest", $cdnRequest); + } +} diff --git a/src/UCDN/Models/TaskInfo.php b/src/UCDN/Models/TaskInfo.php new file mode 100644 index 00000000..16206502 --- /dev/null +++ b/src/UCDN/Models/TaskInfo.php @@ -0,0 +1,113 @@ +get("TaskId"); + } + + /** + * TaskId: 提交任务时返回的任务ID + * + * @param string $taskId + */ + public function setTaskId(string $taskId) + { + $this->set("TaskId", $taskId); + } + + /** + * UrlLists: 任务url的信息列表,参考UrlProgressInfo + * + * @return UrlProgressInfo[]|null + */ + public function getUrlLists(): array + { + $items = $this->get("UrlLists") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UrlProgressInfo($item)); + } + return $result; + } + + /** + * UrlLists: 任务url的信息列表,参考UrlProgressInfo + * + * @param UrlProgressInfo[] $urlLists + */ + public function setUrlLists(array $urlLists) + { + $result = []; + foreach ($urlLists as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * CreateTime: 刷新任务创建的时间。格式为Unix Timestamp + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 刷新任务创建的时间。格式为Unix Timestamp + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * Status: 刷新任务的当前状态,枚举值:success:成功;wait:排队中;process:处理中;failure:失败; unknow:未知 + * + * @return string|null + */ + public function getStatus(): string + { + return $this->get("Status"); + } + + /** + * Status: 刷新任务的当前状态,枚举值:success:成功;wait:排队中;process:处理中;failure:失败; unknow:未知 + * + * @param string $status + */ + public function setStatus(string $status) + { + $this->set("Status", $status); + } +} diff --git a/src/UCDN/Models/TrafficSet.php b/src/UCDN/Models/TrafficSet.php new file mode 100644 index 00000000..010b2906 --- /dev/null +++ b/src/UCDN/Models/TrafficSet.php @@ -0,0 +1,104 @@ +get("Areacode"); + } + + /** + * Areacode: 购买流量的区域, cn: 国内; abroad: 国外 + * + * @param string $areacode + */ + public function setAreacode(string $areacode) + { + $this->set("Areacode", $areacode); + } + + /** + * TrafficTotal: Areacode区域内总购买流量, 单位GB + * + * @return float|null + */ + public function getTrafficTotal(): float + { + return $this->get("TrafficTotal"); + } + + /** + * TrafficTotal: Areacode区域内总购买流量, 单位GB + * + * @param float $trafficTotal + */ + public function setTrafficTotal(float $trafficTotal) + { + $this->set("TrafficTotal", $trafficTotal); + } + + /** + * TrafficLeft: Areacode区域内总剩余流量, 单位GB + * + * @return float|null + */ + public function getTrafficLeft(): float + { + return $this->get("TrafficLeft"); + } + + /** + * TrafficLeft: Areacode区域内总剩余流量, 单位GB + * + * @param float $trafficLeft + */ + public function setTrafficLeft(float $trafficLeft) + { + $this->set("TrafficLeft", $trafficLeft); + } + + /** + * TrafficUsed: Areacode区域内总使用流量, 单位GB + * + * @return float|null + */ + public function getTrafficUsed(): float + { + return $this->get("TrafficUsed"); + } + + /** + * TrafficUsed: Areacode区域内总使用流量, 单位GB + * + * @param float $trafficUsed + */ + public function setTrafficUsed(float $trafficUsed) + { + $this->set("TrafficUsed", $trafficUsed); + } +} diff --git a/src/UCDN/Models/UcdnDomainTrafficSet.php b/src/UCDN/Models/UcdnDomainTrafficSet.php new file mode 100644 index 00000000..e02d626f --- /dev/null +++ b/src/UCDN/Models/UcdnDomainTrafficSet.php @@ -0,0 +1,64 @@ +get("Time"); + } + + /** + * Time: 流量获取的时间点,格式为Unix Timestamp + * + * @param int $time + */ + public function setTime(int $time) + { + $this->set("Time", $time); + } + + /** + * Value: 查询每日流量总值,单位:GB + * + * @return float|null + */ + public function getValue(): float + { + return $this->get("Value"); + } + + /** + * Value: 查询每日流量总值,单位:GB + * + * @param float $value + */ + public function setValue(float $value) + { + $this->set("Value", $value); + } +} diff --git a/src/UCDN/Models/UrlProgressInfo.php b/src/UCDN/Models/UrlProgressInfo.php new file mode 100644 index 00000000..af79e469 --- /dev/null +++ b/src/UCDN/Models/UrlProgressInfo.php @@ -0,0 +1,124 @@ +get("Url"); + } + + /** + * Url: 刷新的单条url + * + * @param string $url + */ + public function setUrl(string $url) + { + $this->set("Url", $url); + } + + /** + * CreateTime: 刷新任务创建的时间。格式为Unix Timestamp + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 刷新任务创建的时间。格式为Unix Timestamp + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * FinishTime: 任务完成时间。格式为Unix Timestamp + * + * @return integer|null + */ + public function getFinishTime(): int + { + return $this->get("FinishTime"); + } + + /** + * FinishTime: 任务完成时间。格式为Unix Timestamp + * + * @param int $finishTime + */ + public function setFinishTime(int $finishTime) + { + $this->set("FinishTime", $finishTime); + } + + /** + * Status: 刷新任务的当前状态,枚举值:success:成功;wait:排队中;process:处理中;failure:失败; unknow:未知 + * + * @return string|null + */ + public function getStatus(): string + { + return $this->get("Status"); + } + + /** + * Status: 刷新任务的当前状态,枚举值:success:成功;wait:排队中;process:处理中;failure:失败; unknow:未知 + * + * @param string $status + */ + public function setStatus(string $status) + { + $this->set("Status", $status); + } + + /** + * Progress: 刷新进度,单位% + * + * @return integer|null + */ + public function getProgress(): int + { + return $this->get("Progress"); + } + + /** + * Progress: 刷新进度,单位% + * + * @param int $progress + */ + public function setProgress(int $progress) + { + $this->set("Progress", $progress); + } +} diff --git a/src/UCDN/UCDNClient.php b/src/UCDN/UCDNClient.php new file mode 100644 index 00000000..1a983b88 --- /dev/null +++ b/src/UCDN/UCDNClient.php @@ -0,0 +1,1684 @@ + (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "TaskId" => (array) 提交任务时返回的任务ID + * "BeginTime" => (integer) 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值 + * "EndTime" => (integer) 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * "Status" => (string) 需要获取的内容预热的状态,枚举值:success:成功;wait:等待处理;process:正在处理;failure:失败; unknow:未知,默认选择所有状态 + * "Offset" => (integer) 数据偏移量,默认为0,自然数 + * "Limit" => (integer) 返回数据长度,默认全部,自然数 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 预热任务的总数 + * "TaskList" => (array) 预热任务信息,参考TaskInfo[ + * [ + * "TaskId" => (string) 提交任务时返回的任务ID + * "UrlLists" => (array) 任务url的信息列表,参考UrlProgressInfo[ + * [ + * "Url" => (string) 刷新的单条url + * "CreateTime" => (integer) 刷新任务创建的时间。格式为Unix Timestamp + * "FinishTime" => (integer) 任务完成时间。格式为Unix Timestamp + * "Status" => (string) 刷新任务的当前状态,枚举值:success:成功;wait:排队中;process:处理中;failure:失败; unknow:未知 + * "Progress" => (integer) 刷新进度,单位% + * ] + * ] + * "CreateTime" => (integer) 刷新任务创建的时间。格式为Unix Timestamp + * "Status" => (string) 刷新任务的当前状态,枚举值:success:成功;wait:排队中;process:处理中;failure:失败; unknow:未知 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeNewUcdnPrefetchCacheTask(DescribeNewUcdnPrefetchCacheTaskRequest $request = null): DescribeNewUcdnPrefetchCacheTaskResponse + { + $resp = $this->invoke($request); + return new DescribeNewUcdnPrefetchCacheTaskResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeNewUcdnRefreshCacheTask - 获取域名刷新任务状态 + * + * See also: https://docs.ucloud.cn/api/UCDN-api/describe_new_ucdn_refresh_cache_task + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "TaskId" => (array) 提交任务时返回的任务ID + * "BeginTime" => (integer) 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值 + * "EndTime" => (integer) 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * "Status" => (string) 需要获取的内容刷新的状态,枚举值:success:成功;wait:等待处理;process:正在处理;failure:失败; unknow:未知,默认选择所有状态 + * "Offset" => (integer) 数据偏移量,默认为0,自然数 + * "Limit" => (integer) 返回数据长度,默认全部,自然数 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 刷新任务的总数 + * "TaskList" => (array) 刷新任务信息,参考TaskInfo[ + * [ + * "TaskId" => (string) 提交任务时返回的任务ID + * "UrlLists" => (array) 任务url的信息列表,参考UrlProgressInfo[ + * [ + * "Url" => (string) 刷新的单条url + * "CreateTime" => (integer) 刷新任务创建的时间。格式为Unix Timestamp + * "FinishTime" => (integer) 任务完成时间。格式为Unix Timestamp + * "Status" => (string) 刷新任务的当前状态,枚举值:success:成功;wait:排队中;process:处理中;failure:失败; unknow:未知 + * "Progress" => (integer) 刷新进度,单位% + * ] + * ] + * "CreateTime" => (integer) 刷新任务创建的时间。格式为Unix Timestamp + * "Status" => (string) 刷新任务的当前状态,枚举值:success:成功;wait:排队中;process:处理中;failure:失败; unknow:未知 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeNewUcdnRefreshCacheTask(DescribeNewUcdnRefreshCacheTaskRequest $request = null): DescribeNewUcdnRefreshCacheTaskResponse + { + $resp = $this->invoke($request); + return new DescribeNewUcdnRefreshCacheTaskResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetNewUcdnDomainBandwidth - 获取域名带宽数据 + * + * See also: https://docs.ucloud.cn/api/UCDN-api/get_new_ucdn_domain_bandwidth + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Type" => (integer) 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度) + * "DomainId" => (array) 域名id,创建域名时生成的id。默认全部域名 + * "Areacode" => (string) 查询带宽区域 cn代表国内 abroad代表海外 不填默认为全部区域 + * "BeginTime" => (integer) 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + * "EndTime" => (integer) 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * ] + * + * Outputs: + * + * $outputs = [ + * "BandwidthList" => (array) 带宽信息列表,参见BandwidthInfo[ + * [ + * "Time" => (integer) 带宽获取的时间点。格式:时间戳 + * "CdnBandwidth" => (number) 返回值返回指定时间区间内CDN的带宽峰值,单位Mbps(如果请求参数Type为0,则Value是五分钟粒度的带宽值,如果Type为1,则Value是1小时的带宽峰值,如果Type为2,则Value是一天内的带宽峰值) + * ] + * ] + * "Traffic" => (number) 从起始时间到结束时间内的所使用的CDN总流量,单位GB + * ] + * + * @throws UCloudException + */ + public function getNewUcdnDomainBandwidth(GetNewUcdnDomainBandwidthRequest $request = null): GetNewUcdnDomainBandwidthResponse + { + $resp = $this->invoke($request); + return new GetNewUcdnDomainBandwidthResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetNewUcdnDomainHitRate - 获取域名命中率 + * + * See also: https://docs.ucloud.cn/api/UCDN-api/get_new_ucdn_domain_hit_rate + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Type" => (integer) 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度)默认5分钟 + * "DomainId" => (array) 域名id,创建域名时生成的id。默认全部域名 + * "Areacode" => (string) 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + * "BeginTime" => (integer) 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + * "EndTime" => (integer) 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * ] + * + * Outputs: + * + * $outputs = [ + * "HitRateList" => (array) 请求数实例表。[ + * [ + * "Time" => (integer) 带宽获取的时间点。格式:时间戳 + * "FlowHitRate" => (number) 总流量命中率,单位% + * "RequestHitRate" => (number) 请求数命中率,单位% + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getNewUcdnDomainHitRate(GetNewUcdnDomainHitRateRequest $request = null): GetNewUcdnDomainHitRateResponse + { + $resp = $this->invoke($request); + return new GetNewUcdnDomainHitRateResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetNewUcdnDomainHttpCode - 获取域名状态码监控 + * + * See also: https://docs.ucloud.cn/api/UCDN-api/get_new_ucdn_domain_http_code + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Type" => (integer) 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度) + * "DomainId" => (array) 域名id,创建域名时生成的id。默认全部域名 + * "Areacode" => (string) 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + * "BeginTime" => (integer) 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + * "EndTime" => (integer) 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * ] + * + * Outputs: + * + * $outputs = [ + * "HttpCodeDetail" => (array) 状态码实例表。详细见HttpCodeInfo[ + * [ + * "Time" => (integer) 带宽获取的时间点。格式:时间戳 + * "HttpOneXX" => (integer) 1xx数量 + * "HttpTwoXX" => (integer) 2xx数量 + * "HttpThreeXX" => (integer) 3xx数量 + * "HttpFourXX" => (integer) 4xx数量 + * "HttpFiveXX" => (integer) 5xx数量 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getNewUcdnDomainHttpCode(GetNewUcdnDomainHttpCodeRequest $request = null): GetNewUcdnDomainHttpCodeResponse + { + $resp = $this->invoke($request); + return new GetNewUcdnDomainHttpCodeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetNewUcdnDomainHttpCodeV2 - 获取域名详细状态码监控 + * + * See also: https://docs.ucloud.cn/api/UCDN-api/get_new_ucdn_domain_http_code_v2 + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Type" => (integer) 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天粒度,3表示按照一分钟粒度) + * "BeginTime" => (integer) 查询的起始时间,格式为Unix Timestamp。 + * "EndTime" => (integer) 查询的结束时间,格式为Unix Timestamp。 + * "DomainId" => (array) 域名id,创建域名时生成的id。默认全部域名 + * "Areacode" => (string) 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + * ] + * + * Outputs: + * + * $outputs = [ + * "HttpCodeV2Detail" => (array) 状态码详情[ + * [ + * "Time" => (integer) 时间 + * "Total" => (integer) 当前分组的总状态码数 + * "Http100" => (integer) http100数量 + * "Http101" => (integer) http101数量 + * "Http102" => (integer) http102数量 + * "Http200" => (integer) http200数量 + * "Http201" => (integer) http201数量 + * "Http202" => (integer) http202数量 + * "Http203" => (integer) http203数量 + * "Http204" => (integer) http204数量 + * "Http205" => (integer) http205数量 + * "Http206" => (integer) http206数量 + * "Http207" => (integer) http207数量 + * "Http300" => (integer) http300数量 + * "Http301" => (integer) http301数量 + * "Http302" => (integer) http302数量 + * "Http303" => (integer) http303数量 + * "Http304" => (integer) http304数量 + * "Http305" => (integer) http305数量 + * "Http306" => (integer) http306数量 + * "Http307" => (integer) http307数量 + * "Http400" => (integer) http400数量 + * "Http401" => (integer) http401数量 + * "Http402" => (integer) http402数量 + * "Http403" => (integer) http403数量 + * "Http404" => (integer) http404数量 + * "Http405" => (integer) http405数量 + * "Http406" => (integer) http406数量 + * "Http407" => (integer) http407数量 + * "Http408" => (integer) http408数量 + * "Http409" => (integer) http409数量 + * "Http410" => (integer) http410数量 + * "Http411" => (integer) http411数量 + * "Http412" => (integer) http412数量 + * "Http413" => (integer) http413数量 + * "Http414" => (integer) http414数量 + * "Http415" => (integer) http415数量 + * "Http416" => (integer) http416数量 + * "Http417" => (integer) http417数量 + * "Http418" => (integer) http418数量 + * "Http421" => (integer) http421数量 + * "Http422" => (integer) http422数量 + * "Http423" => (integer) http423数量 + * "Http424" => (integer) http424数量 + * "Http425" => (integer) http425数量 + * "Http426" => (integer) http426数量 + * "Http449" => (integer) http449数量 + * "Http451" => (integer) http451数量 + * "Http500" => (integer) http500数量 + * "Http501" => (integer) http501数量 + * "Http502" => (integer) http502数量 + * "Http503" => (integer) http503数量 + * "Http504" => (integer) http504数量 + * "Http505" => (integer) http505数量 + * "Http506" => (integer) http506数量 + * "Http507" => (integer) http507数量 + * "Http509" => (integer) http509数量 + * "Http510" => (integer) http510数量 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getNewUcdnDomainHttpCodeV2(GetNewUcdnDomainHttpCodeV2Request $request = null): GetNewUcdnDomainHttpCodeV2Response + { + $resp = $this->invoke($request); + return new GetNewUcdnDomainHttpCodeV2Response($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUcdnDomain95BandwidthV2 - 获取域名九五峰值带宽数据 + * + * See also: https://docs.ucloud.cn/api/UCDN-api/get_ucdn_domain95_bandwidth_v2 + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "BeginTime" => (integer) 查询的起始日期,格式为Unix Timestamp + * "EndTime" => (integer) 查询的结束日期,格式为Unix Timestamp + * "DomainId" => (array) 域名id,创建域名时生成的id。默认全部域名 + * "Areacode" => (string) 查询带宽区域 cn代表国内 abroad代表海外 不填默认为全部区域 + * ] + * + * Outputs: + * + * $outputs = [ + * "Time" => (integer) 查询时间期间的95带宽时间点 Unix时间戳 + * "CdnBandwidth" => (number) 查询期间的CDN的95带宽值,单位Mbps + * ] + * + * @throws UCloudException + */ + public function getUcdnDomain95BandwidthV2(GetUcdnDomain95BandwidthV2Request $request = null): GetUcdnDomain95BandwidthV2Response + { + $resp = $this->invoke($request); + return new GetUcdnDomain95BandwidthV2Response($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUcdnDomainBandwidthV2 - 获取域名带宽数据(新) + * + * See also: https://docs.ucloud.cn/api/UCDN-api/get_ucdn_domain_bandwidth_v2 + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Type" => (integer) 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度,3表示按照1分钟粒度) + * "DomainId" => (array) 域名id,创建域名时生成的id。默认全部域名 + * "Areacode" => (string) 查询带宽区域 cn代表国内 abroad代表海外 不填默认为全部区域 + * "BeginTime" => (integer) 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + * "EndTime" => (integer) 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * "Protocol" => (string) 协议,http、https 不传则查所有协议的带宽 + * "Primeval" => (integer) 原始带宽,不为0则获取原始带宽,默认为0 + * ] + * + * Outputs: + * + * $outputs = [ + * "BandwidthTrafficList" => (array) 带宽信息列表,参见BandwidthTrafficInfo[ + * [ + * "Time" => (integer) 带宽获取的时间点。格式:时间戳 + * "CdnBandwidth" => (number) 返回值返回指定时间区间内CDN的带宽峰值,单位Mbps(如果请求参数Type为0,则Value是五分钟粒度的带宽值,如果Type为1,则Value是1小时的带宽峰值,如果Type为2,则Value是一天内的带宽峰值) + * "Traffic" => (number) 对应时间粒度的流量,单位字节 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getUcdnDomainBandwidthV2(GetUcdnDomainBandwidthV2Request $request = null): GetUcdnDomainBandwidthV2Response + { + $resp = $this->invoke($request); + return new GetUcdnDomainBandwidthV2Response($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUcdnDomainConfig - 批量获取加速域名配置 + * + * See also: https://docs.ucloud.cn/api/UCDN-api/get_ucdn_domain_config + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Offset" => (integer) 数据偏移量,默认0,非负整数 + * "Limit" => (integer) 返回数据长度, 默认全部,非负整数 + * "DomainId" => (array) 域名id,创建域名时生成的id。默认获取账号下的所有域名信息,n为自然数,从DomainId.0开始。 + * "ChannelType" => (string) 产品类型ucdn,可不填,默认为ucdn + * ] + * + * Outputs: + * + * $outputs = [ + * "DomainList" => (array) 获取的域名信息,具体参考下面DomainConfig[ + * [ + * "AreaCode" => (string) 查询带宽区域 cn代表国内 abroad代表海外 all表示全部区域 + * "CdnType" => (string) 加速域名的业务类型,web代表网站,stream代表视频 ,download 代表下载 + * "Status" => (string) 创建的加速域名的当前的状态。check代表审核中,checkSuccess代表审核通过,checkFail代表审核失败,enable代表加速中,disable代表停止加速,delete代表删除加速enableing代表正在开启加速,disableing代表正在停止加速中,deleteing代表删除中 + * "Cname" => (string) cdn域名。创建加速域名生成的cdn域名,用于设置CNAME记录 + * "CreateTime" => (integer) 域名创建的时间。格式:时间戳 + * "TestUrl" => (string) 测试url。用于域名创建加速时的测试 + * "HttpsStatusCn" => (string) 国内https状态 enableing-开启中 fail-开启失败 enable-启用 disable-未启用 + * "HttpsStatusAbroad" => (string) 国外https状态 enableing-开启中 fail-开启失败 enable-启用 disable-未启用 + * "CertNameCn" => (string) 国内证书名称 + * "CertNameAbroad" => (string) 国外证书名称 + * "Tag" => (string) 业务组:Default + * "DomainId" => (string) 域名Id + * "Domain" => (string) 域名 + * "OriginConf" => (object) 源站配置 参考OriginConf[ + * "OriginIpList" => (array) 源站ip即cdn服务器回源访问的ip地址。多个源站ip,可以这样表述,如:["1.1.1.1","2.2.2.2"] + * "OriginHost" => (string) 回源Http请求头部Host,默认是加速域名 + * "OriginPort" => (integer) 回源端口 + * "BackupOriginEnable" => (boolean) 1如果为false表示BackupOriginIp为空,表示没有备份源站,忽略BackupOriginIp,BackupOriginHost字段2如果为true表示BackupOriginIp.n必须至少有一个备份源站地址 + * "BackupOriginIpList" => (array) 备份源站ip即cdn服务器回源访问的ip地址。多个源站ip,可以这样表述,如:["1.1.1.1","2.2.2.2"] + * "BackupOriginHost" => (string) 备份回源Http请求头部Host,默认是加速域名 + * "OriginErrorCode" => (string) 主源响应的回源错误码(如:404|500),默认空字符串 + * "OriginErrorNum" => (integer) 回主源的回源失败数,默认1 + * "OriginProtocol" => (string) 源站协议http,http|https 默认http + * "OriginFollow301" => (integer) 跟随301跳转 0=不跟随 1=跟随 + * ] + * "AccessControlConf" => (object) 访问控制配置 参考AccessControlConf[ + * "IpBlackList" => (array) ip黑名单,多个ip,可表示为:IpBlackList.0=1.1.1.1,IpBlackList.1=2.2.2.2 + * "ReferConf" => (object) refer配置[ + * "ReferType" => (integer) Refer防盗链配置 0白名单,1黑名单 + * "NullRefer" => (integer) ReferType为白名单时(删除),NullRefer为0代表不允许NULL refer访问,为1代表允许Null refer访问 + * "ReferList" => (array) Refer防盗链规则列表,支持正则表达式 + * ] + * ] + * "CacheConf" => (object) 缓存配置 参考CacheAllConfig[ + * "CacheHost" => (string) 缓存Host,不同的域名可以配置为同一个CacheHost来实现缓存共享,默认为加速域名 + * "CacheList" => (array) 缓存配置列表,参见CacheConf[ + * [ + * "PathPattern" => (string) 路径模式,支持正则 + * "CacheTTL" => (integer) 缓存时间 + * "CacheUnit" => (string) 缓存时间的单位。sec(秒),min(分钟),hour(小时),day(天)。上限1年。 + * "CacheBehavior" => (boolean) 是否缓存,true为缓存,flase为不缓存。为flase的情况下,CacheTTL和CacheUnit强制不生效 + * "HttpCodePattern" => (string) 状态码模式,非200,206状态码,多个状态码用竖线(|)分隔,该属性仅仅在状态码缓存配置列表中返回 + * "Description" => (string) 缓存规则描述 + * "FollowOriginRule" => (boolean) 是否优先遵循源站头部缓存策略,false为不优先遵循源站,true为优先遵循源站缓存头部。默认为0 + * ] + * ] + * "HttpCodeCacheList" => (array) 状态码缓存配置列表,参见CacheConf[ + * [ + * "PathPattern" => (string) 路径模式,支持正则 + * "CacheTTL" => (integer) 缓存时间 + * "CacheUnit" => (string) 缓存时间的单位。sec(秒),min(分钟),hour(小时),day(天)。上限1年。 + * "CacheBehavior" => (boolean) 是否缓存,true为缓存,flase为不缓存。为flase的情况下,CacheTTL和CacheUnit强制不生效 + * "HttpCodePattern" => (string) 状态码模式,非200,206状态码,多个状态码用竖线(|)分隔,该属性仅仅在状态码缓存配置列表中返回 + * "Description" => (string) 缓存规则描述 + * "FollowOriginRule" => (boolean) 是否优先遵循源站头部缓存策略,false为不优先遵循源站,true为优先遵循源站缓存头部。默认为0 + * ] + * ] + * "CacheKeyList" => (array) 忽略参数缓存配置列表,参见CacheKeyInfo[ + * [ + * "Ignore" => (boolean) 是否忽略 + * "PathPattern" => (string) 路径模式,支持正则 + * "QueryString" => (string) 自定义变量,以$符号开头,多个变量用加号(+)连接,$querystring表示所有变量 + * ] + * ] + * ] + * "AdvancedConf" => (object) 高级配置 参考AdvancedConf[ + * "HttpClientHeader" => (array) 客户端响应http头列表 + * "HttpOriginHeader" => (array) 源站http头列表 + * "Http2Https" => (boolean) http转https回源 true是,false否 + * ] + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getUcdnDomainConfig(GetUcdnDomainConfigRequest $request = null): GetUcdnDomainConfigResponse + { + $resp = $this->invoke($request); + return new GetUcdnDomainConfigResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUcdnDomainHitRate - 获取域名命中率 + * + * See also: https://docs.ucloud.cn/api/UCDN-api/get_ucdn_domain_hit_rate + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Type" => (integer) 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度,3表示按照一分钟的粒度)默认5分钟 + * "DomainId" => (array) 域名id,创建域名时生成的id。默认全部域名 + * "Areacode" => (string) 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + * "BeginTime" => (integer) 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + * "EndTime" => (integer) 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * "HitType" => (integer) 命中类型:0=整体命中 1=边缘命中 默认是0 + * ] + * + * Outputs: + * + * $outputs = [ + * "HitRateList" => (array) 请求数实例表。[ + * [ + * "Time" => (integer) 带宽获取的时间点。格式:时间戳 + * "FlowHitRate" => (number) 总流量命中率,单位% + * "RequestHitRate" => (number) 请求数命中率,单位% + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getUcdnDomainHitRate(GetUcdnDomainHitRateRequest $request = null): GetUcdnDomainHitRateResponse + { + $resp = $this->invoke($request); + return new GetUcdnDomainHitRateResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUcdnDomainHttpCodeV2 - 获取域名状态码信息 + * + * See also: https://docs.ucloud.cn/api/UCDN-api/get_ucdn_domain_http_code_v2 + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Type" => (integer) 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度,3表示1分钟粒度) + * "DomainId" => (array) 域名id,创建域名时生成的id。默认全部域名 + * "Areacode" => (string) 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + * "BeginTime" => (integer) 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + * "EndTime" => (integer) 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * "Layer" => (string) 指定获取的状态码是边缘还是上层 edge 表示边缘 layer 表示上层 + * ] + * + * Outputs: + * + * $outputs = [ + * "HttpCodeDetail" => (array) 状态码实例表。详细见HttpCodeInfoV2[ + * [ + * "Time" => (integer) 带宽获取的时间点。格式:时间戳 + * "Http1XX" => (object) 1xx信息,参考HttpCodeV2Detail结构[ + * "Time" => (integer) 时间 + * "Total" => (integer) 当前分组的总状态码数 + * "Http100" => (integer) http100数量 + * "Http101" => (integer) http101数量 + * "Http102" => (integer) http102数量 + * "Http200" => (integer) http200数量 + * "Http201" => (integer) http201数量 + * "Http202" => (integer) http202数量 + * "Http203" => (integer) http203数量 + * "Http204" => (integer) http204数量 + * "Http205" => (integer) http205数量 + * "Http206" => (integer) http206数量 + * "Http207" => (integer) http207数量 + * "Http300" => (integer) http300数量 + * "Http301" => (integer) http301数量 + * "Http302" => (integer) http302数量 + * "Http303" => (integer) http303数量 + * "Http304" => (integer) http304数量 + * "Http305" => (integer) http305数量 + * "Http306" => (integer) http306数量 + * "Http307" => (integer) http307数量 + * "Http400" => (integer) http400数量 + * "Http401" => (integer) http401数量 + * "Http402" => (integer) http402数量 + * "Http403" => (integer) http403数量 + * "Http404" => (integer) http404数量 + * "Http405" => (integer) http405数量 + * "Http406" => (integer) http406数量 + * "Http407" => (integer) http407数量 + * "Http408" => (integer) http408数量 + * "Http409" => (integer) http409数量 + * "Http410" => (integer) http410数量 + * "Http411" => (integer) http411数量 + * "Http412" => (integer) http412数量 + * "Http413" => (integer) http413数量 + * "Http414" => (integer) http414数量 + * "Http415" => (integer) http415数量 + * "Http416" => (integer) http416数量 + * "Http417" => (integer) http417数量 + * "Http418" => (integer) http418数量 + * "Http421" => (integer) http421数量 + * "Http422" => (integer) http422数量 + * "Http423" => (integer) http423数量 + * "Http424" => (integer) http424数量 + * "Http425" => (integer) http425数量 + * "Http426" => (integer) http426数量 + * "Http449" => (integer) http449数量 + * "Http451" => (integer) http451数量 + * "Http500" => (integer) http500数量 + * "Http501" => (integer) http501数量 + * "Http502" => (integer) http502数量 + * "Http503" => (integer) http503数量 + * "Http504" => (integer) http504数量 + * "Http505" => (integer) http505数量 + * "Http506" => (integer) http506数量 + * "Http507" => (integer) http507数量 + * "Http509" => (integer) http509数量 + * "Http510" => (integer) http510数量 + * ] + * "Http2XX" => (object) 2xx信息,参考HttpCodeV2Detail结构[ + * "Time" => (integer) 时间 + * "Total" => (integer) 当前分组的总状态码数 + * "Http100" => (integer) http100数量 + * "Http101" => (integer) http101数量 + * "Http102" => (integer) http102数量 + * "Http200" => (integer) http200数量 + * "Http201" => (integer) http201数量 + * "Http202" => (integer) http202数量 + * "Http203" => (integer) http203数量 + * "Http204" => (integer) http204数量 + * "Http205" => (integer) http205数量 + * "Http206" => (integer) http206数量 + * "Http207" => (integer) http207数量 + * "Http300" => (integer) http300数量 + * "Http301" => (integer) http301数量 + * "Http302" => (integer) http302数量 + * "Http303" => (integer) http303数量 + * "Http304" => (integer) http304数量 + * "Http305" => (integer) http305数量 + * "Http306" => (integer) http306数量 + * "Http307" => (integer) http307数量 + * "Http400" => (integer) http400数量 + * "Http401" => (integer) http401数量 + * "Http402" => (integer) http402数量 + * "Http403" => (integer) http403数量 + * "Http404" => (integer) http404数量 + * "Http405" => (integer) http405数量 + * "Http406" => (integer) http406数量 + * "Http407" => (integer) http407数量 + * "Http408" => (integer) http408数量 + * "Http409" => (integer) http409数量 + * "Http410" => (integer) http410数量 + * "Http411" => (integer) http411数量 + * "Http412" => (integer) http412数量 + * "Http413" => (integer) http413数量 + * "Http414" => (integer) http414数量 + * "Http415" => (integer) http415数量 + * "Http416" => (integer) http416数量 + * "Http417" => (integer) http417数量 + * "Http418" => (integer) http418数量 + * "Http421" => (integer) http421数量 + * "Http422" => (integer) http422数量 + * "Http423" => (integer) http423数量 + * "Http424" => (integer) http424数量 + * "Http425" => (integer) http425数量 + * "Http426" => (integer) http426数量 + * "Http449" => (integer) http449数量 + * "Http451" => (integer) http451数量 + * "Http500" => (integer) http500数量 + * "Http501" => (integer) http501数量 + * "Http502" => (integer) http502数量 + * "Http503" => (integer) http503数量 + * "Http504" => (integer) http504数量 + * "Http505" => (integer) http505数量 + * "Http506" => (integer) http506数量 + * "Http507" => (integer) http507数量 + * "Http509" => (integer) http509数量 + * "Http510" => (integer) http510数量 + * ] + * "Http3XX" => (object) 3xx信息,参考HttpCodeV2Detail结构[ + * "Time" => (integer) 时间 + * "Total" => (integer) 当前分组的总状态码数 + * "Http100" => (integer) http100数量 + * "Http101" => (integer) http101数量 + * "Http102" => (integer) http102数量 + * "Http200" => (integer) http200数量 + * "Http201" => (integer) http201数量 + * "Http202" => (integer) http202数量 + * "Http203" => (integer) http203数量 + * "Http204" => (integer) http204数量 + * "Http205" => (integer) http205数量 + * "Http206" => (integer) http206数量 + * "Http207" => (integer) http207数量 + * "Http300" => (integer) http300数量 + * "Http301" => (integer) http301数量 + * "Http302" => (integer) http302数量 + * "Http303" => (integer) http303数量 + * "Http304" => (integer) http304数量 + * "Http305" => (integer) http305数量 + * "Http306" => (integer) http306数量 + * "Http307" => (integer) http307数量 + * "Http400" => (integer) http400数量 + * "Http401" => (integer) http401数量 + * "Http402" => (integer) http402数量 + * "Http403" => (integer) http403数量 + * "Http404" => (integer) http404数量 + * "Http405" => (integer) http405数量 + * "Http406" => (integer) http406数量 + * "Http407" => (integer) http407数量 + * "Http408" => (integer) http408数量 + * "Http409" => (integer) http409数量 + * "Http410" => (integer) http410数量 + * "Http411" => (integer) http411数量 + * "Http412" => (integer) http412数量 + * "Http413" => (integer) http413数量 + * "Http414" => (integer) http414数量 + * "Http415" => (integer) http415数量 + * "Http416" => (integer) http416数量 + * "Http417" => (integer) http417数量 + * "Http418" => (integer) http418数量 + * "Http421" => (integer) http421数量 + * "Http422" => (integer) http422数量 + * "Http423" => (integer) http423数量 + * "Http424" => (integer) http424数量 + * "Http425" => (integer) http425数量 + * "Http426" => (integer) http426数量 + * "Http449" => (integer) http449数量 + * "Http451" => (integer) http451数量 + * "Http500" => (integer) http500数量 + * "Http501" => (integer) http501数量 + * "Http502" => (integer) http502数量 + * "Http503" => (integer) http503数量 + * "Http504" => (integer) http504数量 + * "Http505" => (integer) http505数量 + * "Http506" => (integer) http506数量 + * "Http507" => (integer) http507数量 + * "Http509" => (integer) http509数量 + * "Http510" => (integer) http510数量 + * ] + * "Http4XX" => (object) 4xx信息,参考HttpCodeV2Detail结构[ + * "Time" => (integer) 时间 + * "Total" => (integer) 当前分组的总状态码数 + * "Http100" => (integer) http100数量 + * "Http101" => (integer) http101数量 + * "Http102" => (integer) http102数量 + * "Http200" => (integer) http200数量 + * "Http201" => (integer) http201数量 + * "Http202" => (integer) http202数量 + * "Http203" => (integer) http203数量 + * "Http204" => (integer) http204数量 + * "Http205" => (integer) http205数量 + * "Http206" => (integer) http206数量 + * "Http207" => (integer) http207数量 + * "Http300" => (integer) http300数量 + * "Http301" => (integer) http301数量 + * "Http302" => (integer) http302数量 + * "Http303" => (integer) http303数量 + * "Http304" => (integer) http304数量 + * "Http305" => (integer) http305数量 + * "Http306" => (integer) http306数量 + * "Http307" => (integer) http307数量 + * "Http400" => (integer) http400数量 + * "Http401" => (integer) http401数量 + * "Http402" => (integer) http402数量 + * "Http403" => (integer) http403数量 + * "Http404" => (integer) http404数量 + * "Http405" => (integer) http405数量 + * "Http406" => (integer) http406数量 + * "Http407" => (integer) http407数量 + * "Http408" => (integer) http408数量 + * "Http409" => (integer) http409数量 + * "Http410" => (integer) http410数量 + * "Http411" => (integer) http411数量 + * "Http412" => (integer) http412数量 + * "Http413" => (integer) http413数量 + * "Http414" => (integer) http414数量 + * "Http415" => (integer) http415数量 + * "Http416" => (integer) http416数量 + * "Http417" => (integer) http417数量 + * "Http418" => (integer) http418数量 + * "Http421" => (integer) http421数量 + * "Http422" => (integer) http422数量 + * "Http423" => (integer) http423数量 + * "Http424" => (integer) http424数量 + * "Http425" => (integer) http425数量 + * "Http426" => (integer) http426数量 + * "Http449" => (integer) http449数量 + * "Http451" => (integer) http451数量 + * "Http500" => (integer) http500数量 + * "Http501" => (integer) http501数量 + * "Http502" => (integer) http502数量 + * "Http503" => (integer) http503数量 + * "Http504" => (integer) http504数量 + * "Http505" => (integer) http505数量 + * "Http506" => (integer) http506数量 + * "Http507" => (integer) http507数量 + * "Http509" => (integer) http509数量 + * "Http510" => (integer) http510数量 + * ] + * "Http5XX" => (object) 5xx信息,参考HttpCodeV2Detail结构[ + * "Time" => (integer) 时间 + * "Total" => (integer) 当前分组的总状态码数 + * "Http100" => (integer) http100数量 + * "Http101" => (integer) http101数量 + * "Http102" => (integer) http102数量 + * "Http200" => (integer) http200数量 + * "Http201" => (integer) http201数量 + * "Http202" => (integer) http202数量 + * "Http203" => (integer) http203数量 + * "Http204" => (integer) http204数量 + * "Http205" => (integer) http205数量 + * "Http206" => (integer) http206数量 + * "Http207" => (integer) http207数量 + * "Http300" => (integer) http300数量 + * "Http301" => (integer) http301数量 + * "Http302" => (integer) http302数量 + * "Http303" => (integer) http303数量 + * "Http304" => (integer) http304数量 + * "Http305" => (integer) http305数量 + * "Http306" => (integer) http306数量 + * "Http307" => (integer) http307数量 + * "Http400" => (integer) http400数量 + * "Http401" => (integer) http401数量 + * "Http402" => (integer) http402数量 + * "Http403" => (integer) http403数量 + * "Http404" => (integer) http404数量 + * "Http405" => (integer) http405数量 + * "Http406" => (integer) http406数量 + * "Http407" => (integer) http407数量 + * "Http408" => (integer) http408数量 + * "Http409" => (integer) http409数量 + * "Http410" => (integer) http410数量 + * "Http411" => (integer) http411数量 + * "Http412" => (integer) http412数量 + * "Http413" => (integer) http413数量 + * "Http414" => (integer) http414数量 + * "Http415" => (integer) http415数量 + * "Http416" => (integer) http416数量 + * "Http417" => (integer) http417数量 + * "Http418" => (integer) http418数量 + * "Http421" => (integer) http421数量 + * "Http422" => (integer) http422数量 + * "Http423" => (integer) http423数量 + * "Http424" => (integer) http424数量 + * "Http425" => (integer) http425数量 + * "Http426" => (integer) http426数量 + * "Http449" => (integer) http449数量 + * "Http451" => (integer) http451数量 + * "Http500" => (integer) http500数量 + * "Http501" => (integer) http501数量 + * "Http502" => (integer) http502数量 + * "Http503" => (integer) http503数量 + * "Http504" => (integer) http504数量 + * "Http505" => (integer) http505数量 + * "Http506" => (integer) http506数量 + * "Http507" => (integer) http507数量 + * "Http509" => (integer) http509数量 + * "Http510" => (integer) http510数量 + * ] + * "Http6XX" => (object) 6xx信息,参考HttpCodeV2Detail结构[ + * "Time" => (integer) 时间 + * "Total" => (integer) 当前分组的总状态码数 + * "Http100" => (integer) http100数量 + * "Http101" => (integer) http101数量 + * "Http102" => (integer) http102数量 + * "Http200" => (integer) http200数量 + * "Http201" => (integer) http201数量 + * "Http202" => (integer) http202数量 + * "Http203" => (integer) http203数量 + * "Http204" => (integer) http204数量 + * "Http205" => (integer) http205数量 + * "Http206" => (integer) http206数量 + * "Http207" => (integer) http207数量 + * "Http300" => (integer) http300数量 + * "Http301" => (integer) http301数量 + * "Http302" => (integer) http302数量 + * "Http303" => (integer) http303数量 + * "Http304" => (integer) http304数量 + * "Http305" => (integer) http305数量 + * "Http306" => (integer) http306数量 + * "Http307" => (integer) http307数量 + * "Http400" => (integer) http400数量 + * "Http401" => (integer) http401数量 + * "Http402" => (integer) http402数量 + * "Http403" => (integer) http403数量 + * "Http404" => (integer) http404数量 + * "Http405" => (integer) http405数量 + * "Http406" => (integer) http406数量 + * "Http407" => (integer) http407数量 + * "Http408" => (integer) http408数量 + * "Http409" => (integer) http409数量 + * "Http410" => (integer) http410数量 + * "Http411" => (integer) http411数量 + * "Http412" => (integer) http412数量 + * "Http413" => (integer) http413数量 + * "Http414" => (integer) http414数量 + * "Http415" => (integer) http415数量 + * "Http416" => (integer) http416数量 + * "Http417" => (integer) http417数量 + * "Http418" => (integer) http418数量 + * "Http421" => (integer) http421数量 + * "Http422" => (integer) http422数量 + * "Http423" => (integer) http423数量 + * "Http424" => (integer) http424数量 + * "Http425" => (integer) http425数量 + * "Http426" => (integer) http426数量 + * "Http449" => (integer) http449数量 + * "Http451" => (integer) http451数量 + * "Http500" => (integer) http500数量 + * "Http501" => (integer) http501数量 + * "Http502" => (integer) http502数量 + * "Http503" => (integer) http503数量 + * "Http504" => (integer) http504数量 + * "Http505" => (integer) http505数量 + * "Http506" => (integer) http506数量 + * "Http507" => (integer) http507数量 + * "Http509" => (integer) http509数量 + * "Http510" => (integer) http510数量 + * ] + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getUcdnDomainHttpCodeV2(GetUcdnDomainHttpCodeV2Request $request = null): GetUcdnDomainHttpCodeV2Response + { + $resp = $this->invoke($request); + return new GetUcdnDomainHttpCodeV2Response($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUcdnDomainInfoList - 获取域名基本信息 + * + * See also: https://docs.ucloud.cn/api/UCDN-api/get_ucdn_domain_info_list + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "PageSize" => (integer) 分页的大小,不填默认每页20个 + * "PageIndex" => (integer) 返回第几页,不填默认是第1页 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 账户下域名总个数 + * "DomainInfoList" => (array) 域名基本信息[ + * [ + * "Domain" => (string) 域名 + * "DomainId" => (string) 域名的资源id + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getUcdnDomainInfoList(GetUcdnDomainInfoListRequest $request = null): GetUcdnDomainInfoListResponse + { + $resp = $this->invoke($request); + return new GetUcdnDomainInfoListResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUcdnDomainLog - 获取加速域名原始日志 + * + * See also: https://docs.ucloud.cn/api/UCDN-api/get_ucdn_domain_log + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "DomainId" => (array) 域名ID,创建加速域名时生成。默认全部域名 + * "BeginTime" => (integer) 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。 + * "EndTime" => (integer) 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * "Type" => (integer) 查询粒度 0=default(没有粒度) 1=按小时 2=按天 + * ] + * + * Outputs: + * + * $outputs = [ + * "LogSet" => (array) 获取日志的连接地址。具体参考下面LogSetList[ + * [ + * "Domain" => (string) 域名 + * "Logs" => (array) 域名信息列表,参考LogSetInfo[ + * [ + * "Time" => (integer) 日志时间UnixTime + * "CnLog" => (array) 国内日志url列表 + * "AbroadLog" => (array) 国外日志url列表 + * ] + * ] + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getUcdnDomainLog(GetUcdnDomainLogRequest $request = null): GetUcdnDomainLogResponse + { + $resp = $this->invoke($request); + return new GetUcdnDomainLogResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUcdnDomainOriginHttpCode - 获取域名源站状态码监控 + * + * See also: https://docs.ucloud.cn/api/UCDN-api/get_ucdn_domain_origin_http_code + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Type" => (integer) 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度,3表示按照1分钟粒度) + * "DomainId" => (array) 域名id,创建域名时生成的id。默认全部域名 + * "Areacode" => (string) 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + * "BeginTime" => (integer) 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + * "EndTime" => (integer) 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * ] + * + * Outputs: + * + * $outputs = [ + * "HttpCodeDetail" => (array) 状态码实例表。详细见HttpCodeInfo[ + * [ + * "Time" => (integer) 带宽获取的时间点。格式:时间戳 + * "HttpOneXX" => (integer) 1xx数量 + * "HttpTwoXX" => (integer) 2xx数量 + * "HttpThreeXX" => (integer) 3xx数量 + * "HttpFourXX" => (integer) 4xx数量 + * "HttpFiveXX" => (integer) 5xx数量 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getUcdnDomainOriginHttpCode(GetUcdnDomainOriginHttpCodeRequest $request = null): GetUcdnDomainOriginHttpCodeResponse + { + $resp = $this->invoke($request); + return new GetUcdnDomainOriginHttpCodeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUcdnDomainOriginHttpCodeDetail - 获取域名源站详细状态码监控 + * + * See also: https://docs.ucloud.cn/api/UCDN-api/get_ucdn_domain_origin_http_code_detail + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Type" => (integer) 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天粒度,3表示按照一分钟粒度) + * "BeginTime" => (integer) 查询的起始时间,格式为Unix Timestamp。 + * "EndTime" => (integer) 查询的结束时间,格式为Unix Timestamp。 + * "DomainId" => (array) 域名id,创建域名时生成的id。默认全部域名 + * "Areacode" => (string) 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + * ] + * + * Outputs: + * + * $outputs = [ + * "HttpCodeV2Detail" => (array) 状态码详情[ + * [ + * "Time" => (integer) 时间 + * "Total" => (integer) 当前分组的总状态码数 + * "Http100" => (integer) http100数量 + * "Http101" => (integer) http101数量 + * "Http102" => (integer) http102数量 + * "Http200" => (integer) http200数量 + * "Http201" => (integer) http201数量 + * "Http202" => (integer) http202数量 + * "Http203" => (integer) http203数量 + * "Http204" => (integer) http204数量 + * "Http205" => (integer) http205数量 + * "Http206" => (integer) http206数量 + * "Http207" => (integer) http207数量 + * "Http300" => (integer) http300数量 + * "Http301" => (integer) http301数量 + * "Http302" => (integer) http302数量 + * "Http303" => (integer) http303数量 + * "Http304" => (integer) http304数量 + * "Http305" => (integer) http305数量 + * "Http306" => (integer) http306数量 + * "Http307" => (integer) http307数量 + * "Http400" => (integer) http400数量 + * "Http401" => (integer) http401数量 + * "Http402" => (integer) http402数量 + * "Http403" => (integer) http403数量 + * "Http404" => (integer) http404数量 + * "Http405" => (integer) http405数量 + * "Http406" => (integer) http406数量 + * "Http407" => (integer) http407数量 + * "Http408" => (integer) http408数量 + * "Http409" => (integer) http409数量 + * "Http410" => (integer) http410数量 + * "Http411" => (integer) http411数量 + * "Http412" => (integer) http412数量 + * "Http413" => (integer) http413数量 + * "Http414" => (integer) http414数量 + * "Http415" => (integer) http415数量 + * "Http416" => (integer) http416数量 + * "Http417" => (integer) http417数量 + * "Http418" => (integer) http418数量 + * "Http421" => (integer) http421数量 + * "Http422" => (integer) http422数量 + * "Http423" => (integer) http423数量 + * "Http424" => (integer) http424数量 + * "Http425" => (integer) http425数量 + * "Http426" => (integer) http426数量 + * "Http449" => (integer) http449数量 + * "Http451" => (integer) http451数量 + * "Http500" => (integer) http500数量 + * "Http501" => (integer) http501数量 + * "Http502" => (integer) http502数量 + * "Http503" => (integer) http503数量 + * "Http504" => (integer) http504数量 + * "Http505" => (integer) http505数量 + * "Http506" => (integer) http506数量 + * "Http507" => (integer) http507数量 + * "Http509" => (integer) http509数量 + * "Http510" => (integer) http510数量 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getUcdnDomainOriginHttpCodeDetail(GetUcdnDomainOriginHttpCodeDetailRequest $request = null): GetUcdnDomainOriginHttpCodeDetailResponse + { + $resp = $this->invoke($request); + return new GetUcdnDomainOriginHttpCodeDetailResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUcdnDomainOriginRequestNum - 获取域名回源请求数 + * + * See also: https://docs.ucloud.cn/api/UCDN-api/get_ucdn_domain_origin_request_num + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Type" => (integer) 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度, 3=按1分钟) + * "BeginTime" => (integer) 查询的起始时间,格式为Unix Timestamp + * "EndTime" => (integer) 查询的结束时间,格式为Unix Timestamp + * "DomainId" => (array) 域名id,创建域名时生成的id。默认全部域名 + * "Areacode" => (string) 查询区域 cn代表国内 abroad代表海外,只支持国内 + * ] + * + * Outputs: + * + * $outputs = [ + * "RequestList" => (array) 请求数实例表。[ + * [ + * "Time" => (integer) 带宽获取的时间点。格式:时间戳 + * "CdnRequest" => (number) 返回值返回指定时间区间内的cdn收到的请求次数之和 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getUcdnDomainOriginRequestNum(GetUcdnDomainOriginRequestNumRequest $request = null): GetUcdnDomainOriginRequestNumResponse + { + $resp = $this->invoke($request); + return new GetUcdnDomainOriginRequestNumResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUcdnDomainPrefetchEnable - 获取域名预取开启状态 + * + * See also: https://docs.ucloud.cn/api/UCDN-api/get_ucdn_domain_prefetch_enable + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "DomainId" => (string) 域名ID,创建加速域名时生成。 + * ] + * + * Outputs: + * + * $outputs = [ + * "Enable" => (integer) 0表示该域名未开启预取,1表示该域名已开启预取 + * ] + * + * @throws UCloudException + */ + public function getUcdnDomainPrefetchEnable(GetUcdnDomainPrefetchEnableRequest $request = null): GetUcdnDomainPrefetchEnableResponse + { + $resp = $this->invoke($request); + return new GetUcdnDomainPrefetchEnableResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUcdnDomainRequestNumV2 - 获取域名请求数 + * + * See also: https://docs.ucloud.cn/api/UCDN-api/get_ucdn_domain_request_num_v2 + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Type" => (integer) 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度, 3=按1分钟) + * "BeginTime" => (integer) 查询的起始时间,格式为Unix Timestamp + * "EndTime" => (integer) 查询的结束时间,格式为Unix Timestamp + * "DomainId" => (array) 域名id,创建域名时生成的id。默认全部域名 + * "Areacode" => (string) 查询区域 cn代表国内 abroad代表海外,只支持国内 + * ] + * + * Outputs: + * + * $outputs = [ + * "RequestList" => (array) 请求数实例表。[ + * [ + * "Time" => (integer) 带宽获取的时间点。格式:时间戳 + * "CdnRequest" => (number) 返回值返回指定时间区间内的cdn收到的请求次数之和 + * "OriginRequest" => (number) 返回值返回指定时间区间内的cdn回源的请求次数之和 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getUcdnDomainRequestNumV2(GetUcdnDomainRequestNumV2Request $request = null): GetUcdnDomainRequestNumV2Response + { + $resp = $this->invoke($request); + return new GetUcdnDomainRequestNumV2Response($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUcdnDomainRequestNumV3 - 获取域名请求数 + * + * See also: https://docs.ucloud.cn/api/UCDN-api/get_ucdn_domain_request_num_v3 + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Type" => (integer) 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度, 3=按1分钟) + * "BeginTime" => (integer) 查询的起始时间,格式为Unix Timestamp + * "EndTime" => (integer) 查询的结束时间,格式为Unix Timestamp + * "DomainId" => (array) 域名id,创建域名时生成的id。默认全部域名 + * "Areacode" => (string) 查询区域 cn代表国内 abroad代表海外,只支持国内 + * "Protocol" => (string) 协议,http、https 不传则查所有协议的带宽 + * ] + * + * Outputs: + * + * $outputs = [ + * "RequestList" => (array) 请求数实例表。[ + * [ + * "Time" => (integer) 带宽获取的时间点。格式:时间戳 + * "CdnRequest" => (number) 返回值返回指定时间区间内的cdn收到的请求次数之和 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getUcdnDomainRequestNumV3(GetUcdnDomainRequestNumV3Request $request = null): GetUcdnDomainRequestNumV3Response + { + $resp = $this->invoke($request); + return new GetUcdnDomainRequestNumV3Response($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUcdnDomainTraffic - 获取加速域名流量使用信息 + * + * See also: https://docs.ucloud.cn/api/UCDN-api/get_ucdn_domain_traffic + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "AccountType" => (string) 指定按项目查询,还是按整个账户查询 取值 top 表示按整个账户查询,取值org表示按项目查询 + * "DomainId" => (array) 域名ID,创建加速域名时生成,n从自然数0开始。默认全部域名 + * "Areacode" => (string) 查询流量区域 cn代表国内 abroad代表海外,默认全部区域 + * "BeginTime" => (integer) 查询的起始日期,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值 + * "EndTime" => (integer) 查询的结束日期,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天 + * ] + * + * Outputs: + * + * $outputs = [ + * "TrafficSet" => (array) 流量实例表,具体结构见 UcdnDomainTrafficSet[ + * [ + * "Time" => (integer) 流量获取的时间点,格式为Unix Timestamp + * "Value" => (number) 查询每日流量总值,单位:GB + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getUcdnDomainTraffic(GetUcdnDomainTrafficRequest $request = null): GetUcdnDomainTrafficResponse + { + $resp = $this->invoke($request); + return new GetUcdnDomainTrafficResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUcdnPassBandwidth - 获取回源带宽数据(cdn回客户源站部分) + * + * See also: https://docs.ucloud.cn/api/UCDN-api/get_ucdn_pass_bandwidth + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Type" => (integer) 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度) + * "DomainId" => (array) 域名id,创建域名时生成的id。默认全部域名 + * "Areacode" => (string) 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + * "BeginTime" => (integer) 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + * "EndTime" => (integer) 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * ] + * + * Outputs: + * + * $outputs = [ + * "BandwidthDetail" => (array) 回源带宽数据[ + * [ + * "Time" => (integer) 宽获取的时间点。格式:时间戳 + * "Bandwidth" => (number) 返回值带宽值数据。 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getUcdnPassBandwidth(GetUcdnPassBandwidthRequest $request = null): GetUcdnPassBandwidthResponse + { + $resp = $this->invoke($request); + return new GetUcdnPassBandwidthResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUcdnPassBandwidthV2 - 获取回源带宽数据(cdn回客户源站部分) + * + * See also: https://docs.ucloud.cn/api/UCDN-api/get_ucdn_pass_bandwidth_v2 + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Type" => (integer) 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度,3表示按照1分钟粒度) + * "DomainId" => (array) 域名id,创建域名时生成的id。默认全部域名 + * "Areacode" => (string) 查询带宽区域 cn代表国内 abroad代表海外,只支持国内 + * "BeginTime" => (integer) 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。 + * "EndTime" => (integer) 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。 + * ] + * + * Outputs: + * + * $outputs = [ + * "BandwidthList" => (array) 回源带宽数据[ + * [ + * "Time" => (integer) 宽获取的时间点。格式:时间戳 + * "Bandwidth" => (number) 返回值带宽值数据。 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getUcdnPassBandwidthV2(GetUcdnPassBandwidthV2Request $request = null): GetUcdnPassBandwidthV2Response + { + $resp = $this->invoke($request); + return new GetUcdnPassBandwidthV2Response($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUcdnProIspBandwidthV2 - 按省份运营商获取域名带宽数据 + * + * See also: https://docs.ucloud.cn/api/UCDN-api/get_ucdn_pro_isp_bandwidth_v2 + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "BeginTime" => (integer) 查询的起始日期,格式为Unix Timestamp + * "EndTime" => (integer) 查询的结束日期,格式为Unix Timestamp + * "Type" => (integer) 时间粒度0 (按5分钟粒度)1 (按小时粒度)2(按天粒度)3(按分钟粒度) + * "DomainId" => (array) 域名id,创建域名时生成的id。默认全部域名 + * "Province" => (array) 省份代码(省份拼音),可以传多个,不传则查询所有省份 + * "Isp" => (string) 运营商代码(运营商拼音),一次只能查询一个运营商,不传递默认取所有运营商 + * ] + * + * Outputs: + * + * $outputs = [ + * "BandwidthSet" => (array) 按省份的带宽流量实例表。具体参考下面BandwidthSet[ + * [ + * "Province" => (string) 省份代码 + * "BandwidthTrafficList" => (array) 省份带宽流量实例表[ + * [ + * "Time" => (integer) 带宽获取的时间点。格式:时间戳 + * "CdnBandwidth" => (number) 返回值返回指定时间区间内CDN的带宽峰值,单位Mbps + * "Traffic" => (number) 对应时间粒度的流量,单位字节 + * ] + * ] + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getUcdnProIspBandwidthV2(GetUcdnProIspBandwidthV2Request $request = null): GetUcdnProIspBandwidthV2Response + { + $resp = $this->invoke($request); + return new GetUcdnProIspBandwidthV2Response($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUcdnProIspRequestNumV2 - 按省份运营商获取域名请求数 + * + * See also: https://docs.ucloud.cn/api/UCDN-api/get_ucdn_pro_isp_request_num_v2 + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "BeginTime" => (integer) 查询的起始日期,格式为Unix Timestamp 忽略时间部分 + * "EndTime" => (integer) 查询的结束日期,格式为Unix Timestamp 忽略时间部分 + * "DomainId" => (array) 域名id,创建域名时生成的id。默认全部域名 + * "Province" => (array) 省份代码,可以传多个,不传则查询所有省份 + * "Isp" => (string) 运营商代码,一次只能查询一个运营商,不传递默认取所有运营商 + * "Type" => (integer) 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天粒度,3表示按照一分钟粒度) + * ] + * + * Outputs: + * + * $outputs = [ + * "RequestNumSet" => (array) 按省份的请求数实例表。具体参考下面RequestList[ + * [ + * "Province" => (string) 省份代码 + * "RequestList" => (array) 省份请求数实例表 ProIspRequestListV2[ + * [ + * "Time" => (integer) 带宽获取的时间点。格式:时间戳 + * "CdnRequest" => (number) 返回值返回指定时间区间内的请求数 + * ] + * ] + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getUcdnProIspRequestNumV2(GetUcdnProIspRequestNumV2Request $request = null): GetUcdnProIspRequestNumV2Response + { + $resp = $this->invoke($request); + return new GetUcdnProIspRequestNumV2Response($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUcdnTraffic - 获取流量信息 + * + * See also: https://docs.ucloud.cn/api/UCDN-api/get_ucdn_traffic + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * ] + * + * Outputs: + * + * $outputs = [ + * "TrafficSet" => (array) 用户不同区域的流量信息, 具体结构参见TrafficSet部分[ + * [ + * "Areacode" => (string) 购买流量的区域, cn: 国内; abroad: 国外 + * "TrafficTotal" => (number) Areacode区域内总购买流量, 单位GB + * "TrafficLeft" => (number) Areacode区域内总剩余流量, 单位GB + * "TrafficUsed" => (number) Areacode区域内总使用流量, 单位GB + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getUcdnTraffic(GetUcdnTrafficRequest $request = null): GetUcdnTrafficResponse + { + $resp = $this->invoke($request); + return new GetUcdnTrafficResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUcdnTrafficV2 - 获取流量信息 + * + * See also: https://docs.ucloud.cn/api/UCDN-api/get_ucdn_traffic_v2 + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * ] + * + * Outputs: + * + * $outputs = [ + * "TrafficSet" => (array) 用户不同区域的流量信息, 具体结构参见TrafficSet部分[ + * [ + * "Areacode" => (string) 购买流量的区域, cn: 国内; abroad: 国外 + * "TrafficTotal" => (number) Areacode区域内总购买流量, 单位GB + * "TrafficLeft" => (number) Areacode区域内总剩余流量, 单位GB + * "TrafficUsed" => (number) Areacode区域内总使用流量, 单位GB + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getUcdnTrafficV2(GetUcdnTrafficV2Request $request = null): GetUcdnTrafficV2Response + { + $resp = $this->invoke($request); + return new GetUcdnTrafficV2Response($resp->toArray(), $resp->getRequestId()); + } + + /** + * PrefetchNewUcdnDomainCache - 提交预取任务 + * + * See also: https://docs.ucloud.cn/api/UCDN-api/prefetch_new_ucdn_domain_cache + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "UrlList" => (array) 预热URL列表,n从自然数0开始。UrlList.n字段必须以”http://域名/”开始。如刷新文件目录a下面img.png文件, 格式为http://abc.ucloud.cn/a/img.png。请正确提交需要刷新的域名 + * ] + * + * Outputs: + * + * $outputs = [ + * "TaskId" => (string) 本次提交url对应的任务id + * ] + * + * @throws UCloudException + */ + public function prefetchNewUcdnDomainCache(PrefetchNewUcdnDomainCacheRequest $request = null): PrefetchNewUcdnDomainCacheResponse + { + $resp = $this->invoke($request); + return new PrefetchNewUcdnDomainCacheResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * QueryIpLocation - 查询IP信息 + * + * See also: https://docs.ucloud.cn/api/UCDN-api/query_ip_location + * + * Arguments: + * + * $args = [ + * "Ip" => (array) ip列表 + * ] + * + * Outputs: + * + * $outputs = [ + * "Data" => (array) IP信息列表[ + * [ + * "Ip" => (string) 客户端请求的ip + * "Area" => (string) 地区 + * "Isp" => (string) 运营商 + * "City" => (string) 城市 + * "Exist" => (boolean) ip是否存在 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function queryIpLocation(QueryIpLocationRequest $request = null): QueryIpLocationResponse + { + $resp = $this->invoke($request); + return new QueryIpLocationResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * RefreshNewUcdnDomainCache - 刷新缓存 + * + * See also: https://docs.ucloud.cn/api/UCDN-api/refresh_new_ucdn_domain_cache + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Type" => (string) 刷新类型,file代表文件刷新,dir 代表路径刷新 + * "UrlList" => (array) 需要刷新的URL,n 从自然数0开始,刷新多个URL列表时,一次最多提交30个。必须以”http://域名/”开始。目录要以”/”结尾, 如刷新目录a下所有文件,格式为:http://abc.ucloud.cn/a/;如刷新文件目录a下面img.png文件, 格式为http://abc.ucloud.cn/a/img.png。请正确提交需要刷新的域名 + * ] + * + * Outputs: + * + * $outputs = [ + * "TaskId" => (string) 本次提交url对应的任务id + * ] + * + * @throws UCloudException + */ + public function refreshNewUcdnDomainCache(RefreshNewUcdnDomainCacheRequest $request = null): RefreshNewUcdnDomainCacheResponse + { + $resp = $this->invoke($request); + return new RefreshNewUcdnDomainCacheResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * SwitchUcdnChargeType - 切换账号计费方式 + * + * See also: https://docs.ucloud.cn/api/UCDN-api/switch_ucdn_charge_type + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "ChargeType" => (string) 计费方式。traffic代表按流量包计费,bandwidth按带宽付费 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function switchUcdnChargeType(SwitchUcdnChargeTypeRequest $request = null): SwitchUcdnChargeTypeResponse + { + $resp = $this->invoke($request); + return new SwitchUcdnChargeTypeResponse($resp->toArray(), $resp->getRequestId()); + } +} diff --git a/src/UDB/Apis/BackupUDBInstanceBinlogRequest.php b/src/UDB/Apis/BackupUDBInstanceBinlogRequest.php new file mode 100644 index 00000000..9f919f50 --- /dev/null +++ b/src/UDB/Apis/BackupUDBInstanceBinlogRequest.php @@ -0,0 +1,152 @@ + "BackupUDBInstanceBinlog"]); + $this->markRequired("Region"); + $this->markRequired("DBId"); + $this->markRequired("BackupFile"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DBId: DB实例Id,该值可以通过DescribeUDBInstance获取 + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: DB实例Id,该值可以通过DescribeUDBInstance获取 + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } + + /** + * BackupFile: 需要备份文件,可通过DescribeUDBInstanceBinlog获得 如果要传入多个文件名,以空格键分割,用单引号包含. + * + * @return string|null + */ + public function getBackupFile(): string + { + return $this->get("BackupFile"); + } + + /** + * BackupFile: 需要备份文件,可通过DescribeUDBInstanceBinlog获得 如果要传入多个文件名,以空格键分割,用单引号包含. + * + * @param string $backupFile + */ + public function setBackupFile(string $backupFile) + { + $this->set("BackupFile", $backupFile); + } + + /** + * BackupName: DB备份文件名称 + * + * @return string|null + */ + public function getBackupName(): string + { + return $this->get("BackupName"); + } + + /** + * BackupName: DB备份文件名称 + * + * @param string $backupName + */ + public function setBackupName(string $backupName) + { + $this->set("BackupName", $backupName); + } +} diff --git a/src/UDB/Apis/BackupUDBInstanceBinlogResponse.php b/src/UDB/Apis/BackupUDBInstanceBinlogResponse.php new file mode 100644 index 00000000..9eb1d794 --- /dev/null +++ b/src/UDB/Apis/BackupUDBInstanceBinlogResponse.php @@ -0,0 +1,26 @@ + "BackupUDBInstanceErrorLog"]); + $this->markRequired("Region"); + $this->markRequired("DBId"); + $this->markRequired("BackupName"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DBId: DB实例Id,该值可以通过DescribeUDBInstance获取 + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: DB实例Id,该值可以通过DescribeUDBInstance获取 + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } + + /** + * BackupName: 备份名称 + * + * @return string|null + */ + public function getBackupName(): string + { + return $this->get("BackupName"); + } + + /** + * BackupName: 备份名称 + * + * @param string $backupName + */ + public function setBackupName(string $backupName) + { + $this->set("BackupName", $backupName); + } +} diff --git a/src/UDB/Apis/BackupUDBInstanceErrorLogResponse.php b/src/UDB/Apis/BackupUDBInstanceErrorLogResponse.php new file mode 100644 index 00000000..456c967b --- /dev/null +++ b/src/UDB/Apis/BackupUDBInstanceErrorLogResponse.php @@ -0,0 +1,26 @@ + "BackupUDBInstance"]); + $this->markRequired("Region"); + $this->markRequired("DBId"); + $this->markRequired("BackupName"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DBId: DB实例Id,该值可以通过DescribeUDBInstance获取 + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: DB实例Id,该值可以通过DescribeUDBInstance获取 + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } + + /** + * BackupName: 备份名称 + * + * @return string|null + */ + public function getBackupName(): string + { + return $this->get("BackupName"); + } + + /** + * BackupName: 备份名称 + * + * @param string $backupName + */ + public function setBackupName(string $backupName) + { + $this->set("BackupName", $backupName); + } + + /** + * UseBlacklist: 是否使用黑名单备份,默认false + * + * @return boolean|null + */ + public function getUseBlacklist(): bool + { + return $this->get("UseBlacklist"); + } + + /** + * UseBlacklist: 是否使用黑名单备份,默认false + * + * @param boolean $useBlacklist + */ + public function setUseBlacklist(bool $useBlacklist) + { + $this->set("UseBlacklist", $useBlacklist); + } + + /** + * BackupMethod: 使用的备份方式。(快照备份即物理备份。注意只有SSD版本的mysql实例支持设置为snapshot) + * + * @return string|null + */ + public function getBackupMethod(): string + { + return $this->get("BackupMethod"); + } + + /** + * BackupMethod: 使用的备份方式。(快照备份即物理备份。注意只有SSD版本的mysql实例支持设置为snapshot) + * + * @param string $backupMethod + */ + public function setBackupMethod(string $backupMethod) + { + $this->set("BackupMethod", $backupMethod); + } + + /** + * Blacklist: 备份黑名单列表,以 ; 分隔。注意:只有逻辑备份下备份黑名单才生效,快照备份备份黑名单下无效 + * + * @return string|null + */ + public function getBlacklist(): string + { + return $this->get("Blacklist"); + } + + /** + * Blacklist: 备份黑名单列表,以 ; 分隔。注意:只有逻辑备份下备份黑名单才生效,快照备份备份黑名单下无效 + * + * @param string $blacklist + */ + public function setBlacklist(string $blacklist) + { + $this->set("Blacklist", $blacklist); + } + + /** + * ForceBackup: true表示逻辑备份时是使用 --force 参数,false表示不使用 --force 参数。物理备份此参数无效。 + * + * @return boolean|null + */ + public function getForceBackup(): bool + { + return $this->get("ForceBackup"); + } + + /** + * ForceBackup: true表示逻辑备份时是使用 --force 参数,false表示不使用 --force 参数。物理备份此参数无效。 + * + * @param boolean $forceBackup + */ + public function setForceBackup(bool $forceBackup) + { + $this->set("ForceBackup", $forceBackup); + } +} diff --git a/src/UDB/Apis/BackupUDBInstanceResponse.php b/src/UDB/Apis/BackupUDBInstanceResponse.php new file mode 100644 index 00000000..937c3165 --- /dev/null +++ b/src/UDB/Apis/BackupUDBInstanceResponse.php @@ -0,0 +1,26 @@ + "BackupUDBInstanceSlowLog"]); + $this->markRequired("Region"); + $this->markRequired("DBId"); + $this->markRequired("BeginTime"); + $this->markRequired("EndTime"); + $this->markRequired("BackupName"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DBId: DB实例Id,该值可以通过DescribeUDBInstance获取 + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: DB实例Id,该值可以通过DescribeUDBInstance获取 + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } + + /** + * BeginTime: 过滤条件:起始时间(时间戳) + * + * @return integer|null + */ + public function getBeginTime(): int + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 过滤条件:起始时间(时间戳) + * + * @param int $beginTime + */ + public function setBeginTime(int $beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 过滤条件:结束时间(时间戳) + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 过滤条件:结束时间(时间戳) + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } + + /** + * BackupName: 备份文件名称 + * + * @return string|null + */ + public function getBackupName(): string + { + return $this->get("BackupName"); + } + + /** + * BackupName: 备份文件名称 + * + * @param string $backupName + */ + public function setBackupName(string $backupName) + { + $this->set("BackupName", $backupName); + } +} diff --git a/src/UDB/Apis/BackupUDBInstanceSlowLogResponse.php b/src/UDB/Apis/BackupUDBInstanceSlowLogResponse.php new file mode 100644 index 00000000..6c22be26 --- /dev/null +++ b/src/UDB/Apis/BackupUDBInstanceSlowLogResponse.php @@ -0,0 +1,26 @@ + "ChangeUDBParamGroup"]); + $this->markRequired("Region"); + $this->markRequired("DBId"); + $this->markRequired("GroupId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DBId: DB实例Id + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: DB实例Id + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } + + /** + * GroupId: 参数组Id + * + * @return string|null + */ + public function getGroupId(): string + { + return $this->get("GroupId"); + } + + /** + * GroupId: 参数组Id + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } +} diff --git a/src/UDB/Apis/ChangeUDBParamGroupResponse.php b/src/UDB/Apis/ChangeUDBParamGroupResponse.php new file mode 100644 index 00000000..3f5a159e --- /dev/null +++ b/src/UDB/Apis/ChangeUDBParamGroupResponse.php @@ -0,0 +1,26 @@ + "CheckRecoverUDBInstance"]); + $this->markRequired("Region"); + $this->markRequired("SrcDBId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SrcDBId: 源实例的Id + * + * @return string|null + */ + public function getSrcDBId(): string + { + return $this->get("SrcDBId"); + } + + /** + * SrcDBId: 源实例的Id + * + * @param string $srcDBId + */ + public function setSrcDBId(string $srcDBId) + { + $this->set("SrcDBId", $srcDBId); + } +} diff --git a/src/UDB/Apis/CheckRecoverUDBInstanceResponse.php b/src/UDB/Apis/CheckRecoverUDBInstanceResponse.php new file mode 100644 index 00000000..a9d0e64c --- /dev/null +++ b/src/UDB/Apis/CheckRecoverUDBInstanceResponse.php @@ -0,0 +1,44 @@ +get("LastestTime"); + } + + /** + * LastestTime: 核查成功返回值为可以回档到的最近时刻,核查失败不返回 + * + * @param int $lastestTime + */ + public function setLastestTime(int $lastestTime) + { + $this->set("LastestTime", $lastestTime); + } +} diff --git a/src/UDB/Apis/CheckUDBInstanceToHAAllowanceRequest.php b/src/UDB/Apis/CheckUDBInstanceToHAAllowanceRequest.php new file mode 100644 index 00000000..a5baa98f --- /dev/null +++ b/src/UDB/Apis/CheckUDBInstanceToHAAllowanceRequest.php @@ -0,0 +1,91 @@ + "CheckUDBInstanceToHAAllowance"]); + $this->markRequired("Region"); + $this->markRequired("DBId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DBId: 实例的Id,该值可以通过DescribeUDBInstance获取 + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: 实例的Id,该值可以通过DescribeUDBInstance获取 + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } +} diff --git a/src/UDB/Apis/CheckUDBInstanceToHAAllowanceResponse.php b/src/UDB/Apis/CheckUDBInstanceToHAAllowanceResponse.php new file mode 100644 index 00000000..e8b3bf31 --- /dev/null +++ b/src/UDB/Apis/CheckUDBInstanceToHAAllowanceResponse.php @@ -0,0 +1,44 @@ +get("Allowance"); + } + + /** + * Allowance: Yes ,No ,Yes即可以升级,No为不可以升级 + * + * @param string $allowance + */ + public function setAllowance(string $allowance) + { + $this->set("Allowance", $allowance); + } +} diff --git a/src/UDB/Apis/ClearUDBLogRequest.php b/src/UDB/Apis/ClearUDBLogRequest.php new file mode 100644 index 00000000..08ca9e51 --- /dev/null +++ b/src/UDB/Apis/ClearUDBLogRequest.php @@ -0,0 +1,152 @@ + "ClearUDBLog"]); + $this->markRequired("Region"); + $this->markRequired("DBId"); + $this->markRequired("LogType"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DBId: DB实例的id,该值可以通过DescribeUDBInstance获取 + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: DB实例的id,该值可以通过DescribeUDBInstance获取 + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } + + /** + * LogType: 日志类型,10-error(暂不支持)、20-slow(暂不支持 )、30-binlog + * + * @return integer|null + */ + public function getLogType(): int + { + return $this->get("LogType"); + } + + /** + * LogType: 日志类型,10-error(暂不支持)、20-slow(暂不支持 )、30-binlog + * + * @param int $logType + */ + public function setLogType(int $logType) + { + $this->set("LogType", $logType); + } + + /** + * BeforeTime: 删除时间点(至少前一天)之前log,采用时间戳(秒),默认当 前时间点前一天 + * + * @return integer|null + */ + public function getBeforeTime(): int + { + return $this->get("BeforeTime"); + } + + /** + * BeforeTime: 删除时间点(至少前一天)之前log,采用时间戳(秒),默认当 前时间点前一天 + * + * @param int $beforeTime + */ + public function setBeforeTime(int $beforeTime) + { + $this->set("BeforeTime", $beforeTime); + } +} diff --git a/src/UDB/Apis/ClearUDBLogResponse.php b/src/UDB/Apis/ClearUDBLogResponse.php new file mode 100644 index 00000000..f3fa2932 --- /dev/null +++ b/src/UDB/Apis/ClearUDBLogResponse.php @@ -0,0 +1,26 @@ + "CreateMongoDBReplicaSet"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("Name"); + $this->markRequired("AdminPassword"); + $this->markRequired("DBTypeId"); + $this->markRequired("DiskSpace"); + $this->markRequired("ParamGroupId"); + $this->markRequired("MemoryLimit"); + $this->markRequired("Port"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Name: PrimaryDB实例名称,至少6位 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: PrimaryDB实例名称,至少6位 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * AdminPassword: 管理员密码 + * + * @return string|null + */ + public function getAdminPassword(): string + { + return $this->get("AdminPassword"); + } + + /** + * AdminPassword: 管理员密码 + * + * @param string $adminPassword + */ + public function setAdminPassword(string $adminPassword) + { + $this->set("AdminPassword", $adminPassword); + } + + /** + * DBTypeId: DB类型id对应的字符串形式(例如:mongodb-2.6)注意:当前仅支持mongodb + * + * @return string|null + */ + public function getDBTypeId(): string + { + return $this->get("DBTypeId"); + } + + /** + * DBTypeId: DB类型id对应的字符串形式(例如:mongodb-2.6)注意:当前仅支持mongodb + * + * @param string $dbTypeId + */ + public function setDBTypeId(string $dbTypeId) + { + $this->set("DBTypeId", $dbTypeId); + } + + /** + * DiskSpace: 磁盘空间(GB), 暂时支持20G - 3000G + * + * @return integer|null + */ + public function getDiskSpace(): int + { + return $this->get("DiskSpace"); + } + + /** + * DiskSpace: 磁盘空间(GB), 暂时支持20G - 3000G + * + * @param int $diskSpace + */ + public function setDiskSpace(int $diskSpace) + { + $this->set("DiskSpace", $diskSpace); + } + + /** + * ParamGroupId: DB实例使用的配置参数组id + * + * @return integer|null + */ + public function getParamGroupId(): int + { + return $this->get("ParamGroupId"); + } + + /** + * ParamGroupId: DB实例使用的配置参数组id + * + * @param int $paramGroupId + */ + public function setParamGroupId(int $paramGroupId) + { + $this->set("ParamGroupId", $paramGroupId); + } + + /** + * MemoryLimit: 内存限制(MB),目前支持以下几档 1000M/2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M + * + * @return integer|null + */ + public function getMemoryLimit(): int + { + return $this->get("MemoryLimit"); + } + + /** + * MemoryLimit: 内存限制(MB),目前支持以下几档 1000M/2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M + * + * @param int $memoryLimit + */ + public function setMemoryLimit(int $memoryLimit) + { + $this->set("MemoryLimit", $memoryLimit); + } + + /** + * Port: 端口号 + * + * @return integer|null + */ + public function getPort(): int + { + return $this->get("Port"); + } + + /** + * Port: 端口号 + * + * @param int $port + */ + public function setPort(int $port) + { + $this->set("Port", $port); + } + + /** + * ChargeType: Year, Month, Dynamic,Trial,默认: Month + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: Year, Month, Dynamic,Trial,默认: Month + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时长(N个月),默认值1个月。如果为0,代表购买到月底。 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长(N个月),默认值1个月。如果为0,代表购买到月底。 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * AdminUser: 管理员帐户名,默认root + * + * @return string|null + */ + public function getAdminUser(): string + { + return $this->get("AdminUser"); + } + + /** + * AdminUser: 管理员帐户名,默认root + * + * @param string $adminUser + */ + public function setAdminUser(string $adminUser) + { + $this->set("AdminUser", $adminUser); + } + + /** + * BackupCount: 备份策略,每周备份数量,默认7次 + * + * @return integer|null + */ + public function getBackupCount(): int + { + return $this->get("BackupCount"); + } + + /** + * BackupCount: 备份策略,每周备份数量,默认7次 + * + * @param int $backupCount + */ + public function setBackupCount(int $backupCount) + { + $this->set("BackupCount", $backupCount); + } + + /** + * BackupTime: 备份策略,备份开始时间,单位小时计,默认1点 + * + * @return integer|null + */ + public function getBackupTime(): int + { + return $this->get("BackupTime"); + } + + /** + * BackupTime: 备份策略,备份开始时间,单位小时计,默认1点 + * + * @param int $backupTime + */ + public function setBackupTime(int $backupTime) + { + $this->set("BackupTime", $backupTime); + } + + /** + * BackupDuration: 备份策略,备份时间间隔,单位小时计,默认24小时 + * + * @return integer|null + */ + public function getBackupDuration(): int + { + return $this->get("BackupDuration"); + } + + /** + * BackupDuration: 备份策略,备份时间间隔,单位小时计,默认24小时 + * + * @param int $backupDuration + */ + public function setBackupDuration(int $backupDuration) + { + $this->set("BackupDuration", $backupDuration); + } + + /** + * UseSSD: 是否使用SSD,默认为true + * + * @return boolean|null + */ + public function getUseSSD(): bool + { + return $this->get("UseSSD"); + } + + /** + * UseSSD: 是否使用SSD,默认为true + * + * @param boolean $useSSD + */ + public function setUseSSD(bool $useSSD) + { + $this->set("UseSSD", $useSSD); + } + + /** + * SSDType: SSD类型,可选值为"SATA"、"PCI-E",如果UseSSD为true ,则必选 + * + * @return string|null + */ + public function getSSDType(): string + { + return $this->get("SSDType"); + } + + /** + * SSDType: SSD类型,可选值为"SATA"、"PCI-E",如果UseSSD为true ,则必选 + * + * @param string $ssdType + */ + public function setSSDType(string $ssdType) + { + $this->set("SSDType", $ssdType); + } + + /** + * CPU: cpu核数 + * + * @return integer|null + */ + public function getCPU(): int + { + return $this->get("CPU"); + } + + /** + * CPU: cpu核数 + * + * @param int $cpu + */ + public function setCPU(int $cpu) + { + $this->set("CPU", $cpu); + } + + /** + * InstanceType: UDB数据库机型 + * + * @return string|null + */ + public function getInstanceType(): string + { + return $this->get("InstanceType"); + } + + /** + * InstanceType: UDB数据库机型 + * + * @param string $instanceType + */ + public function setInstanceType(string $instanceType) + { + $this->set("InstanceType", $instanceType); + } + + /** + * SubnetId: 子网ID + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网ID + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * VPCId: VPC的ID + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPC的ID + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * ClusterId: 所属分片集群的ID + * + * @return string|null + */ + public function getClusterId(): string + { + return $this->get("ClusterId"); + } + + /** + * ClusterId: 所属分片集群的ID + * + * @param string $clusterId + */ + public function setClusterId(string $clusterId) + { + $this->set("ClusterId", $clusterId); + } + + /** + * CouponId: CouponId.0 代表第一个代金券id,对于传入多个代金券id,后面为 CouponId.1, CouponId.2 以此类推 + * + * @return string[]|null + */ + public function getCouponId(): array + { + return $this->get("CouponId"); + } + + /** + * CouponId: CouponId.0 代表第一个代金券id,对于传入多个代金券id,后面为 CouponId.1, CouponId.2 以此类推 + * + * @param string[] $couponId + */ + public function setCouponId(array $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UDB/Apis/CreateMongoDBReplicaSetResponse.php b/src/UDB/Apis/CreateMongoDBReplicaSetResponse.php new file mode 100644 index 00000000..bded3a55 --- /dev/null +++ b/src/UDB/Apis/CreateMongoDBReplicaSetResponse.php @@ -0,0 +1,44 @@ +get("DBIds"); + } + + /** + * DBIds: 返回所有副本集成员的Id + * + * @param string[] $dbIds + */ + public function setDBIds(array $dbIds) + { + $this->set("DBIds", $dbIds); + } +} diff --git a/src/UDB/Apis/CreateUDBInstanceByRecoveryRequest.php b/src/UDB/Apis/CreateUDBInstanceByRecoveryRequest.php new file mode 100644 index 00000000..3a7bff5e --- /dev/null +++ b/src/UDB/Apis/CreateUDBInstanceByRecoveryRequest.php @@ -0,0 +1,313 @@ + "CreateUDBInstanceByRecovery"]); + $this->markRequired("Region"); + $this->markRequired("Name"); + $this->markRequired("SrcDBId"); + $this->markRequired("RecoveryTime"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Name: 实例名称,至少6位 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 实例名称,至少6位 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * SrcDBId: 源实例的Id + * + * @return string|null + */ + public function getSrcDBId(): string + { + return $this->get("SrcDBId"); + } + + /** + * SrcDBId: 源实例的Id + * + * @param string $srcDBId + */ + public function setSrcDBId(string $srcDBId) + { + $this->set("SrcDBId", $srcDBId); + } + + /** + * RecoveryTime: 恢复到某个时间点的时间戳(UTC时间格式,默认单位秒) + * + * @return integer|null + */ + public function getRecoveryTime(): int + { + return $this->get("RecoveryTime"); + } + + /** + * RecoveryTime: 恢复到某个时间点的时间戳(UTC时间格式,默认单位秒) + * + * @param int $recoveryTime + */ + public function setRecoveryTime(int $recoveryTime) + { + $this->set("RecoveryTime", $recoveryTime); + } + + /** + * ChargeType: Year, Month, Dynamic,Trial,默认: Dynamic + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: Year, Month, Dynamic,Trial,默认: Dynamic + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时长,默认值1 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长,默认值1 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * UseSSD: 指定是否是否使用SSD,默认使用主库的配置 + * + * @return boolean|null + */ + public function getUseSSD(): bool + { + return $this->get("UseSSD"); + } + + /** + * UseSSD: 指定是否是否使用SSD,默认使用主库的配置 + * + * @param boolean $useSSD + */ + public function setUseSSD(bool $useSSD) + { + $this->set("UseSSD", $useSSD); + } + + /** + * UDBCId: 专区的Id + * + * @return string|null + */ + public function getUDBCId(): string + { + return $this->get("UDBCId"); + } + + /** + * UDBCId: 专区的Id + * + * @param string $udbcId + */ + public function setUDBCId(string $udbcId) + { + $this->set("UDBCId", $udbcId); + } + + /** + * SubnetId: 子网ID + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网ID + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * VPCId: VPC的ID + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPC的ID + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * EnableIpV6: 是否创建使用ipv6 资源, 默认为false, 或者不填, 创建ipv6为true + * + * @return boolean|null + */ + public function getEnableIpV6(): bool + { + return $this->get("EnableIpV6"); + } + + /** + * EnableIpV6: 是否创建使用ipv6 资源, 默认为false, 或者不填, 创建ipv6为true + * + * @param boolean $enableIpV6 + */ + public function setEnableIpV6(bool $enableIpV6) + { + $this->set("EnableIpV6", $enableIpV6); + } + + /** + * CouponId: 使用的代金券id + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 使用的代金券id + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UDB/Apis/CreateUDBInstanceByRecoveryResponse.php b/src/UDB/Apis/CreateUDBInstanceByRecoveryResponse.php new file mode 100644 index 00000000..030f83f9 --- /dev/null +++ b/src/UDB/Apis/CreateUDBInstanceByRecoveryResponse.php @@ -0,0 +1,44 @@ +get("DBId"); + } + + /** + * DBId: db实例id + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } +} diff --git a/src/UDB/Apis/CreateUDBInstanceRequest.php b/src/UDB/Apis/CreateUDBInstanceRequest.php new file mode 100644 index 00000000..a6f16ec5 --- /dev/null +++ b/src/UDB/Apis/CreateUDBInstanceRequest.php @@ -0,0 +1,658 @@ + "CreateUDBInstance"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("Name"); + $this->markRequired("AdminPassword"); + $this->markRequired("DBTypeId"); + $this->markRequired("Port"); + $this->markRequired("DiskSpace"); + $this->markRequired("ParamGroupId"); + $this->markRequired("MemoryLimit"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Name: 实例名称,至少6位 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 实例名称,至少6位 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * AdminPassword: 管理员密码 + * + * @return string|null + */ + public function getAdminPassword(): string + { + return $this->get("AdminPassword"); + } + + /** + * AdminPassword: 管理员密码 + * + * @param string $adminPassword + */ + public function setAdminPassword(string $adminPassword) + { + $this->set("AdminPassword", $adminPassword); + } + + /** + * DBTypeId: DB类型id,mysql/mongodb/postgesql按版本细分 1:mysql-5.1,2:mysql-5.5,3:percona-5.5,4:mysql-5.6,5:percona-5.6,6:mysql-5.7,7:percona-5.7,8:mariadb-10.0,9:mongodb-2.4,10:mongodb-2.6,11:mongodb-3.0,12:mongodb-3.2,13:postgresql-9.4,14:postgresql-9.6,14:postgresql-10.4 + * + * @return string|null + */ + public function getDBTypeId(): string + { + return $this->get("DBTypeId"); + } + + /** + * DBTypeId: DB类型id,mysql/mongodb/postgesql按版本细分 1:mysql-5.1,2:mysql-5.5,3:percona-5.5,4:mysql-5.6,5:percona-5.6,6:mysql-5.7,7:percona-5.7,8:mariadb-10.0,9:mongodb-2.4,10:mongodb-2.6,11:mongodb-3.0,12:mongodb-3.2,13:postgresql-9.4,14:postgresql-9.6,14:postgresql-10.4 + * + * @param string $dbTypeId + */ + public function setDBTypeId(string $dbTypeId) + { + $this->set("DBTypeId", $dbTypeId); + } + + /** + * Port: 端口号,mysql默认3306,mongodb默认27017,postgresql默认5432 + * + * @return integer|null + */ + public function getPort(): int + { + return $this->get("Port"); + } + + /** + * Port: 端口号,mysql默认3306,mongodb默认27017,postgresql默认5432 + * + * @param int $port + */ + public function setPort(int $port) + { + $this->set("Port", $port); + } + + /** + * DiskSpace: 磁盘空间(GB), 暂时支持20G - 32T + * + * @return integer|null + */ + public function getDiskSpace(): int + { + return $this->get("DiskSpace"); + } + + /** + * DiskSpace: 磁盘空间(GB), 暂时支持20G - 32T + * + * @param int $diskSpace + */ + public function setDiskSpace(int $diskSpace) + { + $this->set("DiskSpace", $diskSpace); + } + + /** + * ParamGroupId: DB实例使用的配置参数组id + * + * @return integer|null + */ + public function getParamGroupId(): int + { + return $this->get("ParamGroupId"); + } + + /** + * ParamGroupId: DB实例使用的配置参数组id + * + * @param int $paramGroupId + */ + public function setParamGroupId(int $paramGroupId) + { + $this->set("ParamGroupId", $paramGroupId); + } + + /** + * MemoryLimit: 内存限制(MB),目前支持以下几档 1000M/2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M/128000M/192000M/256000M/320000M + * + * @return integer|null + */ + public function getMemoryLimit(): int + { + return $this->get("MemoryLimit"); + } + + /** + * MemoryLimit: 内存限制(MB),目前支持以下几档 1000M/2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M/128000M/192000M/256000M/320000M + * + * @param int $memoryLimit + */ + public function setMemoryLimit(int $memoryLimit) + { + $this->set("MemoryLimit", $memoryLimit); + } + + /** + * ChargeType: Year, Month, Dynamic,Trial,默认: Month + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: Year, Month, Dynamic,Trial,默认: Month + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时长,默认值1 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长,默认值1 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * AdminUser: 管理员帐户名,默认root + * + * @return string|null + */ + public function getAdminUser(): string + { + return $this->get("AdminUser"); + } + + /** + * AdminUser: 管理员帐户名,默认root + * + * @param string $adminUser + */ + public function setAdminUser(string $adminUser) + { + $this->set("AdminUser", $adminUser); + } + + /** + * BackupCount: 备份策略,每周备份数量,默认7次 + * + * @return integer|null + */ + public function getBackupCount(): int + { + return $this->get("BackupCount"); + } + + /** + * BackupCount: 备份策略,每周备份数量,默认7次 + * + * @param int $backupCount + */ + public function setBackupCount(int $backupCount) + { + $this->set("BackupCount", $backupCount); + } + + /** + * BackupTime: 备份策略,备份开始时间,单位小时计,默认1点 + * + * @return integer|null + */ + public function getBackupTime(): int + { + return $this->get("BackupTime"); + } + + /** + * BackupTime: 备份策略,备份开始时间,单位小时计,默认1点 + * + * @param int $backupTime + */ + public function setBackupTime(int $backupTime) + { + $this->set("BackupTime", $backupTime); + } + + /** + * BackupDuration: 备份策略,备份时间间隔,单位小时计,默认24小时 + * + * @return integer|null + */ + public function getBackupDuration(): int + { + return $this->get("BackupDuration"); + } + + /** + * BackupDuration: 备份策略,备份时间间隔,单位小时计,默认24小时 + * + * @param int $backupDuration + */ + public function setBackupDuration(int $backupDuration) + { + $this->set("BackupDuration", $backupDuration); + } + + /** + * BackupId: 备份id,如果指定,则表明从备份恢复实例 + * + * @return integer|null + */ + public function getBackupId(): int + { + return $this->get("BackupId"); + } + + /** + * BackupId: 备份id,如果指定,则表明从备份恢复实例 + * + * @param int $backupId + */ + public function setBackupId(int $backupId) + { + $this->set("BackupId", $backupId); + } + + /** + * UseSSD: 是否使用SSD,默认为true。目前主要可用区、海外机房、新机房只提供SSD资源,非SSD资源不再提供。 + * + * @return boolean|null + */ + public function getUseSSD(): bool + { + return $this->get("UseSSD"); + } + + /** + * UseSSD: 是否使用SSD,默认为true。目前主要可用区、海外机房、新机房只提供SSD资源,非SSD资源不再提供。 + * + * @param boolean $useSSD + */ + public function setUseSSD(bool $useSSD) + { + $this->set("UseSSD", $useSSD); + } + + /** + * SSDType: SSD类型,可选值为"SATA"、“NVMe”,如果UseSSD为true ,则必选 + * + * @return string|null + */ + public function getSSDType(): string + { + return $this->get("SSDType"); + } + + /** + * SSDType: SSD类型,可选值为"SATA"、“NVMe”,如果UseSSD为true ,则必选 + * + * @param string $ssdType + */ + public function setSSDType(string $ssdType) + { + $this->set("SSDType", $ssdType); + } + + /** + * InstanceMode: UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例 "HA": 高可用版UDB实例 默认是"Normal" + * + * @return string|null + */ + public function getInstanceMode(): string + { + return $this->get("InstanceMode"); + } + + /** + * InstanceMode: UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例 "HA": 高可用版UDB实例 默认是"Normal" + * + * @param string $instanceMode + */ + public function setInstanceMode(string $instanceMode) + { + $this->set("InstanceMode", $instanceMode); + } + + /** + * UDBCId: 专区ID信息(如果这个参数存在这说明是在专区中创建DB) + * + * @return string|null + */ + public function getUDBCId(): string + { + return $this->get("UDBCId"); + } + + /** + * UDBCId: 专区ID信息(如果这个参数存在这说明是在专区中创建DB) + * + * @param string $udbcId + */ + public function setUDBCId(string $udbcId) + { + $this->set("UDBCId", $udbcId); + } + + /** + * CPU: cpu核数 + * + * @return integer|null + */ + public function getCPU(): int + { + return $this->get("CPU"); + } + + /** + * CPU: cpu核数 + * + * @param int $cpu + */ + public function setCPU(int $cpu) + { + $this->set("CPU", $cpu); + } + + /** + * BackupZone: 跨可用区高可用备库所在可用区,参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getBackupZone(): string + { + return $this->get("BackupZone"); + } + + /** + * BackupZone: 跨可用区高可用备库所在可用区,参见 [可用区列表](../summary/regionlist.html) + * + * @param string $backupZone + */ + public function setBackupZone(string $backupZone) + { + $this->set("BackupZone", $backupZone); + } + + /** + * SubnetId: 子网ID + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网ID + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * VPCId: VPC的ID + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPC的ID + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * DisableSemisync: 是否开启异步高可用,默认不填,可置为true + * + * @return boolean|null + */ + public function getDisableSemisync(): bool + { + return $this->get("DisableSemisync"); + } + + /** + * DisableSemisync: 是否开启异步高可用,默认不填,可置为true + * + * @param boolean $disableSemisync + */ + public function setDisableSemisync(bool $disableSemisync) + { + $this->set("DisableSemisync", $disableSemisync); + } + + /** + * ClusterRole: 当DB类型(DBTypeId)为mongodb时,需要指定mongo的角色,可选值为configsrv (配置节点),shardsrv (数据节点) + * + * @return string|null + */ + public function getClusterRole(): string + { + return $this->get("ClusterRole"); + } + + /** + * ClusterRole: 当DB类型(DBTypeId)为mongodb时,需要指定mongo的角色,可选值为configsrv (配置节点),shardsrv (数据节点) + * + * @param string $clusterRole + */ + public function setClusterRole(string $clusterRole) + { + $this->set("ClusterRole", $clusterRole); + } + + /** + * HAArch: 高可用架构:1) haproxy(默认): 当前仅支持mysql。2) sentinel: 基于vip和哨兵节点的架构,当前支持mysql和pg。 + * + * @return string|null + */ + public function getHAArch(): string + { + return $this->get("HAArch"); + } + + /** + * HAArch: 高可用架构:1) haproxy(默认): 当前仅支持mysql。2) sentinel: 基于vip和哨兵节点的架构,当前支持mysql和pg。 + * + * @param string $haArch + */ + public function setHAArch(string $haArch) + { + $this->set("HAArch", $haArch); + } + + /** + * Tag: 实例所在的业务组名称 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 实例所在的业务组名称 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * EnableIpV6: 是否创建使用ipv6 资源, 默认为false, 或者不填, 创建ipv6为true + * + * @return boolean|null + */ + public function getEnableIpV6(): bool + { + return $this->get("EnableIpV6"); + } + + /** + * EnableIpV6: 是否创建使用ipv6 资源, 默认为false, 或者不填, 创建ipv6为true + * + * @param boolean $enableIpV6 + */ + public function setEnableIpV6(bool $enableIpV6) + { + $this->set("EnableIpV6", $enableIpV6); + } + + /** + * CouponId: 使用的代金券id + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 使用的代金券id + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UDB/Apis/CreateUDBInstanceResponse.php b/src/UDB/Apis/CreateUDBInstanceResponse.php new file mode 100644 index 00000000..0361234b --- /dev/null +++ b/src/UDB/Apis/CreateUDBInstanceResponse.php @@ -0,0 +1,44 @@ +get("DBId"); + } + + /** + * DBId: BD实例id + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } +} diff --git a/src/UDB/Apis/CreateUDBParamGroupRequest.php b/src/UDB/Apis/CreateUDBParamGroupRequest.php new file mode 100644 index 00000000..a59f12b4 --- /dev/null +++ b/src/UDB/Apis/CreateUDBParamGroupRequest.php @@ -0,0 +1,195 @@ + "CreateUDBParamGroup"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("GroupName"); + $this->markRequired("Description"); + $this->markRequired("SrcGroupId"); + $this->markRequired("DBTypeId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * GroupName: 新配置参数组名称 + * + * @return string|null + */ + public function getGroupName(): string + { + return $this->get("GroupName"); + } + + /** + * GroupName: 新配置参数组名称 + * + * @param string $groupName + */ + public function setGroupName(string $groupName) + { + $this->set("GroupName", $groupName); + } + + /** + * Description: 参数组描述 + * + * @return string|null + */ + public function getDescription(): string + { + return $this->get("Description"); + } + + /** + * Description: 参数组描述 + * + * @param string $description + */ + public function setDescription(string $description) + { + $this->set("Description", $description); + } + + /** + * SrcGroupId: 源参数组id + * + * @return integer|null + */ + public function getSrcGroupId(): int + { + return $this->get("SrcGroupId"); + } + + /** + * SrcGroupId: 源参数组id + * + * @param int $srcGroupId + */ + public function setSrcGroupId(int $srcGroupId) + { + $this->set("SrcGroupId", $srcGroupId); + } + + /** + * DBTypeId: DB类型id,mysql/mongodb/postgesql按版本细分 1:mysql-5.1,2:mysql-5.5,3:percona-5.5,4:mysql-5.6,5:percona-5.6,6:mysql-5.7,7:percona-5.7,8:mariadb-10.0,9:mongodb-2.4,10:mongodb-2.6,11:mongodb-3.0,12:mongodb-3.2,13:postgresql-9.4,14:postgresql-9.6 + * + * @return string|null + */ + public function getDBTypeId(): string + { + return $this->get("DBTypeId"); + } + + /** + * DBTypeId: DB类型id,mysql/mongodb/postgesql按版本细分 1:mysql-5.1,2:mysql-5.5,3:percona-5.5,4:mysql-5.6,5:percona-5.6,6:mysql-5.7,7:percona-5.7,8:mariadb-10.0,9:mongodb-2.4,10:mongodb-2.6,11:mongodb-3.0,12:mongodb-3.2,13:postgresql-9.4,14:postgresql-9.6 + * + * @param string $dbTypeId + */ + public function setDBTypeId(string $dbTypeId) + { + $this->set("DBTypeId", $dbTypeId); + } + + /** + * RegionFlag: 是否是地域级别的配置文件,默认是false + * + * @return boolean|null + */ + public function getRegionFlag(): bool + { + return $this->get("RegionFlag"); + } + + /** + * RegionFlag: 是否是地域级别的配置文件,默认是false + * + * @param boolean $regionFlag + */ + public function setRegionFlag(bool $regionFlag) + { + $this->set("RegionFlag", $regionFlag); + } +} diff --git a/src/UDB/Apis/CreateUDBParamGroupResponse.php b/src/UDB/Apis/CreateUDBParamGroupResponse.php new file mode 100644 index 00000000..9e08cc02 --- /dev/null +++ b/src/UDB/Apis/CreateUDBParamGroupResponse.php @@ -0,0 +1,44 @@ +get("GroupId"); + } + + /** + * GroupId: 新配置参数组id + * + * @param int $groupId + */ + public function setGroupId(int $groupId) + { + $this->set("GroupId", $groupId); + } +} diff --git a/src/UDB/Apis/CreateUDBReplicationInstanceRequest.php b/src/UDB/Apis/CreateUDBReplicationInstanceRequest.php new file mode 100644 index 00000000..0fab9369 --- /dev/null +++ b/src/UDB/Apis/CreateUDBReplicationInstanceRequest.php @@ -0,0 +1,212 @@ + "CreateUDBReplicationInstance"]); + $this->markRequired("Region"); + $this->markRequired("SrcId"); + $this->markRequired("Name"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SrcId: primary节点的DBId,该值可以通过DescribeUDBInstance获取 + * + * @return string|null + */ + public function getSrcId(): string + { + return $this->get("SrcId"); + } + + /** + * SrcId: primary节点的DBId,该值可以通过DescribeUDBInstance获取 + * + * @param string $srcId + */ + public function setSrcId(string $srcId) + { + $this->set("SrcId", $srcId); + } + + /** + * Name: 实例名称,至少6位 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 实例名称,至少6位 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Port: 端口号,默认27017,取值范围3306至65535。 + * + * @return integer|null + */ + public function getPort(): int + { + return $this->get("Port"); + } + + /** + * Port: 端口号,默认27017,取值范围3306至65535。 + * + * @param int $port + */ + public function setPort(int $port) + { + $this->set("Port", $port); + } + + /** + * IsArbiter: 是否是仲裁节点,默认false,仲裁节点按最小机型创建 + * + * @return boolean|null + */ + public function getIsArbiter(): bool + { + return $this->get("IsArbiter"); + } + + /** + * IsArbiter: 是否是仲裁节点,默认false,仲裁节点按最小机型创建 + * + * @param boolean $isArbiter + */ + public function setIsArbiter(bool $isArbiter) + { + $this->set("IsArbiter", $isArbiter); + } + + /** + * UseSSD: 是否使用SSD,默认 为 true + * + * @return boolean|null + */ + public function getUseSSD(): bool + { + return $this->get("UseSSD"); + } + + /** + * UseSSD: 是否使用SSD,默认 为 true + * + * @param boolean $useSSD + */ + public function setUseSSD(bool $useSSD) + { + $this->set("UseSSD", $useSSD); + } + + /** + * CouponId: 使用的代金券id + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 使用的代金券id + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UDB/Apis/CreateUDBReplicationInstanceResponse.php b/src/UDB/Apis/CreateUDBReplicationInstanceResponse.php new file mode 100644 index 00000000..21ee3408 --- /dev/null +++ b/src/UDB/Apis/CreateUDBReplicationInstanceResponse.php @@ -0,0 +1,44 @@ +get("DBId"); + } + + /** + * DBId: 创建从节点的DBId + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } +} diff --git a/src/UDB/Apis/CreateUDBRouteInstanceRequest.php b/src/UDB/Apis/CreateUDBRouteInstanceRequest.php new file mode 100644 index 00000000..f95dbbc6 --- /dev/null +++ b/src/UDB/Apis/CreateUDBRouteInstanceRequest.php @@ -0,0 +1,317 @@ + "CreateUDBRouteInstance"]); + $this->markRequired("Region"); + $this->markRequired("DBTypeId"); + $this->markRequired("Name"); + $this->markRequired("Port"); + $this->markRequired("ParamGroupId"); + $this->markRequired("MemoryLimit"); + $this->markRequired("DiskSpace"); + $this->markRequired("ConfigsvrId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DBTypeId: DB类型id,mongodb按版本细分有1:mongodb-2.4,2:mongodb-2.6,3:mongodb-3.0,4:mongodb-3.2 + * + * @return string|null + */ + public function getDBTypeId(): string + { + return $this->get("DBTypeId"); + } + + /** + * DBTypeId: DB类型id,mongodb按版本细分有1:mongodb-2.4,2:mongodb-2.6,3:mongodb-3.0,4:mongodb-3.2 + * + * @param string $dbTypeId + */ + public function setDBTypeId(string $dbTypeId) + { + $this->set("DBTypeId", $dbTypeId); + } + + /** + * Name: 实例名称,至少6位 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 实例名称,至少6位 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Port: 端口号,mongodb默认27017 + * + * @return integer|null + */ + public function getPort(): int + { + return $this->get("Port"); + } + + /** + * Port: 端口号,mongodb默认27017 + * + * @param int $port + */ + public function setPort(int $port) + { + $this->set("Port", $port); + } + + /** + * ParamGroupId: DB实例使用的配置参数组id + * + * @return integer|null + */ + public function getParamGroupId(): int + { + return $this->get("ParamGroupId"); + } + + /** + * ParamGroupId: DB实例使用的配置参数组id + * + * @param int $paramGroupId + */ + public function setParamGroupId(int $paramGroupId) + { + $this->set("ParamGroupId", $paramGroupId); + } + + /** + * MemoryLimit: 内存限制(MB),目前支持以下几档 600M/1500M/3000M /6000M/15000M/30000M + * + * @return integer|null + */ + public function getMemoryLimit(): int + { + return $this->get("MemoryLimit"); + } + + /** + * MemoryLimit: 内存限制(MB),目前支持以下几档 600M/1500M/3000M /6000M/15000M/30000M + * + * @param int $memoryLimit + */ + public function setMemoryLimit(int $memoryLimit) + { + $this->set("MemoryLimit", $memoryLimit); + } + + /** + * DiskSpace: 磁盘空间(GB), 暂时支持20G - 500G + * + * @return integer|null + */ + public function getDiskSpace(): int + { + return $this->get("DiskSpace"); + } + + /** + * DiskSpace: 磁盘空间(GB), 暂时支持20G - 500G + * + * @param int $diskSpace + */ + public function setDiskSpace(int $diskSpace) + { + $this->set("DiskSpace", $diskSpace); + } + + /** + * ConfigsvrId: 配置服务器的dbid,允许一个或者三个。 + * + * @return string[]|null + */ + public function getConfigsvrId(): array + { + return $this->get("ConfigsvrId"); + } + + /** + * ConfigsvrId: 配置服务器的dbid,允许一个或者三个。 + * + * @param string[] $configsvrId + */ + public function setConfigsvrId(array $configsvrId) + { + $this->set("ConfigsvrId", $configsvrId); + } + + /** + * ChargeType: Year, Month, Dynamic,Trial,默认: Month + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: Year, Month, Dynamic,Trial,默认: Month + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时长,默认值1 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长,默认值1 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * UseSSD: 是否使用SSD,默认为ture + * + * @return boolean|null + */ + public function getUseSSD(): bool + { + return $this->get("UseSSD"); + } + + /** + * UseSSD: 是否使用SSD,默认为ture + * + * @param boolean $useSSD + */ + public function setUseSSD(bool $useSSD) + { + $this->set("UseSSD", $useSSD); + } + + /** + * CouponId: 使用的代金券id + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 使用的代金券id + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UDB/Apis/CreateUDBRouteInstanceResponse.php b/src/UDB/Apis/CreateUDBRouteInstanceResponse.php new file mode 100644 index 00000000..decb31ba --- /dev/null +++ b/src/UDB/Apis/CreateUDBRouteInstanceResponse.php @@ -0,0 +1,44 @@ +get("DBId"); + } + + /** + * DBId: db实例id + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } +} diff --git a/src/UDB/Apis/CreateUDBSlaveRequest.php b/src/UDB/Apis/CreateUDBSlaveRequest.php new file mode 100644 index 00000000..2722473e --- /dev/null +++ b/src/UDB/Apis/CreateUDBSlaveRequest.php @@ -0,0 +1,412 @@ + "CreateUDBSlave"]); + $this->markRequired("Region"); + $this->markRequired("SrcId"); + $this->markRequired("Name"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SrcId: master实例的DBId,该值可以通过DescribeUDBInstance获取 + * + * @return string|null + */ + public function getSrcId(): string + { + return $this->get("SrcId"); + } + + /** + * SrcId: master实例的DBId,该值可以通过DescribeUDBInstance获取 + * + * @param string $srcId + */ + public function setSrcId(string $srcId) + { + $this->set("SrcId", $srcId); + } + + /** + * Name: 实例名称,至少6位 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 实例名称,至少6位 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Port: 端口号 + * + * @return integer|null + */ + public function getPort(): int + { + return $this->get("Port"); + } + + /** + * Port: 端口号 + * + * @param int $port + */ + public function setPort(int $port) + { + $this->set("Port", $port); + } + + /** + * UseSSD: 是否使用SSD,默认为true + * + * @return boolean|null + */ + public function getUseSSD(): bool + { + return $this->get("UseSSD"); + } + + /** + * UseSSD: 是否使用SSD,默认为true + * + * @param boolean $useSSD + */ + public function setUseSSD(bool $useSSD) + { + $this->set("UseSSD", $useSSD); + } + + /** + * SSDType: SSD类型,可选值为"SATA"、"PCI-E"、“NVMe”,如果UseSSD为true ,则必选 + * + * @return string|null + */ + public function getSSDType(): string + { + return $this->get("SSDType"); + } + + /** + * SSDType: SSD类型,可选值为"SATA"、"PCI-E"、“NVMe”,如果UseSSD为true ,则必选 + * + * @param string $ssdType + */ + public function setSSDType(string $ssdType) + { + $this->set("SSDType", $ssdType); + } + + /** + * IsLock: 是否锁主库,默认为true + * + * @return boolean|null + */ + public function getIsLock(): bool + { + return $this->get("IsLock"); + } + + /** + * IsLock: 是否锁主库,默认为true + * + * @param boolean $isLock + */ + public function setIsLock(bool $isLock) + { + $this->set("IsLock", $isLock); + } + + /** + * InstanceMode: UDB实例部署模式,可选值如下:Normal: 普通单点实例HA: 高可用部署实例 + * + * @return string|null + */ + public function getInstanceMode(): string + { + return $this->get("InstanceMode"); + } + + /** + * InstanceMode: UDB实例部署模式,可选值如下:Normal: 普通单点实例HA: 高可用部署实例 + * + * @param string $instanceMode + */ + public function setInstanceMode(string $instanceMode) + { + $this->set("InstanceMode", $instanceMode); + } + + /** + * MemoryLimit: 内存限制(MB),目前支持以下几档 1000M/2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M/128000M/192000M/256000M/320000M + * + * @return integer|null + */ + public function getMemoryLimit(): int + { + return $this->get("MemoryLimit"); + } + + /** + * MemoryLimit: 内存限制(MB),目前支持以下几档 1000M/2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M/128000M/192000M/256000M/320000M + * + * @param int $memoryLimit + */ + public function setMemoryLimit(int $memoryLimit) + { + $this->set("MemoryLimit", $memoryLimit); + } + + /** + * DiskSpace: 磁盘空间(GB), 暂时支持20G - 3000G(API支持,前端暂时只开放内存定制) + * + * @return integer|null + */ + public function getDiskSpace(): int + { + return $this->get("DiskSpace"); + } + + /** + * DiskSpace: 磁盘空间(GB), 暂时支持20G - 3000G(API支持,前端暂时只开放内存定制) + * + * @param int $diskSpace + */ + public function setDiskSpace(int $diskSpace) + { + $this->set("DiskSpace", $diskSpace); + } + + /** + * InstanceType: UDB实例类型:Normal、SATA_SSD、NVMe_SSD + * + * @return string|null + */ + public function getInstanceType(): string + { + return $this->get("InstanceType"); + } + + /** + * InstanceType: UDB实例类型:Normal、SATA_SSD、NVMe_SSD + * + * @param string $instanceType + */ + public function setInstanceType(string $instanceType) + { + $this->set("InstanceType", $instanceType); + } + + /** + * SubnetId: 子网ID(如果不传用默认子网) + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网ID(如果不传用默认子网) + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * VPCId: VPCID(如果不传用默认的VPC) + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPCID(如果不传用默认的VPC) + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * ChargeType: Year, Month, Dynamic,Trial,默认和主库保持一致 + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: Year, Month, Dynamic,Trial,默认和主库保持一致 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时长,默认默认和主库保持一致 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长,默认默认和主库保持一致 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * ParamGroupId: DB实例使用的配置参数组id,默认和主库保持一致 + * + * @return integer|null + */ + public function getParamGroupId(): int + { + return $this->get("ParamGroupId"); + } + + /** + * ParamGroupId: DB实例使用的配置参数组id,默认和主库保持一致 + * + * @param int $paramGroupId + */ + public function setParamGroupId(int $paramGroupId) + { + $this->set("ParamGroupId", $paramGroupId); + } + + /** + * CouponId: 使用的代金券id + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 使用的代金券id + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UDB/Apis/CreateUDBSlaveResponse.php b/src/UDB/Apis/CreateUDBSlaveResponse.php new file mode 100644 index 00000000..8576dd7b --- /dev/null +++ b/src/UDB/Apis/CreateUDBSlaveResponse.php @@ -0,0 +1,44 @@ +get("DBId"); + } + + /** + * DBId: 创建slave的DBId + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } +} diff --git a/src/UDB/Apis/DeleteUDBInstanceRequest.php b/src/UDB/Apis/DeleteUDBInstanceRequest.php new file mode 100644 index 00000000..e831f69a --- /dev/null +++ b/src/UDB/Apis/DeleteUDBInstanceRequest.php @@ -0,0 +1,131 @@ + "DeleteUDBInstance"]); + $this->markRequired("Region"); + $this->markRequired("DBId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DBId: DB实例的id,该值可以通过DescribeUDBInstance获取 + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: DB实例的id,该值可以通过DescribeUDBInstance获取 + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } + + /** + * UDBCId: 专区ID + * + * @return string|null + */ + public function getUDBCId(): string + { + return $this->get("UDBCId"); + } + + /** + * UDBCId: 专区ID + * + * @param string $udbcId + */ + public function setUDBCId(string $udbcId) + { + $this->set("UDBCId", $udbcId); + } +} diff --git a/src/UDB/Apis/DeleteUDBInstanceResponse.php b/src/UDB/Apis/DeleteUDBInstanceResponse.php new file mode 100644 index 00000000..75393e2e --- /dev/null +++ b/src/UDB/Apis/DeleteUDBInstanceResponse.php @@ -0,0 +1,26 @@ + "DeleteUDBLogPackage"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("BackupId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * BackupId: 日志包id,可通过DescribeUDBLogPackage获得 + * + * @return integer|null + */ + public function getBackupId(): int + { + return $this->get("BackupId"); + } + + /** + * BackupId: 日志包id,可通过DescribeUDBLogPackage获得 + * + * @param int $backupId + */ + public function setBackupId(int $backupId) + { + $this->set("BackupId", $backupId); + } + + /** + * BackupZone: 跨可用区高可用备库所在可用区 + * + * @return string|null + */ + public function getBackupZone(): string + { + return $this->get("BackupZone"); + } + + /** + * BackupZone: 跨可用区高可用备库所在可用区 + * + * @param string $backupZone + */ + public function setBackupZone(string $backupZone) + { + $this->set("BackupZone", $backupZone); + } +} diff --git a/src/UDB/Apis/DeleteUDBLogPackageResponse.php b/src/UDB/Apis/DeleteUDBLogPackageResponse.php new file mode 100644 index 00000000..23418170 --- /dev/null +++ b/src/UDB/Apis/DeleteUDBLogPackageResponse.php @@ -0,0 +1,26 @@ + "DeleteUDBParamGroup"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("GroupId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * GroupId: 参数组id,可通过DescribeUDBParamGroup获取 + * + * @return integer|null + */ + public function getGroupId(): int + { + return $this->get("GroupId"); + } + + /** + * GroupId: 参数组id,可通过DescribeUDBParamGroup获取 + * + * @param int $groupId + */ + public function setGroupId(int $groupId) + { + $this->set("GroupId", $groupId); + } + + /** + * RegionFlag: 是否属于地域级别 + * + * @return boolean|null + */ + public function getRegionFlag(): bool + { + return $this->get("RegionFlag"); + } + + /** + * RegionFlag: 是否属于地域级别 + * + * @param boolean $regionFlag + */ + public function setRegionFlag(bool $regionFlag) + { + $this->set("RegionFlag", $regionFlag); + } +} diff --git a/src/UDB/Apis/DeleteUDBParamGroupResponse.php b/src/UDB/Apis/DeleteUDBParamGroupResponse.php new file mode 100644 index 00000000..f85b3618 --- /dev/null +++ b/src/UDB/Apis/DeleteUDBParamGroupResponse.php @@ -0,0 +1,26 @@ + "DescribeUDBBackupBlacklist"]); + $this->markRequired("Region"); + $this->markRequired("DBId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DBId: DB实例Id,该值可以通过DescribeUDBInstance获取 + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: DB实例Id,该值可以通过DescribeUDBInstance获取 + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } +} diff --git a/src/UDB/Apis/DescribeUDBBackupBlacklistResponse.php b/src/UDB/Apis/DescribeUDBBackupBlacklistResponse.php new file mode 100644 index 00000000..7a410960 --- /dev/null +++ b/src/UDB/Apis/DescribeUDBBackupBlacklistResponse.php @@ -0,0 +1,44 @@ +get("Blacklist"); + } + + /** + * Blacklist: DB的黑名单列表, db.%为指定库 dbname.tablename为指定表 + * + * @param string $blacklist + */ + public function setBlacklist(string $blacklist) + { + $this->set("Blacklist", $blacklist); + } +} diff --git a/src/UDB/Apis/DescribeUDBBackupRequest.php b/src/UDB/Apis/DescribeUDBBackupRequest.php new file mode 100644 index 00000000..a65e1e94 --- /dev/null +++ b/src/UDB/Apis/DescribeUDBBackupRequest.php @@ -0,0 +1,212 @@ + "DescribeUDBBackup"]); + $this->markRequired("Region"); + $this->markRequired("Offset"); + $this->markRequired("Limit"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Offset: 分页显示的起始偏移,列表操作则指定 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 分页显示的起始偏移,列表操作则指定 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 分页显示的条目数,列表操作则指定 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 分页显示的条目数,列表操作则指定 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * DBId: DB实例Id,如果指定,则只获取该db的备份信息 该值可以通过DescribeUDBInstance获取 + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: DB实例Id,如果指定,则只获取该db的备份信息 该值可以通过DescribeUDBInstance获取 + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } + + /** + * BackupType: 备份类型,取值为0或1,0表示自动,1表示手动 + * + * @return integer|null + */ + public function getBackupType(): int + { + return $this->get("BackupType"); + } + + /** + * BackupType: 备份类型,取值为0或1,0表示自动,1表示手动 + * + * @param int $backupType + */ + public function setBackupType(int $backupType) + { + $this->set("BackupType", $backupType); + } + + /** + * BeginTime: 过滤条件:起始时间(Unix时间戳) + * + * @return integer|null + */ + public function getBeginTime(): int + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 过滤条件:起始时间(Unix时间戳) + * + * @param int $beginTime + */ + public function setBeginTime(int $beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 过滤条件:结束时间(Unix时间戳) + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 过滤条件:结束时间(Unix时间戳) + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } +} diff --git a/src/UDB/Apis/DescribeUDBBackupResponse.php b/src/UDB/Apis/DescribeUDBBackupResponse.php new file mode 100644 index 00000000..31e4d2e7 --- /dev/null +++ b/src/UDB/Apis/DescribeUDBBackupResponse.php @@ -0,0 +1,74 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UDBBackupSet($item)); + } + return $result; + } + + /** + * DataSet: 备份信息 参照UDBBackupSet + * + * @param UDBBackupSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalCount: 满足条件备份总数,如果指定dbid,则是该db备份总数 + * + * @return integer|null + */ + public function getTotalCount(): int + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 满足条件备份总数,如果指定dbid,则是该db备份总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/UDB/Apis/DescribeUDBBinlogBackupURLRequest.php b/src/UDB/Apis/DescribeUDBBinlogBackupURLRequest.php new file mode 100644 index 00000000..5e18e04b --- /dev/null +++ b/src/UDB/Apis/DescribeUDBBinlogBackupURLRequest.php @@ -0,0 +1,112 @@ + "DescribeUDBBinlogBackupURL"]); + $this->markRequired("Region"); + $this->markRequired("DBId"); + $this->markRequired("BackupId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * DBId: DB实例Id + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: DB实例Id + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } + + /** + * BackupId: DB实例binlog备份ID,可以从DescribeUDBLogPackage结果当中获得 + * + * @return integer|null + */ + public function getBackupId(): int + { + return $this->get("BackupId"); + } + + /** + * BackupId: DB实例binlog备份ID,可以从DescribeUDBLogPackage结果当中获得 + * + * @param int $backupId + */ + public function setBackupId(int $backupId) + { + $this->set("BackupId", $backupId); + } +} diff --git a/src/UDB/Apis/DescribeUDBBinlogBackupURLResponse.php b/src/UDB/Apis/DescribeUDBBinlogBackupURLResponse.php new file mode 100644 index 00000000..1d70669c --- /dev/null +++ b/src/UDB/Apis/DescribeUDBBinlogBackupURLResponse.php @@ -0,0 +1,64 @@ +get("BackupPath"); + } + + /** + * BackupPath: DB实例备份文件的公网地址 + * + * @param string $backupPath + */ + public function setBackupPath(string $backupPath) + { + $this->set("BackupPath", $backupPath); + } + + /** + * InnerBackupPath: DB实例备份文件的内网地址 + * + * @return string|null + */ + public function getInnerBackupPath(): string + { + return $this->get("InnerBackupPath"); + } + + /** + * InnerBackupPath: DB实例备份文件的内网地址 + * + * @param string $innerBackupPath + */ + public function setInnerBackupPath(string $innerBackupPath) + { + $this->set("InnerBackupPath", $innerBackupPath); + } +} diff --git a/src/UDB/Apis/DescribeUDBInstanceBackupStateRequest.php b/src/UDB/Apis/DescribeUDBInstanceBackupStateRequest.php new file mode 100644 index 00000000..22718b03 --- /dev/null +++ b/src/UDB/Apis/DescribeUDBInstanceBackupStateRequest.php @@ -0,0 +1,132 @@ + "DescribeUDBInstanceBackupState"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("BackupId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * BackupId: 备份记录ID + * + * @return integer|null + */ + public function getBackupId(): int + { + return $this->get("BackupId"); + } + + /** + * BackupId: 备份记录ID + * + * @param int $backupId + */ + public function setBackupId(int $backupId) + { + $this->set("BackupId", $backupId); + } + + /** + * BackupZone: 跨可用区高可用备库所在可用区,参见[可用区列表] + * + * @return string|null + */ + public function getBackupZone(): string + { + return $this->get("BackupZone"); + } + + /** + * BackupZone: 跨可用区高可用备库所在可用区,参见[可用区列表] + * + * @param string $backupZone + */ + public function setBackupZone(string $backupZone) + { + $this->set("BackupZone", $backupZone); + } +} diff --git a/src/UDB/Apis/DescribeUDBInstanceBackupStateResponse.php b/src/UDB/Apis/DescribeUDBInstanceBackupStateResponse.php new file mode 100644 index 00000000..84309dee --- /dev/null +++ b/src/UDB/Apis/DescribeUDBInstanceBackupStateResponse.php @@ -0,0 +1,44 @@ +get("State"); + } + + /** + * State: 备份状态 0 Backuping // 备份中 1 Success // 备份成功 2 Failed // 备份失败 3 Expired // 备份过期 + * + * @param string $state + */ + public function setState(string $state) + { + $this->set("State", $state); + } +} diff --git a/src/UDB/Apis/DescribeUDBInstanceBackupURLRequest.php b/src/UDB/Apis/DescribeUDBInstanceBackupURLRequest.php new file mode 100644 index 00000000..0c933d69 --- /dev/null +++ b/src/UDB/Apis/DescribeUDBInstanceBackupURLRequest.php @@ -0,0 +1,132 @@ + "DescribeUDBInstanceBackupURL"]); + $this->markRequired("Region"); + $this->markRequired("DBId"); + $this->markRequired("BackupId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DBId: DB实例Id,该值可通过DescribeUDBInstance获取 + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: DB实例Id,该值可通过DescribeUDBInstance获取 + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } + + /** + * BackupId: DB实例备份ID,该值可以通过DescribeUDBBackup获取 + * + * @return integer|null + */ + public function getBackupId(): int + { + return $this->get("BackupId"); + } + + /** + * BackupId: DB实例备份ID,该值可以通过DescribeUDBBackup获取 + * + * @param int $backupId + */ + public function setBackupId(int $backupId) + { + $this->set("BackupId", $backupId); + } +} diff --git a/src/UDB/Apis/DescribeUDBInstanceBackupURLResponse.php b/src/UDB/Apis/DescribeUDBInstanceBackupURLResponse.php new file mode 100644 index 00000000..d6320317 --- /dev/null +++ b/src/UDB/Apis/DescribeUDBInstanceBackupURLResponse.php @@ -0,0 +1,64 @@ +get("BackupPath"); + } + + /** + * BackupPath: DB实例备份文件公网的地址 + * + * @param string $backupPath + */ + public function setBackupPath(string $backupPath) + { + $this->set("BackupPath", $backupPath); + } + + /** + * InnerBackupPath: DB实例备份文件内网的地址 + * + * @return string|null + */ + public function getInnerBackupPath(): string + { + return $this->get("InnerBackupPath"); + } + + /** + * InnerBackupPath: DB实例备份文件内网的地址 + * + * @param string $innerBackupPath + */ + public function setInnerBackupPath(string $innerBackupPath) + { + $this->set("InnerBackupPath", $innerBackupPath); + } +} diff --git a/src/UDB/Apis/DescribeUDBInstanceBinlogBackupStateRequest.php b/src/UDB/Apis/DescribeUDBInstanceBinlogBackupStateRequest.php new file mode 100644 index 00000000..c73fbbc2 --- /dev/null +++ b/src/UDB/Apis/DescribeUDBInstanceBinlogBackupStateRequest.php @@ -0,0 +1,132 @@ + "DescribeUDBInstanceBinlogBackupState"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("BackupId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * BackupId: 备份记录ID + * + * @return integer|null + */ + public function getBackupId(): int + { + return $this->get("BackupId"); + } + + /** + * BackupId: 备份记录ID + * + * @param int $backupId + */ + public function setBackupId(int $backupId) + { + $this->set("BackupId", $backupId); + } + + /** + * BackupZone: 跨可用区高可用备库所在可用区 + * + * @return string|null + */ + public function getBackupZone(): string + { + return $this->get("BackupZone"); + } + + /** + * BackupZone: 跨可用区高可用备库所在可用区 + * + * @param string $backupZone + */ + public function setBackupZone(string $backupZone) + { + $this->set("BackupZone", $backupZone); + } +} diff --git a/src/UDB/Apis/DescribeUDBInstanceBinlogBackupStateResponse.php b/src/UDB/Apis/DescribeUDBInstanceBinlogBackupStateResponse.php new file mode 100644 index 00000000..6ac123bb --- /dev/null +++ b/src/UDB/Apis/DescribeUDBInstanceBinlogBackupStateResponse.php @@ -0,0 +1,44 @@ +get("State"); + } + + /** + * State: 备份状态 0 Backuping // 备份中 1 Success // 备份成功 2 Failed // 备份失败 3 Expired // 备份过期 + * + * @param string $state + */ + public function setState(string $state) + { + $this->set("State", $state); + } +} diff --git a/src/UDB/Apis/DescribeUDBInstanceBinlogRequest.php b/src/UDB/Apis/DescribeUDBInstanceBinlogRequest.php new file mode 100644 index 00000000..e25623ec --- /dev/null +++ b/src/UDB/Apis/DescribeUDBInstanceBinlogRequest.php @@ -0,0 +1,153 @@ + "DescribeUDBInstanceBinlog"]); + $this->markRequired("Region"); + $this->markRequired("DBId"); + $this->markRequired("BeginTime"); + $this->markRequired("EndTime"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DBId: DB实例Id + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: DB实例Id + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } + + /** + * BeginTime: 过滤条件:起始时间(时间戳) + * + * @return integer|null + */ + public function getBeginTime(): int + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 过滤条件:起始时间(时间戳) + * + * @param int $beginTime + */ + public function setBeginTime(int $beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 过滤条件:结束时间(时间戳) + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 过滤条件:结束时间(时间戳) + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } +} diff --git a/src/UDB/Apis/DescribeUDBInstanceBinlogResponse.php b/src/UDB/Apis/DescribeUDBInstanceBinlogResponse.php new file mode 100644 index 00000000..842a7736 --- /dev/null +++ b/src/UDB/Apis/DescribeUDBInstanceBinlogResponse.php @@ -0,0 +1,54 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UDBInstanceBinlogSet($item)); + } + return $result; + } + + /** + * DataSet: 获取的Binlog信息列表 UDBInstanceBinlogSet + * + * @param UDBInstanceBinlogSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UDB/Apis/DescribeUDBInstanceLogRequest.php b/src/UDB/Apis/DescribeUDBInstanceLogRequest.php new file mode 100644 index 00000000..d5bbfaeb --- /dev/null +++ b/src/UDB/Apis/DescribeUDBInstanceLogRequest.php @@ -0,0 +1,174 @@ + "DescribeUDBInstanceLog"]); + $this->markRequired("Region"); + $this->markRequired("DBId"); + $this->markRequired("BeginTime"); + $this->markRequired("EndTime"); + $this->markRequired("LogType"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DBId: 实例ID + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: 实例ID + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } + + /** + * BeginTime: 查询的日志开始的时间戳(Unix Timestamp)。对于实时查询,这个参数应该是上次轮询请求时的时间戳,后台会返回从该值到当前时间的日志内容。 + * + * @return integer|null + */ + public function getBeginTime(): int + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 查询的日志开始的时间戳(Unix Timestamp)。对于实时查询,这个参数应该是上次轮询请求时的时间戳,后台会返回从该值到当前时间的日志内容。 + * + * @param int $beginTime + */ + public function setBeginTime(int $beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 查询日志的结束时间戳(Unix Timestamp),对于实时查询不传该值,与BeginTime的差值不超过24小时:(EndTime-BeginTime) < 24*60*60 + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 查询日志的结束时间戳(Unix Timestamp),对于实时查询不传该值,与BeginTime的差值不超过24小时:(EndTime-BeginTime) < 24*60*60 + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } + + /** + * LogType: 查询日志的类型 + * + * @return string|null + */ + public function getLogType(): string + { + return $this->get("LogType"); + } + + /** + * LogType: 查询日志的类型 + * + * @param string $logType + */ + public function setLogType(string $logType) + { + $this->set("LogType", $logType); + } +} diff --git a/src/UDB/Apis/DescribeUDBInstanceLogResponse.php b/src/UDB/Apis/DescribeUDBInstanceLogResponse.php new file mode 100644 index 00000000..5b9c3f9d --- /dev/null +++ b/src/UDB/Apis/DescribeUDBInstanceLogResponse.php @@ -0,0 +1,64 @@ +get("Log"); + } + + /** + * Log: 查询到的日志内容,一段纯文本 + * + * @param string $log + */ + public function setLog(string $log) + { + $this->set("Log", $log); + } + + /** + * NextTime: 此次查询到的日志的下一个时间,用于下一次轮询时的BeginTime参数;如果日志查询结束则返回为空,前端结束查询 + * + * @return string|null + */ + public function getNextTime(): string + { + return $this->get("NextTime"); + } + + /** + * NextTime: 此次查询到的日志的下一个时间,用于下一次轮询时的BeginTime参数;如果日志查询结束则返回为空,前端结束查询 + * + * @param string $nextTime + */ + public function setNextTime(string $nextTime) + { + $this->set("NextTime", $nextTime); + } +} diff --git a/src/UDB/Apis/DescribeUDBInstancePriceRequest.php b/src/UDB/Apis/DescribeUDBInstancePriceRequest.php new file mode 100644 index 00000000..16759cb5 --- /dev/null +++ b/src/UDB/Apis/DescribeUDBInstancePriceRequest.php @@ -0,0 +1,254 @@ + "DescribeUDBInstancePrice"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("MemoryLimit"); + $this->markRequired("DiskSpace"); + $this->markRequired("DBTypeId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * MemoryLimit: 内存限制(MB),单位为MB.目前支持:1000-96000 + * + * @return integer|null + */ + public function getMemoryLimit(): int + { + return $this->get("MemoryLimit"); + } + + /** + * MemoryLimit: 内存限制(MB),单位为MB.目前支持:1000-96000 + * + * @param int $memoryLimit + */ + public function setMemoryLimit(int $memoryLimit) + { + $this->set("MemoryLimit", $memoryLimit); + } + + /** + * DiskSpace: 磁盘空间(GB),暂时支持20(GB) - 3000(GB), 输入不带单位 + * + * @return integer|null + */ + public function getDiskSpace(): int + { + return $this->get("DiskSpace"); + } + + /** + * DiskSpace: 磁盘空间(GB),暂时支持20(GB) - 3000(GB), 输入不带单位 + * + * @param int $diskSpace + */ + public function setDiskSpace(int $diskSpace) + { + $this->set("DiskSpace", $diskSpace); + } + + /** + * DBTypeId: UDB实例的DB版本字符串 + * + * @return string|null + */ + public function getDBTypeId(): string + { + return $this->get("DBTypeId"); + } + + /** + * DBTypeId: UDB实例的DB版本字符串 + * + * @param string $dbTypeId + */ + public function setDBTypeId(string $dbTypeId) + { + $this->set("DBTypeId", $dbTypeId); + } + + /** + * Count: 购买DB实例数量,最大数量为10台, 默认为1台 + * + * @return integer|null + */ + public function getCount(): int + { + return $this->get("Count"); + } + + /** + * Count: 购买DB实例数量,最大数量为10台, 默认为1台 + * + * @param int $count + */ + public function setCount(int $count) + { + $this->set("Count", $count); + } + + /** + * ChargeType: Year,按年付费; Month,按月付费 Dynamic,按需付费(需开启权限) Trial,试用(需开启权限)默认为月付 + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: Year,按年付费; Month,按月付费 Dynamic,按需付费(需开启权限) Trial,试用(需开启权限)默认为月付 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: DB购买多少个"计费时间单位",默认值为1。比如:买2个月,Quantity就是2。如果计费单位是“按月”,并且Quantity为0,表示“购买到月底” + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: DB购买多少个"计费时间单位",默认值为1。比如:买2个月,Quantity就是2。如果计费单位是“按月”,并且Quantity为0,表示“购买到月底” + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * UseSSD: 是否使用SSD,只能填true或false,默认为false + * + * @return string|null + */ + public function getUseSSD(): string + { + return $this->get("UseSSD"); + } + + /** + * UseSSD: 是否使用SSD,只能填true或false,默认为false + * + * @param string $useSSD + */ + public function setUseSSD(string $useSSD) + { + $this->set("UseSSD", $useSSD); + } + + /** + * SSDType: SSD类型,可选值为"SATA"、"PCI-E",如果UseSSD为true ,则必填 + * + * @return string|null + */ + public function getSSDType(): string + { + return $this->get("SSDType"); + } + + /** + * SSDType: SSD类型,可选值为"SATA"、"PCI-E",如果UseSSD为true ,则必填 + * + * @param string $ssdType + */ + public function setSSDType(string $ssdType) + { + $this->set("SSDType", $ssdType); + } + + /** + * InstanceMode: 实例的部署类型。可选值为:Normal: 普通单点实例,Slave: 从库实例,HA: 高可用部署实例,默认是Normal + * + * @return string|null + */ + public function getInstanceMode(): string + { + return $this->get("InstanceMode"); + } + + /** + * InstanceMode: 实例的部署类型。可选值为:Normal: 普通单点实例,Slave: 从库实例,HA: 高可用部署实例,默认是Normal + * + * @param string $instanceMode + */ + public function setInstanceMode(string $instanceMode) + { + $this->set("InstanceMode", $instanceMode); + } +} diff --git a/src/UDB/Apis/DescribeUDBInstancePriceResponse.php b/src/UDB/Apis/DescribeUDBInstancePriceResponse.php new file mode 100644 index 00000000..4c0cf99e --- /dev/null +++ b/src/UDB/Apis/DescribeUDBInstancePriceResponse.php @@ -0,0 +1,54 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UDBInstancePriceSet($item)); + } + return $result; + } + + /** + * DataSet: 价格 参照UDBInstancePriceSet + * + * @param UDBInstancePriceSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UDB/Apis/DescribeUDBInstanceRequest.php b/src/UDB/Apis/DescribeUDBInstanceRequest.php new file mode 100644 index 00000000..84ce8049 --- /dev/null +++ b/src/UDB/Apis/DescribeUDBInstanceRequest.php @@ -0,0 +1,230 @@ + "DescribeUDBInstance"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区,不填时默认全部可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区,不填时默认全部可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ClassType: DB种类,如果是列表操作,则需要指定,不区分大小写,其取值如下:mysql: SQL;mongo: NOSQL;postgresql: postgresql + * + * @return string|null + */ + public function getClassType(): string + { + return $this->get("ClassType"); + } + + /** + * ClassType: DB种类,如果是列表操作,则需要指定,不区分大小写,其取值如下:mysql: SQL;mongo: NOSQL;postgresql: postgresql + * + * @param string $classType + */ + public function setClassType(string $classType) + { + $this->set("ClassType", $classType); + } + + /** + * Offset: 分页显示起始偏移位置,列表操作时必填 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 分页显示起始偏移位置,列表操作时必填 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 分页显示数量,列表操作时必填 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 分页显示数量,列表操作时必填 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * DBId: DB实例id,如果指定则获取单个db实例的描述,否则为列表操作。 指定DBId时无需填写ClassType、Offset、Limit + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: DB实例id,如果指定则获取单个db实例的描述,否则为列表操作。 指定DBId时无需填写ClassType、Offset、Limit + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } + + /** + * IsInUDBC: 是否查看专区里面DB + * + * @return boolean|null + */ + public function getIsInUDBC(): bool + { + return $this->get("IsInUDBC"); + } + + /** + * IsInUDBC: 是否查看专区里面DB + * + * @param boolean $isInUDBC + */ + public function setIsInUDBC(bool $isInUDBC) + { + $this->set("IsInUDBC", $isInUDBC); + } + + /** + * UDBCId: IsInUDBC为True,UDBCId为空,说明查看整个可用区的专区的db,如果UDBId不为空则只查看此专区下面的db + * + * @return string|null + */ + public function getUDBCId(): string + { + return $this->get("UDBCId"); + } + + /** + * UDBCId: IsInUDBC为True,UDBCId为空,说明查看整个可用区的专区的db,如果UDBId不为空则只查看此专区下面的db + * + * @param string $udbcId + */ + public function setUDBCId(string $udbcId) + { + $this->set("UDBCId", $udbcId); + } + + /** + * IncludeSlaves: 当只获取这个特定DBId的信息时,如果有该选项,那么把这个DBId实例的所有从库信息一起拉取并返回 + * + * @return boolean|null + */ + public function getIncludeSlaves(): bool + { + return $this->get("IncludeSlaves"); + } + + /** + * IncludeSlaves: 当只获取这个特定DBId的信息时,如果有该选项,那么把这个DBId实例的所有从库信息一起拉取并返回 + * + * @param boolean $includeSlaves + */ + public function setIncludeSlaves(bool $includeSlaves) + { + $this->set("IncludeSlaves", $includeSlaves); + } +} diff --git a/src/UDB/Apis/DescribeUDBInstanceResponse.php b/src/UDB/Apis/DescribeUDBInstanceResponse.php new file mode 100644 index 00000000..573244bf --- /dev/null +++ b/src/UDB/Apis/DescribeUDBInstanceResponse.php @@ -0,0 +1,76 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UDBInstanceSet($item)); + } + return $result; + } + + /** + * DataSet: DB实例信息列表 UDBInstanceSet + * + * @param UDBInstanceSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalCount: 用户db组的数量,对于 mysql: 主从结对数量,没有slave,则只有master mongodb: 副本集数量 + * + * @return integer|null + */ + public function getTotalCount(): int + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 用户db组的数量,对于 mysql: 主从结对数量,没有slave,则只有master mongodb: 副本集数量 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/UDB/Apis/DescribeUDBInstanceStateRequest.php b/src/UDB/Apis/DescribeUDBInstanceStateRequest.php new file mode 100644 index 00000000..d7c8033c --- /dev/null +++ b/src/UDB/Apis/DescribeUDBInstanceStateRequest.php @@ -0,0 +1,111 @@ + "DescribeUDBInstanceState"]); + $this->markRequired("Region"); + $this->markRequired("DBId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DBId: 实例的Id,该值可以通过DescribeUDBInstance获取 + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: 实例的Id,该值可以通过DescribeUDBInstance获取 + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } +} diff --git a/src/UDB/Apis/DescribeUDBInstanceStateResponse.php b/src/UDB/Apis/DescribeUDBInstanceStateResponse.php new file mode 100644 index 00000000..67bf5fae --- /dev/null +++ b/src/UDB/Apis/DescribeUDBInstanceStateResponse.php @@ -0,0 +1,44 @@ +get("State"); + } + + /** + * State: DB状态标记 Init:初始化中;Fail:安装失败; Starting:启动中; Running : 运行 ;Shutdown:关闭中; Shutoff :已关闭; Delete:已删除; Upgrading:升级中; Promoting: 提升为独库进行中; Recovering: 恢复中; Recover fail:恢复失败。 + * + * @param string $state + */ + public function setState(string $state) + { + $this->set("State", $state); + } +} diff --git a/src/UDB/Apis/DescribeUDBInstanceUpgradePriceRequest.php b/src/UDB/Apis/DescribeUDBInstanceUpgradePriceRequest.php new file mode 100644 index 00000000..b2ac9ed7 --- /dev/null +++ b/src/UDB/Apis/DescribeUDBInstanceUpgradePriceRequest.php @@ -0,0 +1,193 @@ + "DescribeUDBInstanceUpgradePrice"]); + $this->markRequired("Region"); + $this->markRequired("DBId"); + $this->markRequired("MemoryLimit"); + $this->markRequired("DiskSpace"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DBId: 实例的Id + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: 实例的Id + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } + + /** + * MemoryLimit: 内存限制(MB) + * + * @return integer|null + */ + public function getMemoryLimit(): int + { + return $this->get("MemoryLimit"); + } + + /** + * MemoryLimit: 内存限制(MB) + * + * @param int $memoryLimit + */ + public function setMemoryLimit(int $memoryLimit) + { + $this->set("MemoryLimit", $memoryLimit); + } + + /** + * DiskSpace: 磁盘空间(GB), 暂时支持20G - 500G + * + * @return integer|null + */ + public function getDiskSpace(): int + { + return $this->get("DiskSpace"); + } + + /** + * DiskSpace: 磁盘空间(GB), 暂时支持20G - 500G + * + * @param int $diskSpace + */ + public function setDiskSpace(int $diskSpace) + { + $this->set("DiskSpace", $diskSpace); + } + + /** + * UseSSD: 是否使用SSD,默认为false + * + * @return boolean|null + */ + public function getUseSSD(): bool + { + return $this->get("UseSSD"); + } + + /** + * UseSSD: 是否使用SSD,默认为false + * + * @param boolean $useSSD + */ + public function setUseSSD(bool $useSSD) + { + $this->set("UseSSD", $useSSD); + } + + /** + * SSDType: SSD类型,可选值为"SATA"、"PCI-E",如果UseSSD为true ,则必选 + * + * @return string|null + */ + public function getSSDType(): string + { + return $this->get("SSDType"); + } + + /** + * SSDType: SSD类型,可选值为"SATA"、"PCI-E",如果UseSSD为true ,则必选 + * + * @param string $ssdType + */ + public function setSSDType(string $ssdType) + { + $this->set("SSDType", $ssdType); + } +} diff --git a/src/UDB/Apis/DescribeUDBInstanceUpgradePriceResponse.php b/src/UDB/Apis/DescribeUDBInstanceUpgradePriceResponse.php new file mode 100644 index 00000000..6a9157a4 --- /dev/null +++ b/src/UDB/Apis/DescribeUDBInstanceUpgradePriceResponse.php @@ -0,0 +1,44 @@ +get("Price"); + } + + /** + * Price: 价格,单位为分 + * + * @param int $price + */ + public function setPrice(int $price) + { + $this->set("Price", $price); + } +} diff --git a/src/UDB/Apis/DescribeUDBLogBackupURLRequest.php b/src/UDB/Apis/DescribeUDBLogBackupURLRequest.php new file mode 100644 index 00000000..75b86f39 --- /dev/null +++ b/src/UDB/Apis/DescribeUDBLogBackupURLRequest.php @@ -0,0 +1,132 @@ + "DescribeUDBLogBackupURL"]); + $this->markRequired("Region"); + $this->markRequired("DBId"); + $this->markRequired("BackupId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DBId: DB实例Id + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: DB实例Id + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } + + /** + * BackupId: DB实例备份ID + * + * @return integer|null + */ + public function getBackupId(): int + { + return $this->get("BackupId"); + } + + /** + * BackupId: DB实例备份ID + * + * @param int $backupId + */ + public function setBackupId(int $backupId) + { + $this->set("BackupId", $backupId); + } +} diff --git a/src/UDB/Apis/DescribeUDBLogBackupURLResponse.php b/src/UDB/Apis/DescribeUDBLogBackupURLResponse.php new file mode 100644 index 00000000..116105d9 --- /dev/null +++ b/src/UDB/Apis/DescribeUDBLogBackupURLResponse.php @@ -0,0 +1,64 @@ +get("BackupPath"); + } + + /** + * BackupPath: 备份外网URL + * + * @param string $backupPath + */ + public function setBackupPath(string $backupPath) + { + $this->set("BackupPath", $backupPath); + } + + /** + * UsernetPath: 备份用户网URL + * + * @return string|null + */ + public function getUsernetPath(): string + { + return $this->get("UsernetPath"); + } + + /** + * UsernetPath: 备份用户网URL + * + * @param string $usernetPath + */ + public function setUsernetPath(string $usernetPath) + { + $this->set("UsernetPath", $usernetPath); + } +} diff --git a/src/UDB/Apis/DescribeUDBLogPackageRequest.php b/src/UDB/Apis/DescribeUDBLogPackageRequest.php new file mode 100644 index 00000000..0604f1ff --- /dev/null +++ b/src/UDB/Apis/DescribeUDBLogPackageRequest.php @@ -0,0 +1,232 @@ + "DescribeUDBLogPackage"]); + $this->markRequired("Region"); + $this->markRequired("Offset"); + $this->markRequired("Limit"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Offset: 分页显示的起始偏移,列表操作则指定 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 分页显示的起始偏移,列表操作则指定 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 分页显示的条目数,列表操作则指定 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 分页显示的条目数,列表操作则指定 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * Type: 需要列出的备份文件类型,每种文件的值如下 2 : BINLOG\_BACKUP 3 : SLOW\_QUERY\_BACKUP 4 : ERRORLOG\_BACKUP + * + * @return integer|null + */ + public function getType(): int + { + return $this->get("Type"); + } + + /** + * Type: 需要列出的备份文件类型,每种文件的值如下 2 : BINLOG\_BACKUP 3 : SLOW\_QUERY\_BACKUP 4 : ERRORLOG\_BACKUP + * + * @param int $type + */ + public function setType(int $type) + { + $this->set("Type", $type); + } + + /** + * Types: Types作为Type的补充,支持多值传入,可以获取多个类型的日志记录,如:Types.0=2&Types.1=3 + * + * @return int[]|null + */ + public function getTypes(): array + { + return $this->get("Types"); + } + + /** + * Types: Types作为Type的补充,支持多值传入,可以获取多个类型的日志记录,如:Types.0=2&Types.1=3 + * + * @param int[] $types + */ + public function setTypes(array $types) + { + $this->set("Types", $types); + } + + /** + * DBId: DB实例Id,如果指定,则只获取该db的备份信息 + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: DB实例Id,如果指定,则只获取该db的备份信息 + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } + + /** + * BeginTime: 过滤条件:起始时间(时间戳) + * + * @return integer|null + */ + public function getBeginTime(): int + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 过滤条件:起始时间(时间戳) + * + * @param int $beginTime + */ + public function setBeginTime(int $beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 过滤条件:结束时间(时间戳) + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 过滤条件:结束时间(时间戳) + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } +} diff --git a/src/UDB/Apis/DescribeUDBLogPackageResponse.php b/src/UDB/Apis/DescribeUDBLogPackageResponse.php new file mode 100644 index 00000000..54abaabc --- /dev/null +++ b/src/UDB/Apis/DescribeUDBLogPackageResponse.php @@ -0,0 +1,74 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new LogPackageDataSet($item)); + } + return $result; + } + + /** + * DataSet: 备份信息 参见LogPackageDataSet + * + * @param LogPackageDataSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalCount: 备份总数,如果指定dbid,则是该db备份总数 + * + * @return integer|null + */ + public function getTotalCount(): int + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 备份总数,如果指定dbid,则是该db备份总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/UDB/Apis/DescribeUDBParamGroupRequest.php b/src/UDB/Apis/DescribeUDBParamGroupRequest.php new file mode 100644 index 00000000..a9d64add --- /dev/null +++ b/src/UDB/Apis/DescribeUDBParamGroupRequest.php @@ -0,0 +1,210 @@ + "DescribeUDBParamGroup"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Offset: 分页显示的起始偏移,列表操作则指定 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 分页显示的起始偏移,列表操作则指定 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 分页显示的条目数,列表操作则指定 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 分页显示的条目数,列表操作则指定 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * GroupId: 参数组id,如果指定则获取描述,否则是列表操作,需要 指定Offset/Limit + * + * @return integer|null + */ + public function getGroupId(): int + { + return $this->get("GroupId"); + } + + /** + * GroupId: 参数组id,如果指定则获取描述,否则是列表操作,需要 指定Offset/Limit + * + * @param int $groupId + */ + public function setGroupId(int $groupId) + { + $this->set("GroupId", $groupId); + } + + /** + * IsInUDBC: 是否选取专区中配置 + * + * @return boolean|null + */ + public function getIsInUDBC(): bool + { + return $this->get("IsInUDBC"); + } + + /** + * IsInUDBC: 是否选取专区中配置 + * + * @param boolean $isInUDBC + */ + public function setIsInUDBC(bool $isInUDBC) + { + $this->set("IsInUDBC", $isInUDBC); + } + + /** + * RegionFlag: 当请求没有填写Zone时,如果指定为true,表示只拉取跨可用区的相关配置文件,否则,拉取所有机房的配置文件(包括每个单可用区和跨可用区) + * + * @return boolean|null + */ + public function getRegionFlag(): bool + { + return $this->get("RegionFlag"); + } + + /** + * RegionFlag: 当请求没有填写Zone时,如果指定为true,表示只拉取跨可用区的相关配置文件,否则,拉取所有机房的配置文件(包括每个单可用区和跨可用区) + * + * @param boolean $regionFlag + */ + public function setRegionFlag(bool $regionFlag) + { + $this->set("RegionFlag", $regionFlag); + } + + /** + * ClassType: 如果未指定GroupId,则可选是否选取特定DB类型的配置(sql, nosql, postgresql, sqlserver) + * + * @return string|null + */ + public function getClassType(): string + { + return $this->get("ClassType"); + } + + /** + * ClassType: 如果未指定GroupId,则可选是否选取特定DB类型的配置(sql, nosql, postgresql, sqlserver) + * + * @param string $classType + */ + public function setClassType(string $classType) + { + $this->set("ClassType", $classType); + } +} diff --git a/src/UDB/Apis/DescribeUDBParamGroupResponse.php b/src/UDB/Apis/DescribeUDBParamGroupResponse.php new file mode 100644 index 00000000..36ac78f8 --- /dev/null +++ b/src/UDB/Apis/DescribeUDBParamGroupResponse.php @@ -0,0 +1,75 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UDBParamGroupSet($item)); + } + return $result; + } + + /** + * DataSet: 参数组列表 参照UDBParamGroupSet + * + * @param UDBParamGroupSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalCount: 参数组总数,列表操作时才会有该参数 + * + * @return integer|null + */ + public function getTotalCount(): int + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 参数组总数,列表操作时才会有该参数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/UDB/Apis/DescribeUDBSplittingInfoRequest.php b/src/UDB/Apis/DescribeUDBSplittingInfoRequest.php new file mode 100644 index 00000000..9b559a23 --- /dev/null +++ b/src/UDB/Apis/DescribeUDBSplittingInfoRequest.php @@ -0,0 +1,92 @@ + "DescribeUDBSplittingInfo"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("MasterDBId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * MasterDBId: DB实例ID + * + * @return string|null + */ + public function getMasterDBId(): string + { + return $this->get("MasterDBId"); + } + + /** + * MasterDBId: DB实例ID + * + * @param string $masterDBId + */ + public function setMasterDBId(string $masterDBId) + { + $this->set("MasterDBId", $masterDBId); + } +} diff --git a/src/UDB/Apis/DescribeUDBSplittingInfoResponse.php b/src/UDB/Apis/DescribeUDBSplittingInfoResponse.php new file mode 100644 index 00000000..9c24305e --- /dev/null +++ b/src/UDB/Apis/DescribeUDBSplittingInfoResponse.php @@ -0,0 +1,214 @@ +get("Zone"); + } + + /** + * Zone: 可用区 + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * MasterDBId: DB实例ID + * + * @return string|null + */ + public function getMasterDBId(): string + { + return $this->get("MasterDBId"); + } + + /** + * MasterDBId: DB实例ID + * + * @param string $masterDBId + */ + public function setMasterDBId(string $masterDBId) + { + $this->set("MasterDBId", $masterDBId); + } + + /** + * RWIP: 读写分离IP + * + * @return string|null + */ + public function getRWIP(): string + { + return $this->get("RWIP"); + } + + /** + * RWIP: 读写分离IP + * + * @param string $rwip + */ + public function setRWIP(string $rwip) + { + $this->set("RWIP", $rwip); + } + + /** + * DelayThreshold: 时间阈值 + * + * @return integer|null + */ + public function getDelayThreshold(): int + { + return $this->get("DelayThreshold"); + } + + /** + * DelayThreshold: 时间阈值 + * + * @param int $delayThreshold + */ + public function setDelayThreshold(int $delayThreshold) + { + $this->set("DelayThreshold", $delayThreshold); + } + + /** + * Port: 端口号 + * + * @return integer|null + */ + public function getPort(): int + { + return $this->get("Port"); + } + + /** + * Port: 端口号 + * + * @param int $port + */ + public function setPort(int $port) + { + $this->set("Port", $port); + } + + /** + * ReadModel: 读写分离策略 + * + * @return string|null + */ + public function getReadModel(): string + { + return $this->get("ReadModel"); + } + + /** + * ReadModel: 读写分离策略 + * + * @param string $readModel + */ + public function setReadModel(string $readModel) + { + $this->set("ReadModel", $readModel); + } + + /** + * DBTypeId: 数据库版本 + * + * @return string|null + */ + public function getDBTypeId(): string + { + return $this->get("DBTypeId"); + } + + /** + * DBTypeId: 数据库版本 + * + * @param string $dbTypeId + */ + public function setDBTypeId(string $dbTypeId) + { + $this->set("DBTypeId", $dbTypeId); + } + + /** + * RWState: 读写分离状态 + * + * @return string|null + */ + public function getRWState(): string + { + return $this->get("RWState"); + } + + /** + * RWState: 读写分离状态 + * + * @param string $rwState + */ + public function setRWState(string $rwState) + { + $this->set("RWState", $rwState); + } + + /** + * DataSet: 读写分离从库信息 + * + * @return UDBRWSplittingSet[]|null + */ + public function getDataSet(): array + { + $items = $this->get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UDBRWSplittingSet($item)); + } + return $result; + } + + /** + * DataSet: 读写分离从库信息 + * + * @param UDBRWSplittingSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UDB/Apis/DescribeUDBTypeRequest.php b/src/UDB/Apis/DescribeUDBTypeRequest.php new file mode 100644 index 00000000..b0863d46 --- /dev/null +++ b/src/UDB/Apis/DescribeUDBTypeRequest.php @@ -0,0 +1,171 @@ + "DescribeUDBType"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * BackupZone: 跨可用区高可用DB的备库所在区域,仅当该可用区支持跨可用区高可用时填入。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getBackupZone(): string + { + return $this->get("BackupZone"); + } + + /** + * BackupZone: 跨可用区高可用DB的备库所在区域,仅当该可用区支持跨可用区高可用时填入。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $backupZone + */ + public function setBackupZone(string $backupZone) + { + $this->set("BackupZone", $backupZone); + } + + /** + * DBClusterType: DB实例类型,如mysql,sqlserver,mongo,postgresql + * + * @return string|null + */ + public function getDBClusterType(): string + { + return $this->get("DBClusterType"); + } + + /** + * DBClusterType: DB实例类型,如mysql,sqlserver,mongo,postgresql + * + * @param string $dbClusterType + */ + public function setDBClusterType(string $dbClusterType) + { + $this->set("DBClusterType", $dbClusterType); + } + + /** + * InstanceMode: 返回支持某种实例类型的DB类型。如果没传,则表示任何实例类型均可。normal:单点,ha:高可用,sharded_cluster:分片集群 + * + * @return string|null + */ + public function getInstanceMode(): string + { + return $this->get("InstanceMode"); + } + + /** + * InstanceMode: 返回支持某种实例类型的DB类型。如果没传,则表示任何实例类型均可。normal:单点,ha:高可用,sharded_cluster:分片集群 + * + * @param string $instanceMode + */ + public function setInstanceMode(string $instanceMode) + { + $this->set("InstanceMode", $instanceMode); + } + + /** + * DiskType: 返回支持某种磁盘类型的DB类型,如Normal、SSD、NVMe_SSD。如果没传,则表示任何磁盘类型均可。 + * + * @return string|null + */ + public function getDiskType(): string + { + return $this->get("DiskType"); + } + + /** + * DiskType: 返回支持某种磁盘类型的DB类型,如Normal、SSD、NVMe_SSD。如果没传,则表示任何磁盘类型均可。 + * + * @param string $diskType + */ + public function setDiskType(string $diskType) + { + $this->set("DiskType", $diskType); + } + + /** + * CompatibleWithDBType: 返回从备份创建实例时,该版本号所支持的备份创建版本。如果没传,则表示不是从备份创建。 + * + * @return string|null + */ + public function getCompatibleWithDBType(): string + { + return $this->get("CompatibleWithDBType"); + } + + /** + * CompatibleWithDBType: 返回从备份创建实例时,该版本号所支持的备份创建版本。如果没传,则表示不是从备份创建。 + * + * @param string $compatibleWithDBType + */ + public function setCompatibleWithDBType(string $compatibleWithDBType) + { + $this->set("CompatibleWithDBType", $compatibleWithDBType); + } +} diff --git a/src/UDB/Apis/DescribeUDBTypeResponse.php b/src/UDB/Apis/DescribeUDBTypeResponse.php new file mode 100644 index 00000000..cf23c027 --- /dev/null +++ b/src/UDB/Apis/DescribeUDBTypeResponse.php @@ -0,0 +1,54 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UDBTypeSet($item)); + } + return $result; + } + + /** + * DataSet: DB类型列表 参数见 UDBTypeSet + * + * @param UDBTypeSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UDB/Apis/DisableUDBRWSplittingRequest.php b/src/UDB/Apis/DisableUDBRWSplittingRequest.php new file mode 100644 index 00000000..845c676d --- /dev/null +++ b/src/UDB/Apis/DisableUDBRWSplittingRequest.php @@ -0,0 +1,92 @@ + "DisableUDBRWSplitting"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("MasterDBId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * MasterDBId: DB实例ID(master) + * + * @return string|null + */ + public function getMasterDBId(): string + { + return $this->get("MasterDBId"); + } + + /** + * MasterDBId: DB实例ID(master) + * + * @param string $masterDBId + */ + public function setMasterDBId(string $masterDBId) + { + $this->set("MasterDBId", $masterDBId); + } +} diff --git a/src/UDB/Apis/DisableUDBRWSplittingResponse.php b/src/UDB/Apis/DisableUDBRWSplittingResponse.php new file mode 100644 index 00000000..a6533725 --- /dev/null +++ b/src/UDB/Apis/DisableUDBRWSplittingResponse.php @@ -0,0 +1,26 @@ + "EditUDBBackupBlacklist"]); + $this->markRequired("Region"); + $this->markRequired("DBId"); + $this->markRequired("Blacklist"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DBId: DB实例Id,该值可以通过DescribeUDBInstance获取 + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: DB实例Id,该值可以通过DescribeUDBInstance获取 + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } + + /** + * Blacklist: 黑名单,规范示例,指定库mysql.%;test.%; 指定表city.address; + * + * @return string|null + */ + public function getBlacklist(): string + { + return $this->get("Blacklist"); + } + + /** + * Blacklist: 黑名单,规范示例,指定库mysql.%;test.%; 指定表city.address; + * + * @param string $blacklist + */ + public function setBlacklist(string $blacklist) + { + $this->set("Blacklist", $blacklist); + } +} diff --git a/src/UDB/Apis/EditUDBBackupBlacklistResponse.php b/src/UDB/Apis/EditUDBBackupBlacklistResponse.php new file mode 100644 index 00000000..ff92680f --- /dev/null +++ b/src/UDB/Apis/EditUDBBackupBlacklistResponse.php @@ -0,0 +1,26 @@ + "EnableUDBRWSplitting"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("MasterDBId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * MasterDBId: DB实例ID(主库) + * + * @return string|null + */ + public function getMasterDBId(): string + { + return $this->get("MasterDBId"); + } + + /** + * MasterDBId: DB实例ID(主库) + * + * @param string $masterDBId + */ + public function setMasterDBId(string $masterDBId) + { + $this->set("MasterDBId", $masterDBId); + } + + /** + * BackupZone: 备份的可用区。用于创建跨可用区读写分离的一个节点,跨机房的读写分离必须有这个参数 + * + * @return string|null + */ + public function getBackupZone(): string + { + return $this->get("BackupZone"); + } + + /** + * BackupZone: 备份的可用区。用于创建跨可用区读写分离的一个节点,跨机房的读写分离必须有这个参数 + * + * @param string $backupZone + */ + public function setBackupZone(string $backupZone) + { + $this->set("BackupZone", $backupZone); + } +} diff --git a/src/UDB/Apis/EnableUDBRWSplittingResponse.php b/src/UDB/Apis/EnableUDBRWSplittingResponse.php new file mode 100644 index 00000000..9980effe --- /dev/null +++ b/src/UDB/Apis/EnableUDBRWSplittingResponse.php @@ -0,0 +1,64 @@ +get("MasterDBId"); + } + + /** + * MasterDBId: DB实例ID(主库) + * + * @param string $masterDBId + */ + public function setMasterDBId(string $masterDBId) + { + $this->set("MasterDBId", $masterDBId); + } + + /** + * RWIp: 读写分离访问IP + * + * @return string|null + */ + public function getRWIp(): string + { + return $this->get("RWIp"); + } + + /** + * RWIp: 读写分离访问IP + * + * @param string $rwIp + */ + public function setRWIp(string $rwIp) + { + $this->set("RWIp", $rwIp); + } +} diff --git a/src/UDB/Apis/ExtractUDBParamGroupRequest.php b/src/UDB/Apis/ExtractUDBParamGroupRequest.php new file mode 100644 index 00000000..66dde783 --- /dev/null +++ b/src/UDB/Apis/ExtractUDBParamGroupRequest.php @@ -0,0 +1,111 @@ + "ExtractUDBParamGroup"]); + $this->markRequired("Region"); + $this->markRequired("GroupId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。如果RegionFlag=false,必须传,反之,可不传。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。如果RegionFlag=false,必须传,反之,可不传。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * GroupId: 配置id + * + * @return integer|null + */ + public function getGroupId(): int + { + return $this->get("GroupId"); + } + + /** + * GroupId: 配置id + * + * @param int $groupId + */ + public function setGroupId(int $groupId) + { + $this->set("GroupId", $groupId); + } + + /** + * RegionFlag: 是否跨可用区,RegionFlag为true时表示跨可用区配置文件。如果RegionFlag=true,Zone可以不传,否则Zone必须传。 + * + * @return boolean|null + */ + public function getRegionFlag(): bool + { + return $this->get("RegionFlag"); + } + + /** + * RegionFlag: 是否跨可用区,RegionFlag为true时表示跨可用区配置文件。如果RegionFlag=true,Zone可以不传,否则Zone必须传。 + * + * @param boolean $regionFlag + */ + public function setRegionFlag(bool $regionFlag) + { + $this->set("RegionFlag", $regionFlag); + } +} diff --git a/src/UDB/Apis/ExtractUDBParamGroupResponse.php b/src/UDB/Apis/ExtractUDBParamGroupResponse.php new file mode 100644 index 00000000..3975890a --- /dev/null +++ b/src/UDB/Apis/ExtractUDBParamGroupResponse.php @@ -0,0 +1,44 @@ +get("Content"); + } + + /** + * Content: 配置文件内容 + * + * @param string $content + */ + public function setContent(string $content) + { + $this->set("Content", $content); + } +} diff --git a/src/UDB/Apis/FetchUDBInstanceEarliestRecoverTimeRequest.php b/src/UDB/Apis/FetchUDBInstanceEarliestRecoverTimeRequest.php new file mode 100644 index 00000000..5f78ed5a --- /dev/null +++ b/src/UDB/Apis/FetchUDBInstanceEarliestRecoverTimeRequest.php @@ -0,0 +1,111 @@ + "FetchUDBInstanceEarliestRecoverTime"]); + $this->markRequired("Region"); + $this->markRequired("DBId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DBId: DB实例Id + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: DB实例Id + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } +} diff --git a/src/UDB/Apis/FetchUDBInstanceEarliestRecoverTimeResponse.php b/src/UDB/Apis/FetchUDBInstanceEarliestRecoverTimeResponse.php new file mode 100644 index 00000000..cdc2319d --- /dev/null +++ b/src/UDB/Apis/FetchUDBInstanceEarliestRecoverTimeResponse.php @@ -0,0 +1,44 @@ +get("EarliestTime"); + } + + /** + * EarliestTime: 获取最早可回档时间点 + * + * @param int $earliestTime + */ + public function setEarliestTime(int $earliestTime) + { + $this->set("EarliestTime", $earliestTime); + } +} diff --git a/src/UDB/Apis/ModifyUDBInstanceNameRequest.php b/src/UDB/Apis/ModifyUDBInstanceNameRequest.php new file mode 100644 index 00000000..0b5fd537 --- /dev/null +++ b/src/UDB/Apis/ModifyUDBInstanceNameRequest.php @@ -0,0 +1,132 @@ + "ModifyUDBInstanceName"]); + $this->markRequired("Region"); + $this->markRequired("DBId"); + $this->markRequired("Name"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DBId: 实例的Id,该值可以通过DescribeUDBInstance获取 + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: 实例的Id,该值可以通过DescribeUDBInstance获取 + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } + + /** + * Name: 实例的新名字, 长度要求为6~63位 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 实例的新名字, 长度要求为6~63位 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } +} diff --git a/src/UDB/Apis/ModifyUDBInstanceNameResponse.php b/src/UDB/Apis/ModifyUDBInstanceNameResponse.php new file mode 100644 index 00000000..23c8937a --- /dev/null +++ b/src/UDB/Apis/ModifyUDBInstanceNameResponse.php @@ -0,0 +1,26 @@ + "ModifyUDBInstancePassword"]); + $this->markRequired("Region"); + $this->markRequired("DBId"); + $this->markRequired("Password"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DBId: 实例的ID,该值可以通过DescribeUDBInstance获取 + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: 实例的ID,该值可以通过DescribeUDBInstance获取 + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } + + /** + * Password: 实例的新密码 + * + * @return string|null + */ + public function getPassword(): string + { + return $this->get("Password"); + } + + /** + * Password: 实例的新密码 + * + * @param string $password + */ + public function setPassword(string $password) + { + $this->set("Password", $password); + } + + /** + * AccountName: sqlserver帐号,仅在sqlserver的情况下填该参数 + * + * @return string|null + */ + public function getAccountName(): string + { + return $this->get("AccountName"); + } + + /** + * AccountName: sqlserver帐号,仅在sqlserver的情况下填该参数 + * + * @param string $accountName + */ + public function setAccountName(string $accountName) + { + $this->set("AccountName", $accountName); + } +} diff --git a/src/UDB/Apis/ModifyUDBInstancePasswordResponse.php b/src/UDB/Apis/ModifyUDBInstancePasswordResponse.php new file mode 100644 index 00000000..98bd8607 --- /dev/null +++ b/src/UDB/Apis/ModifyUDBInstancePasswordResponse.php @@ -0,0 +1,26 @@ + "PromoteUDBInstanceToHA"]); + $this->markRequired("Region"); + $this->markRequired("DBId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DBId: 实例的Id,该值可以通过DescribeUDBInstance获取 + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: 实例的Id,该值可以通过DescribeUDBInstance获取 + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } +} diff --git a/src/UDB/Apis/PromoteUDBInstanceToHAResponse.php b/src/UDB/Apis/PromoteUDBInstanceToHAResponse.php new file mode 100644 index 00000000..dab17b9b --- /dev/null +++ b/src/UDB/Apis/PromoteUDBInstanceToHAResponse.php @@ -0,0 +1,26 @@ + "PromoteUDBSlave"]); + $this->markRequired("Region"); + $this->markRequired("DBId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DBId: 实例的Id,该值可以通过DescribeUDBInstance获取 + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: 实例的Id,该值可以通过DescribeUDBInstance获取 + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } + + /** + * IsForce: 是否强制(如果从库落后可能会禁止提升),默认false 如果落后情况下,强制提升丢失数据 + * + * @return boolean|null + */ + public function getIsForce(): bool + { + return $this->get("IsForce"); + } + + /** + * IsForce: 是否强制(如果从库落后可能会禁止提升),默认false 如果落后情况下,强制提升丢失数据 + * + * @param boolean $isForce + */ + public function setIsForce(bool $isForce) + { + $this->set("IsForce", $isForce); + } +} diff --git a/src/UDB/Apis/PromoteUDBSlaveResponse.php b/src/UDB/Apis/PromoteUDBSlaveResponse.php new file mode 100644 index 00000000..b145b388 --- /dev/null +++ b/src/UDB/Apis/PromoteUDBSlaveResponse.php @@ -0,0 +1,26 @@ + "ResizeUDBInstance"]); + $this->markRequired("Region"); + $this->markRequired("DBId"); + $this->markRequired("MemoryLimit"); + $this->markRequired("DiskSpace"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DBId: 实例的Id + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: 实例的Id + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } + + /** + * MemoryLimit: 内存限制(MB),目前支持以下几档 1000M/2000M/4000M/ 6000M/8000M/ 12000M/16000M/ 24000M/32000M/ 48000M/64000M/96000M/128000M/192000M/256000M/320000M。 + * + * @return integer|null + */ + public function getMemoryLimit(): int + { + return $this->get("MemoryLimit"); + } + + /** + * MemoryLimit: 内存限制(MB),目前支持以下几档 1000M/2000M/4000M/ 6000M/8000M/ 12000M/16000M/ 24000M/32000M/ 48000M/64000M/96000M/128000M/192000M/256000M/320000M。 + * + * @param int $memoryLimit + */ + public function setMemoryLimit(int $memoryLimit) + { + $this->set("MemoryLimit", $memoryLimit); + } + + /** + * DiskSpace: 磁盘空间(GB), 暂时支持20G-32T + * + * @return integer|null + */ + public function getDiskSpace(): int + { + return $this->get("DiskSpace"); + } + + /** + * DiskSpace: 磁盘空间(GB), 暂时支持20G-32T + * + * @param int $diskSpace + */ + public function setDiskSpace(int $diskSpace) + { + $this->set("DiskSpace", $diskSpace); + } + + /** + * UseSSD: 是否使用SSD,默认为true + * + * @return boolean|null + */ + public function getUseSSD(): bool + { + return $this->get("UseSSD"); + } + + /** + * UseSSD: 是否使用SSD,默认为true + * + * @param boolean $useSSD + */ + public function setUseSSD(bool $useSSD) + { + $this->set("UseSSD", $useSSD); + } + + /** + * SSDType: SSD类型,可选值为"SATA"、"PCI-E"、“NVMe”,如果UseSSD为true ,则必选 + * + * @return string|null + */ + public function getSSDType(): string + { + return $this->get("SSDType"); + } + + /** + * SSDType: SSD类型,可选值为"SATA"、"PCI-E"、“NVMe”,如果UseSSD为true ,则必选 + * + * @param string $ssdType + */ + public function setSSDType(string $ssdType) + { + $this->set("SSDType", $ssdType); + } + + /** + * UDBCId: 专区的ID,如果有值表示专区中的DB配置升降级 + * + * @return string|null + */ + public function getUDBCId(): string + { + return $this->get("UDBCId"); + } + + /** + * UDBCId: 专区的ID,如果有值表示专区中的DB配置升降级 + * + * @param string $udbcId + */ + public function setUDBCId(string $udbcId) + { + $this->set("UDBCId", $udbcId); + } + + /** + * InstanceType: UDB数据库机型: "Normal": "标准机型" , "SATA_SSD": "SSD机型" , "PCIE_SSD": "SSD高性能机型" , "Normal_Volume": "标准大容量机型", "SATA_SSD_Volume": "SSD大容量机型" , "PCIE_SSD_Volume": "SSD高性能大容量机型",“NVMe_SSD”:“快杰机型” + * + * @return string|null + */ + public function getInstanceType(): string + { + return $this->get("InstanceType"); + } + + /** + * InstanceType: UDB数据库机型: "Normal": "标准机型" , "SATA_SSD": "SSD机型" , "PCIE_SSD": "SSD高性能机型" , "Normal_Volume": "标准大容量机型", "SATA_SSD_Volume": "SSD大容量机型" , "PCIE_SSD_Volume": "SSD高性能大容量机型",“NVMe_SSD”:“快杰机型” + * + * @param string $instanceType + */ + public function setInstanceType(string $instanceType) + { + $this->set("InstanceType", $instanceType); + } + + /** + * InstanceMode: UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例 "HA": 高可用版UDB实例 默认是"Normal" + * + * @return string|null + */ + public function getInstanceMode(): string + { + return $this->get("InstanceMode"); + } + + /** + * InstanceMode: UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例 "HA": 高可用版UDB实例 默认是"Normal" + * + * @param string $instanceMode + */ + public function setInstanceMode(string $instanceMode) + { + $this->set("InstanceMode", $instanceMode); + } + + /** + * StartAfterUpgrade: DB关闭状态下升降级,升降级后是否启动DB,默认为false + * + * @return boolean|null + */ + public function getStartAfterUpgrade(): bool + { + return $this->get("StartAfterUpgrade"); + } + + /** + * StartAfterUpgrade: DB关闭状态下升降级,升降级后是否启动DB,默认为false + * + * @param boolean $startAfterUpgrade + */ + public function setStartAfterUpgrade(bool $startAfterUpgrade) + { + $this->set("StartAfterUpgrade", $startAfterUpgrade); + } + + /** + * CouponId: 使用的代金券id + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 使用的代金券id + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UDB/Apis/ResizeUDBInstanceResponse.php b/src/UDB/Apis/ResizeUDBInstanceResponse.php new file mode 100644 index 00000000..2d10e8e0 --- /dev/null +++ b/src/UDB/Apis/ResizeUDBInstanceResponse.php @@ -0,0 +1,26 @@ + "RestartRWSplitting"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("MasterDBId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * MasterDBId: 待关闭读写分离中间键ProxyId + * + * @return string|null + */ + public function getMasterDBId(): string + { + return $this->get("MasterDBId"); + } + + /** + * MasterDBId: 待关闭读写分离中间键ProxyId + * + * @param string $masterDBId + */ + public function setMasterDBId(string $masterDBId) + { + $this->set("MasterDBId", $masterDBId); + } +} diff --git a/src/UDB/Apis/RestartRWSplittingResponse.php b/src/UDB/Apis/RestartRWSplittingResponse.php new file mode 100644 index 00000000..8091fbdc --- /dev/null +++ b/src/UDB/Apis/RestartRWSplittingResponse.php @@ -0,0 +1,26 @@ + "RestartUDBInstance"]); + $this->markRequired("Region"); + $this->markRequired("DBId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DBId: 实例的Id,该值可以通过DescribeUDBInstance获取 + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: 实例的Id,该值可以通过DescribeUDBInstance获取 + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } +} diff --git a/src/UDB/Apis/RestartUDBInstanceResponse.php b/src/UDB/Apis/RestartUDBInstanceResponse.php new file mode 100644 index 00000000..2ba59f95 --- /dev/null +++ b/src/UDB/Apis/RestartUDBInstanceResponse.php @@ -0,0 +1,26 @@ + "SetUDBRWSplitting"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("MasterDBId"); + $this->markRequired("ReadModel"); + $this->markRequired("DBIds"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * MasterDBId: DB实例ID(master) + * + * @return string|null + */ + public function getMasterDBId(): string + { + return $this->get("MasterDBId"); + } + + /** + * MasterDBId: DB实例ID(master) + * + * @param string $masterDBId + */ + public function setMasterDBId(string $masterDBId) + { + $this->set("MasterDBId", $masterDBId); + } + + /** + * ReadModel: 读写分离策略 + * + * @return string|null + */ + public function getReadModel(): string + { + return $this->get("ReadModel"); + } + + /** + * ReadModel: 读写分离策略 + * + * @param string $readModel + */ + public function setReadModel(string $readModel) + { + $this->set("ReadModel", $readModel); + } + + /** + * DBIds: DBIds.0 代表UDB主节点, DBIds.1 到DBIds.n 代表1到N个从节点 + * + * @return string[]|null + */ + public function getDBIds(): array + { + return $this->get("DBIds"); + } + + /** + * DBIds: DBIds.0 代表UDB主节点, DBIds.1 到DBIds.n 代表1到N个从节点 + * + * @param string[] $dbIds + */ + public function setDBIds(array $dbIds) + { + $this->set("DBIds", $dbIds); + } + + /** + * ReadPercents: udb主从节点的只读比例。ReadPercents.0代表主节点的只读比例,ReadPercents.1代表从节点1的读写比例, 以此类推 + * + * @return string[]|null + */ + public function getReadPercents(): array + { + return $this->get("ReadPercents"); + } + + /** + * ReadPercents: udb主从节点的只读比例。ReadPercents.0代表主节点的只读比例,ReadPercents.1代表从节点1的读写比例, 以此类推 + * + * @param string[] $readPercents + */ + public function setReadPercents(array $readPercents) + { + $this->set("ReadPercents", $readPercents); + } + + /** + * DelayThreshold: 时间阙值 + * + * @return integer|null + */ + public function getDelayThreshold(): int + { + return $this->get("DelayThreshold"); + } + + /** + * DelayThreshold: 时间阙值 + * + * @param int $delayThreshold + */ + public function setDelayThreshold(int $delayThreshold) + { + $this->set("DelayThreshold", $delayThreshold); + } +} diff --git a/src/UDB/Apis/SetUDBRWSplittingResponse.php b/src/UDB/Apis/SetUDBRWSplittingResponse.php new file mode 100644 index 00000000..227f0c2f --- /dev/null +++ b/src/UDB/Apis/SetUDBRWSplittingResponse.php @@ -0,0 +1,26 @@ + "StartUDBInstance"]); + $this->markRequired("Region"); + $this->markRequired("DBId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DBId: 实例的Id,该值可以通过DescribeUDBInstance获取 + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: 实例的Id,该值可以通过DescribeUDBInstance获取 + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } +} diff --git a/src/UDB/Apis/StartUDBInstanceResponse.php b/src/UDB/Apis/StartUDBInstanceResponse.php new file mode 100644 index 00000000..0398dc55 --- /dev/null +++ b/src/UDB/Apis/StartUDBInstanceResponse.php @@ -0,0 +1,26 @@ + "StopUDBInstance"]); + $this->markRequired("Region"); + $this->markRequired("DBId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DBId: 实例的Id,该值可以通过DescribeUDBInstance获取 + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: 实例的Id,该值可以通过DescribeUDBInstance获取 + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } + + /** + * ForceToKill: 是否使用强制手段关闭DB,默认是false + * + * @return boolean|null + */ + public function getForceToKill(): bool + { + return $this->get("ForceToKill"); + } + + /** + * ForceToKill: 是否使用强制手段关闭DB,默认是false + * + * @param boolean $forceToKill + */ + public function setForceToKill(bool $forceToKill) + { + $this->set("ForceToKill", $forceToKill); + } +} diff --git a/src/UDB/Apis/StopUDBInstanceResponse.php b/src/UDB/Apis/StopUDBInstanceResponse.php new file mode 100644 index 00000000..5ed8e521 --- /dev/null +++ b/src/UDB/Apis/StopUDBInstanceResponse.php @@ -0,0 +1,26 @@ + "SwitchUDBHAToSentinel"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("DBId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DBId: UDB的实例ID + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: UDB的实例ID + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } +} diff --git a/src/UDB/Apis/SwitchUDBHAToSentinelResponse.php b/src/UDB/Apis/SwitchUDBHAToSentinelResponse.php new file mode 100644 index 00000000..7ede4c09 --- /dev/null +++ b/src/UDB/Apis/SwitchUDBHAToSentinelResponse.php @@ -0,0 +1,26 @@ + "SwitchUDBInstanceToHA"]); + $this->markRequired("Region"); + $this->markRequired("DBId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DBId: 实例的Id,该值可以通过DescribeUDBInstance获取 + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: 实例的Id,该值可以通过DescribeUDBInstance获取 + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } +} diff --git a/src/UDB/Apis/SwitchUDBInstanceToHAResponse.php b/src/UDB/Apis/SwitchUDBInstanceToHAResponse.php new file mode 100644 index 00000000..b86122b9 --- /dev/null +++ b/src/UDB/Apis/SwitchUDBInstanceToHAResponse.php @@ -0,0 +1,44 @@ +get("DBId"); + } + + /** + * DBId: 切换后高可用db实例的Id + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } +} diff --git a/src/UDB/Apis/UpdateUDBInstanceBackupStrategyRequest.php b/src/UDB/Apis/UpdateUDBInstanceBackupStrategyRequest.php new file mode 100644 index 00000000..dcfb9b7d --- /dev/null +++ b/src/UDB/Apis/UpdateUDBInstanceBackupStrategyRequest.php @@ -0,0 +1,191 @@ + "UpdateUDBInstanceBackupStrategy"]); + $this->markRequired("Region"); + $this->markRequired("DBId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DBId: 主节点的Id + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: 主节点的Id + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } + + /** + * BackupTime: 备份的整点时间,范围[0,23] + * + * @return integer|null + */ + public function getBackupTime(): int + { + return $this->get("BackupTime"); + } + + /** + * BackupTime: 备份的整点时间,范围[0,23] + * + * @param int $backupTime + */ + public function setBackupTime(int $backupTime) + { + $this->set("BackupTime", $backupTime); + } + + /** + * BackupDate: 备份时期标记位。共7位,每一位为一周中一天的备份情况,0表示关闭当天备份,1表示打开当天备份。最右边的一位为星期天的备份开关,其余从右到左依次为星期一到星期六的备份配置开关,每周必须至少设置两天备份。例如:1100000表示打开星期六和星期五的备份功能 + * + * @return string|null + */ + public function getBackupDate(): string + { + return $this->get("BackupDate"); + } + + /** + * BackupDate: 备份时期标记位。共7位,每一位为一周中一天的备份情况,0表示关闭当天备份,1表示打开当天备份。最右边的一位为星期天的备份开关,其余从右到左依次为星期一到星期六的备份配置开关,每周必须至少设置两天备份。例如:1100000表示打开星期六和星期五的备份功能 + * + * @param string $backupDate + */ + public function setBackupDate(string $backupDate) + { + $this->set("BackupDate", $backupDate); + } + + /** + * ForceDump: 当导出某些数据遇到问题后,是否强制导出其他剩余数据默认是false需要同时设置BackupDate字段 + * + * @return boolean|null + */ + public function getForceDump(): bool + { + return $this->get("ForceDump"); + } + + /** + * ForceDump: 当导出某些数据遇到问题后,是否强制导出其他剩余数据默认是false需要同时设置BackupDate字段 + * + * @param boolean $forceDump + */ + public function setForceDump(bool $forceDump) + { + $this->set("ForceDump", $forceDump); + } + + /** + * BackupMethod: 选择默认的备份方式,可选 snapshot 表示使用快照/物理备份,不填或者其它任何值为默认的逻辑备份。需要同时设置BackupDate字段。(注意现在只有SSD 版本的 MySQL实例支持物理备份) + * + * @return string|null + */ + public function getBackupMethod(): string + { + return $this->get("BackupMethod"); + } + + /** + * BackupMethod: 选择默认的备份方式,可选 snapshot 表示使用快照/物理备份,不填或者其它任何值为默认的逻辑备份。需要同时设置BackupDate字段。(注意现在只有SSD 版本的 MySQL实例支持物理备份) + * + * @param string $backupMethod + */ + public function setBackupMethod(string $backupMethod) + { + $this->set("BackupMethod", $backupMethod); + } +} diff --git a/src/UDB/Apis/UpdateUDBInstanceBackupStrategyResponse.php b/src/UDB/Apis/UpdateUDBInstanceBackupStrategyResponse.php new file mode 100644 index 00000000..68b48d9c --- /dev/null +++ b/src/UDB/Apis/UpdateUDBInstanceBackupStrategyResponse.php @@ -0,0 +1,26 @@ + "UpdateUDBInstanceSlaveBackupSwitch"]); + $this->markRequired("Region"); + $this->markRequired("MasterDBId"); + $this->markRequired("BackupSwitch"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * MasterDBId: 主库的Id + * + * @return string|null + */ + public function getMasterDBId(): string + { + return $this->get("MasterDBId"); + } + + /** + * MasterDBId: 主库的Id + * + * @param string $masterDBId + */ + public function setMasterDBId(string $masterDBId) + { + $this->set("MasterDBId", $masterDBId); + } + + /** + * BackupSwitch: 从库的备份开关,范围[0,1],0表示从库备份功能关闭,1 表示从库备份开关打开。 + * + * @return integer|null + */ + public function getBackupSwitch(): int + { + return $this->get("BackupSwitch"); + } + + /** + * BackupSwitch: 从库的备份开关,范围[0,1],0表示从库备份功能关闭,1 表示从库备份开关打开。 + * + * @param int $backupSwitch + */ + public function setBackupSwitch(int $backupSwitch) + { + $this->set("BackupSwitch", $backupSwitch); + } + + /** + * SlaveDBId: 从库的Id,如果从库备份开关设定为打开,则必须赋值。 + * + * @return string|null + */ + public function getSlaveDBId(): string + { + return $this->get("SlaveDBId"); + } + + /** + * SlaveDBId: 从库的Id,如果从库备份开关设定为打开,则必须赋值。 + * + * @param string $slaveDBId + */ + public function setSlaveDBId(string $slaveDBId) + { + $this->set("SlaveDBId", $slaveDBId); + } +} diff --git a/src/UDB/Apis/UpdateUDBInstanceSlaveBackupSwitchResponse.php b/src/UDB/Apis/UpdateUDBInstanceSlaveBackupSwitchResponse.php new file mode 100644 index 00000000..02146f4c --- /dev/null +++ b/src/UDB/Apis/UpdateUDBInstanceSlaveBackupSwitchResponse.php @@ -0,0 +1,26 @@ + "UpdateUDBParamGroup"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("GroupId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * GroupId: 配置参数组id,使用DescribeUDBParamGroup获得 + * + * @return integer|null + */ + public function getGroupId(): int + { + return $this->get("GroupId"); + } + + /** + * GroupId: 配置参数组id,使用DescribeUDBParamGroup获得 + * + * @param int $groupId + */ + public function setGroupId(int $groupId) + { + $this->set("GroupId", $groupId); + } + + /** + * Key: 参数名称(与Value配合使用) + * + * @return string|null + */ + public function getKey(): string + { + return $this->get("Key"); + } + + /** + * Key: 参数名称(与Value配合使用) + * + * @param string $key + */ + public function setKey(string $key) + { + $this->set("Key", $key); + } + + /** + * Value: 参数值(与Key配合使用) + * + * @return string|null + */ + public function getValue(): string + { + return $this->get("Value"); + } + + /** + * Value: 参数值(与Key配合使用) + * + * @param string $value + */ + public function setValue(string $value) + { + $this->set("Value", $value); + } + + /** + * Name: 配置文件的名字,不传时认为不修改名字,传了则不能为空 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 配置文件的名字,不传时认为不修改名字,传了则不能为空 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Description: 配置文件的描述,不传时认为不修改 + * + * @return string|null + */ + public function getDescription(): string + { + return $this->get("Description"); + } + + /** + * Description: 配置文件的描述,不传时认为不修改 + * + * @param string $description + */ + public function setDescription(string $description) + { + $this->set("Description", $description); + } + + /** + * RegionFlag: 该配置文件是否是地域级别配置文件,默认是false + * + * @return boolean|null + */ + public function getRegionFlag(): bool + { + return $this->get("RegionFlag"); + } + + /** + * RegionFlag: 该配置文件是否是地域级别配置文件,默认是false + * + * @param boolean $regionFlag + */ + public function setRegionFlag(bool $regionFlag) + { + $this->set("RegionFlag", $regionFlag); + } +} diff --git a/src/UDB/Apis/UpdateUDBParamGroupResponse.php b/src/UDB/Apis/UpdateUDBParamGroupResponse.php new file mode 100644 index 00000000..3b0e2ae3 --- /dev/null +++ b/src/UDB/Apis/UpdateUDBParamGroupResponse.php @@ -0,0 +1,26 @@ + "UploadUDBParamGroup"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("DBTypeId"); + $this->markRequired("GroupName"); + $this->markRequired("Description"); + $this->markRequired("Content"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DBTypeId: DB类型id,DB类型id,mysql/mongodb/postgesql按版本细分 1:mysql-5.1,2:mysql-5.5,3:percona-5.5,4:mysql-5.6,5:percona-5.6,6:mysql-5.7,7:percona-5.7,8:mariadb-10.0,9:mongodb-2.4,10:mongodb-2.6,11:mongodb-3.0,12:mongodb-3.2,13:postgresql-9.4,14:postgresql-9.6 + * + * @return string|null + */ + public function getDBTypeId(): string + { + return $this->get("DBTypeId"); + } + + /** + * DBTypeId: DB类型id,DB类型id,mysql/mongodb/postgesql按版本细分 1:mysql-5.1,2:mysql-5.5,3:percona-5.5,4:mysql-5.6,5:percona-5.6,6:mysql-5.7,7:percona-5.7,8:mariadb-10.0,9:mongodb-2.4,10:mongodb-2.6,11:mongodb-3.0,12:mongodb-3.2,13:postgresql-9.4,14:postgresql-9.6 + * + * @param string $dbTypeId + */ + public function setDBTypeId(string $dbTypeId) + { + $this->set("DBTypeId", $dbTypeId); + } + + /** + * GroupName: 配置参数组名称 + * + * @return string|null + */ + public function getGroupName(): string + { + return $this->get("GroupName"); + } + + /** + * GroupName: 配置参数组名称 + * + * @param string $groupName + */ + public function setGroupName(string $groupName) + { + $this->set("GroupName", $groupName); + } + + /** + * Description: 参数组描述 + * + * @return string|null + */ + public function getDescription(): string + { + return $this->get("Description"); + } + + /** + * Description: 参数组描述 + * + * @param string $description + */ + public function setDescription(string $description) + { + $this->set("Description", $description); + } + + /** + * Content: 配置内容,导入的配置内容采用base64编码 + * + * @return string|null + */ + public function getContent(): string + { + return $this->get("Content"); + } + + /** + * Content: 配置内容,导入的配置内容采用base64编码 + * + * @param string $content + */ + public function setContent(string $content) + { + $this->set("Content", $content); + } + + /** + * RegionFlag: 该配置文件是否是地域级别配置文件,默认是false + * + * @return boolean|null + */ + public function getRegionFlag(): bool + { + return $this->get("RegionFlag"); + } + + /** + * RegionFlag: 该配置文件是否是地域级别配置文件,默认是false + * + * @param boolean $regionFlag + */ + public function setRegionFlag(bool $regionFlag) + { + $this->set("RegionFlag", $regionFlag); + } +} diff --git a/src/UDB/Apis/UploadUDBParamGroupResponse.php b/src/UDB/Apis/UploadUDBParamGroupResponse.php new file mode 100644 index 00000000..94d6c4c9 --- /dev/null +++ b/src/UDB/Apis/UploadUDBParamGroupResponse.php @@ -0,0 +1,44 @@ +get("GroupId"); + } + + /** + * GroupId: 配置参数组id + * + * @param int $groupId + */ + public function setGroupId(int $groupId) + { + $this->set("GroupId", $groupId); + } +} diff --git a/src/UDB/Models/LogPackageDataSet.php b/src/UDB/Models/LogPackageDataSet.php new file mode 100644 index 00000000..3bcb107b --- /dev/null +++ b/src/UDB/Models/LogPackageDataSet.php @@ -0,0 +1,224 @@ +get("BackupId"); + } + + /** + * BackupId: 备份id + * + * @param int $backupId + */ + public function setBackupId(int $backupId) + { + $this->set("BackupId", $backupId); + } + + /** + * BackupName: 备份名称 + * + * @return string|null + */ + public function getBackupName(): string + { + return $this->get("BackupName"); + } + + /** + * BackupName: 备份名称 + * + * @param string $backupName + */ + public function setBackupName(string $backupName) + { + $this->set("BackupName", $backupName); + } + + /** + * BackupTime: 备份时间 + * + * @return integer|null + */ + public function getBackupTime(): int + { + return $this->get("BackupTime"); + } + + /** + * BackupTime: 备份时间 + * + * @param int $backupTime + */ + public function setBackupTime(int $backupTime) + { + $this->set("BackupTime", $backupTime); + } + + /** + * BackupSize: 备份文件大小 + * + * @return integer|null + */ + public function getBackupSize(): int + { + return $this->get("BackupSize"); + } + + /** + * BackupSize: 备份文件大小 + * + * @param int $backupSize + */ + public function setBackupSize(int $backupSize) + { + $this->set("BackupSize", $backupSize); + } + + /** + * BackupType: 备份类型,包括2-binlog备份,3-slowlog备份 + * + * @return integer|null + */ + public function getBackupType(): int + { + return $this->get("BackupType"); + } + + /** + * BackupType: 备份类型,包括2-binlog备份,3-slowlog备份 + * + * @param int $backupType + */ + public function setBackupType(int $backupType) + { + $this->set("BackupType", $backupType); + } + + /** + * State: 备份状态 Backuping // 备份中 Success // 备份成功 Failed // 备份失败 Expired // 备份过期 + * + * @return string|null + */ + public function getState(): string + { + return $this->get("State"); + } + + /** + * State: 备份状态 Backuping // 备份中 Success // 备份成功 Failed // 备份失败 Expired // 备份过期 + * + * @param string $state + */ + public function setState(string $state) + { + $this->set("State", $state); + } + + /** + * DBId: dbid + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: dbid + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } + + /** + * DBName: 对应的db名称 + * + * @return string|null + */ + public function getDBName(): string + { + return $this->get("DBName"); + } + + /** + * DBName: 对应的db名称 + * + * @param string $dbName + */ + public function setDBName(string $dbName) + { + $this->set("DBName", $dbName); + } + + /** + * Zone: 所在可用区 + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 所在可用区 + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * BackupZone: 跨可用区高可用备库所在可用区 + * + * @return string|null + */ + public function getBackupZone(): string + { + return $this->get("BackupZone"); + } + + /** + * BackupZone: 跨可用区高可用备库所在可用区 + * + * @param string $backupZone + */ + public function setBackupZone(string $backupZone) + { + $this->set("BackupZone", $backupZone); + } +} diff --git a/src/UDB/Models/UDBBackupSet.php b/src/UDB/Models/UDBBackupSet.php new file mode 100644 index 00000000..5bcc94fe --- /dev/null +++ b/src/UDB/Models/UDBBackupSet.php @@ -0,0 +1,244 @@ +get("BackupId"); + } + + /** + * BackupId: 备份id + * + * @param int $backupId + */ + public function setBackupId(int $backupId) + { + $this->set("BackupId", $backupId); + } + + /** + * BackupName: 备份名称 + * + * @return string|null + */ + public function getBackupName(): string + { + return $this->get("BackupName"); + } + + /** + * BackupName: 备份名称 + * + * @param string $backupName + */ + public function setBackupName(string $backupName) + { + $this->set("BackupName", $backupName); + } + + /** + * BackupTime: 备份时间(Unix时间戳) + * + * @return integer|null + */ + public function getBackupTime(): int + { + return $this->get("BackupTime"); + } + + /** + * BackupTime: 备份时间(Unix时间戳) + * + * @param int $backupTime + */ + public function setBackupTime(int $backupTime) + { + $this->set("BackupTime", $backupTime); + } + + /** + * BackupSize: 备份文件大小(字节) + * + * @return integer|null + */ + public function getBackupSize(): int + { + return $this->get("BackupSize"); + } + + /** + * BackupSize: 备份文件大小(字节) + * + * @param int $backupSize + */ + public function setBackupSize(int $backupSize) + { + $this->set("BackupSize", $backupSize); + } + + /** + * BackupType: 备份类型,取值为0或1,0表示自动,1表示手动 + * + * @return integer|null + */ + public function getBackupType(): int + { + return $this->get("BackupType"); + } + + /** + * BackupType: 备份类型,取值为0或1,0表示自动,1表示手动 + * + * @param int $backupType + */ + public function setBackupType(int $backupType) + { + $this->set("BackupType", $backupType); + } + + /** + * State: 备份状态 Backuping // 备份中 Success // 备份成功 Failed // 备份失败 Expired // 备份过期 + * + * @return string|null + */ + public function getState(): string + { + return $this->get("State"); + } + + /** + * State: 备份状态 Backuping // 备份中 Success // 备份成功 Failed // 备份失败 Expired // 备份过期 + * + * @param string $state + */ + public function setState(string $state) + { + $this->set("State", $state); + } + + /** + * DBId: dbid + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: dbid + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } + + /** + * DBName: 对应的db名称 + * + * @return string|null + */ + public function getDBName(): string + { + return $this->get("DBName"); + } + + /** + * DBName: 对应的db名称 + * + * @param string $dbName + */ + public function setDBName(string $dbName) + { + $this->set("DBName", $dbName); + } + + /** + * Zone: 备份所在可用区 + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 备份所在可用区 + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * BackupZone: 跨机房高可用备库所在可用区 + * + * @return string|null + */ + public function getBackupZone(): string + { + return $this->get("BackupZone"); + } + + /** + * BackupZone: 跨机房高可用备库所在可用区 + * + * @param string $backupZone + */ + public function setBackupZone(string $backupZone) + { + $this->set("BackupZone", $backupZone); + } + + /** + * BackupEndTime: 备份完成时间(Unix时间戳) + * + * @return integer|null + */ + public function getBackupEndTime(): int + { + return $this->get("BackupEndTime"); + } + + /** + * BackupEndTime: 备份完成时间(Unix时间戳) + * + * @param int $backupEndTime + */ + public function setBackupEndTime(int $backupEndTime) + { + $this->set("BackupEndTime", $backupEndTime); + } +} diff --git a/src/UDB/Models/UDBInstanceBinlogSet.php b/src/UDB/Models/UDBInstanceBinlogSet.php new file mode 100644 index 00000000..b535c29a --- /dev/null +++ b/src/UDB/Models/UDBInstanceBinlogSet.php @@ -0,0 +1,104 @@ +get("Name"); + } + + /** + * Name: Binlog文件名 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Size: Binlog文件大小 + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: Binlog文件大小 + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * BeginTime: Binlog文件生成时间(时间戳) + * + * @return integer|null + */ + public function getBeginTime(): int + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: Binlog文件生成时间(时间戳) + * + * @param int $beginTime + */ + public function setBeginTime(int $beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: Binlog文件结束时间(时间戳) + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: Binlog文件结束时间(时间戳) + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } +} diff --git a/src/UDB/Models/UDBInstancePriceSet.php b/src/UDB/Models/UDBInstancePriceSet.php new file mode 100644 index 00000000..3adfeceb --- /dev/null +++ b/src/UDB/Models/UDBInstancePriceSet.php @@ -0,0 +1,64 @@ +get("ChargeType"); + } + + /** + * ChargeType: Year, Month, Dynamic,Trial + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Price: 价格,单位为分 + * + * @return integer|null + */ + public function getPrice(): int + { + return $this->get("Price"); + } + + /** + * Price: 价格,单位为分 + * + * @param int $price + */ + public function setPrice(int $price) + { + $this->set("Price", $price); + } +} diff --git a/src/UDB/Models/UDBInstanceSet.php b/src/UDB/Models/UDBInstanceSet.php new file mode 100644 index 00000000..92a35fb4 --- /dev/null +++ b/src/UDB/Models/UDBInstanceSet.php @@ -0,0 +1,833 @@ +get("Zone"); + } + + /** + * Zone: DB实例所在可用区 + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ClusterRole: 当DB类型为mongodb时,返回该实例所在集群中的角色,包括:mongos、configsrv_sccc、configsrv_csrs、shardsrv_datanode、shardsrv_arbiter,其中congfigsrv分为sccc和csrs两种模式,shardsrv分为datanode和arbiter两种模式 + * + * @return string|null + */ + public function getClusterRole(): string + { + return $this->get("ClusterRole"); + } + + /** + * ClusterRole: 当DB类型为mongodb时,返回该实例所在集群中的角色,包括:mongos、configsrv_sccc、configsrv_csrs、shardsrv_datanode、shardsrv_arbiter,其中congfigsrv分为sccc和csrs两种模式,shardsrv分为datanode和arbiter两种模式 + * + * @param string $clusterRole + */ + public function setClusterRole(string $clusterRole) + { + $this->set("ClusterRole", $clusterRole); + } + + /** + * DBId: DB实例id + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: DB实例id + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } + + /** + * Name: 实例名称,至少6位 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 实例名称,至少6位 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * DBTypeId: DB类型id,mysql/mongodb按版本细分各有一个id 目前id的取值范围为[1,7],数值对应的版本如下: 1:mysql-5.5,2:mysql-5.1,3:percona-5.5 4:mongodb-2.4,5:mongodb-2.6,6:mysql-5.6, 7:percona-5.6 + * + * @return string|null + */ + public function getDBTypeId(): string + { + return $this->get("DBTypeId"); + } + + /** + * DBTypeId: DB类型id,mysql/mongodb按版本细分各有一个id 目前id的取值范围为[1,7],数值对应的版本如下: 1:mysql-5.5,2:mysql-5.1,3:percona-5.5 4:mongodb-2.4,5:mongodb-2.6,6:mysql-5.6, 7:percona-5.6 + * + * @param string $dbTypeId + */ + public function setDBTypeId(string $dbTypeId) + { + $this->set("DBTypeId", $dbTypeId); + } + + /** + * ParamGroupId: DB实例使用的配置参数组id + * + * @return integer|null + */ + public function getParamGroupId(): int + { + return $this->get("ParamGroupId"); + } + + /** + * ParamGroupId: DB实例使用的配置参数组id + * + * @param int $paramGroupId + */ + public function setParamGroupId(int $paramGroupId) + { + $this->set("ParamGroupId", $paramGroupId); + } + + /** + * AdminUser: 管理员帐户名,默认root + * + * @return string|null + */ + public function getAdminUser(): string + { + return $this->get("AdminUser"); + } + + /** + * AdminUser: 管理员帐户名,默认root + * + * @param string $adminUser + */ + public function setAdminUser(string $adminUser) + { + $this->set("AdminUser", $adminUser); + } + + /** + * VirtualIP: DB实例虚ip + * + * @return string|null + */ + public function getVirtualIP(): string + { + return $this->get("VirtualIP"); + } + + /** + * VirtualIP: DB实例虚ip + * + * @param string $virtualIP + */ + public function setVirtualIP(string $virtualIP) + { + $this->set("VirtualIP", $virtualIP); + } + + /** + * VirtualIPMac: DB实例虚ip的mac地址 + * + * @return string|null + */ + public function getVirtualIPMac(): string + { + return $this->get("VirtualIPMac"); + } + + /** + * VirtualIPMac: DB实例虚ip的mac地址 + * + * @param string $virtualIPMac + */ + public function setVirtualIPMac(string $virtualIPMac) + { + $this->set("VirtualIPMac", $virtualIPMac); + } + + /** + * VPCId: VPC的ID + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPC的ID + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: 子网ID + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网ID + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * InstanceType: UDB数据库机型 + * + * @return string|null + */ + public function getInstanceType(): string + { + return $this->get("InstanceType"); + } + + /** + * InstanceType: UDB数据库机型 + * + * @param string $instanceType + */ + public function setInstanceType(string $instanceType) + { + $this->set("InstanceType", $instanceType); + } + + /** + * InstanceTypeId: UDB数据库机型ID + * + * @return integer|null + */ + public function getInstanceTypeId(): int + { + return $this->get("InstanceTypeId"); + } + + /** + * InstanceTypeId: UDB数据库机型ID + * + * @param int $instanceTypeId + */ + public function setInstanceTypeId(int $instanceTypeId) + { + $this->set("InstanceTypeId", $instanceTypeId); + } + + /** + * Tag: 获取资源其他信息 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 获取资源其他信息 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Port: 端口号,mysql默认3306,mongodb默认27017 + * + * @return integer|null + */ + public function getPort(): int + { + return $this->get("Port"); + } + + /** + * Port: 端口号,mysql默认3306,mongodb默认27017 + * + * @param int $port + */ + public function setPort(int $port) + { + $this->set("Port", $port); + } + + /** + * SrcDBId: 对mysql的slave而言是master的DBId,对master则为空, 对mongodb则是副本集id + * + * @return string|null + */ + public function getSrcDBId(): string + { + return $this->get("SrcDBId"); + } + + /** + * SrcDBId: 对mysql的slave而言是master的DBId,对master则为空, 对mongodb则是副本集id + * + * @param string $srcDBId + */ + public function setSrcDBId(string $srcDBId) + { + $this->set("SrcDBId", $srcDBId); + } + + /** + * BackupCount: 备份策略,不可修改,备份文件保留的数量,默认7次 + * + * @return integer|null + */ + public function getBackupCount(): int + { + return $this->get("BackupCount"); + } + + /** + * BackupCount: 备份策略,不可修改,备份文件保留的数量,默认7次 + * + * @param int $backupCount + */ + public function setBackupCount(int $backupCount) + { + $this->set("BackupCount", $backupCount); + } + + /** + * BackupBeginTime: 备份策略,不可修改,开始时间,单位小时计,默认3点 + * + * @return integer|null + */ + public function getBackupBeginTime(): int + { + return $this->get("BackupBeginTime"); + } + + /** + * BackupBeginTime: 备份策略,不可修改,开始时间,单位小时计,默认3点 + * + * @param int $backupBeginTime + */ + public function setBackupBeginTime(int $backupBeginTime) + { + $this->set("BackupBeginTime", $backupBeginTime); + } + + /** + * BackupDuration: 备份策略,一天内备份时间间隔,单位小时,默认24小时 + * + * @return integer|null + */ + public function getBackupDuration(): int + { + return $this->get("BackupDuration"); + } + + /** + * BackupDuration: 备份策略,一天内备份时间间隔,单位小时,默认24小时 + * + * @param int $backupDuration + */ + public function setBackupDuration(int $backupDuration) + { + $this->set("BackupDuration", $backupDuration); + } + + /** + * BackupBlacklist: 备份策略,备份黑名单,mongodb则不适用 + * + * @return string|null + */ + public function getBackupBlacklist(): string + { + return $this->get("BackupBlacklist"); + } + + /** + * BackupBlacklist: 备份策略,备份黑名单,mongodb则不适用 + * + * @param string $backupBlacklist + */ + public function setBackupBlacklist(string $backupBlacklist) + { + $this->set("BackupBlacklist", $backupBlacklist); + } + + /** + * State: DB状态标记 Init:初始化中,Fail:安装失败,Starting:启动中,Running:运行,Shutdown:关闭中,Shutoff:已关闭,Delete:已删除,Upgrading:升级中,Promoting:提升为独库进行中,Recovering:恢复中,Recover fail:恢复失败 + * + * @return string|null + */ + public function getState(): string + { + return $this->get("State"); + } + + /** + * State: DB状态标记 Init:初始化中,Fail:安装失败,Starting:启动中,Running:运行,Shutdown:关闭中,Shutoff:已关闭,Delete:已删除,Upgrading:升级中,Promoting:提升为独库进行中,Recovering:恢复中,Recover fail:恢复失败 + * + * @param string $state + */ + public function setState(string $state) + { + $this->set("State", $state); + } + + /** + * CreateTime: DB实例创建时间,采用UTC计时时间戳 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: DB实例创建时间,采用UTC计时时间戳 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ModifyTime: DB实例修改时间,采用UTC计时时间戳 + * + * @return integer|null + */ + public function getModifyTime(): int + { + return $this->get("ModifyTime"); + } + + /** + * ModifyTime: DB实例修改时间,采用UTC计时时间戳 + * + * @param int $modifyTime + */ + public function setModifyTime(int $modifyTime) + { + $this->set("ModifyTime", $modifyTime); + } + + /** + * ExpiredTime: DB实例过期时间,采用UTC计时时间戳 + * + * @return integer|null + */ + public function getExpiredTime(): int + { + return $this->get("ExpiredTime"); + } + + /** + * ExpiredTime: DB实例过期时间,采用UTC计时时间戳 + * + * @param int $expiredTime + */ + public function setExpiredTime(int $expiredTime) + { + $this->set("ExpiredTime", $expiredTime); + } + + /** + * ChargeType: Year, Month, Dynamic,Trial,默认: Dynamic + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: Year, Month, Dynamic,Trial,默认: Dynamic + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * MemoryLimit: 内存限制(MB),默认根据配置机型 + * + * @return integer|null + */ + public function getMemoryLimit(): int + { + return $this->get("MemoryLimit"); + } + + /** + * MemoryLimit: 内存限制(MB),默认根据配置机型 + * + * @param int $memoryLimit + */ + public function setMemoryLimit(int $memoryLimit) + { + $this->set("MemoryLimit", $memoryLimit); + } + + /** + * DiskSpace: 磁盘空间(GB), 默认根据配置机型 + * + * @return integer|null + */ + public function getDiskSpace(): int + { + return $this->get("DiskSpace"); + } + + /** + * DiskSpace: 磁盘空间(GB), 默认根据配置机型 + * + * @param int $diskSpace + */ + public function setDiskSpace(int $diskSpace) + { + $this->set("DiskSpace", $diskSpace); + } + + /** + * UseSSD: 是否使用SSD + * + * @return boolean|null + */ + public function getUseSSD(): bool + { + return $this->get("UseSSD"); + } + + /** + * UseSSD: 是否使用SSD + * + * @param boolean $useSSD + */ + public function setUseSSD(bool $useSSD) + { + $this->set("UseSSD", $useSSD); + } + + /** + * SSDType: SSD类型,SATA/PCI-E/NVMe + * + * @return string|null + */ + public function getSSDType(): string + { + return $this->get("SSDType"); + } + + /** + * SSDType: SSD类型,SATA/PCI-E/NVMe + * + * @param string $ssdType + */ + public function setSSDType(string $ssdType) + { + $this->set("SSDType", $ssdType); + } + + /** + * Role: DB实例角色,mysql区分master/slave,mongodb多种角色 + * + * @return string|null + */ + public function getRole(): string + { + return $this->get("Role"); + } + + /** + * Role: DB实例角色,mysql区分master/slave,mongodb多种角色 + * + * @param string $role + */ + public function setRole(string $role) + { + $this->set("Role", $role); + } + + /** + * DiskUsedSize: DB实例磁盘已使用空间,单位GB + * + * @return float|null + */ + public function getDiskUsedSize(): float + { + return $this->get("DiskUsedSize"); + } + + /** + * DiskUsedSize: DB实例磁盘已使用空间,单位GB + * + * @param float $diskUsedSize + */ + public function setDiskUsedSize(float $diskUsedSize) + { + $this->set("DiskUsedSize", $diskUsedSize); + } + + /** + * DataFileSize: DB实例数据文件大小,单位GB + * + * @return float|null + */ + public function getDataFileSize(): float + { + return $this->get("DataFileSize"); + } + + /** + * DataFileSize: DB实例数据文件大小,单位GB + * + * @param float $dataFileSize + */ + public function setDataFileSize(float $dataFileSize) + { + $this->set("DataFileSize", $dataFileSize); + } + + /** + * SystemFileSize: DB实例系统文件大小,单位GB + * + * @return float|null + */ + public function getSystemFileSize(): float + { + return $this->get("SystemFileSize"); + } + + /** + * SystemFileSize: DB实例系统文件大小,单位GB + * + * @param float $systemFileSize + */ + public function setSystemFileSize(float $systemFileSize) + { + $this->set("SystemFileSize", $systemFileSize); + } + + /** + * LogFileSize: DB实例日志文件大小,单位GB + * + * @return float|null + */ + public function getLogFileSize(): float + { + return $this->get("LogFileSize"); + } + + /** + * LogFileSize: DB实例日志文件大小,单位GB + * + * @param float $logFileSize + */ + public function setLogFileSize(float $logFileSize) + { + $this->set("LogFileSize", $logFileSize); + } + + /** + * BackupDate: 备份日期标记位。共7位,每一位为一周中一天的备份情况 0表示关闭当天备份,1表示打开当天备份。最右边的一位 为星期天的备份开关,其余从右到左依次为星期一到星期 六的备份配置开关,每周必须至少设置两天备份。 例如:1100000 表示打开星期六和星期五的自动备份功能 + * + * @return string|null + */ + public function getBackupDate(): string + { + return $this->get("BackupDate"); + } + + /** + * BackupDate: 备份日期标记位。共7位,每一位为一周中一天的备份情况 0表示关闭当天备份,1表示打开当天备份。最右边的一位 为星期天的备份开关,其余从右到左依次为星期一到星期 六的备份配置开关,每周必须至少设置两天备份。 例如:1100000 表示打开星期六和星期五的自动备份功能 + * + * @param string $backupDate + */ + public function setBackupDate(string $backupDate) + { + $this->set("BackupDate", $backupDate); + } + + /** + * InstanceMode: UDB实例模式类型, 可选值如下: “Normal”: 普通版UDB实例 “HA”: 高可用版UDB实例 + * + * @return string|null + */ + public function getInstanceMode(): string + { + return $this->get("InstanceMode"); + } + + /** + * InstanceMode: UDB实例模式类型, 可选值如下: “Normal”: 普通版UDB实例 “HA”: 高可用版UDB实例 + * + * @param string $instanceMode + */ + public function setInstanceMode(string $instanceMode) + { + $this->set("InstanceMode", $instanceMode); + } + + /** + * DataSet: 如果在需要返回从库的场景下,返回该DB实例的所有从库DB实例信息列表。列表中每一个元素的内容同UDBSlaveInstanceSet 。如果这个DB实例没有从库的情况下,此时返回一个空的列表 + * + * @return UDBSlaveInstanceSet[]|null + */ + public function getDataSet(): array + { + $items = $this->get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UDBSlaveInstanceSet($item)); + } + return $result; + } + + /** + * DataSet: 如果在需要返回从库的场景下,返回该DB实例的所有从库DB实例信息列表。列表中每一个元素的内容同UDBSlaveInstanceSet 。如果这个DB实例没有从库的情况下,此时返回一个空的列表 + * + * @param UDBSlaveInstanceSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * BackupZone: 跨可用区高可用备库所在可用区 + * + * @return string|null + */ + public function getBackupZone(): string + { + return $this->get("BackupZone"); + } + + /** + * BackupZone: 跨可用区高可用备库所在可用区 + * + * @param string $backupZone + */ + public function setBackupZone(string $backupZone) + { + $this->set("BackupZone", $backupZone); + } + + /** + * IPv6Address: 该实例的ipv6地址 + * + * @return string|null + */ + public function getIPv6Address(): string + { + return $this->get("IPv6Address"); + } + + /** + * IPv6Address: 该实例的ipv6地址 + * + * @param string $iPv6Address + */ + public function setIPv6Address(string $iPv6Address) + { + $this->set("IPv6Address", $iPv6Address); + } + + /** + * UserUFileData: 用户转存备份到自己的UFILE配置, 结构参考UFileDataSet + * + * @return UFileDataSet|null + */ + public function getUserUFileData(): UFileDataSet + { + return new UFileDataSet($this->get("UserUFileData")); + } + + /** + * UserUFileData: 用户转存备份到自己的UFILE配置, 结构参考UFileDataSet + * + * @param UFileDataSet $userUFileData + */ + public function setUserUFileData(UFileDataSet $userUFileData) + { + $this->set("UserUFileData", $userUFileData->getAll()); + } +} diff --git a/src/UDB/Models/UDBParamGroupSet.php b/src/UDB/Models/UDBParamGroupSet.php new file mode 100644 index 00000000..0407f718 --- /dev/null +++ b/src/UDB/Models/UDBParamGroupSet.php @@ -0,0 +1,153 @@ +get("GroupId"); + } + + /** + * GroupId: 参数组id + * + * @param int $groupId + */ + public function setGroupId(int $groupId) + { + $this->set("GroupId", $groupId); + } + + /** + * GroupName: 参数组名称 + * + * @return string|null + */ + public function getGroupName(): string + { + return $this->get("GroupName"); + } + + /** + * GroupName: 参数组名称 + * + * @param string $groupName + */ + public function setGroupName(string $groupName) + { + $this->set("GroupName", $groupName); + } + + /** + * DBTypeId: DB类型id,mysql/mongodb按版本细分各有一个id 目前id的取值范围为[1,7],数值对应的版本如下 1:mysql-5.5,2:mysql-5.1,3:percona-5.5 4:mongodb-2.4,5:mongodb-2.6,6:mysql-5.6 7:percona-5.6 + * + * @return string|null + */ + public function getDBTypeId(): string + { + return $this->get("DBTypeId"); + } + + /** + * DBTypeId: DB类型id,mysql/mongodb按版本细分各有一个id 目前id的取值范围为[1,7],数值对应的版本如下 1:mysql-5.5,2:mysql-5.1,3:percona-5.5 4:mongodb-2.4,5:mongodb-2.6,6:mysql-5.6 7:percona-5.6 + * + * @param string $dbTypeId + */ + public function setDBTypeId(string $dbTypeId) + { + $this->set("DBTypeId", $dbTypeId); + } + + /** + * Description: 参数组描述 + * + * @return string|null + */ + public function getDescription(): string + { + return $this->get("Description"); + } + + /** + * Description: 参数组描述 + * + * @param string $description + */ + public function setDescription(string $description) + { + $this->set("Description", $description); + } + + /** + * Modifiable: 参数组是否可修改 + * + * @return boolean|null + */ + public function getModifiable(): bool + { + return $this->get("Modifiable"); + } + + /** + * Modifiable: 参数组是否可修改 + * + * @param boolean $modifiable + */ + public function setModifiable(bool $modifiable) + { + $this->set("Modifiable", $modifiable); + } + + /** + * ParamMember: 参数的键值对表 UDBParamMemberSet + * + * @return UDBParamMemberSet[]|null + */ + public function getParamMember(): array + { + $items = $this->get("ParamMember") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UDBParamMemberSet($item)); + } + return $result; + } + + /** + * ParamMember: 参数的键值对表 UDBParamMemberSet + * + * @param UDBParamMemberSet[] $paramMember + */ + public function setParamMember(array $paramMember) + { + $result = []; + foreach ($paramMember as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UDB/Models/UDBParamMemberSet.php b/src/UDB/Models/UDBParamMemberSet.php new file mode 100644 index 00000000..9a115fb6 --- /dev/null +++ b/src/UDB/Models/UDBParamMemberSet.php @@ -0,0 +1,164 @@ +get("Key"); + } + + /** + * Key: 参数名称 + * + * @param string $key + */ + public function setKey(string $key) + { + $this->set("Key", $key); + } + + /** + * Value: 参数值 + * + * @return string|null + */ + public function getValue(): string + { + return $this->get("Value"); + } + + /** + * Value: 参数值 + * + * @param string $value + */ + public function setValue(string $value) + { + $this->set("Value", $value); + } + + /** + * ValueType: 参数值应用类型,取值范围为{0,10,20,30},各值 代表意义为 0-unknown、10-int、20-string、 30-bool + * + * @return integer|null + */ + public function getValueType(): int + { + return $this->get("ValueType"); + } + + /** + * ValueType: 参数值应用类型,取值范围为{0,10,20,30},各值 代表意义为 0-unknown、10-int、20-string、 30-bool + * + * @param int $valueType + */ + public function setValueType(int $valueType) + { + $this->set("ValueType", $valueType); + } + + /** + * AllowedVal: 允许的值(根据参数类型,用分隔符表示) + * + * @return string|null + */ + public function getAllowedVal(): string + { + return $this->get("AllowedVal"); + } + + /** + * AllowedVal: 允许的值(根据参数类型,用分隔符表示) + * + * @param string $allowedVal + */ + public function setAllowedVal(string $allowedVal) + { + $this->set("AllowedVal", $allowedVal); + } + + /** + * ApplyType: 参数值应用类型,取值范围为{0,10,20},各值代表 意义为0-unknown、10-static、20-dynamic + * + * @return integer|null + */ + public function getApplyType(): int + { + return $this->get("ApplyType"); + } + + /** + * ApplyType: 参数值应用类型,取值范围为{0,10,20},各值代表 意义为0-unknown、10-static、20-dynamic + * + * @param int $applyType + */ + public function setApplyType(int $applyType) + { + $this->set("ApplyType", $applyType); + } + + /** + * Modifiable: 是否可更改,默认为false + * + * @return boolean|null + */ + public function getModifiable(): bool + { + return $this->get("Modifiable"); + } + + /** + * Modifiable: 是否可更改,默认为false + * + * @param boolean $modifiable + */ + public function setModifiable(bool $modifiable) + { + $this->set("Modifiable", $modifiable); + } + + /** + * FormatType: 允许值的格式类型,取值范围为{0,10,20},意义分 别为PVFT_UNKOWN=0,PVFT_RANGE=10, PVFT_ENUM=20 + * + * @return integer|null + */ + public function getFormatType(): int + { + return $this->get("FormatType"); + } + + /** + * FormatType: 允许值的格式类型,取值范围为{0,10,20},意义分 别为PVFT_UNKOWN=0,PVFT_RANGE=10, PVFT_ENUM=20 + * + * @param int $formatType + */ + public function setFormatType(int $formatType) + { + $this->set("FormatType", $formatType); + } +} diff --git a/src/UDB/Models/UDBRWSplittingSet.php b/src/UDB/Models/UDBRWSplittingSet.php new file mode 100644 index 00000000..8d4df938 --- /dev/null +++ b/src/UDB/Models/UDBRWSplittingSet.php @@ -0,0 +1,124 @@ +get("DBId"); + } + + /** + * DBId: DB实例ID + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } + + /** + * Role: 主库/从库 + * + * @return string|null + */ + public function getRole(): string + { + return $this->get("Role"); + } + + /** + * Role: 主库/从库 + * + * @param string $role + */ + public function setRole(string $role) + { + $this->set("Role", $role); + } + + /** + * VirtualIP: DBIP + * + * @return string|null + */ + public function getVirtualIP(): string + { + return $this->get("VirtualIP"); + } + + /** + * VirtualIP: DBIP + * + * @param string $virtualIP + */ + public function setVirtualIP(string $virtualIP) + { + $this->set("VirtualIP", $virtualIP); + } + + /** + * ReadWeight: 读写分离比重 + * + * @return integer|null + */ + public function getReadWeight(): int + { + return $this->get("ReadWeight"); + } + + /** + * ReadWeight: 读写分离比重 + * + * @param int $readWeight + */ + public function setReadWeight(int $readWeight) + { + $this->set("ReadWeight", $readWeight); + } + + /** + * State: DB状态 + * + * @return string|null + */ + public function getState(): string + { + return $this->get("State"); + } + + /** + * State: DB状态 + * + * @param string $state + */ + public function setState(string $state) + { + $this->set("State", $state); + } +} diff --git a/src/UDB/Models/UDBSlaveInstanceSet.php b/src/UDB/Models/UDBSlaveInstanceSet.php new file mode 100644 index 00000000..d18b7ed0 --- /dev/null +++ b/src/UDB/Models/UDBSlaveInstanceSet.php @@ -0,0 +1,764 @@ +get("Zone"); + } + + /** + * Zone: 可用区 + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * DBId: DB实例id + * + * @return string|null + */ + public function getDBId(): string + { + return $this->get("DBId"); + } + + /** + * DBId: DB实例id + * + * @param string $dbId + */ + public function setDBId(string $dbId) + { + $this->set("DBId", $dbId); + } + + /** + * Name: 实例名称,至少6位 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 实例名称,至少6位 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * DBTypeId: DB类型id,mysql/mongodb按版本细分各有一个id 目前id的取值范围为[1,7],数值对应的版本如下: 1:mysql-5.5,2:mysql-5.1,3:percona-5.5 4:mongodb-2.4,5:mongodb-2.6,6:mysql-5.6, 7:percona-5.6 + * + * @return string|null + */ + public function getDBTypeId(): string + { + return $this->get("DBTypeId"); + } + + /** + * DBTypeId: DB类型id,mysql/mongodb按版本细分各有一个id 目前id的取值范围为[1,7],数值对应的版本如下: 1:mysql-5.5,2:mysql-5.1,3:percona-5.5 4:mongodb-2.4,5:mongodb-2.6,6:mysql-5.6, 7:percona-5.6 + * + * @param string $dbTypeId + */ + public function setDBTypeId(string $dbTypeId) + { + $this->set("DBTypeId", $dbTypeId); + } + + /** + * ParamGroupId: DB实例使用的配置参数组id + * + * @return integer|null + */ + public function getParamGroupId(): int + { + return $this->get("ParamGroupId"); + } + + /** + * ParamGroupId: DB实例使用的配置参数组id + * + * @param int $paramGroupId + */ + public function setParamGroupId(int $paramGroupId) + { + $this->set("ParamGroupId", $paramGroupId); + } + + /** + * AdminUser: 管理员帐户名,默认root + * + * @return string|null + */ + public function getAdminUser(): string + { + return $this->get("AdminUser"); + } + + /** + * AdminUser: 管理员帐户名,默认root + * + * @param string $adminUser + */ + public function setAdminUser(string $adminUser) + { + $this->set("AdminUser", $adminUser); + } + + /** + * VirtualIP: DB实例虚ip + * + * @return string|null + */ + public function getVirtualIP(): string + { + return $this->get("VirtualIP"); + } + + /** + * VirtualIP: DB实例虚ip + * + * @param string $virtualIP + */ + public function setVirtualIP(string $virtualIP) + { + $this->set("VirtualIP", $virtualIP); + } + + /** + * VirtualIPMac: DB实例虚ip的mac地址 + * + * @return string|null + */ + public function getVirtualIPMac(): string + { + return $this->get("VirtualIPMac"); + } + + /** + * VirtualIPMac: DB实例虚ip的mac地址 + * + * @param string $virtualIPMac + */ + public function setVirtualIPMac(string $virtualIPMac) + { + $this->set("VirtualIPMac", $virtualIPMac); + } + + /** + * Port: 端口号,mysql默认3306,mongodb默认27017 + * + * @return integer|null + */ + public function getPort(): int + { + return $this->get("Port"); + } + + /** + * Port: 端口号,mysql默认3306,mongodb默认27017 + * + * @param int $port + */ + public function setPort(int $port) + { + $this->set("Port", $port); + } + + /** + * SrcDBId: 对mysql的slave而言是master的DBId,对master则为空, 对mongodb则是副本集id + * + * @return string|null + */ + public function getSrcDBId(): string + { + return $this->get("SrcDBId"); + } + + /** + * SrcDBId: 对mysql的slave而言是master的DBId,对master则为空, 对mongodb则是副本集id + * + * @param string $srcDBId + */ + public function setSrcDBId(string $srcDBId) + { + $this->set("SrcDBId", $srcDBId); + } + + /** + * BackupCount: 备份策略,不可修改,备份文件保留的数量,默认7次 + * + * @return integer|null + */ + public function getBackupCount(): int + { + return $this->get("BackupCount"); + } + + /** + * BackupCount: 备份策略,不可修改,备份文件保留的数量,默认7次 + * + * @param int $backupCount + */ + public function setBackupCount(int $backupCount) + { + $this->set("BackupCount", $backupCount); + } + + /** + * BackupBeginTime: 备份策略,不可修改,开始时间,单位小时计,默认3点 + * + * @return integer|null + */ + public function getBackupBeginTime(): int + { + return $this->get("BackupBeginTime"); + } + + /** + * BackupBeginTime: 备份策略,不可修改,开始时间,单位小时计,默认3点 + * + * @param int $backupBeginTime + */ + public function setBackupBeginTime(int $backupBeginTime) + { + $this->set("BackupBeginTime", $backupBeginTime); + } + + /** + * BackupDuration: 备份策略,一天内备份时间间隔,单位小时,默认24小时 + * + * @return integer|null + */ + public function getBackupDuration(): int + { + return $this->get("BackupDuration"); + } + + /** + * BackupDuration: 备份策略,一天内备份时间间隔,单位小时,默认24小时 + * + * @param int $backupDuration + */ + public function setBackupDuration(int $backupDuration) + { + $this->set("BackupDuration", $backupDuration); + } + + /** + * BackupBlacklist: 备份策略,备份黑名单,mongodb则不适用 + * + * @return string|null + */ + public function getBackupBlacklist(): string + { + return $this->get("BackupBlacklist"); + } + + /** + * BackupBlacklist: 备份策略,备份黑名单,mongodb则不适用 + * + * @param string $backupBlacklist + */ + public function setBackupBlacklist(string $backupBlacklist) + { + $this->set("BackupBlacklist", $backupBlacklist); + } + + /** + * State: DB状态标记 Init:初始化中,Fail:安装失败,Starting:启动中,Running:运行,Shutdown:关闭中,Shutoff:已关闭,Delete:已删除,Upgrading:升级中,Promoting:提升为独库进行中,Recovering:恢复中,Recover fail:恢复失败 + * + * @return string|null + */ + public function getState(): string + { + return $this->get("State"); + } + + /** + * State: DB状态标记 Init:初始化中,Fail:安装失败,Starting:启动中,Running:运行,Shutdown:关闭中,Shutoff:已关闭,Delete:已删除,Upgrading:升级中,Promoting:提升为独库进行中,Recovering:恢复中,Recover fail:恢复失败 + * + * @param string $state + */ + public function setState(string $state) + { + $this->set("State", $state); + } + + /** + * CreateTime: DB实例创建时间,采用UTC计时时间戳 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: DB实例创建时间,采用UTC计时时间戳 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ModifyTime: DB实例修改时间,采用UTC计时时间戳 + * + * @return integer|null + */ + public function getModifyTime(): int + { + return $this->get("ModifyTime"); + } + + /** + * ModifyTime: DB实例修改时间,采用UTC计时时间戳 + * + * @param int $modifyTime + */ + public function setModifyTime(int $modifyTime) + { + $this->set("ModifyTime", $modifyTime); + } + + /** + * ExpiredTime: DB实例过期时间,采用UTC计时时间戳 + * + * @return integer|null + */ + public function getExpiredTime(): int + { + return $this->get("ExpiredTime"); + } + + /** + * ExpiredTime: DB实例过期时间,采用UTC计时时间戳 + * + * @param int $expiredTime + */ + public function setExpiredTime(int $expiredTime) + { + $this->set("ExpiredTime", $expiredTime); + } + + /** + * ChargeType: Year, Month, Dynamic,Trial,默认: Dynamic + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: Year, Month, Dynamic,Trial,默认: Dynamic + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * MemoryLimit: 内存限制(MB),默认根据配置机型 + * + * @return integer|null + */ + public function getMemoryLimit(): int + { + return $this->get("MemoryLimit"); + } + + /** + * MemoryLimit: 内存限制(MB),默认根据配置机型 + * + * @param int $memoryLimit + */ + public function setMemoryLimit(int $memoryLimit) + { + $this->set("MemoryLimit", $memoryLimit); + } + + /** + * DiskSpace: 磁盘空间(GB), 默认根据配置机型 + * + * @return integer|null + */ + public function getDiskSpace(): int + { + return $this->get("DiskSpace"); + } + + /** + * DiskSpace: 磁盘空间(GB), 默认根据配置机型 + * + * @param int $diskSpace + */ + public function setDiskSpace(int $diskSpace) + { + $this->set("DiskSpace", $diskSpace); + } + + /** + * UseSSD: 是否使用SSD + * + * @return boolean|null + */ + public function getUseSSD(): bool + { + return $this->get("UseSSD"); + } + + /** + * UseSSD: 是否使用SSD + * + * @param boolean $useSSD + */ + public function setUseSSD(bool $useSSD) + { + $this->set("UseSSD", $useSSD); + } + + /** + * SSDType: SSD类型,SATA/PCI-E + * + * @return string|null + */ + public function getSSDType(): string + { + return $this->get("SSDType"); + } + + /** + * SSDType: SSD类型,SATA/PCI-E + * + * @param string $ssdType + */ + public function setSSDType(string $ssdType) + { + $this->set("SSDType", $ssdType); + } + + /** + * Role: DB实例角色,mysql区分master/slave,mongodb多种角色 + * + * @return string|null + */ + public function getRole(): string + { + return $this->get("Role"); + } + + /** + * Role: DB实例角色,mysql区分master/slave,mongodb多种角色 + * + * @param string $role + */ + public function setRole(string $role) + { + $this->set("Role", $role); + } + + /** + * DiskUsedSize: DB实例磁盘已使用空间,单位GB + * + * @return float|null + */ + public function getDiskUsedSize(): float + { + return $this->get("DiskUsedSize"); + } + + /** + * DiskUsedSize: DB实例磁盘已使用空间,单位GB + * + * @param float $diskUsedSize + */ + public function setDiskUsedSize(float $diskUsedSize) + { + $this->set("DiskUsedSize", $diskUsedSize); + } + + /** + * DataFileSize: DB实例数据文件大小,单位GB + * + * @return float|null + */ + public function getDataFileSize(): float + { + return $this->get("DataFileSize"); + } + + /** + * DataFileSize: DB实例数据文件大小,单位GB + * + * @param float $dataFileSize + */ + public function setDataFileSize(float $dataFileSize) + { + $this->set("DataFileSize", $dataFileSize); + } + + /** + * SystemFileSize: DB实例系统文件大小,单位GB + * + * @return float|null + */ + public function getSystemFileSize(): float + { + return $this->get("SystemFileSize"); + } + + /** + * SystemFileSize: DB实例系统文件大小,单位GB + * + * @param float $systemFileSize + */ + public function setSystemFileSize(float $systemFileSize) + { + $this->set("SystemFileSize", $systemFileSize); + } + + /** + * LogFileSize: DB实例日志文件大小,单位GB + * + * @return float|null + */ + public function getLogFileSize(): float + { + return $this->get("LogFileSize"); + } + + /** + * LogFileSize: DB实例日志文件大小,单位GB + * + * @param float $logFileSize + */ + public function setLogFileSize(float $logFileSize) + { + $this->set("LogFileSize", $logFileSize); + } + + /** + * BackupDate: 备份日期标记位。共7位,每一位为一周中一天的备份情况 0表示关闭当天备份,1表示打开当天备份。最右边的一位 为星期天的备份开关,其余从右到左依次为星期一到星期 六的备份配置开关,每周必须至少设置两天备份。 例如:1100000 表示打开星期六和星期五的自动备份功能 + * + * @return string|null + */ + public function getBackupDate(): string + { + return $this->get("BackupDate"); + } + + /** + * BackupDate: 备份日期标记位。共7位,每一位为一周中一天的备份情况 0表示关闭当天备份,1表示打开当天备份。最右边的一位 为星期天的备份开关,其余从右到左依次为星期一到星期 六的备份配置开关,每周必须至少设置两天备份。 例如:1100000 表示打开星期六和星期五的自动备份功能 + * + * @param string $backupDate + */ + public function setBackupDate(string $backupDate) + { + $this->set("BackupDate", $backupDate); + } + + /** + * InstanceMode: UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例;"HA": 高可用版UDB实例 + * + * @return string|null + */ + public function getInstanceMode(): string + { + return $this->get("InstanceMode"); + } + + /** + * InstanceMode: UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例;"HA": 高可用版UDB实例 + * + * @param string $instanceMode + */ + public function setInstanceMode(string $instanceMode) + { + $this->set("InstanceMode", $instanceMode); + } + + /** + * ClusterRole: 当DB类型为mongodb时,返回该实例所在集群中的角色,包括:mongos、configsrv_sccc、configsrv_csrs、shardsrv_datanode、shardsrv_arbiter,其中congfigsrv分为sccc和csrs两种模式,shardsrv分为datanode和arbiter两种模式 + * + * @return string|null + */ + public function getClusterRole(): string + { + return $this->get("ClusterRole"); + } + + /** + * ClusterRole: 当DB类型为mongodb时,返回该实例所在集群中的角色,包括:mongos、configsrv_sccc、configsrv_csrs、shardsrv_datanode、shardsrv_arbiter,其中congfigsrv分为sccc和csrs两种模式,shardsrv分为datanode和arbiter两种模式 + * + * @param string $clusterRole + */ + public function setClusterRole(string $clusterRole) + { + $this->set("ClusterRole", $clusterRole); + } + + /** + * SubnetId: 子网ID + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网ID + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * VPCId: VPC的ID + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPC的ID + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * InstanceType: UDB数据库机型 + * + * @return string|null + */ + public function getInstanceType(): string + { + return $this->get("InstanceType"); + } + + /** + * InstanceType: UDB数据库机型 + * + * @param string $instanceType + */ + public function setInstanceType(string $instanceType) + { + $this->set("InstanceType", $instanceType); + } + + /** + * InstanceTypeId: UDB数据库机型ID + * + * @return integer|null + */ + public function getInstanceTypeId(): int + { + return $this->get("InstanceTypeId"); + } + + /** + * InstanceTypeId: UDB数据库机型ID + * + * @param int $instanceTypeId + */ + public function setInstanceTypeId(int $instanceTypeId) + { + $this->set("InstanceTypeId", $instanceTypeId); + } + + /** + * Tag: 获取资源其他信息 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 获取资源其他信息 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * IPv6Address: 获取该实例的IPv6地址 + * + * @return string|null + */ + public function getIPv6Address(): string + { + return $this->get("IPv6Address"); + } + + /** + * IPv6Address: 获取该实例的IPv6地址 + * + * @param string $iPv6Address + */ + public function setIPv6Address(string $iPv6Address) + { + $this->set("IPv6Address", $iPv6Address); + } +} diff --git a/src/UDB/Models/UDBTypeSet.php b/src/UDB/Models/UDBTypeSet.php new file mode 100644 index 00000000..02ed264c --- /dev/null +++ b/src/UDB/Models/UDBTypeSet.php @@ -0,0 +1,44 @@ +get("DBTypeId"); + } + + /** + * DBTypeId: DB类型id,mysql/mongodb按版本细分各有一个id, 目前id的取值范围为[1,7],数值对应的版本如下: 1:mysql-5.5,2:mysql-5.1,3:percona-5.5 4:mongodb-2.4,5:mongodb-2.6,6:mysql-5.6, 7:percona-5.6 + * + * @param string $dbTypeId + */ + public function setDBTypeId(string $dbTypeId) + { + $this->set("DBTypeId", $dbTypeId); + } +} diff --git a/src/UDB/Models/UFileDataSet.php b/src/UDB/Models/UFileDataSet.php new file mode 100644 index 00000000..79edc998 --- /dev/null +++ b/src/UDB/Models/UFileDataSet.php @@ -0,0 +1,64 @@ +get("TokenID"); + } + + /** + * TokenID: Ufile的令牌tokenid + * + * @param string $tokenID + */ + public function setTokenID(string $tokenID) + { + $this->set("TokenID", $tokenID); + } + + /** + * Bucket: bucket名称 + * + * @return string|null + */ + public function getBucket(): string + { + return $this->get("Bucket"); + } + + /** + * Bucket: bucket名称 + * + * @param string $bucket + */ + public function setBucket(string $bucket) + { + $this->set("Bucket", $bucket); + } +} diff --git a/src/UDB/UDBClient.php b/src/UDB/UDBClient.php new file mode 100644 index 00000000..9f4f18a8 --- /dev/null +++ b/src/UDB/UDBClient.php @@ -0,0 +1,2034 @@ + (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "DBId" => (string) DB实例Id,该值可以通过DescribeUDBInstance获取 + * "BackupName" => (string) 备份名称 + * "UseBlacklist" => (boolean) 是否使用黑名单备份,默认false + * "BackupMethod" => (string) 使用的备份方式。(快照备份即物理备份。注意只有SSD版本的mysql实例支持设置为snapshot) + * "Blacklist" => (string) 备份黑名单列表,以 ; 分隔。注意:只有逻辑备份下备份黑名单才生效,快照备份备份黑名单下无效 + * "ForceBackup" => (boolean) true表示逻辑备份时是使用 --force 参数,false表示不使用 --force 参数。物理备份此参数无效。 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function backupUDBInstance(BackupUDBInstanceRequest $request = null): BackupUDBInstanceResponse + { + $resp = $this->invoke($request); + return new BackupUDBInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * BackupUDBInstanceBinlog - 备份UDB指定时间段的binlog列表 + * + * See also: https://docs.ucloud.cn/api/UDB-api/backup_udb_instance_binlog + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "DBId" => (string) DB实例Id,该值可以通过DescribeUDBInstance获取 + * "BackupFile" => (string) 需要备份文件,可通过DescribeUDBInstanceBinlog获得 如果要传入多个文件名,以空格键分割,用单引号包含. + * "BackupName" => (string) DB备份文件名称 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function backupUDBInstanceBinlog(BackupUDBInstanceBinlogRequest $request = null): BackupUDBInstanceBinlogResponse + { + $resp = $this->invoke($request); + return new BackupUDBInstanceBinlogResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * BackupUDBInstanceErrorLog - 备份UDB指定时间段的errorlog + * + * See also: https://docs.ucloud.cn/api/UDB-api/backup_udb_instance_error_log + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "DBId" => (string) DB实例Id,该值可以通过DescribeUDBInstance获取 + * "BackupName" => (string) 备份名称 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function backupUDBInstanceErrorLog(BackupUDBInstanceErrorLogRequest $request = null): BackupUDBInstanceErrorLogResponse + { + $resp = $this->invoke($request); + return new BackupUDBInstanceErrorLogResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * BackupUDBInstanceSlowLog - 备份UDB指定时间段的slowlog分析结果 + * + * See also: https://docs.ucloud.cn/api/UDB-api/backup_udb_instance_slow_log + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "DBId" => (string) DB实例Id,该值可以通过DescribeUDBInstance获取 + * "BeginTime" => (integer) 过滤条件:起始时间(时间戳) + * "EndTime" => (integer) 过滤条件:结束时间(时间戳) + * "BackupName" => (string) 备份文件名称 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function backupUDBInstanceSlowLog(BackupUDBInstanceSlowLogRequest $request = null): BackupUDBInstanceSlowLogResponse + { + $resp = $this->invoke($request); + return new BackupUDBInstanceSlowLogResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ChangeUDBParamGroup - 修改配置文件 + * + * See also: https://docs.ucloud.cn/api/UDB-api/change_udb_param_group + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "DBId" => (string) DB实例Id + * "GroupId" => (string) 参数组Id + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function changeUDBParamGroup(ChangeUDBParamGroupRequest $request = null): ChangeUDBParamGroupResponse + { + $resp = $this->invoke($request); + return new ChangeUDBParamGroupResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CheckRecoverUDBInstance - 核查db是否可以使用回档功能 + * + * See also: https://docs.ucloud.cn/api/UDB-api/check_recover_udb_instance + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "SrcDBId" => (string) 源实例的Id + * ] + * + * Outputs: + * + * $outputs = [ + * "LastestTime" => (integer) 核查成功返回值为可以回档到的最近时刻,核查失败不返回 + * ] + * + * @throws UCloudException + */ + public function checkRecoverUDBInstance(CheckRecoverUDBInstanceRequest $request = null): CheckRecoverUDBInstanceResponse + { + $resp = $this->invoke($request); + return new CheckRecoverUDBInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CheckUDBInstanceToHAAllowance - 核查db是否可以升级为高可用 + * + * See also: https://docs.ucloud.cn/api/UDB-api/check_udb_instance_to_ha_allowance + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "DBId" => (string) 实例的Id,该值可以通过DescribeUDBInstance获取 + * ] + * + * Outputs: + * + * $outputs = [ + * "Allowance" => (string) Yes ,No ,Yes即可以升级,No为不可以升级 + * ] + * + * @throws UCloudException + */ + public function checkUDBInstanceToHAAllowance(CheckUDBInstanceToHAAllowanceRequest $request = null): CheckUDBInstanceToHAAllowanceResponse + { + $resp = $this->invoke($request); + return new CheckUDBInstanceToHAAllowanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ClearUDBLog - 清除UDB实例的log + * + * See also: https://docs.ucloud.cn/api/UDB-api/clear_udb_log + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "DBId" => (string) DB实例的id,该值可以通过DescribeUDBInstance获取 + * "LogType" => (integer) 日志类型,10-error(暂不支持)、20-slow(暂不支持 )、30-binlog + * "BeforeTime" => (integer) 删除时间点(至少前一天)之前log,采用时间戳(秒),默认当 前时间点前一天 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function clearUDBLog(ClearUDBLogRequest $request = null): ClearUDBLogResponse + { + $resp = $this->invoke($request); + return new ClearUDBLogResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateMongoDBReplicaSet - 一键创建DB副本集 + * + * See also: https://docs.ucloud.cn/api/UDB-api/create_mongo_db_replica_set + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Name" => (string) PrimaryDB实例名称,至少6位 + * "AdminPassword" => (string) 管理员密码 + * "DBTypeId" => (string) DB类型id对应的字符串形式(例如:mongodb-2.6)注意:当前仅支持mongodb + * "DiskSpace" => (integer) 磁盘空间(GB), 暂时支持20G - 3000G + * "ParamGroupId" => (integer) DB实例使用的配置参数组id + * "MemoryLimit" => (integer) 内存限制(MB),目前支持以下几档 1000M/2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M + * "Port" => (integer) 端口号 + * "ChargeType" => (string) Year, Month, Dynamic,Trial,默认: Month + * "Quantity" => (integer) 购买时长(N个月),默认值1个月。如果为0,代表购买到月底。 + * "AdminUser" => (string) 管理员帐户名,默认root + * "BackupCount" => (integer) 备份策略,每周备份数量,默认7次 + * "BackupTime" => (integer) 备份策略,备份开始时间,单位小时计,默认1点 + * "BackupDuration" => (integer) 备份策略,备份时间间隔,单位小时计,默认24小时 + * "UseSSD" => (boolean) 是否使用SSD,默认为true + * "SSDType" => (string) SSD类型,可选值为"SATA"、"PCI-E",如果UseSSD为true ,则必选 + * "CPU" => (integer) cpu核数 + * "InstanceType" => (string) UDB数据库机型 + * "SubnetId" => (string) 子网ID + * "VPCId" => (string) VPC的ID + * "ClusterId" => (string) 所属分片集群的ID + * "CouponId" => (array) CouponId.0 代表第一个代金券id,对于传入多个代金券id,后面为 CouponId.1, CouponId.2 以此类推 + * ] + * + * Outputs: + * + * $outputs = [ + * "DBIds" => (array) 返回所有副本集成员的Id + * ] + * + * @throws UCloudException + */ + public function createMongoDBReplicaSet(CreateMongoDBReplicaSetRequest $request = null): CreateMongoDBReplicaSetResponse + { + $resp = $this->invoke($request); + return new CreateMongoDBReplicaSetResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUDBInstance - 创建UDB实例(包括创建mysql master节点、mongodb primary/configsvr节点和从备份恢复实例) + * + * See also: https://docs.ucloud.cn/api/UDB-api/create_udb_instance + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Name" => (string) 实例名称,至少6位 + * "AdminPassword" => (string) 管理员密码 + * "DBTypeId" => (string) DB类型id,mysql/mongodb/postgesql按版本细分 1:mysql-5.1,2:mysql-5.5,3:percona-5.5,4:mysql-5.6,5:percona-5.6,6:mysql-5.7,7:percona-5.7,8:mariadb-10.0,9:mongodb-2.4,10:mongodb-2.6,11:mongodb-3.0,12:mongodb-3.2,13:postgresql-9.4,14:postgresql-9.6,14:postgresql-10.4 + * "Port" => (integer) 端口号,mysql默认3306,mongodb默认27017,postgresql默认5432 + * "DiskSpace" => (integer) 磁盘空间(GB), 暂时支持20G - 32T + * "ParamGroupId" => (integer) DB实例使用的配置参数组id + * "MemoryLimit" => (integer) 内存限制(MB),目前支持以下几档 1000M/2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M/128000M/192000M/256000M/320000M + * "ChargeType" => (string) Year, Month, Dynamic,Trial,默认: Month + * "Quantity" => (integer) 购买时长,默认值1 + * "AdminUser" => (string) 管理员帐户名,默认root + * "BackupCount" => (integer) 备份策略,每周备份数量,默认7次 + * "BackupTime" => (integer) 备份策略,备份开始时间,单位小时计,默认1点 + * "BackupDuration" => (integer) 备份策略,备份时间间隔,单位小时计,默认24小时 + * "BackupId" => (integer) 备份id,如果指定,则表明从备份恢复实例 + * "UseSSD" => (boolean) 是否使用SSD,默认为true。目前主要可用区、海外机房、新机房只提供SSD资源,非SSD资源不再提供。 + * "SSDType" => (string) SSD类型,可选值为"SATA"、“NVMe”,如果UseSSD为true ,则必选 + * "InstanceMode" => (string) UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例 "HA": 高可用版UDB实例 默认是"Normal" + * "UDBCId" => (string) 专区ID信息(如果这个参数存在这说明是在专区中创建DB) + * "CPU" => (integer) cpu核数 + * "BackupZone" => (string) 跨可用区高可用备库所在可用区,参见 [可用区列表](../summary/regionlist.html) + * "SubnetId" => (string) 子网ID + * "VPCId" => (string) VPC的ID + * "DisableSemisync" => (boolean) 是否开启异步高可用,默认不填,可置为true + * "ClusterRole" => (string) 当DB类型(DBTypeId)为mongodb时,需要指定mongo的角色,可选值为configsrv (配置节点),shardsrv (数据节点) + * "HAArch" => (string) 高可用架构:1) haproxy(默认): 当前仅支持mysql。2) sentinel: 基于vip和哨兵节点的架构,当前支持mysql和pg。 + * "Tag" => (string) 实例所在的业务组名称 + * "EnableIpV6" => (boolean) 是否创建使用ipv6 资源, 默认为false, 或者不填, 创建ipv6为true + * "CouponId" => (string) 使用的代金券id + * ] + * + * Outputs: + * + * $outputs = [ + * "DBId" => (string) BD实例id + * ] + * + * @throws UCloudException + */ + public function createUDBInstance(CreateUDBInstanceRequest $request = null): CreateUDBInstanceResponse + { + $resp = $this->invoke($request); + return new CreateUDBInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUDBInstanceByRecovery - 创建db,将新创建的db恢复到指定db某个指定时间点 + * + * See also: https://docs.ucloud.cn/api/UDB-api/create_udb_instance_by_recovery + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Name" => (string) 实例名称,至少6位 + * "SrcDBId" => (string) 源实例的Id + * "RecoveryTime" => (integer) 恢复到某个时间点的时间戳(UTC时间格式,默认单位秒) + * "ChargeType" => (string) Year, Month, Dynamic,Trial,默认: Dynamic + * "Quantity" => (integer) 购买时长,默认值1 + * "UseSSD" => (boolean) 指定是否是否使用SSD,默认使用主库的配置 + * "UDBCId" => (string) 专区的Id + * "SubnetId" => (string) 子网ID + * "VPCId" => (string) VPC的ID + * "EnableIpV6" => (boolean) 是否创建使用ipv6 资源, 默认为false, 或者不填, 创建ipv6为true + * "CouponId" => (string) 使用的代金券id + * ] + * + * Outputs: + * + * $outputs = [ + * "DBId" => (string) db实例id + * ] + * + * @throws UCloudException + */ + public function createUDBInstanceByRecovery(CreateUDBInstanceByRecoveryRequest $request = null): CreateUDBInstanceByRecoveryResponse + { + $resp = $this->invoke($request); + return new CreateUDBInstanceByRecoveryResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUDBParamGroup - 从已有配置文件创建新配置文件 + * + * See also: https://docs.ucloud.cn/api/UDB-api/create_udb_param_group + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "GroupName" => (string) 新配置参数组名称 + * "Description" => (string) 参数组描述 + * "SrcGroupId" => (integer) 源参数组id + * "DBTypeId" => (string) DB类型id,mysql/mongodb/postgesql按版本细分 1:mysql-5.1,2:mysql-5.5,3:percona-5.5,4:mysql-5.6,5:percona-5.6,6:mysql-5.7,7:percona-5.7,8:mariadb-10.0,9:mongodb-2.4,10:mongodb-2.6,11:mongodb-3.0,12:mongodb-3.2,13:postgresql-9.4,14:postgresql-9.6 + * "RegionFlag" => (boolean) 是否是地域级别的配置文件,默认是false + * ] + * + * Outputs: + * + * $outputs = [ + * "GroupId" => (integer) 新配置参数组id + * ] + * + * @throws UCloudException + */ + public function createUDBParamGroup(CreateUDBParamGroupRequest $request = null): CreateUDBParamGroupResponse + { + $resp = $this->invoke($request); + return new CreateUDBParamGroupResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUDBReplicationInstance - 创建MongoDB的副本节点(包括仲裁) + * + * See also: https://docs.ucloud.cn/api/UDB-api/create_udb_replication_instance + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "SrcId" => (string) primary节点的DBId,该值可以通过DescribeUDBInstance获取 + * "Name" => (string) 实例名称,至少6位 + * "Port" => (integer) 端口号,默认27017,取值范围3306至65535。 + * "IsArbiter" => (boolean) 是否是仲裁节点,默认false,仲裁节点按最小机型创建 + * "UseSSD" => (boolean) 是否使用SSD,默认 为 true + * "CouponId" => (string) 使用的代金券id + * ] + * + * Outputs: + * + * $outputs = [ + * "DBId" => (string) 创建从节点的DBId + * ] + * + * @throws UCloudException + */ + public function createUDBReplicationInstance(CreateUDBReplicationInstanceRequest $request = null): CreateUDBReplicationInstanceResponse + { + $resp = $this->invoke($request); + return new CreateUDBReplicationInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUDBRouteInstance - 创建mongos实例 + * + * See also: https://docs.ucloud.cn/api/UDB-api/create_udb_route_instance + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "DBTypeId" => (string) DB类型id,mongodb按版本细分有1:mongodb-2.4,2:mongodb-2.6,3:mongodb-3.0,4:mongodb-3.2 + * "Name" => (string) 实例名称,至少6位 + * "Port" => (integer) 端口号,mongodb默认27017 + * "ParamGroupId" => (integer) DB实例使用的配置参数组id + * "MemoryLimit" => (integer) 内存限制(MB),目前支持以下几档 600M/1500M/3000M /6000M/15000M/30000M + * "DiskSpace" => (integer) 磁盘空间(GB), 暂时支持20G - 500G + * "ConfigsvrId" => (array) 配置服务器的dbid,允许一个或者三个。 + * "ChargeType" => (string) Year, Month, Dynamic,Trial,默认: Month + * "Quantity" => (integer) 购买时长,默认值1 + * "UseSSD" => (boolean) 是否使用SSD,默认为ture + * "CouponId" => (string) 使用的代金券id + * ] + * + * Outputs: + * + * $outputs = [ + * "DBId" => (string) db实例id + * ] + * + * @throws UCloudException + */ + public function createUDBRouteInstance(CreateUDBRouteInstanceRequest $request = null): CreateUDBRouteInstanceResponse + { + $resp = $this->invoke($request); + return new CreateUDBRouteInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUDBSlave - 创建UDB实例的slave + * + * See also: https://docs.ucloud.cn/api/UDB-api/create_udb_slave + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "SrcId" => (string) master实例的DBId,该值可以通过DescribeUDBInstance获取 + * "Name" => (string) 实例名称,至少6位 + * "Port" => (integer) 端口号 + * "UseSSD" => (boolean) 是否使用SSD,默认为true + * "SSDType" => (string) SSD类型,可选值为"SATA"、"PCI-E"、“NVMe”,如果UseSSD为true ,则必选 + * "IsLock" => (boolean) 是否锁主库,默认为true + * "InstanceMode" => (string) UDB实例部署模式,可选值如下:Normal: 普通单点实例HA: 高可用部署实例 + * "MemoryLimit" => (integer) 内存限制(MB),目前支持以下几档 1000M/2000M/4000M/ 6000M/8000M/12000M/16000M/ 24000M/32000M/48000M/ 64000M/96000M/128000M/192000M/256000M/320000M + * "DiskSpace" => (integer) 磁盘空间(GB), 暂时支持20G - 3000G(API支持,前端暂时只开放内存定制) + * "InstanceType" => (string) UDB实例类型:Normal、SATA_SSD、NVMe_SSD + * "SubnetId" => (string) 子网ID(如果不传用默认子网) + * "VPCId" => (string) VPCID(如果不传用默认的VPC) + * "ChargeType" => (string) Year, Month, Dynamic,Trial,默认和主库保持一致 + * "Quantity" => (integer) 购买时长,默认默认和主库保持一致 + * "ParamGroupId" => (integer) DB实例使用的配置参数组id,默认和主库保持一致 + * "CouponId" => (string) 使用的代金券id + * ] + * + * Outputs: + * + * $outputs = [ + * "DBId" => (string) 创建slave的DBId + * ] + * + * @throws UCloudException + */ + public function createUDBSlave(CreateUDBSlaveRequest $request = null): CreateUDBSlaveResponse + { + $resp = $this->invoke($request); + return new CreateUDBSlaveResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteUDBInstance - 删除UDB实例 + * + * See also: https://docs.ucloud.cn/api/UDB-api/delete_udb_instance + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "DBId" => (string) DB实例的id,该值可以通过DescribeUDBInstance获取 + * "UDBCId" => (string) 专区ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteUDBInstance(DeleteUDBInstanceRequest $request = null): DeleteUDBInstanceResponse + { + $resp = $this->invoke($request); + return new DeleteUDBInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteUDBLogPackage - 删除UDB日志包 + * + * See also: https://docs.ucloud.cn/api/UDB-api/delete_udb_log_package + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "BackupId" => (integer) 日志包id,可通过DescribeUDBLogPackage获得 + * "BackupZone" => (string) 跨可用区高可用备库所在可用区 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteUDBLogPackage(DeleteUDBLogPackageRequest $request = null): DeleteUDBLogPackageResponse + { + $resp = $this->invoke($request); + return new DeleteUDBLogPackageResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteUDBParamGroup - 删除配置参数组 + * + * See also: https://docs.ucloud.cn/api/UDB-api/delete_udb_param_group + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "GroupId" => (integer) 参数组id,可通过DescribeUDBParamGroup获取 + * "RegionFlag" => (boolean) 是否属于地域级别 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteUDBParamGroup(DeleteUDBParamGroupRequest $request = null): DeleteUDBParamGroupResponse + { + $resp = $this->invoke($request); + return new DeleteUDBParamGroupResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDBBackup - 列表UDB实例备份信息 + * + * See also: https://docs.ucloud.cn/api/UDB-api/describe_udb_backup + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Offset" => (integer) 分页显示的起始偏移,列表操作则指定 + * "Limit" => (integer) 分页显示的条目数,列表操作则指定 + * "DBId" => (string) DB实例Id,如果指定,则只获取该db的备份信息 该值可以通过DescribeUDBInstance获取 + * "BackupType" => (integer) 备份类型,取值为0或1,0表示自动,1表示手动 + * "BeginTime" => (integer) 过滤条件:起始时间(Unix时间戳) + * "EndTime" => (integer) 过滤条件:结束时间(Unix时间戳) + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 备份信息 参照UDBBackupSet[ + * [ + * "BackupId" => (integer) 备份id + * "BackupName" => (string) 备份名称 + * "BackupTime" => (integer) 备份时间(Unix时间戳) + * "BackupSize" => (integer) 备份文件大小(字节) + * "BackupType" => (integer) 备份类型,取值为0或1,0表示自动,1表示手动 + * "State" => (string) 备份状态 Backuping // 备份中 Success // 备份成功 Failed // 备份失败 Expired // 备份过期 + * "DBId" => (string) dbid + * "DBName" => (string) 对应的db名称 + * "Zone" => (string) 备份所在可用区 + * "BackupZone" => (string) 跨机房高可用备库所在可用区 + * "BackupEndTime" => (integer) 备份完成时间(Unix时间戳) + * ] + * ] + * "TotalCount" => (integer) 满足条件备份总数,如果指定dbid,则是该db备份总数 + * ] + * + * @throws UCloudException + */ + public function describeUDBBackup(DescribeUDBBackupRequest $request = null): DescribeUDBBackupResponse + { + $resp = $this->invoke($request); + return new DescribeUDBBackupResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDBBackupBlacklist - 获取UDB实例的备份黑名单 + * + * See also: https://docs.ucloud.cn/api/UDB-api/describe_udb_backup_blacklist + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "DBId" => (string) DB实例Id,该值可以通过DescribeUDBInstance获取 + * ] + * + * Outputs: + * + * $outputs = [ + * "Blacklist" => (string) DB的黑名单列表, db.%为指定库 dbname.tablename为指定表 + * ] + * + * @throws UCloudException + */ + public function describeUDBBackupBlacklist(DescribeUDBBackupBlacklistRequest $request = null): DescribeUDBBackupBlacklistResponse + { + $resp = $this->invoke($request); + return new DescribeUDBBackupBlacklistResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDBBinlogBackupURL - 获取UDB的Binlog备份地址 + * + * See also: https://docs.ucloud.cn/api/UDB-api/describe_udb_binlog_backup_url + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "DBId" => (string) DB实例Id + * "BackupId" => (integer) DB实例binlog备份ID,可以从DescribeUDBLogPackage结果当中获得 + * ] + * + * Outputs: + * + * $outputs = [ + * "BackupPath" => (string) DB实例备份文件的公网地址 + * "InnerBackupPath" => (string) DB实例备份文件的内网地址 + * ] + * + * @throws UCloudException + */ + public function describeUDBBinlogBackupURL(DescribeUDBBinlogBackupURLRequest $request = null): DescribeUDBBinlogBackupURLResponse + { + $resp = $this->invoke($request); + return new DescribeUDBBinlogBackupURLResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDBInstance - 获取UDB实例信息,支持两类操作:(1)指定DBId用于获取该db的信息;(2)指定ClassType、Offset、Limit用于列表操作,查询某一个类型db。 + * + * See also: https://docs.ucloud.cn/api/UDB-api/describe_udb_instance + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区,不填时默认全部可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "ClassType" => (string) DB种类,如果是列表操作,则需要指定,不区分大小写,其取值如下:mysql: SQL;mongo: NOSQL;postgresql: postgresql + * "Offset" => (integer) 分页显示起始偏移位置,列表操作时必填 + * "Limit" => (integer) 分页显示数量,列表操作时必填 + * "DBId" => (string) DB实例id,如果指定则获取单个db实例的描述,否则为列表操作。 指定DBId时无需填写ClassType、Offset、Limit + * "IsInUDBC" => (boolean) 是否查看专区里面DB + * "UDBCId" => (string) IsInUDBC为True,UDBCId为空,说明查看整个可用区的专区的db,如果UDBId不为空则只查看此专区下面的db + * "IncludeSlaves" => (boolean) 当只获取这个特定DBId的信息时,如果有该选项,那么把这个DBId实例的所有从库信息一起拉取并返回 + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) DB实例信息列表 UDBInstanceSet[ + * [ + * "Zone" => (string) DB实例所在可用区 + * "ClusterRole" => (string) 当DB类型为mongodb时,返回该实例所在集群中的角色,包括:mongos、configsrv_sccc、configsrv_csrs、shardsrv_datanode、shardsrv_arbiter,其中congfigsrv分为sccc和csrs两种模式,shardsrv分为datanode和arbiter两种模式 + * "DBId" => (string) DB实例id + * "Name" => (string) 实例名称,至少6位 + * "DBTypeId" => (string) DB类型id,mysql/mongodb按版本细分各有一个id 目前id的取值范围为[1,7],数值对应的版本如下: 1:mysql-5.5,2:mysql-5.1,3:percona-5.5 4:mongodb-2.4,5:mongodb-2.6,6:mysql-5.6, 7:percona-5.6 + * "ParamGroupId" => (integer) DB实例使用的配置参数组id + * "AdminUser" => (string) 管理员帐户名,默认root + * "VirtualIP" => (string) DB实例虚ip + * "VirtualIPMac" => (string) DB实例虚ip的mac地址 + * "VPCId" => (string) VPC的ID + * "SubnetId" => (string) 子网ID + * "InstanceType" => (string) UDB数据库机型 + * "InstanceTypeId" => (integer) UDB数据库机型ID + * "Tag" => (string) 获取资源其他信息 + * "Port" => (integer) 端口号,mysql默认3306,mongodb默认27017 + * "SrcDBId" => (string) 对mysql的slave而言是master的DBId,对master则为空, 对mongodb则是副本集id + * "BackupCount" => (integer) 备份策略,不可修改,备份文件保留的数量,默认7次 + * "BackupBeginTime" => (integer) 备份策略,不可修改,开始时间,单位小时计,默认3点 + * "BackupDuration" => (integer) 备份策略,一天内备份时间间隔,单位小时,默认24小时 + * "BackupBlacklist" => (string) 备份策略,备份黑名单,mongodb则不适用 + * "State" => (string) DB状态标记 Init:初始化中,Fail:安装失败,Starting:启动中,Running:运行,Shutdown:关闭中,Shutoff:已关闭,Delete:已删除,Upgrading:升级中,Promoting:提升为独库进行中,Recovering:恢复中,Recover fail:恢复失败 + * "CreateTime" => (integer) DB实例创建时间,采用UTC计时时间戳 + * "ModifyTime" => (integer) DB实例修改时间,采用UTC计时时间戳 + * "ExpiredTime" => (integer) DB实例过期时间,采用UTC计时时间戳 + * "ChargeType" => (string) Year, Month, Dynamic,Trial,默认: Dynamic + * "MemoryLimit" => (integer) 内存限制(MB),默认根据配置机型 + * "DiskSpace" => (integer) 磁盘空间(GB), 默认根据配置机型 + * "UseSSD" => (boolean) 是否使用SSD + * "SSDType" => (string) SSD类型,SATA/PCI-E/NVMe + * "Role" => (string) DB实例角色,mysql区分master/slave,mongodb多种角色 + * "DiskUsedSize" => (number) DB实例磁盘已使用空间,单位GB + * "DataFileSize" => (number) DB实例数据文件大小,单位GB + * "SystemFileSize" => (number) DB实例系统文件大小,单位GB + * "LogFileSize" => (number) DB实例日志文件大小,单位GB + * "BackupDate" => (string) 备份日期标记位。共7位,每一位为一周中一天的备份情况 0表示关闭当天备份,1表示打开当天备份。最右边的一位 为星期天的备份开关,其余从右到左依次为星期一到星期 六的备份配置开关,每周必须至少设置两天备份。 例如:1100000 表示打开星期六和星期五的自动备份功能 + * "InstanceMode" => (string) UDB实例模式类型, 可选值如下: “Normal”: 普通版UDB实例 “HA”: 高可用版UDB实例 + * "DataSet" => (array) 如果在需要返回从库的场景下,返回该DB实例的所有从库DB实例信息列表。列表中每一个元素的内容同UDBSlaveInstanceSet 。如果这个DB实例没有从库的情况下,此时返回一个空的列表[ + * [ + * "Zone" => (string) 可用区 + * "DBId" => (string) DB实例id + * "Name" => (string) 实例名称,至少6位 + * "DBTypeId" => (string) DB类型id,mysql/mongodb按版本细分各有一个id 目前id的取值范围为[1,7],数值对应的版本如下: 1:mysql-5.5,2:mysql-5.1,3:percona-5.5 4:mongodb-2.4,5:mongodb-2.6,6:mysql-5.6, 7:percona-5.6 + * "ParamGroupId" => (integer) DB实例使用的配置参数组id + * "AdminUser" => (string) 管理员帐户名,默认root + * "VirtualIP" => (string) DB实例虚ip + * "VirtualIPMac" => (string) DB实例虚ip的mac地址 + * "Port" => (integer) 端口号,mysql默认3306,mongodb默认27017 + * "SrcDBId" => (string) 对mysql的slave而言是master的DBId,对master则为空, 对mongodb则是副本集id + * "BackupCount" => (integer) 备份策略,不可修改,备份文件保留的数量,默认7次 + * "BackupBeginTime" => (integer) 备份策略,不可修改,开始时间,单位小时计,默认3点 + * "BackupDuration" => (integer) 备份策略,一天内备份时间间隔,单位小时,默认24小时 + * "BackupBlacklist" => (string) 备份策略,备份黑名单,mongodb则不适用 + * "State" => (string) DB状态标记 Init:初始化中,Fail:安装失败,Starting:启动中,Running:运行,Shutdown:关闭中,Shutoff:已关闭,Delete:已删除,Upgrading:升级中,Promoting:提升为独库进行中,Recovering:恢复中,Recover fail:恢复失败 + * "CreateTime" => (integer) DB实例创建时间,采用UTC计时时间戳 + * "ModifyTime" => (integer) DB实例修改时间,采用UTC计时时间戳 + * "ExpiredTime" => (integer) DB实例过期时间,采用UTC计时时间戳 + * "ChargeType" => (string) Year, Month, Dynamic,Trial,默认: Dynamic + * "MemoryLimit" => (integer) 内存限制(MB),默认根据配置机型 + * "DiskSpace" => (integer) 磁盘空间(GB), 默认根据配置机型 + * "UseSSD" => (boolean) 是否使用SSD + * "SSDType" => (string) SSD类型,SATA/PCI-E + * "Role" => (string) DB实例角色,mysql区分master/slave,mongodb多种角色 + * "DiskUsedSize" => (number) DB实例磁盘已使用空间,单位GB + * "DataFileSize" => (number) DB实例数据文件大小,单位GB + * "SystemFileSize" => (number) DB实例系统文件大小,单位GB + * "LogFileSize" => (number) DB实例日志文件大小,单位GB + * "BackupDate" => (string) 备份日期标记位。共7位,每一位为一周中一天的备份情况 0表示关闭当天备份,1表示打开当天备份。最右边的一位 为星期天的备份开关,其余从右到左依次为星期一到星期 六的备份配置开关,每周必须至少设置两天备份。 例如:1100000 表示打开星期六和星期五的自动备份功能 + * "InstanceMode" => (string) UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例;"HA": 高可用版UDB实例 + * "ClusterRole" => (string) 当DB类型为mongodb时,返回该实例所在集群中的角色,包括:mongos、configsrv_sccc、configsrv_csrs、shardsrv_datanode、shardsrv_arbiter,其中congfigsrv分为sccc和csrs两种模式,shardsrv分为datanode和arbiter两种模式 + * "SubnetId" => (string) 子网ID + * "VPCId" => (string) VPC的ID + * "InstanceType" => (string) UDB数据库机型 + * "InstanceTypeId" => (integer) UDB数据库机型ID + * "Tag" => (string) 获取资源其他信息 + * "IPv6Address" => (string) 获取该实例的IPv6地址 + * ] + * ] + * "BackupZone" => (string) 跨可用区高可用备库所在可用区 + * "IPv6Address" => (string) 该实例的ipv6地址 + * "UserUFileData" => (object) 用户转存备份到自己的UFILE配置, 结构参考UFileDataSet[ + * "TokenID" => (string) Ufile的令牌tokenid + * "Bucket" => (string) bucket名称 + * ] + * ] + * ] + * "TotalCount" => (integer) 用户db组的数量,对于 mysql: 主从结对数量,没有slave,则只有master mongodb: 副本集数量 + * ] + * + * @throws UCloudException + */ + public function describeUDBInstance(DescribeUDBInstanceRequest $request = null): DescribeUDBInstanceResponse + { + $resp = $this->invoke($request); + return new DescribeUDBInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDBInstanceBackupState - 获取UDB实例备份状态 + * + * See also: https://docs.ucloud.cn/api/UDB-api/describe_udb_instance_backup_state + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "BackupId" => (integer) 备份记录ID + * "BackupZone" => (string) 跨可用区高可用备库所在可用区,参见[可用区列表] + * ] + * + * Outputs: + * + * $outputs = [ + * "State" => (string) 备份状态 0 Backuping // 备份中 1 Success // 备份成功 2 Failed // 备份失败 3 Expired // 备份过期 + * ] + * + * @throws UCloudException + */ + public function describeUDBInstanceBackupState(DescribeUDBInstanceBackupStateRequest $request = null): DescribeUDBInstanceBackupStateResponse + { + $resp = $this->invoke($request); + return new DescribeUDBInstanceBackupStateResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDBInstanceBackupURL - 获取UDB备份下载地址 + * + * See also: https://docs.ucloud.cn/api/UDB-api/describe_udb_instance_backup_url + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "DBId" => (string) DB实例Id,该值可通过DescribeUDBInstance获取 + * "BackupId" => (integer) DB实例备份ID,该值可以通过DescribeUDBBackup获取 + * ] + * + * Outputs: + * + * $outputs = [ + * "BackupPath" => (string) DB实例备份文件公网的地址 + * "InnerBackupPath" => (string) DB实例备份文件内网的地址 + * ] + * + * @throws UCloudException + */ + public function describeUDBInstanceBackupURL(DescribeUDBInstanceBackupURLRequest $request = null): DescribeUDBInstanceBackupURLResponse + { + $resp = $this->invoke($request); + return new DescribeUDBInstanceBackupURLResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDBInstanceBinlog - 获取UDB指定时间段的binlog列表 + * + * See also: https://docs.ucloud.cn/api/UDB-api/describe_udb_instance_binlog + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "DBId" => (string) DB实例Id + * "BeginTime" => (integer) 过滤条件:起始时间(时间戳) + * "EndTime" => (integer) 过滤条件:结束时间(时间戳) + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 获取的Binlog信息列表 UDBInstanceBinlogSet[ + * [ + * "Name" => (string) Binlog文件名 + * "Size" => (integer) Binlog文件大小 + * "BeginTime" => (integer) Binlog文件生成时间(时间戳) + * "EndTime" => (integer) Binlog文件结束时间(时间戳) + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeUDBInstanceBinlog(DescribeUDBInstanceBinlogRequest $request = null): DescribeUDBInstanceBinlogResponse + { + $resp = $this->invoke($request); + return new DescribeUDBInstanceBinlogResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDBInstanceBinlogBackupState - 获取udb实例备份状态 + * + * See also: https://docs.ucloud.cn/api/UDB-api/describe_udb_instance_binlog_backup_state + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "BackupId" => (integer) 备份记录ID + * "BackupZone" => (string) 跨可用区高可用备库所在可用区 + * ] + * + * Outputs: + * + * $outputs = [ + * "State" => (string) 备份状态 0 Backuping // 备份中 1 Success // 备份成功 2 Failed // 备份失败 3 Expired // 备份过期 + * ] + * + * @throws UCloudException + */ + public function describeUDBInstanceBinlogBackupState(DescribeUDBInstanceBinlogBackupStateRequest $request = null): DescribeUDBInstanceBinlogBackupStateResponse + { + $resp = $this->invoke($request); + return new DescribeUDBInstanceBinlogBackupStateResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDBInstanceLog - 查询某一段时间内UDB的错误日志或慢查询日志 + * + * See also: https://docs.ucloud.cn/api/UDB-api/describe_udb_instance_log + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "DBId" => (string) 实例ID + * "BeginTime" => (integer) 查询的日志开始的时间戳(Unix Timestamp)。对于实时查询,这个参数应该是上次轮询请求时的时间戳,后台会返回从该值到当前时间的日志内容。 + * "EndTime" => (integer) 查询日志的结束时间戳(Unix Timestamp),对于实时查询不传该值,与BeginTime的差值不超过24小时:(EndTime-BeginTime) < 24*60*60 + * "LogType" => (string) 查询日志的类型 + * ] + * + * Outputs: + * + * $outputs = [ + * "Log" => (string) 查询到的日志内容,一段纯文本 + * "NextTime" => (string) 此次查询到的日志的下一个时间,用于下一次轮询时的BeginTime参数;如果日志查询结束则返回为空,前端结束查询 + * ] + * + * @throws UCloudException + */ + public function describeUDBInstanceLog(DescribeUDBInstanceLogRequest $request = null): DescribeUDBInstanceLogResponse + { + $resp = $this->invoke($request); + return new DescribeUDBInstanceLogResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDBInstancePrice - 获取UDB实例价格信息 + * + * See also: https://docs.ucloud.cn/api/UDB-api/describe_udb_instance_price + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "MemoryLimit" => (integer) 内存限制(MB),单位为MB.目前支持:1000-96000 + * "DiskSpace" => (integer) 磁盘空间(GB),暂时支持20(GB) - 3000(GB), 输入不带单位 + * "DBTypeId" => (string) UDB实例的DB版本字符串 + * "Count" => (integer) 购买DB实例数量,最大数量为10台, 默认为1台 + * "ChargeType" => (string) Year,按年付费; Month,按月付费 Dynamic,按需付费(需开启权限) Trial,试用(需开启权限)默认为月付 + * "Quantity" => (integer) DB购买多少个"计费时间单位",默认值为1。比如:买2个月,Quantity就是2。如果计费单位是“按月”,并且Quantity为0,表示“购买到月底” + * "UseSSD" => (string) 是否使用SSD,只能填true或false,默认为false + * "SSDType" => (string) SSD类型,可选值为"SATA"、"PCI-E",如果UseSSD为true ,则必填 + * "InstanceMode" => (string) 实例的部署类型。可选值为:Normal: 普通单点实例,Slave: 从库实例,HA: 高可用部署实例,默认是Normal + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 价格 参照UDBInstancePriceSet[ + * [ + * "ChargeType" => (string) Year, Month, Dynamic,Trial + * "Price" => (integer) 价格,单位为分 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeUDBInstancePrice(DescribeUDBInstancePriceRequest $request = null): DescribeUDBInstancePriceResponse + { + $resp = $this->invoke($request); + return new DescribeUDBInstancePriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDBInstanceState - 获取UDB实例状态 + * + * See also: https://docs.ucloud.cn/api/UDB-api/describe_udb_instance_state + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "DBId" => (string) 实例的Id,该值可以通过DescribeUDBInstance获取 + * ] + * + * Outputs: + * + * $outputs = [ + * "State" => (string) DB状态标记 Init:初始化中;Fail:安装失败; Starting:启动中; Running : 运行 ;Shutdown:关闭中; Shutoff :已关闭; Delete:已删除; Upgrading:升级中; Promoting: 提升为独库进行中; Recovering: 恢复中; Recover fail:恢复失败。 + * ] + * + * @throws UCloudException + */ + public function describeUDBInstanceState(DescribeUDBInstanceStateRequest $request = null): DescribeUDBInstanceStateResponse + { + $resp = $this->invoke($request); + return new DescribeUDBInstanceStateResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDBInstanceUpgradePrice - 获取UDB实例升降级价格信息 + * + * See also: https://docs.ucloud.cn/api/UDB-api/describe_udb_instance_upgrade_price + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "DBId" => (string) 实例的Id + * "MemoryLimit" => (integer) 内存限制(MB) + * "DiskSpace" => (integer) 磁盘空间(GB), 暂时支持20G - 500G + * "UseSSD" => (boolean) 是否使用SSD,默认为false + * "SSDType" => (string) SSD类型,可选值为"SATA"、"PCI-E",如果UseSSD为true ,则必选 + * ] + * + * Outputs: + * + * $outputs = [ + * "Price" => (integer) 价格,单位为分 + * ] + * + * @throws UCloudException + */ + public function describeUDBInstanceUpgradePrice(DescribeUDBInstanceUpgradePriceRequest $request = null): DescribeUDBInstanceUpgradePriceResponse + { + $resp = $this->invoke($request); + return new DescribeUDBInstanceUpgradePriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDBLogBackupURL - 获取UDB的slowlog备份地址 + * + * See also: https://docs.ucloud.cn/api/UDB-api/describe_udb_log_backup_url + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "DBId" => (string) DB实例Id + * "BackupId" => (integer) DB实例备份ID + * ] + * + * Outputs: + * + * $outputs = [ + * "BackupPath" => (string) 备份外网URL + * "UsernetPath" => (string) 备份用户网URL + * ] + * + * @throws UCloudException + */ + public function describeUDBLogBackupURL(DescribeUDBLogBackupURLRequest $request = null): DescribeUDBLogBackupURLResponse + { + $resp = $this->invoke($request); + return new DescribeUDBLogBackupURLResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDBLogPackage - 列表UDB实例binlog或slowlog或errorlog备份信息 + * + * See also: https://docs.ucloud.cn/api/UDB-api/describe_udb_log_package + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Offset" => (integer) 分页显示的起始偏移,列表操作则指定 + * "Limit" => (integer) 分页显示的条目数,列表操作则指定 + * "Type" => (integer) 需要列出的备份文件类型,每种文件的值如下 2 : BINLOG\_BACKUP 3 : SLOW\_QUERY\_BACKUP 4 : ERRORLOG\_BACKUP + * "Types" => (array) Types作为Type的补充,支持多值传入,可以获取多个类型的日志记录,如:Types.0=2&Types.1=3 + * "DBId" => (string) DB实例Id,如果指定,则只获取该db的备份信息 + * "BeginTime" => (integer) 过滤条件:起始时间(时间戳) + * "EndTime" => (integer) 过滤条件:结束时间(时间戳) + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 备份信息 参见LogPackageDataSet[ + * [ + * "BackupId" => (integer) 备份id + * "BackupName" => (string) 备份名称 + * "BackupTime" => (integer) 备份时间 + * "BackupSize" => (integer) 备份文件大小 + * "BackupType" => (integer) 备份类型,包括2-binlog备份,3-slowlog备份 + * "State" => (string) 备份状态 Backuping // 备份中 Success // 备份成功 Failed // 备份失败 Expired // 备份过期 + * "DBId" => (string) dbid + * "DBName" => (string) 对应的db名称 + * "Zone" => (string) 所在可用区 + * "BackupZone" => (string) 跨可用区高可用备库所在可用区 + * ] + * ] + * "TotalCount" => (integer) 备份总数,如果指定dbid,则是该db备份总数 + * ] + * + * @throws UCloudException + */ + public function describeUDBLogPackage(DescribeUDBLogPackageRequest $request = null): DescribeUDBLogPackageResponse + { + $resp = $this->invoke($request); + return new DescribeUDBLogPackageResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDBParamGroup - 获取参数组详细参数信息 + * + * See also: https://docs.ucloud.cn/api/UDB-api/describe_udb_param_group + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Offset" => (integer) 分页显示的起始偏移,列表操作则指定 + * "Limit" => (integer) 分页显示的条目数,列表操作则指定 + * "GroupId" => (integer) 参数组id,如果指定则获取描述,否则是列表操作,需要 指定Offset/Limit + * "IsInUDBC" => (boolean) 是否选取专区中配置 + * "RegionFlag" => (boolean) 当请求没有填写Zone时,如果指定为true,表示只拉取跨可用区的相关配置文件,否则,拉取所有机房的配置文件(包括每个单可用区和跨可用区) + * "ClassType" => (string) 如果未指定GroupId,则可选是否选取特定DB类型的配置(sql, nosql, postgresql, sqlserver) + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 参数组列表 参照UDBParamGroupSet[ + * [ + * "GroupId" => (integer) 参数组id + * "GroupName" => (string) 参数组名称 + * "DBTypeId" => (string) DB类型id,mysql/mongodb按版本细分各有一个id 目前id的取值范围为[1,7],数值对应的版本如下 1:mysql-5.5,2:mysql-5.1,3:percona-5.5 4:mongodb-2.4,5:mongodb-2.6,6:mysql-5.6 7:percona-5.6 + * "Description" => (string) 参数组描述 + * "Modifiable" => (boolean) 参数组是否可修改 + * "ParamMember" => (array) 参数的键值对表 UDBParamMemberSet[ + * [ + * "Key" => (string) 参数名称 + * "Value" => (string) 参数值 + * "ValueType" => (integer) 参数值应用类型,取值范围为{0,10,20,30},各值 代表意义为 0-unknown、10-int、20-string、 30-bool + * "AllowedVal" => (string) 允许的值(根据参数类型,用分隔符表示) + * "ApplyType" => (integer) 参数值应用类型,取值范围为{0,10,20},各值代表 意义为0-unknown、10-static、20-dynamic + * "Modifiable" => (boolean) 是否可更改,默认为false + * "FormatType" => (integer) 允许值的格式类型,取值范围为{0,10,20},意义分 别为PVFT_UNKOWN=0,PVFT_RANGE=10, PVFT_ENUM=20 + * ] + * ] + * ] + * ] + * "TotalCount" => (integer) 参数组总数,列表操作时才会有该参数 + * ] + * + * @throws UCloudException + */ + public function describeUDBParamGroup(DescribeUDBParamGroupRequest $request = null): DescribeUDBParamGroupResponse + { + $resp = $this->invoke($request); + return new DescribeUDBParamGroupResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDBSplittingInfo - 描述读写分离功能的详细信息 + * + * See also: https://docs.ucloud.cn/api/UDB-api/describe_udb_splitting_info + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "MasterDBId" => (string) DB实例ID + * ] + * + * Outputs: + * + * $outputs = [ + * "Zone" => (string) 可用区 + * "MasterDBId" => (string) DB实例ID + * "RWIP" => (string) 读写分离IP + * "DelayThreshold" => (integer) 时间阈值 + * "Port" => (integer) 端口号 + * "ReadModel" => (string) 读写分离策略 + * "DBTypeId" => (string) 数据库版本 + * "RWState" => (string) 读写分离状态 + * "DataSet" => (array) 读写分离从库信息[ + * [ + * "DBId" => (string) DB实例ID + * "Role" => (string) 主库/从库 + * "VirtualIP" => (string) DBIP + * "ReadWeight" => (integer) 读写分离比重 + * "State" => (string) DB状态 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeUDBSplittingInfo(DescribeUDBSplittingInfoRequest $request = null): DescribeUDBSplittingInfoResponse + { + $resp = $this->invoke($request); + return new DescribeUDBSplittingInfoResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDBType - 获取UDB支持的类型信息 + * + * See also: https://docs.ucloud.cn/api/UDB-api/describe_udb_type + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "BackupZone" => (string) 跨可用区高可用DB的备库所在区域,仅当该可用区支持跨可用区高可用时填入。参见 [可用区列表](../summary/regionlist.html) + * "DBClusterType" => (string) DB实例类型,如mysql,sqlserver,mongo,postgresql + * "InstanceMode" => (string) 返回支持某种实例类型的DB类型。如果没传,则表示任何实例类型均可。normal:单点,ha:高可用,sharded_cluster:分片集群 + * "DiskType" => (string) 返回支持某种磁盘类型的DB类型,如Normal、SSD、NVMe_SSD。如果没传,则表示任何磁盘类型均可。 + * "CompatibleWithDBType" => (string) 返回从备份创建实例时,该版本号所支持的备份创建版本。如果没传,则表示不是从备份创建。 + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) DB类型列表 参数见 UDBTypeSet[ + * [ + * "DBTypeId" => (string) DB类型id,mysql/mongodb按版本细分各有一个id, 目前id的取值范围为[1,7],数值对应的版本如下: 1:mysql-5.5,2:mysql-5.1,3:percona-5.5 4:mongodb-2.4,5:mongodb-2.6,6:mysql-5.6, 7:percona-5.6 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeUDBType(DescribeUDBTypeRequest $request = null): DescribeUDBTypeResponse + { + $resp = $this->invoke($request); + return new DescribeUDBTypeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DisableUDBRWSplitting - 关闭DB的读写分离功能 + * + * See also: https://docs.ucloud.cn/api/UDB-api/disable_udb_rw_splitting + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "MasterDBId" => (string) DB实例ID(master) + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function disableUDBRWSplitting(DisableUDBRWSplittingRequest $request = null): DisableUDBRWSplittingResponse + { + $resp = $this->invoke($request); + return new DisableUDBRWSplittingResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * EditUDBBackupBlacklist - 编辑UDB实例的备份黑名单 + * + * See also: https://docs.ucloud.cn/api/UDB-api/edit_udb_backup_blacklist + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "DBId" => (string) DB实例Id,该值可以通过DescribeUDBInstance获取 + * "Blacklist" => (string) 黑名单,规范示例,指定库mysql.%;test.%; 指定表city.address; + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function editUDBBackupBlacklist(EditUDBBackupBlacklistRequest $request = null): EditUDBBackupBlacklistResponse + { + $resp = $this->invoke($request); + return new EditUDBBackupBlacklistResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * EnableUDBRWSplitting - 开启DB的读写分离功能 + * + * See also: https://docs.ucloud.cn/api/UDB-api/enable_udb_rw_splitting + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "MasterDBId" => (string) DB实例ID(主库) + * "BackupZone" => (string) 备份的可用区。用于创建跨可用区读写分离的一个节点,跨机房的读写分离必须有这个参数 + * ] + * + * Outputs: + * + * $outputs = [ + * "MasterDBId" => (string) DB实例ID(主库) + * "RWIp" => (string) 读写分离访问IP + * ] + * + * @throws UCloudException + */ + public function enableUDBRWSplitting(EnableUDBRWSplittingRequest $request = null): EnableUDBRWSplittingResponse + { + $resp = $this->invoke($request); + return new EnableUDBRWSplittingResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ExtractUDBParamGroup - 获取配置文件内容 + * + * See also: https://docs.ucloud.cn/api/UDB-api/extract_udb_param_group + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。如果RegionFlag=false,必须传,反之,可不传。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "GroupId" => (integer) 配置id + * "RegionFlag" => (boolean) 是否跨可用区,RegionFlag为true时表示跨可用区配置文件。如果RegionFlag=true,Zone可以不传,否则Zone必须传。 + * ] + * + * Outputs: + * + * $outputs = [ + * "Content" => (string) 配置文件内容 + * ] + * + * @throws UCloudException + */ + public function extractUDBParamGroup(ExtractUDBParamGroupRequest $request = null): ExtractUDBParamGroupResponse + { + $resp = $this->invoke($request); + return new ExtractUDBParamGroupResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * FetchUDBInstanceEarliestRecoverTime - 获取UDB最早可回档的时间点 + * + * See also: https://docs.ucloud.cn/api/UDB-api/fetch_udb_instance_earliest_recover_time + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "DBId" => (string) DB实例Id + * ] + * + * Outputs: + * + * $outputs = [ + * "EarliestTime" => (integer) 获取最早可回档时间点 + * ] + * + * @throws UCloudException + */ + public function fetchUDBInstanceEarliestRecoverTime(FetchUDBInstanceEarliestRecoverTimeRequest $request = null): FetchUDBInstanceEarliestRecoverTimeResponse + { + $resp = $this->invoke($request); + return new FetchUDBInstanceEarliestRecoverTimeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyUDBInstanceName - 重命名UDB实例 + * + * See also: https://docs.ucloud.cn/api/UDB-api/modify_udb_instance_name + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "DBId" => (string) 实例的Id,该值可以通过DescribeUDBInstance获取 + * "Name" => (string) 实例的新名字, 长度要求为6~63位 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function modifyUDBInstanceName(ModifyUDBInstanceNameRequest $request = null): ModifyUDBInstanceNameResponse + { + $resp = $this->invoke($request); + return new ModifyUDBInstanceNameResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyUDBInstancePassword - 修改DB实例的管理员密码 + * + * See also: https://docs.ucloud.cn/api/UDB-api/modify_udb_instance_password + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "DBId" => (string) 实例的ID,该值可以通过DescribeUDBInstance获取 + * "Password" => (string) 实例的新密码 + * "AccountName" => (string) sqlserver帐号,仅在sqlserver的情况下填该参数 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function modifyUDBInstancePassword(ModifyUDBInstancePasswordRequest $request = null): ModifyUDBInstancePasswordResponse + { + $resp = $this->invoke($request); + return new ModifyUDBInstancePasswordResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * PromoteUDBInstanceToHA - 普通db升级为高可用(只针对mysql5.5及以上版本) + * + * See also: https://docs.ucloud.cn/api/UDB-api/promote_udb_instance_to_ha + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "DBId" => (string) 实例的Id,该值可以通过DescribeUDBInstance获取 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function promoteUDBInstanceToHA(PromoteUDBInstanceToHARequest $request = null): PromoteUDBInstanceToHAResponse + { + $resp = $this->invoke($request); + return new PromoteUDBInstanceToHAResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * PromoteUDBSlave - 从库提升为独立库 + * + * See also: https://docs.ucloud.cn/api/UDB-api/promote_udb_slave + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "DBId" => (string) 实例的Id,该值可以通过DescribeUDBInstance获取 + * "IsForce" => (boolean) 是否强制(如果从库落后可能会禁止提升),默认false 如果落后情况下,强制提升丢失数据 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function promoteUDBSlave(PromoteUDBSlaveRequest $request = null): PromoteUDBSlaveResponse + { + $resp = $this->invoke($request); + return new PromoteUDBSlaveResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ResizeUDBInstance - 修改(升级和降级)UDB实例的配置,包括内存和磁盘的配置,对于内存升级无需关闭实例,其他场景需要事先关闭实例。两套参数可以配置升降机:1.配置UseSSD和SSDType 2.配置InstanceType,不需要配置InstanceMode。这两套第二套参数的优先级更高 + * + * See also: https://docs.ucloud.cn/api/UDB-api/resize_udb_instance + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "DBId" => (string) 实例的Id + * "MemoryLimit" => (integer) 内存限制(MB),目前支持以下几档 1000M/2000M/4000M/ 6000M/8000M/ 12000M/16000M/ 24000M/32000M/ 48000M/64000M/96000M/128000M/192000M/256000M/320000M。 + * "DiskSpace" => (integer) 磁盘空间(GB), 暂时支持20G-32T + * "UseSSD" => (boolean) 是否使用SSD,默认为true + * "SSDType" => (string) SSD类型,可选值为"SATA"、"PCI-E"、“NVMe”,如果UseSSD为true ,则必选 + * "UDBCId" => (string) 专区的ID,如果有值表示专区中的DB配置升降级 + * "InstanceType" => (string) UDB数据库机型: "Normal": "标准机型" , "SATA_SSD": "SSD机型" , "PCIE_SSD": "SSD高性能机型" , "Normal_Volume": "标准大容量机型", "SATA_SSD_Volume": "SSD大容量机型" , "PCIE_SSD_Volume": "SSD高性能大容量机型",“NVMe_SSD”:“快杰机型” + * "InstanceMode" => (string) UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例 "HA": 高可用版UDB实例 默认是"Normal" + * "StartAfterUpgrade" => (boolean) DB关闭状态下升降级,升降级后是否启动DB,默认为false + * "CouponId" => (string) 使用的代金券id + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function resizeUDBInstance(ResizeUDBInstanceRequest $request = null): ResizeUDBInstanceResponse + { + $resp = $this->invoke($request); + return new ResizeUDBInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * RestartRWSplitting - 读写分离中间件重启,对应docker重启,但是ip不变 + * + * See also: https://docs.ucloud.cn/api/UDB-api/restart_rw_splitting + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "MasterDBId" => (string) 待关闭读写分离中间键ProxyId + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function restartRWSplitting(RestartRWSplittingRequest $request = null): RestartRWSplittingResponse + { + $resp = $this->invoke($request); + return new RestartRWSplittingResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * RestartUDBInstance - 重启UDB实例 + * + * See also: https://docs.ucloud.cn/api/UDB-api/restart_udb_instance + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "DBId" => (string) 实例的Id,该值可以通过DescribeUDBInstance获取 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function restartUDBInstance(RestartUDBInstanceRequest $request = null): RestartUDBInstanceResponse + { + $resp = $this->invoke($request); + return new RestartUDBInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * SetUDBRWSplitting - 设置读写分离的模式 + * + * See also: https://docs.ucloud.cn/api/UDB-api/set_udb_rw_splitting + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "MasterDBId" => (string) DB实例ID(master) + * "ReadModel" => (string) 读写分离策略 + * "DBIds" => (array) DBIds.0 代表UDB主节点, DBIds.1 到DBIds.n 代表1到N个从节点 + * "ReadPercents" => (array) udb主从节点的只读比例。ReadPercents.0代表主节点的只读比例,ReadPercents.1代表从节点1的读写比例, 以此类推 + * "DelayThreshold" => (integer) 时间阙值 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function setUDBRWSplitting(SetUDBRWSplittingRequest $request = null): SetUDBRWSplittingResponse + { + $resp = $this->invoke($request); + return new SetUDBRWSplittingResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * StartUDBInstance - 启动UDB实例 + * + * See also: https://docs.ucloud.cn/api/UDB-api/start_udb_instance + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "DBId" => (string) 实例的Id,该值可以通过DescribeUDBInstance获取 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function startUDBInstance(StartUDBInstanceRequest $request = null): StartUDBInstanceResponse + { + $resp = $this->invoke($request); + return new StartUDBInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * StopUDBInstance - 关闭UDB实例 + * + * See also: https://docs.ucloud.cn/api/UDB-api/stop_udb_instance + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "DBId" => (string) 实例的Id,该值可以通过DescribeUDBInstance获取 + * "ForceToKill" => (boolean) 是否使用强制手段关闭DB,默认是false + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function stopUDBInstance(StopUDBInstanceRequest $request = null): StopUDBInstanceResponse + { + $resp = $this->invoke($request); + return new StopUDBInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * SwitchUDBHAToSentinel - UDB高可用实例从HAProxy版本升级为Sentinel版本(不带HAProxy)升级耗时30-70秒 + * + * See also: https://docs.ucloud.cn/api/UDB-api/switch_udb_ha_to_sentinel + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "DBId" => (string) UDB的实例ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function switchUDBHAToSentinel(SwitchUDBHAToSentinelRequest $request = null): SwitchUDBHAToSentinelResponse + { + $resp = $this->invoke($request); + return new SwitchUDBHAToSentinelResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * SwitchUDBInstanceToHA - 普通UDB切换为高可用,原db状态为WaitForSwitch时,调用改api + * + * See also: https://docs.ucloud.cn/api/UDB-api/switch_udb_instance_to_ha + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "DBId" => (string) 实例的Id,该值可以通过DescribeUDBInstance获取 + * ] + * + * Outputs: + * + * $outputs = [ + * "DBId" => (string) 切换后高可用db实例的Id + * ] + * + * @throws UCloudException + */ + public function switchUDBInstanceToHA(SwitchUDBInstanceToHARequest $request = null): SwitchUDBInstanceToHAResponse + { + $resp = $this->invoke($request); + return new SwitchUDBInstanceToHAResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateUDBInstanceBackupStrategy - 修改UDB自动备份策略 + * + * See also: https://docs.ucloud.cn/api/UDB-api/update_udb_instance_backup_strategy + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "DBId" => (string) 主节点的Id + * "BackupTime" => (integer) 备份的整点时间,范围[0,23] + * "BackupDate" => (string) 备份时期标记位。共7位,每一位为一周中一天的备份情况,0表示关闭当天备份,1表示打开当天备份。最右边的一位为星期天的备份开关,其余从右到左依次为星期一到星期六的备份配置开关,每周必须至少设置两天备份。例如:1100000表示打开星期六和星期五的备份功能 + * "ForceDump" => (boolean) 当导出某些数据遇到问题后,是否强制导出其他剩余数据默认是false需要同时设置BackupDate字段 + * "BackupMethod" => (string) 选择默认的备份方式,可选 snapshot 表示使用快照/物理备份,不填或者其它任何值为默认的逻辑备份。需要同时设置BackupDate字段。(注意现在只有SSD 版本的 MySQL实例支持物理备份) + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function updateUDBInstanceBackupStrategy(UpdateUDBInstanceBackupStrategyRequest $request = null): UpdateUDBInstanceBackupStrategyResponse + { + $resp = $this->invoke($request); + return new UpdateUDBInstanceBackupStrategyResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateUDBInstanceSlaveBackupSwitch - 开启或者关闭UDB从库备份 + * + * See also: https://docs.ucloud.cn/api/UDB-api/update_udb_instance_slave_backup_switch + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "MasterDBId" => (string) 主库的Id + * "BackupSwitch" => (integer) 从库的备份开关,范围[0,1],0表示从库备份功能关闭,1 表示从库备份开关打开。 + * "SlaveDBId" => (string) 从库的Id,如果从库备份开关设定为打开,则必须赋值。 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function updateUDBInstanceSlaveBackupSwitch(UpdateUDBInstanceSlaveBackupSwitchRequest $request = null): UpdateUDBInstanceSlaveBackupSwitchResponse + { + $resp = $this->invoke($request); + return new UpdateUDBInstanceSlaveBackupSwitchResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateUDBParamGroup - 更新UDB配置参数项 + * + * See also: https://docs.ucloud.cn/api/UDB-api/update_udb_param_group + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "GroupId" => (integer) 配置参数组id,使用DescribeUDBParamGroup获得 + * "Key" => (string) 参数名称(与Value配合使用) + * "Value" => (string) 参数值(与Key配合使用) + * "Name" => (string) 配置文件的名字,不传时认为不修改名字,传了则不能为空 + * "Description" => (string) 配置文件的描述,不传时认为不修改 + * "RegionFlag" => (boolean) 该配置文件是否是地域级别配置文件,默认是false + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function updateUDBParamGroup(UpdateUDBParamGroupRequest $request = null): UpdateUDBParamGroupResponse + { + $resp = $this->invoke($request); + return new UpdateUDBParamGroupResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UploadUDBParamGroup - 导入UDB配置 + * + * See also: https://docs.ucloud.cn/api/UDB-api/upload_udb_param_group + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "DBTypeId" => (string) DB类型id,DB类型id,mysql/mongodb/postgesql按版本细分 1:mysql-5.1,2:mysql-5.5,3:percona-5.5,4:mysql-5.6,5:percona-5.6,6:mysql-5.7,7:percona-5.7,8:mariadb-10.0,9:mongodb-2.4,10:mongodb-2.6,11:mongodb-3.0,12:mongodb-3.2,13:postgresql-9.4,14:postgresql-9.6 + * "GroupName" => (string) 配置参数组名称 + * "Description" => (string) 参数组描述 + * "Content" => (string) 配置内容,导入的配置内容采用base64编码 + * "RegionFlag" => (boolean) 该配置文件是否是地域级别配置文件,默认是false + * ] + * + * Outputs: + * + * $outputs = [ + * "GroupId" => (integer) 配置参数组id + * ] + * + * @throws UCloudException + */ + public function uploadUDBParamGroup(UploadUDBParamGroupRequest $request = null): UploadUDBParamGroupResponse + { + $resp = $this->invoke($request); + return new UploadUDBParamGroupResponse($resp->toArray(), $resp->getRequestId()); + } +} diff --git a/src/UDDB/Apis/ChangeUDDBInstanceNameRequest.php b/src/UDDB/Apis/ChangeUDDBInstanceNameRequest.php new file mode 100644 index 00000000..e3dbac24 --- /dev/null +++ b/src/UDDB/Apis/ChangeUDDBInstanceNameRequest.php @@ -0,0 +1,134 @@ + "ChangeUDDBInstanceName"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ProjectId"); + $this->markRequired("UDDBId"); + $this->markRequired("NewName"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UDDBId: UDDB实例Id + * + * @return string|null + */ + public function getUDDBId(): string + { + return $this->get("UDDBId"); + } + + /** + * UDDBId: UDDB实例Id + * + * @param string $uddbId + */ + public function setUDDBId(string $uddbId) + { + $this->set("UDDBId", $uddbId); + } + + /** + * NewName: 名称 + * + * @return string|null + */ + public function getNewName(): string + { + return $this->get("NewName"); + } + + /** + * NewName: 名称 + * + * @param string $newName + */ + public function setNewName(string $newName) + { + $this->set("NewName", $newName); + } +} diff --git a/src/UDDB/Apis/ChangeUDDBInstanceNameResponse.php b/src/UDDB/Apis/ChangeUDDBInstanceNameResponse.php new file mode 100644 index 00000000..a05a20bc --- /dev/null +++ b/src/UDDB/Apis/ChangeUDDBInstanceNameResponse.php @@ -0,0 +1,26 @@ + "ChangeUDDBSlaveCount"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ProjectId"); + $this->markRequired("UDDBId"); + $this->markRequired("SlaveCount"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UDDBId: UDDB资源id + * + * @return string|null + */ + public function getUDDBId(): string + { + return $this->get("UDDBId"); + } + + /** + * UDDBId: UDDB资源id + * + * @param string $uddbId + */ + public function setUDDBId(string $uddbId) + { + $this->set("UDDBId", $uddbId); + } + + /** + * SlaveCount: 每个数据节点的只读实例个数, 取值必须>=0 + * + * @return string|null + */ + public function getSlaveCount(): string + { + return $this->get("SlaveCount"); + } + + /** + * SlaveCount: 每个数据节点的只读实例个数, 取值必须>=0 + * + * @param string $slaveCount + */ + public function setSlaveCount(string $slaveCount) + { + $this->set("SlaveCount", $slaveCount); + } +} diff --git a/src/UDDB/Apis/ChangeUDDBSlaveCountResponse.php b/src/UDDB/Apis/ChangeUDDBSlaveCountResponse.php new file mode 100644 index 00000000..4c49d191 --- /dev/null +++ b/src/UDDB/Apis/ChangeUDDBSlaveCountResponse.php @@ -0,0 +1,26 @@ + "CreateUDDBInstance"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ProjectId"); + $this->markRequired("DBTypeId"); + $this->markRequired("Name"); + $this->markRequired("AdminPassword"); + $this->markRequired("RouterVersion"); + $this->markRequired("RouterNodeNum"); + $this->markRequired("DataNodeCount"); + $this->markRequired("DataNodeMemory"); + $this->markRequired("DataNodeDiskSpace"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DBTypeId: UDDB的数据库版本,支持版本如下:mysql-5.6 mysql-5.7. 如果不填,则默认为mysql-5.6 + * + * @return string|null + */ + public function getDBTypeId(): string + { + return $this->get("DBTypeId"); + } + + /** + * DBTypeId: UDDB的数据库版本,支持版本如下:mysql-5.6 mysql-5.7. 如果不填,则默认为mysql-5.6 + * + * @param string $dbTypeId + */ + public function setDBTypeId(string $dbTypeId) + { + $this->set("DBTypeId", $dbTypeId); + } + + /** + * Name: 实例名称,至少6位 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 实例名称,至少6位 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * AdminPassword: 管理员密码, 密码需要使用base64加密 + * + * @return string|null + */ + public function getAdminPassword(): string + { + return $this->get("AdminPassword"); + } + + /** + * AdminPassword: 管理员密码, 密码需要使用base64加密 + * + * @param string $adminPassword + */ + public function setAdminPassword(string $adminPassword) + { + $this->set("AdminPassword", $adminPassword); + } + + /** + * RouterVersion: UDDB路由节点的版本。分为三种: Trival(免费版): 2中间件节点; QPS:1.5W FellFree(标准版): 固定为4中间件节点,后续将根据业务请求量自动扩展,最多扩展到12个节点,QPS为3w - 10w; EnjoyAlone(物理机版):专享物理机,节点数让客户可选 + * + * @return string|null + */ + public function getRouterVersion(): string + { + return $this->get("RouterVersion"); + } + + /** + * RouterVersion: UDDB路由节点的版本。分为三种: Trival(免费版): 2中间件节点; QPS:1.5W FellFree(标准版): 固定为4中间件节点,后续将根据业务请求量自动扩展,最多扩展到12个节点,QPS为3w - 10w; EnjoyAlone(物理机版):专享物理机,节点数让客户可选 + * + * @param string $routerVersion + */ + public function setRouterVersion(string $routerVersion) + { + $this->set("RouterVersion", $routerVersion); + } + + /** + * RouterNodeNum: 其他版本:该参数可不填;专享版:物理机台数 + * + * @return integer|null + */ + public function getRouterNodeNum(): int + { + return $this->get("RouterNodeNum"); + } + + /** + * RouterNodeNum: 其他版本:该参数可不填;专享版:物理机台数 + * + * @param int $routerNodeNum + */ + public function setRouterNodeNum(int $routerNodeNum) + { + $this->set("RouterNodeNum", $routerNodeNum); + } + + /** + * DataNodeCount: 初始的数据节点个数 取值必须>0. + * + * @return integer|null + */ + public function getDataNodeCount(): int + { + return $this->get("DataNodeCount"); + } + + /** + * DataNodeCount: 初始的数据节点个数 取值必须>0. + * + * @param int $dataNodeCount + */ + public function setDataNodeCount(int $dataNodeCount) + { + $this->set("DataNodeCount", $dataNodeCount); + } + + /** + * DataNodeMemory: 新的数据节点的内存配置, 单位:MB 具体数值参考UDB的内存取值. + * + * @return integer|null + */ + public function getDataNodeMemory(): int + { + return $this->get("DataNodeMemory"); + } + + /** + * DataNodeMemory: 新的数据节点的内存配置, 单位:MB 具体数值参考UDB的内存取值. + * + * @param int $dataNodeMemory + */ + public function setDataNodeMemory(int $dataNodeMemory) + { + $this->set("DataNodeMemory", $dataNodeMemory); + } + + /** + * DataNodeDiskSpace: 新的数据节点的磁盘大小配置. 单位: GB 具体数值参考UDB的磁盘大小取值. + * + * @return integer|null + */ + public function getDataNodeDiskSpace(): int + { + return $this->get("DataNodeDiskSpace"); + } + + /** + * DataNodeDiskSpace: 新的数据节点的磁盘大小配置. 单位: GB 具体数值参考UDB的磁盘大小取值. + * + * @param int $dataNodeDiskSpace + */ + public function setDataNodeDiskSpace(int $dataNodeDiskSpace) + { + $this->set("DataNodeDiskSpace", $dataNodeDiskSpace); + } + + /** + * InstanceMode: 存储节点的高可用模式, 分为高可用UDB(HA)和普通UDB(Normal),如果不填, 则默认为HA + * + * @return string|null + */ + public function getInstanceMode(): string + { + return $this->get("InstanceMode"); + } + + /** + * InstanceMode: 存储节点的高可用模式, 分为高可用UDB(HA)和普通UDB(Normal),如果不填, 则默认为HA + * + * @param string $instanceMode + */ + public function setInstanceMode(string $instanceMode) + { + $this->set("InstanceMode", $instanceMode); + } + + /** + * InstanceType: 存储节点和只读实例的磁盘类型。分为:SSD磁盘(SATA_SSD)或普通磁盘(Normal)。 如果不填,则默认为SATA_SSD + * + * @return string|null + */ + public function getInstanceType(): string + { + return $this->get("InstanceType"); + } + + /** + * InstanceType: 存储节点和只读实例的磁盘类型。分为:SSD磁盘(SATA_SSD)或普通磁盘(Normal)。 如果不填,则默认为SATA_SSD + * + * @param string $instanceType + */ + public function setInstanceType(string $instanceType) + { + $this->set("InstanceType", $instanceType); + } + + /** + * ChargeType: 付费类型,可选值如下:Year: 按年付费 Month: 按月付费 Dynamic: 按需付费(单位: 小时) Trial: 免费试用 默认值为: Dynamic + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费类型,可选值如下:Year: 按年付费 Month: 按月付费 Dynamic: 按需付费(单位: 小时) Trial: 免费试用 默认值为: Dynamic + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时长,默认值1 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长,默认值1 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * AdminUser: 管理员帐户名,默认root + * + * @return string|null + */ + public function getAdminUser(): string + { + return $this->get("AdminUser"); + } + + /** + * AdminUser: 管理员帐户名,默认root + * + * @param string $adminUser + */ + public function setAdminUser(string $adminUser) + { + $this->set("AdminUser", $adminUser); + } + + /** + * Port: 端口号,mysql默认端口为3306 + * + * @return integer|null + */ + public function getPort(): int + { + return $this->get("Port"); + } + + /** + * Port: 端口号,mysql默认端口为3306 + * + * @param int $port + */ + public function setPort(int $port) + { + $this->set("Port", $port); + } + + /** + * DataNodeSlaveCount: 每个数据节点的只读实例个数, 取值必须>=0. 默认取值为0. + * + * @return integer|null + */ + public function getDataNodeSlaveCount(): int + { + return $this->get("DataNodeSlaveCount"); + } + + /** + * DataNodeSlaveCount: 每个数据节点的只读实例个数, 取值必须>=0. 默认取值为0. + * + * @param int $dataNodeSlaveCount + */ + public function setDataNodeSlaveCount(int $dataNodeSlaveCount) + { + $this->set("DataNodeSlaveCount", $dataNodeSlaveCount); + } + + /** + * VPCId: VPC的ID + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPC的ID + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: 子网ID + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网ID + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * CouponId: 使用的代金券id + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 使用的代金券id + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UDDB/Apis/CreateUDDBInstanceResponse.php b/src/UDDB/Apis/CreateUDDBInstanceResponse.php new file mode 100644 index 00000000..124b13d0 --- /dev/null +++ b/src/UDDB/Apis/CreateUDDBInstanceResponse.php @@ -0,0 +1,44 @@ +get("UDDBId"); + } + + /** + * UDDBId: UDDB实例ID + * + * @param string $uddbId + */ + public function setUDDBId(string $uddbId) + { + $this->set("UDDBId", $uddbId); + } +} diff --git a/src/UDDB/Apis/DeleteUDDBInstanceRequest.php b/src/UDDB/Apis/DeleteUDDBInstanceRequest.php new file mode 100644 index 00000000..1c5e0f1c --- /dev/null +++ b/src/UDDB/Apis/DeleteUDDBInstanceRequest.php @@ -0,0 +1,113 @@ + "DeleteUDDBInstance"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ProjectId"); + $this->markRequired("UDDBId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UDDBId: UDDB实例ID + * + * @return string|null + */ + public function getUDDBId(): string + { + return $this->get("UDDBId"); + } + + /** + * UDDBId: UDDB实例ID + * + * @param string $uddbId + */ + public function setUDDBId(string $uddbId) + { + $this->set("UDDBId", $uddbId); + } +} diff --git a/src/UDDB/Apis/DeleteUDDBInstanceResponse.php b/src/UDDB/Apis/DeleteUDDBInstanceResponse.php new file mode 100644 index 00000000..169c1f84 --- /dev/null +++ b/src/UDDB/Apis/DeleteUDDBInstanceResponse.php @@ -0,0 +1,26 @@ + "DescribeUDDBInstancePrice"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ProjectId"); + $this->markRequired("RouterVersion"); + $this->markRequired("RouterNodeNum"); + $this->markRequired("DataNodeCount"); + $this->markRequired("DataNodeMemory"); + $this->markRequired("DataNodeDiskSpace"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * RouterVersion: UDDB路由节点的版本。分为三种: Trival(免费版): 2中间件节点; QPS:1.5WFeelFree(标准版): 固定为4中间件节点,后续将根据业务请求量自动扩展,最多扩展到12个节点,QPS为3w - 10w;EnjoyAlone(物理机版):专享物理机,节点数让客户可选 + * + * @return string|null + */ + public function getRouterVersion(): string + { + return $this->get("RouterVersion"); + } + + /** + * RouterVersion: UDDB路由节点的版本。分为三种: Trival(免费版): 2中间件节点; QPS:1.5WFeelFree(标准版): 固定为4中间件节点,后续将根据业务请求量自动扩展,最多扩展到12个节点,QPS为3w - 10w;EnjoyAlone(物理机版):专享物理机,节点数让客户可选 + * + * @param string $routerVersion + */ + public function setRouterVersion(string $routerVersion) + { + $this->set("RouterVersion", $routerVersion); + } + + /** + * RouterNodeNum: 其他版本:该参数可不填;专享版:物理机节点个数。一台物理机有2个节点 + * + * @return integer|null + */ + public function getRouterNodeNum(): int + { + return $this->get("RouterNodeNum"); + } + + /** + * RouterNodeNum: 其他版本:该参数可不填;专享版:物理机节点个数。一台物理机有2个节点 + * + * @param int $routerNodeNum + */ + public function setRouterNodeNum(int $routerNodeNum) + { + $this->set("RouterNodeNum", $routerNodeNum); + } + + /** + * DataNodeCount: 初始的数据节点个数 取值必须>0. + * + * @return integer|null + */ + public function getDataNodeCount(): int + { + return $this->get("DataNodeCount"); + } + + /** + * DataNodeCount: 初始的数据节点个数 取值必须>0. + * + * @param int $dataNodeCount + */ + public function setDataNodeCount(int $dataNodeCount) + { + $this->set("DataNodeCount", $dataNodeCount); + } + + /** + * DataNodeMemory: 新的数据节点的内存配置, 单位:MB 具体数值参考UDB的内存取值. + * + * @return string|null + */ + public function getDataNodeMemory(): string + { + return $this->get("DataNodeMemory"); + } + + /** + * DataNodeMemory: 新的数据节点的内存配置, 单位:MB 具体数值参考UDB的内存取值. + * + * @param string $dataNodeMemory + */ + public function setDataNodeMemory(string $dataNodeMemory) + { + $this->set("DataNodeMemory", $dataNodeMemory); + } + + /** + * DataNodeDiskSpace: 新的数据节点的磁盘大小配置. 单位: GB 具体数值参考UDB的磁盘大小取值. + * + * @return integer|null + */ + public function getDataNodeDiskSpace(): int + { + return $this->get("DataNodeDiskSpace"); + } + + /** + * DataNodeDiskSpace: 新的数据节点的磁盘大小配置. 单位: GB 具体数值参考UDB的磁盘大小取值. + * + * @param int $dataNodeDiskSpace + */ + public function setDataNodeDiskSpace(int $dataNodeDiskSpace) + { + $this->set("DataNodeDiskSpace", $dataNodeDiskSpace); + } + + /** + * ChargeType: 付费类型,可选值如下: Year: 按年付费 Month: 按月付费 Dynamic: 按需付费(单位: 小时) Trial: 免费试用 默认值为: Dynamic + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费类型,可选值如下: Year: 按年付费 Month: 按月付费 Dynamic: 按需付费(单位: 小时) Trial: 免费试用 默认值为: Dynamic + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时长,默认值1 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长,默认值1 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * DataNodeSlaveCount: 每个数据节点的只读实例个数, 取值必须>=0. 默认取值为0. + * + * @return integer|null + */ + public function getDataNodeSlaveCount(): int + { + return $this->get("DataNodeSlaveCount"); + } + + /** + * DataNodeSlaveCount: 每个数据节点的只读实例个数, 取值必须>=0. 默认取值为0. + * + * @param int $dataNodeSlaveCount + */ + public function setDataNodeSlaveCount(int $dataNodeSlaveCount) + { + $this->set("DataNodeSlaveCount", $dataNodeSlaveCount); + } + + /** + * InstanceMode: 存储节点的高可用模式, 分为高可用UDB(HA)和普通UDB(Normal),如果不填, 则默认为HA + * + * @return string|null + */ + public function getInstanceMode(): string + { + return $this->get("InstanceMode"); + } + + /** + * InstanceMode: 存储节点的高可用模式, 分为高可用UDB(HA)和普通UDB(Normal),如果不填, 则默认为HA + * + * @param string $instanceMode + */ + public function setInstanceMode(string $instanceMode) + { + $this->set("InstanceMode", $instanceMode); + } + + /** + * InstanceType: 存储节点和只读实例的磁盘类型。分为:SSD磁盘(SATA_SSD)或普通磁盘(Normal)。 如果不填,则默认为SATA_SSD + * + * @return string|null + */ + public function getInstanceType(): string + { + return $this->get("InstanceType"); + } + + /** + * InstanceType: 存储节点和只读实例的磁盘类型。分为:SSD磁盘(SATA_SSD)或普通磁盘(Normal)。 如果不填,则默认为SATA_SSD + * + * @param string $instanceType + */ + public function setInstanceType(string $instanceType) + { + $this->set("InstanceType", $instanceType); + } +} diff --git a/src/UDDB/Apis/DescribeUDDBInstancePriceResponse.php b/src/UDDB/Apis/DescribeUDDBInstancePriceResponse.php new file mode 100644 index 00000000..94efbb18 --- /dev/null +++ b/src/UDDB/Apis/DescribeUDDBInstancePriceResponse.php @@ -0,0 +1,45 @@ +get("PriceInfo")); + } + + /** + * PriceInfo: 价格明细, 参考PriceDetailInfo对象定义 + * + * @param PriceDetailInfo $priceInfo + */ + public function setPriceInfo(PriceDetailInfo $priceInfo) + { + $this->set("PriceInfo", $priceInfo->getAll()); + } +} diff --git a/src/UDDB/Apis/DescribeUDDBInstanceRequest.php b/src/UDDB/Apis/DescribeUDDBInstanceRequest.php new file mode 100644 index 00000000..226bfe35 --- /dev/null +++ b/src/UDDB/Apis/DescribeUDDBInstanceRequest.php @@ -0,0 +1,113 @@ + "DescribeUDDBInstance"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ProjectId"); + $this->markRequired("UDDBId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UDDBId: UDDB实例ID + * + * @return string|null + */ + public function getUDDBId(): string + { + return $this->get("UDDBId"); + } + + /** + * UDDBId: UDDB实例ID + * + * @param string $uddbId + */ + public function setUDDBId(string $uddbId) + { + $this->set("UDDBId", $uddbId); + } +} diff --git a/src/UDDB/Apis/DescribeUDDBInstanceResponse.php b/src/UDDB/Apis/DescribeUDDBInstanceResponse.php new file mode 100644 index 00000000..07c54bb8 --- /dev/null +++ b/src/UDDB/Apis/DescribeUDDBInstanceResponse.php @@ -0,0 +1,56 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new DataSetUDDB($item)); + } + return $result; + } + + /** + * DataSet: UDDB实例信息列表, 参见DataSetUDDB项定义 + * + * @param DataSetUDDB[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UDDB/Apis/DescribeUDDBInstanceUpgradePriceRequest.php b/src/UDDB/Apis/DescribeUDDBInstanceUpgradePriceRequest.php new file mode 100644 index 00000000..ff69a70d --- /dev/null +++ b/src/UDDB/Apis/DescribeUDDBInstanceUpgradePriceRequest.php @@ -0,0 +1,275 @@ + "DescribeUDDBInstanceUpgradePrice"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ProjectId"); + $this->markRequired("UDDBId"); + $this->markRequired("RouterVersion"); + $this->markRequired("RouterNodeNum"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UDDBId: UDDB实例ID + * + * @return string|null + */ + public function getUDDBId(): string + { + return $this->get("UDDBId"); + } + + /** + * UDDBId: UDDB实例ID + * + * @param string $uddbId + */ + public function setUDDBId(string $uddbId) + { + $this->set("UDDBId", $uddbId); + } + + /** + * RouterVersion: UDDB路由节点的版本。分为三种: Trival(免费版): 2中间件节点; QPS:1.5WFeelFree(标准版): 固定为4中间件节点,后续将根据业务请求量自动扩展,最多扩展到12个节点,QPS为3w - 10w;EnjoyAlone(物理机版):专享物理机,节点数让客户可选 + * + * @return string|null + */ + public function getRouterVersion(): string + { + return $this->get("RouterVersion"); + } + + /** + * RouterVersion: UDDB路由节点的版本。分为三种: Trival(免费版): 2中间件节点; QPS:1.5WFeelFree(标准版): 固定为4中间件节点,后续将根据业务请求量自动扩展,最多扩展到12个节点,QPS为3w - 10w;EnjoyAlone(物理机版):专享物理机,节点数让客户可选 + * + * @param string $routerVersion + */ + public function setRouterVersion(string $routerVersion) + { + $this->set("RouterVersion", $routerVersion); + } + + /** + * RouterNodeNum: 其他版本:该参数可不填;专享版:物理机节点的个数。一台物理机有2个节点 + * + * @return integer|null + */ + public function getRouterNodeNum(): int + { + return $this->get("RouterNodeNum"); + } + + /** + * RouterNodeNum: 其他版本:该参数可不填;专享版:物理机节点的个数。一台物理机有2个节点 + * + * @param int $routerNodeNum + */ + public function setRouterNodeNum(int $routerNodeNum) + { + $this->set("RouterNodeNum", $routerNodeNum); + } + + /** + * DataNodeCount: 新的数据节点个数 取值必须>0. + * + * @return integer|null + */ + public function getDataNodeCount(): int + { + return $this->get("DataNodeCount"); + } + + /** + * DataNodeCount: 新的数据节点个数 取值必须>0. + * + * @param int $dataNodeCount + */ + public function setDataNodeCount(int $dataNodeCount) + { + $this->set("DataNodeCount", $dataNodeCount); + } + + /** + * DataNodeMemory: 新的数据节点的内存配置, 单位:MB 具体数值参考UDB的内存取值. + * + * @return integer|null + */ + public function getDataNodeMemory(): int + { + return $this->get("DataNodeMemory"); + } + + /** + * DataNodeMemory: 新的数据节点的内存配置, 单位:MB 具体数值参考UDB的内存取值. + * + * @param int $dataNodeMemory + */ + public function setDataNodeMemory(int $dataNodeMemory) + { + $this->set("DataNodeMemory", $dataNodeMemory); + } + + /** + * DataNodeDiskSpace: 新的数据节点的磁盘大小配置. 单位: GB 具体数值参考UDB的磁盘大小取值. + * + * @return integer|null + */ + public function getDataNodeDiskSpace(): int + { + return $this->get("DataNodeDiskSpace"); + } + + /** + * DataNodeDiskSpace: 新的数据节点的磁盘大小配置. 单位: GB 具体数值参考UDB的磁盘大小取值. + * + * @param int $dataNodeDiskSpace + */ + public function setDataNodeDiskSpace(int $dataNodeDiskSpace) + { + $this->set("DataNodeDiskSpace", $dataNodeDiskSpace); + } + + /** + * DataNodeSlaveCount: 每个数据节点的只读实例个数, 取值必须>=0. + * + * @return integer|null + */ + public function getDataNodeSlaveCount(): int + { + return $this->get("DataNodeSlaveCount"); + } + + /** + * DataNodeSlaveCount: 每个数据节点的只读实例个数, 取值必须>=0. + * + * @param int $dataNodeSlaveCount + */ + public function setDataNodeSlaveCount(int $dataNodeSlaveCount) + { + $this->set("DataNodeSlaveCount", $dataNodeSlaveCount); + } + + /** + * InstanceMode: 存储节点的高可用模式, 分为高可用UDB(HA)和普通UDB(Normal),如果不填, 则默认为HA + * + * @return string|null + */ + public function getInstanceMode(): string + { + return $this->get("InstanceMode"); + } + + /** + * InstanceMode: 存储节点的高可用模式, 分为高可用UDB(HA)和普通UDB(Normal),如果不填, 则默认为HA + * + * @param string $instanceMode + */ + public function setInstanceMode(string $instanceMode) + { + $this->set("InstanceMode", $instanceMode); + } + + /** + * InstanceType: 存储节点和只读实例的磁盘类型。分为:SSD磁盘(SATA_SSD)或普通磁盘(Normal)。 如果不填,则默认为SATA_SSD + * + * @return string|null + */ + public function getInstanceType(): string + { + return $this->get("InstanceType"); + } + + /** + * InstanceType: 存储节点和只读实例的磁盘类型。分为:SSD磁盘(SATA_SSD)或普通磁盘(Normal)。 如果不填,则默认为SATA_SSD + * + * @param string $instanceType + */ + public function setInstanceType(string $instanceType) + { + $this->set("InstanceType", $instanceType); + } +} diff --git a/src/UDDB/Apis/DescribeUDDBInstanceUpgradePriceResponse.php b/src/UDDB/Apis/DescribeUDDBInstanceUpgradePriceResponse.php new file mode 100644 index 00000000..3979d621 --- /dev/null +++ b/src/UDDB/Apis/DescribeUDDBInstanceUpgradePriceResponse.php @@ -0,0 +1,45 @@ +get("PriceInfo")); + } + + /** + * PriceInfo: 价格明细, 参考PriceInfo对象定义 + * + * @param PriceInfo $priceInfo + */ + public function setPriceInfo(PriceInfo $priceInfo) + { + $this->set("PriceInfo", $priceInfo->getAll()); + } +} diff --git a/src/UDDB/Apis/RestartUDDBInstanceRequest.php b/src/UDDB/Apis/RestartUDDBInstanceRequest.php new file mode 100644 index 00000000..130fbaca --- /dev/null +++ b/src/UDDB/Apis/RestartUDDBInstanceRequest.php @@ -0,0 +1,113 @@ + "RestartUDDBInstance"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ProjectId"); + $this->markRequired("UDDBId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UDDBId: UDDB实例ID + * + * @return string|null + */ + public function getUDDBId(): string + { + return $this->get("UDDBId"); + } + + /** + * UDDBId: UDDB实例ID + * + * @param string $uddbId + */ + public function setUDDBId(string $uddbId) + { + $this->set("UDDBId", $uddbId); + } +} diff --git a/src/UDDB/Apis/RestartUDDBInstanceResponse.php b/src/UDDB/Apis/RestartUDDBInstanceResponse.php new file mode 100644 index 00000000..68037d6f --- /dev/null +++ b/src/UDDB/Apis/RestartUDDBInstanceResponse.php @@ -0,0 +1,26 @@ + "StartUDDBInstance"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ProjectId"); + $this->markRequired("UDDBId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UDDBId: UDDB实例ID + * + * @return string|null + */ + public function getUDDBId(): string + { + return $this->get("UDDBId"); + } + + /** + * UDDBId: UDDB实例ID + * + * @param string $uddbId + */ + public function setUDDBId(string $uddbId) + { + $this->set("UDDBId", $uddbId); + } +} diff --git a/src/UDDB/Apis/StartUDDBInstanceResponse.php b/src/UDDB/Apis/StartUDDBInstanceResponse.php new file mode 100644 index 00000000..d94697d9 --- /dev/null +++ b/src/UDDB/Apis/StartUDDBInstanceResponse.php @@ -0,0 +1,26 @@ + "StopUDDBInstance"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ProjectId"); + $this->markRequired("UDDBId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UDDBId: UDDB实例ID + * + * @return string|null + */ + public function getUDDBId(): string + { + return $this->get("UDDBId"); + } + + /** + * UDDBId: UDDB实例ID + * + * @param string $uddbId + */ + public function setUDDBId(string $uddbId) + { + $this->set("UDDBId", $uddbId); + } +} diff --git a/src/UDDB/Apis/StopUDDBInstanceResponse.php b/src/UDDB/Apis/StopUDDBInstanceResponse.php new file mode 100644 index 00000000..2bedd220 --- /dev/null +++ b/src/UDDB/Apis/StopUDDBInstanceResponse.php @@ -0,0 +1,26 @@ + "UpgradeUDDBDataNode"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("UDDBId"); + $this->markRequired("DataNodeMemory"); + $this->markRequired("DataNodeDiskSpace"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UDDBId: UDDB实例ID + * + * @return string|null + */ + public function getUDDBId(): string + { + return $this->get("UDDBId"); + } + + /** + * UDDBId: UDDB实例ID + * + * @param string $uddbId + */ + public function setUDDBId(string $uddbId) + { + $this->set("UDDBId", $uddbId); + } + + /** + * DataNodeMemory: 新的数据节点的内存配置, 单位:MB 具体数值参考UDB的内存取值 + * + * @return integer|null + */ + public function getDataNodeMemory(): int + { + return $this->get("DataNodeMemory"); + } + + /** + * DataNodeMemory: 新的数据节点的内存配置, 单位:MB 具体数值参考UDB的内存取值 + * + * @param int $dataNodeMemory + */ + public function setDataNodeMemory(int $dataNodeMemory) + { + $this->set("DataNodeMemory", $dataNodeMemory); + } + + /** + * DataNodeDiskSpace: 新的数据节点的磁盘大小配置. 单位: GB 具体数值参考UDB的磁盘大小取值. + * + * @return integer|null + */ + public function getDataNodeDiskSpace(): int + { + return $this->get("DataNodeDiskSpace"); + } + + /** + * DataNodeDiskSpace: 新的数据节点的磁盘大小配置. 单位: GB 具体数值参考UDB的磁盘大小取值. + * + * @param int $dataNodeDiskSpace + */ + public function setDataNodeDiskSpace(int $dataNodeDiskSpace) + { + $this->set("DataNodeDiskSpace", $dataNodeDiskSpace); + } + + /** + * CouponId: 使用的代金券id + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 使用的代金券id + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UDDB/Apis/UpgradeUDDBDataNodeResponse.php b/src/UDDB/Apis/UpgradeUDDBDataNodeResponse.php new file mode 100644 index 00000000..423edd3a --- /dev/null +++ b/src/UDDB/Apis/UpgradeUDDBDataNodeResponse.php @@ -0,0 +1,26 @@ + "UpgradeUDDBInstance"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("UDDBId"); + $this->markRequired("RouterVersion"); + $this->markRequired("RouterNodeNum"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UDDBId: UDDB实例ID + * + * @return string|null + */ + public function getUDDBId(): string + { + return $this->get("UDDBId"); + } + + /** + * UDDBId: UDDB实例ID + * + * @param string $uddbId + */ + public function setUDDBId(string $uddbId) + { + $this->set("UDDBId", $uddbId); + } + + /** + * RouterVersion: UDDB路由节点的版本。分为三种: Trival(免费版): 2中间件节点; QPS:1.5W FellFree(标准版): 固定为4中间件节点,后续将根据业务请求量自动扩展,最多扩展到12个节点,QPS为3w - 10w; EnjoyAlone(物理机版):专享物理机,节点数让客户可选 + * + * @return string|null + */ + public function getRouterVersion(): string + { + return $this->get("RouterVersion"); + } + + /** + * RouterVersion: UDDB路由节点的版本。分为三种: Trival(免费版): 2中间件节点; QPS:1.5W FellFree(标准版): 固定为4中间件节点,后续将根据业务请求量自动扩展,最多扩展到12个节点,QPS为3w - 10w; EnjoyAlone(物理机版):专享物理机,节点数让客户可选 + * + * @param string $routerVersion + */ + public function setRouterVersion(string $routerVersion) + { + $this->set("RouterVersion", $routerVersion); + } + + /** + * RouterNodeNum: 其他版本:该参数可不填;专享版:物理机台数 + * + * @return integer|null + */ + public function getRouterNodeNum(): int + { + return $this->get("RouterNodeNum"); + } + + /** + * RouterNodeNum: 其他版本:该参数可不填;专享版:物理机台数 + * + * @param int $routerNodeNum + */ + public function setRouterNodeNum(int $routerNodeNum) + { + $this->set("RouterNodeNum", $routerNodeNum); + } + + /** + * CouponId: 使用的代金券id + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 使用的代金券id + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UDDB/Apis/UpgradeUDDBInstanceResponse.php b/src/UDDB/Apis/UpgradeUDDBInstanceResponse.php new file mode 100644 index 00000000..571ccfb6 --- /dev/null +++ b/src/UDDB/Apis/UpgradeUDDBInstanceResponse.php @@ -0,0 +1,26 @@ +get("Id"); + } + + /** + * Id: 数据节点ID + * + * @param string $id + */ + public function setId(string $id) + { + $this->set("Id", $id); + } + + /** + * Memory: 数据节点的内存配置, 单位:MB + * + * @return integer|null + */ + public function getMemory(): int + { + return $this->get("Memory"); + } + + /** + * Memory: 数据节点的内存配置, 单位:MB + * + * @param int $memory + */ + public function setMemory(int $memory) + { + $this->set("Memory", $memory); + } + + /** + * DiskSpace: 数据节点的磁盘大小配置. 单位: GB + * + * @return integer|null + */ + public function getDiskSpace(): int + { + return $this->get("DiskSpace"); + } + + /** + * DiskSpace: 数据节点的磁盘大小配置. 单位: GB + * + * @param int $diskSpace + */ + public function setDiskSpace(int $diskSpace) + { + $this->set("DiskSpace", $diskSpace); + } + + /** + * SlaveCount: 数据节点的只读实例个数. + * + * @return integer|null + */ + public function getSlaveCount(): int + { + return $this->get("SlaveCount"); + } + + /** + * SlaveCount: 数据节点的只读实例个数. + * + * @param int $slaveCount + */ + public function setSlaveCount(int $slaveCount) + { + $this->set("SlaveCount", $slaveCount); + } + + /** + * State: 数据分片状态, 状态列表如下: Init: 初始化中 Fail: 安装失败 Starting: 启动中 Running: 系统正常运行中 Shutdown: 关闭中 Shutoff: 已关闭 Deleted: 已删除 Upgrading: 系统升级中 + * + * @return string|null + */ + public function getState(): string + { + return $this->get("State"); + } + + /** + * State: 数据分片状态, 状态列表如下: Init: 初始化中 Fail: 安装失败 Starting: 启动中 Running: 系统正常运行中 Shutdown: 关闭中 Shutoff: 已关闭 Deleted: 已删除 Upgrading: 系统升级中 + * + * @param string $state + */ + public function setState(string $state) + { + $this->set("State", $state); + } + + /** + * SlaveInfos: 只读实例信息列表 + * + * @return SlaveInfo[]|null + */ + public function getSlaveInfos(): array + { + $items = $this->get("SlaveInfos") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new SlaveInfo($item)); + } + return $result; + } + + /** + * SlaveInfos: 只读实例信息列表 + * + * @param SlaveInfo[] $slaveInfos + */ + public function setSlaveInfos(array $slaveInfos) + { + $result = []; + foreach ($slaveInfos as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * LastTransTaskId: 最近一次数据迁移任务id + * + * @return string|null + */ + public function getLastTransTaskId(): string + { + return $this->get("LastTransTaskId"); + } + + /** + * LastTransTaskId: 最近一次数据迁移任务id + * + * @param string $lastTransTaskId + */ + public function setLastTransTaskId(string $lastTransTaskId) + { + $this->set("LastTransTaskId", $lastTransTaskId); + } + + /** + * CreateTime: 节点的创建时间 + * + * @return string|null + */ + public function getCreateTime(): string + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 节点的创建时间 + * + * @param string $createTime + */ + public function setCreateTime(string $createTime) + { + $this->set("CreateTime", $createTime); + } +} diff --git a/src/UDDB/Models/DataSetUDDB.php b/src/UDDB/Models/DataSetUDDB.php new file mode 100644 index 00000000..593a4eb3 --- /dev/null +++ b/src/UDDB/Models/DataSetUDDB.php @@ -0,0 +1,453 @@ +get("Zone"); + } + + /** + * Zone: UDDB实例对应的可用区 + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * UDDBId: UDDB实例ID + * + * @return string|null + */ + public function getUDDBId(): string + { + return $this->get("UDDBId"); + } + + /** + * UDDBId: UDDB实例ID + * + * @param string $uddbId + */ + public function setUDDBId(string $uddbId) + { + $this->set("UDDBId", $uddbId); + } + + /** + * Name: UDDB实例名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: UDDB实例名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * DBTypeId: UDDB的数据库版本 + * + * @return string|null + */ + public function getDBTypeId(): string + { + return $this->get("DBTypeId"); + } + + /** + * DBTypeId: UDDB的数据库版本 + * + * @param string $dbTypeId + */ + public function setDBTypeId(string $dbTypeId) + { + $this->set("DBTypeId", $dbTypeId); + } + + /** + * AdminUser: 管理员帐户名,默认root + * + * @return string|null + */ + public function getAdminUser(): string + { + return $this->get("AdminUser"); + } + + /** + * AdminUser: 管理员帐户名,默认root + * + * @param string $adminUser + */ + public function setAdminUser(string $adminUser) + { + $this->set("AdminUser", $adminUser); + } + + /** + * VirtualIP: UDDB实例访问的虚IP + * + * @return string|null + */ + public function getVirtualIP(): string + { + return $this->get("VirtualIP"); + } + + /** + * VirtualIP: UDDB实例访问的虚IP + * + * @param string $virtualIP + */ + public function setVirtualIP(string $virtualIP) + { + $this->set("VirtualIP", $virtualIP); + } + + /** + * Port: UDDB实例访问的端口号 + * + * @return integer|null + */ + public function getPort(): int + { + return $this->get("Port"); + } + + /** + * Port: UDDB实例访问的端口号 + * + * @param int $port + */ + public function setPort(int $port) + { + $this->set("Port", $port); + } + + /** + * State: UDDB状态, 状态列表如下: Init: 初始化中 InitFail: 初始化失败 Starting: 启动中 Running: 系统正常运行中 Abnormal: 系统运行中, 有异常, 还能提供服务 Error: 系统运行中, 但不能正常提供服务 Shutdown: 关闭中 Shutoff: 已关闭 Deleted: 已删除 UpgradingUDDB: 升降级UDDB配置中 UpgradingDataNode: 升降级UDDB节点配置中 ChangingSlaveCount: 改变只读实例数量中 ScalingOutUDDB: 水平扩展中 + * + * @return string|null + */ + public function getState(): string + { + return $this->get("State"); + } + + /** + * State: UDDB状态, 状态列表如下: Init: 初始化中 InitFail: 初始化失败 Starting: 启动中 Running: 系统正常运行中 Abnormal: 系统运行中, 有异常, 还能提供服务 Error: 系统运行中, 但不能正常提供服务 Shutdown: 关闭中 Shutoff: 已关闭 Deleted: 已删除 UpgradingUDDB: 升降级UDDB配置中 UpgradingDataNode: 升降级UDDB节点配置中 ChangingSlaveCount: 改变只读实例数量中 ScalingOutUDDB: 水平扩展中 + * + * @param string $state + */ + public function setState(string $state) + { + $this->set("State", $state); + } + + /** + * CreateTime: UDDB实例创建时间,采用UTC计时时间戳 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: UDDB实例创建时间,采用UTC计时时间戳 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ExpiredTime: UDDB实例过期时间,采用UTC计时时间戳 + * + * @return integer|null + */ + public function getExpiredTime(): int + { + return $this->get("ExpiredTime"); + } + + /** + * ExpiredTime: UDDB实例过期时间,采用UTC计时时间戳 + * + * @param int $expiredTime + */ + public function setExpiredTime(int $expiredTime) + { + $this->set("ExpiredTime", $expiredTime); + } + + /** + * ChargeType: 付费类型,可选值如下: Year: 按年付费 Month: 按月付费 Dynamic: 按需付费(单位: 小时) Trial: 免费试用 + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费类型,可选值如下: Year: 按年付费 Month: 按月付费 Dynamic: 按需付费(单位: 小时) Trial: 免费试用 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * RouterVersion: UDDB路由节点的版本。分为三种: Trival(免费版): 2中间件节点; QPS:1.5W FellFree(标准版): 固定为4中间件节点,后续将根据业务请求量自动扩展,最多扩展到12个节点,QPS为3w - 10w; EnjoyAlone(物理机版):专享物理机,节点数让客户可选 + * + * @return string|null + */ + public function getRouterVersion(): string + { + return $this->get("RouterVersion"); + } + + /** + * RouterVersion: UDDB路由节点的版本。分为三种: Trival(免费版): 2中间件节点; QPS:1.5W FellFree(标准版): 固定为4中间件节点,后续将根据业务请求量自动扩展,最多扩展到12个节点,QPS为3w - 10w; EnjoyAlone(物理机版):专享物理机,节点数让客户可选 + * + * @param string $routerVersion + */ + public function setRouterVersion(string $routerVersion) + { + $this->set("RouterVersion", $routerVersion); + } + + /** + * RouterNodeNum: 各版本下的节点个数。体验版: 固定为2节点; 畅享版:固定为4节点(后续可通过管理API调整);专享版:物理机台数 + * + * @return integer|null + */ + public function getRouterNodeNum(): int + { + return $this->get("RouterNodeNum"); + } + + /** + * RouterNodeNum: 各版本下的节点个数。体验版: 固定为2节点; 畅享版:固定为4节点(后续可通过管理API调整);专享版:物理机台数 + * + * @param int $routerNodeNum + */ + public function setRouterNodeNum(int $routerNodeNum) + { + $this->set("RouterNodeNum", $routerNodeNum); + } + + /** + * RefQps: 参考QPS。 免费版: 15000; 畅享版: 30000 - 100000 (根据节点数而定); 专享版: 节点数 * 10w qps + * + * @return integer|null + */ + public function getRefQps(): int + { + return $this->get("RefQps"); + } + + /** + * RefQps: 参考QPS。 免费版: 15000; 畅享版: 30000 - 100000 (根据节点数而定); 专享版: 节点数 * 10w qps + * + * @param int $refQps + */ + public function setRefQps(int $refQps) + { + $this->set("RefQps", $refQps); + } + + /** + * DataNodeCount: 数据节点个数 + * + * @return integer|null + */ + public function getDataNodeCount(): int + { + return $this->get("DataNodeCount"); + } + + /** + * DataNodeCount: 数据节点个数 + * + * @param int $dataNodeCount + */ + public function setDataNodeCount(int $dataNodeCount) + { + $this->set("DataNodeCount", $dataNodeCount); + } + + /** + * DataNodeMemory: 数据节点的内存配置, 单位:MB + * + * @return integer|null + */ + public function getDataNodeMemory(): int + { + return $this->get("DataNodeMemory"); + } + + /** + * DataNodeMemory: 数据节点的内存配置, 单位:MB + * + * @param int $dataNodeMemory + */ + public function setDataNodeMemory(int $dataNodeMemory) + { + $this->set("DataNodeMemory", $dataNodeMemory); + } + + /** + * DataNodeDiskSpace: 数据节点的磁盘大小配置. 单位: GB + * + * @return integer|null + */ + public function getDataNodeDiskSpace(): int + { + return $this->get("DataNodeDiskSpace"); + } + + /** + * DataNodeDiskSpace: 数据节点的磁盘大小配置. 单位: GB + * + * @param int $dataNodeDiskSpace + */ + public function setDataNodeDiskSpace(int $dataNodeDiskSpace) + { + $this->set("DataNodeDiskSpace", $dataNodeDiskSpace); + } + + /** + * DataNodeSlaveCount: 每个数据节点的只读实例个数. + * + * @return integer|null + */ + public function getDataNodeSlaveCount(): int + { + return $this->get("DataNodeSlaveCount"); + } + + /** + * DataNodeSlaveCount: 每个数据节点的只读实例个数. + * + * @param int $dataNodeSlaveCount + */ + public function setDataNodeSlaveCount(int $dataNodeSlaveCount) + { + $this->set("DataNodeSlaveCount", $dataNodeSlaveCount); + } + + /** + * DataNodeList: UDDB实例的数据节点的信息列表 + * + * @return DataNodeInfo[]|null + */ + public function getDataNodeList(): array + { + $items = $this->get("DataNodeList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new DataNodeInfo($item)); + } + return $result; + } + + /** + * DataNodeList: UDDB实例的数据节点的信息列表 + * + * @param DataNodeInfo[] $dataNodeList + */ + public function setDataNodeList(array $dataNodeList) + { + $result = []; + foreach ($dataNodeList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * InstanceMode: 存储节点的高可用模式, 分为高可用UDB(HA)和普通UDB(Normal),如果不填, 则默认为HA + * + * @return string|null + */ + public function getInstanceMode(): string + { + return $this->get("InstanceMode"); + } + + /** + * InstanceMode: 存储节点的高可用模式, 分为高可用UDB(HA)和普通UDB(Normal),如果不填, 则默认为HA + * + * @param string $instanceMode + */ + public function setInstanceMode(string $instanceMode) + { + $this->set("InstanceMode", $instanceMode); + } + + /** + * InstanceType: 存储节点和只读实例的磁盘类型。分为:SSD磁盘(SATA_SSD)或普通磁盘(Normal)。 如果不填,则默认为SATA_SSD + * + * @return string|null + */ + public function getInstanceType(): string + { + return $this->get("InstanceType"); + } + + /** + * InstanceType: 存储节点和只读实例的磁盘类型。分为:SSD磁盘(SATA_SSD)或普通磁盘(Normal)。 如果不填,则默认为SATA_SSD + * + * @param string $instanceType + */ + public function setInstanceType(string $instanceType) + { + $this->set("InstanceType", $instanceType); + } +} diff --git a/src/UDDB/Models/PriceDetailInfo.php b/src/UDDB/Models/PriceDetailInfo.php new file mode 100644 index 00000000..c75d1aab --- /dev/null +++ b/src/UDDB/Models/PriceDetailInfo.php @@ -0,0 +1,84 @@ +get("MiddlewarePrice"); + } + + /** + * MiddlewarePrice: 中间件路由节点费用 + * + * @param float $middlewarePrice + */ + public function setMiddlewarePrice(float $middlewarePrice) + { + $this->set("MiddlewarePrice", $middlewarePrice); + } + + /** + * DataNodePrice: 存储节点费用 + * + * @return float|null + */ + public function getDataNodePrice(): float + { + return $this->get("DataNodePrice"); + } + + /** + * DataNodePrice: 存储节点费用 + * + * @param float $dataNodePrice + */ + public function setDataNodePrice(float $dataNodePrice) + { + $this->set("DataNodePrice", $dataNodePrice); + } + + /** + * DataNodeSlavePrice: 只读实例费用 + * + * @return float|null + */ + public function getDataNodeSlavePrice(): float + { + return $this->get("DataNodeSlavePrice"); + } + + /** + * DataNodeSlavePrice: 只读实例费用 + * + * @param float $dataNodeSlavePrice + */ + public function setDataNodeSlavePrice(float $dataNodeSlavePrice) + { + $this->set("DataNodeSlavePrice", $dataNodeSlavePrice); + } +} diff --git a/src/UDDB/Models/PriceInfo.php b/src/UDDB/Models/PriceInfo.php new file mode 100644 index 00000000..ce9666e2 --- /dev/null +++ b/src/UDDB/Models/PriceInfo.php @@ -0,0 +1,84 @@ +get("MiddlewarePrice"); + } + + /** + * MiddlewarePrice: 中间件路由节点费用 + * + * @param float $middlewarePrice + */ + public function setMiddlewarePrice(float $middlewarePrice) + { + $this->set("MiddlewarePrice", $middlewarePrice); + } + + /** + * DataNodePrice: 存储节点费用 + * + * @return float|null + */ + public function getDataNodePrice(): float + { + return $this->get("DataNodePrice"); + } + + /** + * DataNodePrice: 存储节点费用 + * + * @param float $dataNodePrice + */ + public function setDataNodePrice(float $dataNodePrice) + { + $this->set("DataNodePrice", $dataNodePrice); + } + + /** + * DataNodeSlavePrice: 只读实例费用 + * + * @return float|null + */ + public function getDataNodeSlavePrice(): float + { + return $this->get("DataNodeSlavePrice"); + } + + /** + * DataNodeSlavePrice: 只读实例费用 + * + * @param float $dataNodeSlavePrice + */ + public function setDataNodeSlavePrice(float $dataNodeSlavePrice) + { + $this->set("DataNodeSlavePrice", $dataNodeSlavePrice); + } +} diff --git a/src/UDDB/Models/SlaveInfo.php b/src/UDDB/Models/SlaveInfo.php new file mode 100644 index 00000000..61f59b9e --- /dev/null +++ b/src/UDDB/Models/SlaveInfo.php @@ -0,0 +1,84 @@ +get("Id"); + } + + /** + * Id: 只读实例ID + * + * @param string $id + */ + public function setId(string $id) + { + $this->set("Id", $id); + } + + /** + * DataNodeId: 对应数据节点的ID + * + * @return string|null + */ + public function getDataNodeId(): string + { + return $this->get("DataNodeId"); + } + + /** + * DataNodeId: 对应数据节点的ID + * + * @param string $dataNodeId + */ + public function setDataNodeId(string $dataNodeId) + { + $this->set("DataNodeId", $dataNodeId); + } + + /** + * State: 只读实例状态, 状态列表如下: Init: 初始化中 Fail: 安装失败 Starting: 启动中 Running: 系统正常运行中 Shutdown: 关闭中 Shutoff: 已关闭 Deleted: 已删除 Upgrading: 系统升级中 + * + * @return string|null + */ + public function getState(): string + { + return $this->get("State"); + } + + /** + * State: 只读实例状态, 状态列表如下: Init: 初始化中 Fail: 安装失败 Starting: 启动中 Running: 系统正常运行中 Shutdown: 关闭中 Shutoff: 已关闭 Deleted: 已删除 Upgrading: 系统升级中 + * + * @param string $state + */ + public function setState(string $state) + { + $this->set("State", $state); + } +} diff --git a/src/UDDB/UDDBClient.php b/src/UDDB/UDDBClient.php new file mode 100644 index 00000000..4fefe8d8 --- /dev/null +++ b/src/UDDB/UDDBClient.php @@ -0,0 +1,513 @@ + (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "UDDBId" => (string) UDDB实例Id + * "NewName" => (string) 名称 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function changeUDDBInstanceName(ChangeUDDBInstanceNameRequest $request = null): ChangeUDDBInstanceNameResponse + { + $resp = $this->invoke($request); + return new ChangeUDDBInstanceNameResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ChangeUDDBSlaveCount - 改变分布式数据库数据节点的只读实例个数 +每一个UDDB的数据节点负责处理所有的写入请求。与此同时,每一个数据节点可以配置若干个该节点的只读实例。当主节点的数据写入完毕后,只读实例把这次的写入操作进行更新,从而和数据节点保持一致。 +只读实例可以使得数据由多份复制,在数据节点和只读实例之间,可以做请求的读写分离, 也就是说, 主节点写入数据之后, 数据的读操作可以由数据只读实例进行分担, 这样减少主节点的压力, 增加性能 +当改变了数据节点的只读实例个数之后,对于现有的和以后的每一个数据节点都采用这个配置。如果UDDB实例有现有的数据节点, 那么它会根据新配置的参数,自动创建或删除数据节点的只读实例 +如下状态的UDDB实例可以进行这个操作: +Running: 系统正常运行中 +当请求返回成功之后,UDDB实例的状态变成"ChangingSlaveCount"; 如果返回失败, UDDB实例状态保持不变 当UDDB更改数据分区的只读实例个数成功之后, UDDB实例的状态变成"Running"(正常运行中); 如果更改过程中出现异常, 状态变成"Abnormal"(异常运行中)或者"Error"(运行错误) + * + * See also: https://docs.ucloud.cn/api/UDDB-api/change_uddb_slave_count + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "UDDBId" => (string) UDDB资源id + * "SlaveCount" => (string) 每个数据节点的只读实例个数, 取值必须>=0 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function changeUDDBSlaveCount(ChangeUDDBSlaveCountRequest $request = null): ChangeUDDBSlaveCountResponse + { + $resp = $this->invoke($request); + return new ChangeUDDBSlaveCountResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUDDBInstance - 创建创建分布式数据库UDDB实例, 简称UDDB实例。 + * + * See also: https://docs.ucloud.cn/api/UDDB-api/create_uddb_instance + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "DBTypeId" => (string) UDDB的数据库版本,支持版本如下:mysql-5.6 mysql-5.7. 如果不填,则默认为mysql-5.6 + * "Name" => (string) 实例名称,至少6位 + * "AdminPassword" => (string) 管理员密码, 密码需要使用base64加密 + * "RouterVersion" => (string) UDDB路由节点的版本。分为三种: Trival(免费版): 2中间件节点; QPS:1.5W FellFree(标准版): 固定为4中间件节点,后续将根据业务请求量自动扩展,最多扩展到12个节点,QPS为3w - 10w; EnjoyAlone(物理机版):专享物理机,节点数让客户可选 + * "RouterNodeNum" => (integer) 其他版本:该参数可不填;专享版:物理机台数 + * "DataNodeCount" => (integer) 初始的数据节点个数 取值必须>0. + * "DataNodeMemory" => (integer) 新的数据节点的内存配置, 单位:MB 具体数值参考UDB的内存取值. + * "DataNodeDiskSpace" => (integer) 新的数据节点的磁盘大小配置. 单位: GB 具体数值参考UDB的磁盘大小取值. + * "InstanceMode" => (string) 存储节点的高可用模式, 分为高可用UDB(HA)和普通UDB(Normal),如果不填, 则默认为HA + * "InstanceType" => (string) 存储节点和只读实例的磁盘类型。分为:SSD磁盘(SATA_SSD)或普通磁盘(Normal)。 如果不填,则默认为SATA_SSD + * "ChargeType" => (string) 付费类型,可选值如下:Year: 按年付费 Month: 按月付费 Dynamic: 按需付费(单位: 小时) Trial: 免费试用 默认值为: Dynamic + * "Quantity" => (integer) 购买时长,默认值1 + * "AdminUser" => (string) 管理员帐户名,默认root + * "Port" => (integer) 端口号,mysql默认端口为3306 + * "DataNodeSlaveCount" => (integer) 每个数据节点的只读实例个数, 取值必须>=0. 默认取值为0. + * "VPCId" => (string) VPC的ID + * "SubnetId" => (string) 子网ID + * "CouponId" => (string) 使用的代金券id + * ] + * + * Outputs: + * + * $outputs = [ + * "UDDBId" => (string) UDDB实例ID + * ] + * + * @throws UCloudException + */ + public function createUDDBInstance(CreateUDDBInstanceRequest $request = null): CreateUDDBInstanceResponse + { + $resp = $this->invoke($request); + return new CreateUDDBInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteUDDBInstance - 删除UDDB实例。 +如下状态的UDDB实例可以进行这个操作: +InitFail: 初始化失败 +Shutoff: 已关闭 +当请求返回成功之后,UDDB实例就已经被删除, 列表上看不到对应的UDDB实例 + * + * See also: https://docs.ucloud.cn/api/UDDB-api/delete_uddb_instance + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "UDDBId" => (string) UDDB实例ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteUDDBInstance(DeleteUDDBInstanceRequest $request = null): DeleteUDDBInstanceResponse + { + $resp = $this->invoke($request); + return new DeleteUDDBInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDDBInstance - 获取分布式数据库UDDB的详细信息 + * + * See also: https://docs.ucloud.cn/api/UDDB-api/describe_uddb_instance + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "UDDBId" => (string) UDDB实例ID + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) UDDB实例信息列表, 参见DataSetUDDB项定义[ + * [ + * "Zone" => (string) UDDB实例对应的可用区 + * "UDDBId" => (string) UDDB实例ID + * "Name" => (string) UDDB实例名称 + * "DBTypeId" => (string) UDDB的数据库版本 + * "AdminUser" => (string) 管理员帐户名,默认root + * "VirtualIP" => (string) UDDB实例访问的虚IP + * "Port" => (integer) UDDB实例访问的端口号 + * "State" => (string) UDDB状态, 状态列表如下: Init: 初始化中 InitFail: 初始化失败 Starting: 启动中 Running: 系统正常运行中 Abnormal: 系统运行中, 有异常, 还能提供服务 Error: 系统运行中, 但不能正常提供服务 Shutdown: 关闭中 Shutoff: 已关闭 Deleted: 已删除 UpgradingUDDB: 升降级UDDB配置中 UpgradingDataNode: 升降级UDDB节点配置中 ChangingSlaveCount: 改变只读实例数量中 ScalingOutUDDB: 水平扩展中 + * "CreateTime" => (integer) UDDB实例创建时间,采用UTC计时时间戳 + * "ExpiredTime" => (integer) UDDB实例过期时间,采用UTC计时时间戳 + * "ChargeType" => (string) 付费类型,可选值如下: Year: 按年付费 Month: 按月付费 Dynamic: 按需付费(单位: 小时) Trial: 免费试用 + * "RouterVersion" => (string) UDDB路由节点的版本。分为三种: Trival(免费版): 2中间件节点; QPS:1.5W FellFree(标准版): 固定为4中间件节点,后续将根据业务请求量自动扩展,最多扩展到12个节点,QPS为3w - 10w; EnjoyAlone(物理机版):专享物理机,节点数让客户可选 + * "RouterNodeNum" => (integer) 各版本下的节点个数。体验版: 固定为2节点; 畅享版:固定为4节点(后续可通过管理API调整);专享版:物理机台数 + * "RefQps" => (integer) 参考QPS。 免费版: 15000; 畅享版: 30000 - 100000 (根据节点数而定); 专享版: 节点数 * 10w qps + * "DataNodeCount" => (integer) 数据节点个数 + * "DataNodeMemory" => (integer) 数据节点的内存配置, 单位:MB + * "DataNodeDiskSpace" => (integer) 数据节点的磁盘大小配置. 单位: GB + * "DataNodeSlaveCount" => (integer) 每个数据节点的只读实例个数. + * "DataNodeList" => (array) UDDB实例的数据节点的信息列表[ + * [ + * "Id" => (string) 数据节点ID + * "Memory" => (integer) 数据节点的内存配置, 单位:MB + * "DiskSpace" => (integer) 数据节点的磁盘大小配置. 单位: GB + * "SlaveCount" => (integer) 数据节点的只读实例个数. + * "State" => (string) 数据分片状态, 状态列表如下: Init: 初始化中 Fail: 安装失败 Starting: 启动中 Running: 系统正常运行中 Shutdown: 关闭中 Shutoff: 已关闭 Deleted: 已删除 Upgrading: 系统升级中 + * "SlaveInfos" => (array) 只读实例信息列表[ + * [ + * "Id" => (string) 只读实例ID + * "DataNodeId" => (string) 对应数据节点的ID + * "State" => (string) 只读实例状态, 状态列表如下: Init: 初始化中 Fail: 安装失败 Starting: 启动中 Running: 系统正常运行中 Shutdown: 关闭中 Shutoff: 已关闭 Deleted: 已删除 Upgrading: 系统升级中 + * ] + * ] + * "LastTransTaskId" => (string) 最近一次数据迁移任务id + * "CreateTime" => (string) 节点的创建时间 + * ] + * ] + * "InstanceMode" => (string) 存储节点的高可用模式, 分为高可用UDB(HA)和普通UDB(Normal),如果不填, 则默认为HA + * "InstanceType" => (string) 存储节点和只读实例的磁盘类型。分为:SSD磁盘(SATA_SSD)或普通磁盘(Normal)。 如果不填,则默认为SATA_SSD + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeUDDBInstance(DescribeUDDBInstanceRequest $request = null): DescribeUDDBInstanceResponse + { + $resp = $this->invoke($request); + return new DescribeUDDBInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDDBInstancePrice - 获取分布式数据库UDDB价格 + * + * See also: https://docs.ucloud.cn/api/UDDB-api/describe_uddb_instance_price + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "RouterVersion" => (string) UDDB路由节点的版本。分为三种: Trival(免费版): 2中间件节点; QPS:1.5WFeelFree(标准版): 固定为4中间件节点,后续将根据业务请求量自动扩展,最多扩展到12个节点,QPS为3w - 10w;EnjoyAlone(物理机版):专享物理机,节点数让客户可选 + * "RouterNodeNum" => (integer) 其他版本:该参数可不填;专享版:物理机节点个数。一台物理机有2个节点 + * "DataNodeCount" => (integer) 初始的数据节点个数 取值必须>0. + * "DataNodeMemory" => (string) 新的数据节点的内存配置, 单位:MB 具体数值参考UDB的内存取值. + * "DataNodeDiskSpace" => (integer) 新的数据节点的磁盘大小配置. 单位: GB 具体数值参考UDB的磁盘大小取值. + * "ChargeType" => (string) 付费类型,可选值如下: Year: 按年付费 Month: 按月付费 Dynamic: 按需付费(单位: 小时) Trial: 免费试用 默认值为: Dynamic + * "Quantity" => (integer) 购买时长,默认值1 + * "DataNodeSlaveCount" => (integer) 每个数据节点的只读实例个数, 取值必须>=0. 默认取值为0. + * "InstanceMode" => (string) 存储节点的高可用模式, 分为高可用UDB(HA)和普通UDB(Normal),如果不填, 则默认为HA + * "InstanceType" => (string) 存储节点和只读实例的磁盘类型。分为:SSD磁盘(SATA_SSD)或普通磁盘(Normal)。 如果不填,则默认为SATA_SSD + * ] + * + * Outputs: + * + * $outputs = [ + * "PriceInfo" => (object) 价格明细, 参考PriceDetailInfo对象定义[ + * "MiddlewarePrice" => (number) 中间件路由节点费用 + * "DataNodePrice" => (number) 存储节点费用 + * "DataNodeSlavePrice" => (number) 只读实例费用 + * ] + * ] + * + * @throws UCloudException + */ + public function describeUDDBInstancePrice(DescribeUDDBInstancePriceRequest $request = null): DescribeUDDBInstancePriceResponse + { + $resp = $this->invoke($request); + return new DescribeUDDBInstancePriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDDBInstanceUpgradePrice - 升级UDDB时,获取升级后的价格 + * + * See also: https://docs.ucloud.cn/api/UDDB-api/describe_uddb_instance_upgrade_price + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "UDDBId" => (string) UDDB实例ID + * "RouterVersion" => (string) UDDB路由节点的版本。分为三种: Trival(免费版): 2中间件节点; QPS:1.5WFeelFree(标准版): 固定为4中间件节点,后续将根据业务请求量自动扩展,最多扩展到12个节点,QPS为3w - 10w;EnjoyAlone(物理机版):专享物理机,节点数让客户可选 + * "RouterNodeNum" => (integer) 其他版本:该参数可不填;专享版:物理机节点的个数。一台物理机有2个节点 + * "DataNodeCount" => (integer) 新的数据节点个数 取值必须>0. + * "DataNodeMemory" => (integer) 新的数据节点的内存配置, 单位:MB 具体数值参考UDB的内存取值. + * "DataNodeDiskSpace" => (integer) 新的数据节点的磁盘大小配置. 单位: GB 具体数值参考UDB的磁盘大小取值. + * "DataNodeSlaveCount" => (integer) 每个数据节点的只读实例个数, 取值必须>=0. + * "InstanceMode" => (string) 存储节点的高可用模式, 分为高可用UDB(HA)和普通UDB(Normal),如果不填, 则默认为HA + * "InstanceType" => (string) 存储节点和只读实例的磁盘类型。分为:SSD磁盘(SATA_SSD)或普通磁盘(Normal)。 如果不填,则默认为SATA_SSD + * ] + * + * Outputs: + * + * $outputs = [ + * "PriceInfo" => (object) 价格明细, 参考PriceInfo对象定义[ + * "MiddlewarePrice" => (number) 中间件路由节点费用 + * "DataNodePrice" => (number) 存储节点费用 + * "DataNodeSlavePrice" => (number) 只读实例费用 + * ] + * ] + * + * @throws UCloudException + */ + public function describeUDDBInstanceUpgradePrice(DescribeUDDBInstanceUpgradePriceRequest $request = null): DescribeUDDBInstanceUpgradePriceResponse + { + $resp = $this->invoke($request); + return new DescribeUDDBInstanceUpgradePriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * RestartUDDBInstance - 重启UDDB实例,开始提供服务。 + +如下状态的UDDB实例可以进行这个操作: + +Running: 正常运行中 +Abnormal: 异常运行中 +当请求返回成功之后,UDDB实例的状态变成"Starting"(启动中); 如果返回失败, UDDB实例状态保持不变 UDDB实例在重启过程中, 当UDDB实例启动成功之后, UDDB实例的状态变成"Running"(正常运行中); 如果启动过程中出现异常, 状态变成"Abnormal"(异常运行中), 或者"Shutoff"(已关闭 + * + * See also: https://docs.ucloud.cn/api/UDDB-api/restart_uddb_instance + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "UDDBId" => (string) UDDB实例ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function restartUDDBInstance(RestartUDDBInstanceRequest $request = null): RestartUDDBInstanceResponse + { + $resp = $this->invoke($request); + return new RestartUDDBInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * StartUDDBInstance - 启动UDDB实例,开始提供服务。 + +如下状态的UDDB实例可以进行这个操作: + +Shutoff: 已关闭 +当请求返回成功之后,UDDB实例的状态变成"Starting"(启动中); 如果返回失败, UDDB实例状态保持不变 UDDB实例在启动过程中, 当UDDB实例启动成功之后, UDDB实例的状态变成"Running"(正常运行中); 如果启动过程中出现异常, 状态变成"Abnormal"(异常运行中), 或者"Shutoff"(已关闭) + * + * See also: https://docs.ucloud.cn/api/UDDB-api/start_uddb_instance + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "UDDBId" => (string) UDDB实例ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function startUDDBInstance(StartUDDBInstanceRequest $request = null): StartUDDBInstanceResponse + { + $resp = $this->invoke($request); + return new StartUDDBInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * StopUDDBInstance - 关闭UDDB实例,停止提供服务。 + +如下状态的UDDB实例可以进行这个操作: + +Running: 正常运行中 +Abnormal: 异常运行中 +当请求返回成功之后,UDDB实例的状态变成"Shutdown"(关闭中); 如果返回失败, UDDB实例状态保持不变 UDDB实例在关闭过程中, 当UDDB实例关闭成功之后, UDDB实例的状态变成"Shutoff"(已关闭); 如果关闭过程中出现异常, 根据UDDB实例的情况, 状态变成"Abnormal"(异常运行中), 或者"Running"(正常运行中) + * + * See also: https://docs.ucloud.cn/api/UDDB-api/stop_uddb_instance + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "UDDBId" => (string) UDDB实例ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function stopUDDBInstance(StopUDDBInstanceRequest $request = null): StopUDDBInstanceResponse + { + $resp = $this->invoke($request); + return new StopUDDBInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpgradeUDDBDataNode - 升降级分布式数据库数据节点的配置, 提高/降低数据节点的数据容量和内存 + +所有数据节点以及其所挂载的只读实例的配置都受到影响 + +升降级数据节点的配置之后之后, 会按照数据节点新的磁盘和内存大小重新计费 + +如下状态的数据节点实例可以进行这个操作: + +Shutoff: 已关闭 +当请求返回成功之后,UDDB实例的状态变成"UpgradingDataNode",相关数据节点的状态变成"Upgrading"; 如果返回失败, UDDB实例状态保持不变 当UDDB实例升级结束之后, UDDB实例的状态变成"Shutoff" + * + * See also: https://docs.ucloud.cn/api/UDDB-api/upgrade_uddb_data_node + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "UDDBId" => (string) UDDB实例ID + * "DataNodeMemory" => (integer) 新的数据节点的内存配置, 单位:MB 具体数值参考UDB的内存取值 + * "DataNodeDiskSpace" => (integer) 新的数据节点的磁盘大小配置. 单位: GB 具体数值参考UDB的磁盘大小取值. + * "CouponId" => (string) 使用的代金券id + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function upgradeUDDBDataNode(UpgradeUDDBDataNodeRequest $request = null): UpgradeUDDBDataNodeResponse + { + $resp = $this->invoke($request); + return new UpgradeUDDBDataNodeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpgradeUDDBInstance - 升降级分布式数据库中间件的配置, 提高/降低请求处理的并发性 + +修改请求处理节点个数之后, 按照所有请求处理节点的总内存容量和CPU核数重新计费 + +如下状态的UDDB实例可以进行这个操作: + +Running: 系统正常运行中 +当请求返回成功之后,UDDB实例的状态变成"UpgradingUDDB"; 如果返回失败, UDDB实例状态保持不变 当UDDB实例升级成功之后, UDDB实例的状态变成"Running"; 如果更改过程中出现异常, 状态变成"Abnormal", 或者"Error" + * + * See also: https://docs.ucloud.cn/api/UDDB-api/upgrade_uddb_instance + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "UDDBId" => (string) UDDB实例ID + * "RouterVersion" => (string) UDDB路由节点的版本。分为三种: Trival(免费版): 2中间件节点; QPS:1.5W FellFree(标准版): 固定为4中间件节点,后续将根据业务请求量自动扩展,最多扩展到12个节点,QPS为3w - 10w; EnjoyAlone(物理机版):专享物理机,节点数让客户可选 + * "RouterNodeNum" => (integer) 其他版本:该参数可不填;专享版:物理机台数 + * "CouponId" => (string) 使用的代金券id + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function upgradeUDDBInstance(UpgradeUDDBInstanceRequest $request = null): UpgradeUDDBInstanceResponse + { + $resp = $this->invoke($request); + return new UpgradeUDDBInstanceResponse($resp->toArray(), $resp->getRequestId()); + } +} diff --git a/src/UDPN/Apis/AllocateUDPNRequest.php b/src/UDPN/Apis/AllocateUDPNRequest.php new file mode 100644 index 00000000..085aa494 --- /dev/null +++ b/src/UDPN/Apis/AllocateUDPNRequest.php @@ -0,0 +1,212 @@ + "AllocateUDPN"]); + $this->markRequired("Peer1"); + $this->markRequired("Peer2"); + $this->markRequired("Bandwidth"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Peer1: 专线可用区1,支持地域:北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 洛杉矶:us-ca, 华盛顿:us-ws, 东京:jpn-tky + * + * @return string|null + */ + public function getPeer1(): string + { + return $this->get("Peer1"); + } + + /** + * Peer1: 专线可用区1,支持地域:北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 洛杉矶:us-ca, 华盛顿:us-ws, 东京:jpn-tky + * + * @param string $peer1 + */ + public function setPeer1(string $peer1) + { + $this->set("Peer1", $peer1); + } + + /** + * Peer2: 专线可用区2,支持地域:北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 洛杉矶:us-ca, 华盛顿:us-ws, 东京:jpn-tky + * + * @return string|null + */ + public function getPeer2(): string + { + return $this->get("Peer2"); + } + + /** + * Peer2: 专线可用区2,支持地域:北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 洛杉矶:us-ca, 华盛顿:us-ws, 东京:jpn-tky + * + * @param string $peer2 + */ + public function setPeer2(string $peer2) + { + $this->set("Peer2", $peer2); + } + + /** + * Bandwidth: 带宽 + * + * @return integer|null + */ + public function getBandwidth(): int + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: 带宽 + * + * @param int $bandwidth + */ + public function setBandwidth(int $bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * ChargeType: 计费类型,枚举值为: Year,按年付费; Month,按月付费; Dynamic,按需付费 + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费类型,枚举值为: Year,按年付费; Month,按月付费; Dynamic,按需付费 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 计费时长,默认 1 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 计费时长,默认 1 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * PayMode: 计费模式. 枚举值:"Traffic", 流量计费模式; 否则 带宽计费模式; + * + * @return string|null + */ + public function getPayMode(): string + { + return $this->get("PayMode"); + } + + /** + * PayMode: 计费模式. 枚举值:"Traffic", 流量计费模式; 否则 带宽计费模式; + * + * @param string $payMode + */ + public function setPayMode(string $payMode) + { + $this->set("PayMode", $payMode); + } + + /** + * CouponId: 代金劵 + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 代金劵 + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UDPN/Apis/AllocateUDPNResponse.php b/src/UDPN/Apis/AllocateUDPNResponse.php new file mode 100644 index 00000000..ca63fe83 --- /dev/null +++ b/src/UDPN/Apis/AllocateUDPNResponse.php @@ -0,0 +1,44 @@ +get("UDPNId"); + } + + /** + * UDPNId: 资源名称 + * + * @param string $udpnId + */ + public function setUDPNId(string $udpnId) + { + $this->set("UDPNId", $udpnId); + } +} diff --git a/src/UDPN/Apis/DescribeUDPNRequest.php b/src/UDPN/Apis/DescribeUDPNRequest.php new file mode 100644 index 00000000..7b3ba557 --- /dev/null +++ b/src/UDPN/Apis/DescribeUDPNRequest.php @@ -0,0 +1,129 @@ + "DescribeUDPN"]); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UDPNId: 申请到的 UDPN 资源 ID。若为空,则查询该用户在机房所有的专线信息。非默认项目资源,需填写ProjectId + * + * @return string|null + */ + public function getUDPNId(): string + { + return $this->get("UDPNId"); + } + + /** + * UDPNId: 申请到的 UDPN 资源 ID。若为空,则查询该用户在机房所有的专线信息。非默认项目资源,需填写ProjectId + * + * @param string $udpnId + */ + public function setUDPNId(string $udpnId) + { + $this->set("UDPNId", $udpnId); + } + + /** + * Offset: 列表起始位置偏移量,默认为 0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 列表起始位置偏移量,默认为 0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 返回数据长度,默认为 20 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数据长度,默认为 20 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/UDPN/Apis/DescribeUDPNResponse.php b/src/UDPN/Apis/DescribeUDPNResponse.php new file mode 100644 index 00000000..dfe623a5 --- /dev/null +++ b/src/UDPN/Apis/DescribeUDPNResponse.php @@ -0,0 +1,74 @@ +get("TotalCount"); + } + + /** + * TotalCount: 查询到的总数量 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * DataSet: UDPN详情 + * + * @return UDPNData[]|null + */ + public function getDataSet(): array + { + $items = $this->get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UDPNData($item)); + } + return $result; + } + + /** + * DataSet: UDPN详情 + * + * @param UDPNData[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UDPN/Apis/GetUDPNLineListRequest.php b/src/UDPN/Apis/GetUDPNLineListRequest.php new file mode 100644 index 00000000..23a06810 --- /dev/null +++ b/src/UDPN/Apis/GetUDPNLineListRequest.php @@ -0,0 +1,69 @@ + "GetUDPNLineList"]); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } +} diff --git a/src/UDPN/Apis/GetUDPNLineListResponse.php b/src/UDPN/Apis/GetUDPNLineListResponse.php new file mode 100644 index 00000000..29a794a4 --- /dev/null +++ b/src/UDPN/Apis/GetUDPNLineListResponse.php @@ -0,0 +1,74 @@ +get("TotalCount"); + } + + /** + * TotalCount: DataSet中的元素个数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * DataSet: 当前支持的专线线路详细信息,详见UDPNLineSet + * + * @return UDPNLineSet[]|null + */ + public function getDataSet(): array + { + $items = $this->get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UDPNLineSet($item)); + } + return $result; + } + + /** + * DataSet: 当前支持的专线线路详细信息,详见UDPNLineSet + * + * @param UDPNLineSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UDPN/Apis/GetUDPNPriceRequest.php b/src/UDPN/Apis/GetUDPNPriceRequest.php new file mode 100644 index 00000000..ae35549e --- /dev/null +++ b/src/UDPN/Apis/GetUDPNPriceRequest.php @@ -0,0 +1,172 @@ + "GetUDPNPrice"]); + $this->markRequired("Peer1"); + $this->markRequired("Peer2"); + $this->markRequired("Bandwidth"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Peer1: 专线可用区1,支持地域:北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 洛杉矶:us-la, 华盛顿:us-ws, 东京:jpn-tky + * + * @return string|null + */ + public function getPeer1(): string + { + return $this->get("Peer1"); + } + + /** + * Peer1: 专线可用区1,支持地域:北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 洛杉矶:us-la, 华盛顿:us-ws, 东京:jpn-tky + * + * @param string $peer1 + */ + public function setPeer1(string $peer1) + { + $this->set("Peer1", $peer1); + } + + /** + * Peer2: 专线可用区2,支持地域:北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 洛杉矶:us-la, 华盛顿:us-ws, 东京:jpn-tky + * + * @return string|null + */ + public function getPeer2(): string + { + return $this->get("Peer2"); + } + + /** + * Peer2: 专线可用区2,支持地域:北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 洛杉矶:us-la, 华盛顿:us-ws, 东京:jpn-tky + * + * @param string $peer2 + */ + public function setPeer2(string $peer2) + { + $this->set("Peer2", $peer2); + } + + /** + * Bandwidth: 带宽信息 + * + * @return integer|null + */ + public function getBandwidth(): int + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: 带宽信息 + * + * @param int $bandwidth + */ + public function setBandwidth(int $bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * ChargeType: 计费类型 + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费类型 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时长 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * PayMode: PayMode,枚举值,Bandwidth:带宽;Traffic:流量 默认不填写:带宽 + * + * @return string|null + */ + public function getPayMode(): string + { + return $this->get("PayMode"); + } + + /** + * PayMode: PayMode,枚举值,Bandwidth:带宽;Traffic:流量 默认不填写:带宽 + * + * @param string $payMode + */ + public function setPayMode(string $payMode) + { + $this->set("PayMode", $payMode); + } +} diff --git a/src/UDPN/Apis/GetUDPNPriceResponse.php b/src/UDPN/Apis/GetUDPNPriceResponse.php new file mode 100644 index 00000000..a06d2a81 --- /dev/null +++ b/src/UDPN/Apis/GetUDPNPriceResponse.php @@ -0,0 +1,64 @@ +get("PurchaseValue"); + } + + /** + * PurchaseValue: 资源有效期 unix 时间戳 + * + * @param int $purchaseValue + */ + public function setPurchaseValue(int $purchaseValue) + { + $this->set("PurchaseValue", $purchaseValue); + } + + /** + * Price: 专线价格 + * + * @return float|null + */ + public function getPrice(): float + { + return $this->get("Price"); + } + + /** + * Price: 专线价格 + * + * @param float $price + */ + public function setPrice(float $price) + { + $this->set("Price", $price); + } +} diff --git a/src/UDPN/Apis/GetUDPNUpgradePriceRequest.php b/src/UDPN/Apis/GetUDPNUpgradePriceRequest.php new file mode 100644 index 00000000..2c13461f --- /dev/null +++ b/src/UDPN/Apis/GetUDPNUpgradePriceRequest.php @@ -0,0 +1,111 @@ + "GetUDPNUpgradePrice"]); + $this->markRequired("UDPNId"); + $this->markRequired("Bandwidth"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UDPNId: 专线带宽资源 Id + * + * @return string|null + */ + public function getUDPNId(): string + { + return $this->get("UDPNId"); + } + + /** + * UDPNId: 专线带宽资源 Id + * + * @param string $udpnId + */ + public function setUDPNId(string $udpnId) + { + $this->set("UDPNId", $udpnId); + } + + /** + * Bandwidth: 带宽 + * + * @return integer|null + */ + public function getBandwidth(): int + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: 带宽 + * + * @param int $bandwidth + */ + public function setBandwidth(int $bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } +} diff --git a/src/UDPN/Apis/GetUDPNUpgradePriceResponse.php b/src/UDPN/Apis/GetUDPNUpgradePriceResponse.php new file mode 100644 index 00000000..7db7deeb --- /dev/null +++ b/src/UDPN/Apis/GetUDPNUpgradePriceResponse.php @@ -0,0 +1,44 @@ +get("Price"); + } + + /** + * Price: 升级后的价格 + * + * @param float $price + */ + public function setPrice(float $price) + { + $this->set("Price", $price); + } +} diff --git a/src/UDPN/Apis/ModifyUDPNBandwidthRequest.php b/src/UDPN/Apis/ModifyUDPNBandwidthRequest.php new file mode 100644 index 00000000..624a85d4 --- /dev/null +++ b/src/UDPN/Apis/ModifyUDPNBandwidthRequest.php @@ -0,0 +1,111 @@ + "ModifyUDPNBandwidth"]); + $this->markRequired("UDPNId"); + $this->markRequired("Bandwidth"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UDPNId: UDPN Id + * + * @return string|null + */ + public function getUDPNId(): string + { + return $this->get("UDPNId"); + } + + /** + * UDPNId: UDPN Id + * + * @param string $udpnId + */ + public function setUDPNId(string $udpnId) + { + $this->set("UDPNId", $udpnId); + } + + /** + * Bandwidth: 调整后专线带宽, 单位为Mbps,取值范围为大于等于2且小于等于1000([2-1000])的整数 + * + * @return integer|null + */ + public function getBandwidth(): int + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: 调整后专线带宽, 单位为Mbps,取值范围为大于等于2且小于等于1000([2-1000])的整数 + * + * @param int $bandwidth + */ + public function setBandwidth(int $bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * CouponId: 代金劵 ID + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 代金劵 ID + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UDPN/Apis/ModifyUDPNBandwidthResponse.php b/src/UDPN/Apis/ModifyUDPNBandwidthResponse.php new file mode 100644 index 00000000..33459ade --- /dev/null +++ b/src/UDPN/Apis/ModifyUDPNBandwidthResponse.php @@ -0,0 +1,26 @@ + "ReleaseUDPN"]); + $this->markRequired("UDPNId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UDPNId: UDPN 资源 Id + * + * @return string|null + */ + public function getUDPNId(): string + { + return $this->get("UDPNId"); + } + + /** + * UDPNId: UDPN 资源 Id + * + * @param string $udpnId + */ + public function setUDPNId(string $udpnId) + { + $this->set("UDPNId", $udpnId); + } +} diff --git a/src/UDPN/Apis/ReleaseUDPNResponse.php b/src/UDPN/Apis/ReleaseUDPNResponse.php new file mode 100644 index 00000000..3636a94d --- /dev/null +++ b/src/UDPN/Apis/ReleaseUDPNResponse.php @@ -0,0 +1,26 @@ +get("UDPNId"); + } + + /** + * UDPNId: UDPN 资源短 ID + * + * @param string $udpnId + */ + public function setUDPNId(string $udpnId) + { + $this->set("UDPNId", $udpnId); + } + + /** + * Peer1: 可用区域 1 + * + * @return string|null + */ + public function getPeer1(): string + { + return $this->get("Peer1"); + } + + /** + * Peer1: 可用区域 1 + * + * @param string $peer1 + */ + public function setPeer1(string $peer1) + { + $this->set("Peer1", $peer1); + } + + /** + * Peer2: 可用区域 2 + * + * @return string|null + */ + public function getPeer2(): string + { + return $this->get("Peer2"); + } + + /** + * Peer2: 可用区域 2 + * + * @param string $peer2 + */ + public function setPeer2(string $peer2) + { + $this->set("Peer2", $peer2); + } + + /** + * ChargeType: 计费类型 + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费类型 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Bandwidth: 带宽 + * + * @return integer|null + */ + public function getBandwidth(): int + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: 带宽 + * + * @param int $bandwidth + */ + public function setBandwidth(int $bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * CreateTime: unix 时间戳 创建时间 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: unix 时间戳 创建时间 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ExpireTime: unix 时间戳 到期时间 + * + * @return integer|null + */ + public function getExpireTime(): int + { + return $this->get("ExpireTime"); + } + + /** + * ExpireTime: unix 时间戳 到期时间 + * + * @param int $expireTime + */ + public function setExpireTime(int $expireTime) + { + $this->set("ExpireTime", $expireTime); + } +} diff --git a/src/UDPN/Models/UDPNLineSet.php b/src/UDPN/Models/UDPNLineSet.php new file mode 100644 index 00000000..d2e78bd1 --- /dev/null +++ b/src/UDPN/Models/UDPNLineSet.php @@ -0,0 +1,84 @@ +get("LocalRegion"); + } + + /** + * LocalRegion: 支持UDPN的地域之一,北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 华盛顿:us-ws, 洛杉矶:us-la, 东京:jpn-tky + * + * @param string $localRegion + */ + public function setLocalRegion(string $localRegion) + { + $this->set("LocalRegion", $localRegion); + } + + /** + * RemoteRegion: 支持UDPN的地域之一,北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 华盛顿:us-ws, 洛杉矶:us-la, 东京:jpn-tky + * + * @return string|null + */ + public function getRemoteRegion(): string + { + return $this->get("RemoteRegion"); + } + + /** + * RemoteRegion: 支持UDPN的地域之一,北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 华盛顿:us-ws, 洛杉矶:us-la, 东京:jpn-tky + * + * @param string $remoteRegion + */ + public function setRemoteRegion(string $remoteRegion) + { + $this->set("RemoteRegion", $remoteRegion); + } + + /** + * BandwidthUpperLimit: 线路带宽上限,单位 M + * + * @return integer|null + */ + public function getBandwidthUpperLimit(): int + { + return $this->get("BandwidthUpperLimit"); + } + + /** + * BandwidthUpperLimit: 线路带宽上限,单位 M + * + * @param int $bandwidthUpperLimit + */ + public function setBandwidthUpperLimit(int $bandwidthUpperLimit) + { + $this->set("BandwidthUpperLimit", $bandwidthUpperLimit); + } +} diff --git a/src/UDPN/UDPNClient.php b/src/UDPN/UDPNClient.php new file mode 100644 index 00000000..ba4163cf --- /dev/null +++ b/src/UDPN/UDPNClient.php @@ -0,0 +1,260 @@ + (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Peer1" => (string) 专线可用区1,支持地域:北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 洛杉矶:us-ca, 华盛顿:us-ws, 东京:jpn-tky + * "Peer2" => (string) 专线可用区2,支持地域:北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 洛杉矶:us-ca, 华盛顿:us-ws, 东京:jpn-tky + * "Bandwidth" => (integer) 带宽 + * "ChargeType" => (string) 计费类型,枚举值为: Year,按年付费; Month,按月付费; Dynamic,按需付费 + * "Quantity" => (integer) 计费时长,默认 1 + * "PayMode" => (string) 计费模式. 枚举值:"Traffic", 流量计费模式; 否则 带宽计费模式; + * "CouponId" => (string) 代金劵 + * ] + * + * Outputs: + * + * $outputs = [ + * "UDPNId" => (string) 资源名称 + * ] + * + * @throws UCloudException + */ + public function allocateUDPN(AllocateUDPNRequest $request = null): AllocateUDPNResponse + { + $resp = $this->invoke($request); + return new AllocateUDPNResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDPN - 描述 UDPN + * + * See also: https://docs.ucloud.cn/api/UDPN-api/describe_udpn + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "UDPNId" => (string) 申请到的 UDPN 资源 ID。若为空,则查询该用户在机房所有的专线信息。非默认项目资源,需填写ProjectId + * "Offset" => (integer) 列表起始位置偏移量,默认为 0 + * "Limit" => (integer) 返回数据长度,默认为 20 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 查询到的总数量 + * "DataSet" => (array) UDPN详情[ + * [ + * "UDPNId" => (string) UDPN 资源短 ID + * "Peer1" => (string) 可用区域 1 + * "Peer2" => (string) 可用区域 2 + * "ChargeType" => (string) 计费类型 + * "Bandwidth" => (integer) 带宽 + * "CreateTime" => (integer) unix 时间戳 创建时间 + * "ExpireTime" => (integer) unix 时间戳 到期时间 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeUDPN(DescribeUDPNRequest $request = null): DescribeUDPNResponse + { + $resp = $this->invoke($request); + return new DescribeUDPNResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUDPNLineList - 获取当前支持的专线线路列表 + * + * See also: https://docs.ucloud.cn/api/UDPN-api/get_udpn_line_list + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) DataSet中的元素个数 + * "DataSet" => (array) 当前支持的专线线路详细信息,详见UDPNLineSet[ + * [ + * "LocalRegion" => (string) 支持UDPN的地域之一,北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 华盛顿:us-ws, 洛杉矶:us-la, 东京:jpn-tky + * "RemoteRegion" => (string) 支持UDPN的地域之一,北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 华盛顿:us-ws, 洛杉矶:us-la, 东京:jpn-tky + * "BandwidthUpperLimit" => (integer) 线路带宽上限,单位 M + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getUDPNLineList(GetUDPNLineListRequest $request = null): GetUDPNLineListResponse + { + $resp = $this->invoke($request); + return new GetUDPNLineListResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUDPNPrice - 获取 UDPN 价格 + * + * See also: https://docs.ucloud.cn/api/UDPN-api/get_udpn_price + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Peer1" => (string) 专线可用区1,支持地域:北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 洛杉矶:us-la, 华盛顿:us-ws, 东京:jpn-tky + * "Peer2" => (string) 专线可用区2,支持地域:北京二:cn-bj2, 上海二:cn-sh2, 广东:cn-gd, 亚太: hk, 上海一:cn-sh1, 法兰克福:ge-fra, 新加坡:sg, 洛杉矶:us-la, 华盛顿:us-ws, 东京:jpn-tky + * "Bandwidth" => (integer) 带宽信息 + * "ChargeType" => (string) 计费类型 + * "Quantity" => (integer) 购买时长 + * "PayMode" => (string) PayMode,枚举值,Bandwidth:带宽;Traffic:流量 默认不填写:带宽 + * ] + * + * Outputs: + * + * $outputs = [ + * "PurchaseValue" => (integer) 资源有效期 unix 时间戳 + * "Price" => (number) 专线价格 + * ] + * + * @throws UCloudException + */ + public function getUDPNPrice(GetUDPNPriceRequest $request = null): GetUDPNPriceResponse + { + $resp = $this->invoke($request); + return new GetUDPNPriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUDPNUpgradePrice - 获取专线升级价格 + * + * See also: https://docs.ucloud.cn/api/UDPN-api/get_udpn_upgrade_price + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "UDPNId" => (string) 专线带宽资源 Id + * "Bandwidth" => (integer) 带宽 + * ] + * + * Outputs: + * + * $outputs = [ + * "Price" => (number) 升级后的价格 + * ] + * + * @throws UCloudException + */ + public function getUDPNUpgradePrice(GetUDPNUpgradePriceRequest $request = null): GetUDPNUpgradePriceResponse + { + $resp = $this->invoke($request); + return new GetUDPNUpgradePriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyUDPNBandwidth - 修改带宽值 + * + * See also: https://docs.ucloud.cn/api/UDPN-api/modify_udpn_bandwidth + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "UDPNId" => (string) UDPN Id + * "Bandwidth" => (integer) 调整后专线带宽, 单位为Mbps,取值范围为大于等于2且小于等于1000([2-1000])的整数 + * "CouponId" => (string) 代金劵 ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function modifyUDPNBandwidth(ModifyUDPNBandwidthRequest $request = null): ModifyUDPNBandwidthResponse + { + $resp = $this->invoke($request); + return new ModifyUDPNBandwidthResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ReleaseUDPN - 释放 UDPN + * + * See also: https://docs.ucloud.cn/api/UDPN-api/release_udpn + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "UDPNId" => (string) UDPN 资源 Id + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function releaseUDPN(ReleaseUDPNRequest $request = null): ReleaseUDPNResponse + { + $resp = $this->invoke($request); + return new ReleaseUDPNResponse($resp->toArray(), $resp->getRequestId()); + } +} diff --git a/src/UDisk/Apis/AttachUDiskRequest.php b/src/UDisk/Apis/AttachUDiskRequest.php new file mode 100644 index 00000000..7597cbe4 --- /dev/null +++ b/src/UDisk/Apis/AttachUDiskRequest.php @@ -0,0 +1,171 @@ + "AttachUDisk"]); + $this->markRequired("Region"); + $this->markRequired("UDiskId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UDiskId: 需要挂载的UDisk实例ID. + * + * @return string|null + */ + public function getUDiskId(): string + { + return $this->get("UDiskId"); + } + + /** + * UDiskId: 需要挂载的UDisk实例ID. + * + * @param string $uDiskId + */ + public function setUDiskId(string $uDiskId) + { + $this->set("UDiskId", $uDiskId); + } + + /** + * UHostId: UHost实例ID。【UHostId和HostId必须选填一个,本字段即将废弃,建议使用HostId】 + * + * @return string|null + */ + public function getUHostId(): string + { + return $this->get("UHostId"); + } + + /** + * UHostId: UHost实例ID。【UHostId和HostId必须选填一个,本字段即将废弃,建议使用HostId】 + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } + + /** + * MultiAttach: 是否允许多点挂载(Yes: 允许多点挂载, No: 不允许多点挂载, 不填默认Yes ) + * + * @return string|null + */ + public function getMultiAttach(): string + { + return $this->get("MultiAttach"); + } + + /** + * MultiAttach: 是否允许多点挂载(Yes: 允许多点挂载, No: 不允许多点挂载, 不填默认Yes ) + * + * @param string $multiAttach + */ + public function setMultiAttach(string $multiAttach) + { + $this->set("MultiAttach", $multiAttach); + } + + /** + * HostId: Host实例ID + * + * @return string|null + */ + public function getHostId(): string + { + return $this->get("HostId"); + } + + /** + * HostId: Host实例ID + * + * @param string $hostId + */ + public function setHostId(string $hostId) + { + $this->set("HostId", $hostId); + } +} diff --git a/src/UDisk/Apis/AttachUDiskResponse.php b/src/UDisk/Apis/AttachUDiskResponse.php new file mode 100644 index 00000000..83a9aa53 --- /dev/null +++ b/src/UDisk/Apis/AttachUDiskResponse.php @@ -0,0 +1,104 @@ +get("UHostId"); + } + + /** + * UHostId: 挂载的UHost实例ID。【即将废弃,建议使用HostId】 + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } + + /** + * UDiskId: 挂载的UDisk实例ID + * + * @return string|null + */ + public function getUDiskId(): string + { + return $this->get("UDiskId"); + } + + /** + * UDiskId: 挂载的UDisk实例ID + * + * @param string $uDiskId + */ + public function setUDiskId(string $uDiskId) + { + $this->set("UDiskId", $uDiskId); + } + + /** + * DeviceName: 挂载的设备名称 + * + * @return string|null + */ + public function getDeviceName(): string + { + return $this->get("DeviceName"); + } + + /** + * DeviceName: 挂载的设备名称 + * + * @param string $deviceName + */ + public function setDeviceName(string $deviceName) + { + $this->set("DeviceName", $deviceName); + } + + /** + * HostId: 挂载的Host实例ID + * + * @return string|null + */ + public function getHostId(): string + { + return $this->get("HostId"); + } + + /** + * HostId: 挂载的Host实例ID + * + * @param string $hostId + */ + public function setHostId(string $hostId) + { + $this->set("HostId", $hostId); + } +} diff --git a/src/UDisk/Apis/CloneUDiskRequest.php b/src/UDisk/Apis/CloneUDiskRequest.php new file mode 100644 index 00000000..d96442d5 --- /dev/null +++ b/src/UDisk/Apis/CloneUDiskRequest.php @@ -0,0 +1,293 @@ + "CloneUDisk"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("Name"); + $this->markRequired("SourceId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Name: 实例名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 实例名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * SourceId: 克隆父Disk的Id + * + * @return string|null + */ + public function getSourceId(): string + { + return $this->get("SourceId"); + } + + /** + * SourceId: 克隆父Disk的Id + * + * @param string $sourceId + */ + public function setSourceId(string $sourceId) + { + $this->set("SourceId", $sourceId); + } + + /** + * UDataArkMode: 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + * + * @return string|null + */ + public function getUDataArkMode(): string + { + return $this->get("UDataArkMode"); + } + + /** + * UDataArkMode: 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + * + * @param string $uDataArkMode + */ + public function setUDataArkMode(string $uDataArkMode) + { + $this->set("UDataArkMode", $uDataArkMode); + } + + /** + * SnapshotService: 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + * + * @return string|null + */ + public function getSnapshotService(): string + { + return $this->get("SnapshotService"); + } + + /** + * SnapshotService: 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + * + * @param string $snapshotService + */ + public function setSnapshotService(string $snapshotService) + { + $this->set("SnapshotService", $snapshotService); + } + + /** + * Quantity: 购买时长 默认: 1 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长 默认: 1 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * Comment: Disk注释 + * + * @return string|null + */ + public function getComment(): string + { + return $this->get("Comment"); + } + + /** + * Comment: Disk注释 + * + * @param string $comment + */ + public function setComment(string $comment) + { + $this->set("Comment", $comment); + } + + /** + * ChargeType: Year , Month, Dynamic,Postpay,Trial 默认: Month + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: Year , Month, Dynamic,Postpay,Trial 默认: Month + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Tag: 业务组 默认:Default + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组 默认:Default + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * RdmaClusterId: RDMA集群id。指定RSSD云盘克隆到对应的RDMA集群。 + * + * @return string|null + */ + public function getRdmaClusterId(): string + { + return $this->get("RdmaClusterId"); + } + + /** + * RdmaClusterId: RDMA集群id。指定RSSD云盘克隆到对应的RDMA集群。 + * + * @param string $rdmaClusterId + */ + public function setRdmaClusterId(string $rdmaClusterId) + { + $this->set("RdmaClusterId", $rdmaClusterId); + } + + /** + * CouponId: 使用的代金券id + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 使用的代金券id + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UDisk/Apis/CloneUDiskResponse.php b/src/UDisk/Apis/CloneUDiskResponse.php new file mode 100644 index 00000000..484c8295 --- /dev/null +++ b/src/UDisk/Apis/CloneUDiskResponse.php @@ -0,0 +1,44 @@ +get("UDiskId"); + } + + /** + * UDiskId: 创建UDisk Id + * + * @param string[] $uDiskId + */ + public function setUDiskId(array $uDiskId) + { + $this->set("UDiskId", $uDiskId); + } +} diff --git a/src/UDisk/Apis/CloneUDiskSnapshotRequest.php b/src/UDisk/Apis/CloneUDiskSnapshotRequest.php new file mode 100644 index 00000000..a79a5dd9 --- /dev/null +++ b/src/UDisk/Apis/CloneUDiskSnapshotRequest.php @@ -0,0 +1,313 @@ + "CloneUDiskSnapshot"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("Name"); + $this->markRequired("SourceId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Name: 实例名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 实例名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * SourceId: 克隆父Snapshot的Id + * + * @return string|null + */ + public function getSourceId(): string + { + return $this->get("SourceId"); + } + + /** + * SourceId: 克隆父Snapshot的Id + * + * @param string $sourceId + */ + public function setSourceId(string $sourceId) + { + $this->set("SourceId", $sourceId); + } + + /** + * Size: 购买UDisk大小,单位:GB,范围[1~8000]。(UDisk大小设定对本地盘快照有效,对云盘快照无效) + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 购买UDisk大小,单位:GB,范围[1~8000]。(UDisk大小设定对本地盘快照有效,对云盘快照无效) + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * Comment: Disk注释 + * + * @return string|null + */ + public function getComment(): string + { + return $this->get("Comment"); + } + + /** + * Comment: Disk注释 + * + * @param string $comment + */ + public function setComment(string $comment) + { + $this->set("Comment", $comment); + } + + /** + * ChargeType: Year , Month, Dynamic,Postpay 默认: Dynamic + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: Year , Month, Dynamic,Postpay 默认: Dynamic + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时长 默认: 1 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长 默认: 1 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * UDataArkMode: 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + * + * @return string|null + */ + public function getUDataArkMode(): string + { + return $this->get("UDataArkMode"); + } + + /** + * UDataArkMode: 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + * + * @param string $uDataArkMode + */ + public function setUDataArkMode(string $uDataArkMode) + { + $this->set("UDataArkMode", $uDataArkMode); + } + + /** + * SnapshotService: 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + * + * @return string|null + */ + public function getSnapshotService(): string + { + return $this->get("SnapshotService"); + } + + /** + * SnapshotService: 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + * + * @param string $snapshotService + */ + public function setSnapshotService(string $snapshotService) + { + $this->set("SnapshotService", $snapshotService); + } + + /** + * Tag: 业务组 默认:Default + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组 默认:Default + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * RdmaClusterId: RDMA集群id。指定RSSD云盘克隆到对应的RDMA集群。 + * + * @return string|null + */ + public function getRdmaClusterId(): string + { + return $this->get("RdmaClusterId"); + } + + /** + * RdmaClusterId: RDMA集群id。指定RSSD云盘克隆到对应的RDMA集群。 + * + * @param string $rdmaClusterId + */ + public function setRdmaClusterId(string $rdmaClusterId) + { + $this->set("RdmaClusterId", $rdmaClusterId); + } + + /** + * CouponId: 使用的代金券id + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 使用的代金券id + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UDisk/Apis/CloneUDiskSnapshotResponse.php b/src/UDisk/Apis/CloneUDiskSnapshotResponse.php new file mode 100644 index 00000000..100df8e6 --- /dev/null +++ b/src/UDisk/Apis/CloneUDiskSnapshotResponse.php @@ -0,0 +1,44 @@ +get("UDiskId"); + } + + /** + * UDiskId: 创建UDisk Id + * + * @param string[] $uDiskId + */ + public function setUDiskId(array $uDiskId) + { + $this->set("UDiskId", $uDiskId); + } +} diff --git a/src/UDisk/Apis/CloneUDiskUDataArkRequest.php b/src/UDisk/Apis/CloneUDiskUDataArkRequest.php new file mode 100644 index 00000000..8924ce04 --- /dev/null +++ b/src/UDisk/Apis/CloneUDiskUDataArkRequest.php @@ -0,0 +1,334 @@ + "CloneUDiskUDataArk"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("Name"); + $this->markRequired("UDiskId"); + $this->markRequired("SnapshotTime"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Name: 实例名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 实例名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * UDiskId: 需要克隆的源盘id + * + * @return string|null + */ + public function getUDiskId(): string + { + return $this->get("UDiskId"); + } + + /** + * UDiskId: 需要克隆的源盘id + * + * @param string $uDiskId + */ + public function setUDiskId(string $uDiskId) + { + $this->set("UDiskId", $uDiskId); + } + + /** + * SnapshotTime: 指定从方舟克隆的备份时间点 + * + * @return integer|null + */ + public function getSnapshotTime(): int + { + return $this->get("SnapshotTime"); + } + + /** + * SnapshotTime: 指定从方舟克隆的备份时间点 + * + * @param int $snapshotTime + */ + public function setSnapshotTime(int $snapshotTime) + { + $this->set("SnapshotTime", $snapshotTime); + } + + /** + * Comment: Disk注释 + * + * @return string|null + */ + public function getComment(): string + { + return $this->get("Comment"); + } + + /** + * Comment: Disk注释 + * + * @param string $comment + */ + public function setComment(string $comment) + { + $this->set("Comment", $comment); + } + + /** + * ChargeType: Year , Month, Dynamic,Postpay 默认: Dynamic + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: Year , Month, Dynamic,Postpay 默认: Dynamic + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时长 默认: 1 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长 默认: 1 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * UDataArkMode: 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + * + * @return string|null + */ + public function getUDataArkMode(): string + { + return $this->get("UDataArkMode"); + } + + /** + * UDataArkMode: 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + * + * @param string $uDataArkMode + */ + public function setUDataArkMode(string $uDataArkMode) + { + $this->set("UDataArkMode", $uDataArkMode); + } + + /** + * SnapshotService: 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + * + * @return string|null + */ + public function getSnapshotService(): string + { + return $this->get("SnapshotService"); + } + + /** + * SnapshotService: 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + * + * @param string $snapshotService + */ + public function setSnapshotService(string $snapshotService) + { + $this->set("SnapshotService", $snapshotService); + } + + /** + * Size: 购买UDisk大小,单位:GB,范围[1~8000]。(UDisk大小设定对本地盘备份有效,对云盘备份无效) + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 购买UDisk大小,单位:GB,范围[1~8000]。(UDisk大小设定对本地盘备份有效,对云盘备份无效) + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * Tag: 业务组 默认:Default + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组 默认:Default + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * RdmaClusterId: RDMA集群id。指定RSSD云盘克隆到对应的RDMA集群。 + * + * @return string|null + */ + public function getRdmaClusterId(): string + { + return $this->get("RdmaClusterId"); + } + + /** + * RdmaClusterId: RDMA集群id。指定RSSD云盘克隆到对应的RDMA集群。 + * + * @param string $rdmaClusterId + */ + public function setRdmaClusterId(string $rdmaClusterId) + { + $this->set("RdmaClusterId", $rdmaClusterId); + } + + /** + * CouponId: 使用的代金券id + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 使用的代金券id + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UDisk/Apis/CloneUDiskUDataArkResponse.php b/src/UDisk/Apis/CloneUDiskUDataArkResponse.php new file mode 100644 index 00000000..c0d7f9f8 --- /dev/null +++ b/src/UDisk/Apis/CloneUDiskUDataArkResponse.php @@ -0,0 +1,44 @@ +get("UDiskId"); + } + + /** + * UDiskId: 创建UDisk Id + * + * @param string[] $uDiskId + */ + public function setUDiskId(array $uDiskId) + { + $this->set("UDiskId", $uDiskId); + } +} diff --git a/src/UDisk/Apis/CreateAttachUDiskRequest.php b/src/UDisk/Apis/CreateAttachUDiskRequest.php new file mode 100644 index 00000000..0ecfb7c8 --- /dev/null +++ b/src/UDisk/Apis/CreateAttachUDiskRequest.php @@ -0,0 +1,373 @@ + "CreateAttachUDisk"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("Size"); + $this->markRequired("Name"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Size: 购买UDisk大小,单位:GB,普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];RSSD数据盘:范围[1~32000];高效数据盘:范围[1~32000]。 + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 购买UDisk大小,单位:GB,普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];RSSD数据盘:范围[1~32000];高效数据盘:范围[1~32000]。 + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * Name: 实例名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 实例名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * UHostId: UHost实例ID。当创建云盘类型为RSSDDataDisk时,根据传入的UHostId,创建与虚机在同一PodId下的云盘。【UHostId和HostId必须选填一个,本字段即将废弃,建议使用HostId】 + * + * @return string|null + */ + public function getUHostId(): string + { + return $this->get("UHostId"); + } + + /** + * UHostId: UHost实例ID。当创建云盘类型为RSSDDataDisk时,根据传入的UHostId,创建与虚机在同一PodId下的云盘。【UHostId和HostId必须选填一个,本字段即将废弃,建议使用HostId】 + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } + + /** + * ChargeType: Year , Month, Dynamic, Postpay, Trial 。 Size小于等于2000时,默认为Dynamic;Size大于2000时,默认为Month。 + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: Year , Month, Dynamic, Postpay, Trial 。 Size小于等于2000时,默认为Dynamic;Size大于2000时,默认为Month。 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时长 默认: 1 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长 默认: 1 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * UDataArkMode: 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + * + * @return string|null + */ + public function getUDataArkMode(): string + { + return $this->get("UDataArkMode"); + } + + /** + * UDataArkMode: 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + * + * @param string $uDataArkMode + */ + public function setUDataArkMode(string $uDataArkMode) + { + $this->set("UDataArkMode", $uDataArkMode); + } + + /** + * SnapshotService: 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + * + * @return string|null + */ + public function getSnapshotService(): string + { + return $this->get("SnapshotService"); + } + + /** + * SnapshotService: 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + * + * @param string $snapshotService + */ + public function setSnapshotService(string $snapshotService) + { + $this->set("SnapshotService", $snapshotService); + } + + /** + * Tag: 业务组 默认:Default + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组 默认:Default + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * DiskType: UDisk 类型: DataDisk(普通数据盘),SSDDataDisk(SSD数据盘),RSSDDataDisk(RSSD数据盘),EfficiencyDataDisk(高效数据盘),默认值(DataDisk) + * + * @return string|null + */ + public function getDiskType(): string + { + return $this->get("DiskType"); + } + + /** + * DiskType: UDisk 类型: DataDisk(普通数据盘),SSDDataDisk(SSD数据盘),RSSDDataDisk(RSSD数据盘),EfficiencyDataDisk(高效数据盘),默认值(DataDisk) + * + * @param string $diskType + */ + public function setDiskType(string $diskType) + { + $this->set("DiskType", $diskType); + } + + /** + * UKmsMode: 是否加密。Yes:加密,No:不加密,默认值(No) + * + * @return string|null + */ + public function getUKmsMode(): string + { + return $this->get("UKmsMode"); + } + + /** + * UKmsMode: 是否加密。Yes:加密,No:不加密,默认值(No) + * + * @param string $uKmsMode + */ + public function setUKmsMode(string $uKmsMode) + { + $this->set("UKmsMode", $uKmsMode); + } + + /** + * CmkId: 加密需要的cmk id,UKmsMode为Yes时,必填 + * + * @return string|null + */ + public function getCmkId(): string + { + return $this->get("CmkId"); + } + + /** + * CmkId: 加密需要的cmk id,UKmsMode为Yes时,必填 + * + * @param string $cmkId + */ + public function setCmkId(string $cmkId) + { + $this->set("CmkId", $cmkId); + } + + /** + * MultiAttach: 是否允许多点挂载(Yes: 允许多点挂载, No: 不允许多点挂载, 不填默认Yes ) + * + * @return string|null + */ + public function getMultiAttach(): string + { + return $this->get("MultiAttach"); + } + + /** + * MultiAttach: 是否允许多点挂载(Yes: 允许多点挂载, No: 不允许多点挂载, 不填默认Yes ) + * + * @param string $multiAttach + */ + public function setMultiAttach(string $multiAttach) + { + $this->set("MultiAttach", $multiAttach); + } + + /** + * HostId: Host实例ID。当创建云盘类型为RSSDDataDisk时,根据传入的HostId,创建与虚机在同一PodId下的云盘。 + * + * @return string|null + */ + public function getHostId(): string + { + return $this->get("HostId"); + } + + /** + * HostId: Host实例ID。当创建云盘类型为RSSDDataDisk时,根据传入的HostId,创建与虚机在同一PodId下的云盘。 + * + * @param string $hostId + */ + public function setHostId(string $hostId) + { + $this->set("HostId", $hostId); + } + + /** + * CouponId: 使用的代金券id + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 使用的代金券id + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UDisk/Apis/CreateAttachUDiskResponse.php b/src/UDisk/Apis/CreateAttachUDiskResponse.php new file mode 100644 index 00000000..5b16a97a --- /dev/null +++ b/src/UDisk/Apis/CreateAttachUDiskResponse.php @@ -0,0 +1,104 @@ +get("UDiskId"); + } + + /** + * UDiskId: 挂载的UDisk实例ID + * + * @param string $uDiskId + */ + public function setUDiskId(string $uDiskId) + { + $this->set("UDiskId", $uDiskId); + } + + /** + * UHostId: 挂载的UHost实例ID。【即将废弃,建议使用HostId】 + * + * @return string|null + */ + public function getUHostId(): string + { + return $this->get("UHostId"); + } + + /** + * UHostId: 挂载的UHost实例ID。【即将废弃,建议使用HostId】 + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } + + /** + * HostId: 挂载的Host实例ID + * + * @return string|null + */ + public function getHostId(): string + { + return $this->get("HostId"); + } + + /** + * HostId: 挂载的Host实例ID + * + * @param string $hostId + */ + public function setHostId(string $hostId) + { + $this->set("HostId", $hostId); + } + + /** + * DeviceName: 挂载设备名称 + * + * @return string|null + */ + public function getDeviceName(): string + { + return $this->get("DeviceName"); + } + + /** + * DeviceName: 挂载设备名称 + * + * @param string $deviceName + */ + public function setDeviceName(string $deviceName) + { + $this->set("DeviceName", $deviceName); + } +} diff --git a/src/UDisk/Apis/CreateUDiskRequest.php b/src/UDisk/Apis/CreateUDiskRequest.php new file mode 100644 index 00000000..817f2b36 --- /dev/null +++ b/src/UDisk/Apis/CreateUDiskRequest.php @@ -0,0 +1,333 @@ + "CreateUDisk"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("Size"); + $this->markRequired("Name"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Size: 购买UDisk大小,单位:GB,普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];RSSD数据盘:范围[1~32000];高效数据盘:范围[1~32000]。 + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 购买UDisk大小,单位:GB,普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];RSSD数据盘:范围[1~32000];高效数据盘:范围[1~32000]。 + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * Name: 实例名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 实例名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * ChargeType: Year , Month, Dynamic, Postpay, Trial 。默认为Dynamic。 + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: Year , Month, Dynamic, Postpay, Trial 。默认为Dynamic。 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时长 默认: 1 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长 默认: 1 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * UDataArkMode: 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + * + * @return string|null + */ + public function getUDataArkMode(): string + { + return $this->get("UDataArkMode"); + } + + /** + * UDataArkMode: 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + * + * @param string $uDataArkMode + */ + public function setUDataArkMode(string $uDataArkMode) + { + $this->set("UDataArkMode", $uDataArkMode); + } + + /** + * SnapshotService: 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + * + * @return string|null + */ + public function getSnapshotService(): string + { + return $this->get("SnapshotService"); + } + + /** + * SnapshotService: 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + * + * @param string $snapshotService + */ + public function setSnapshotService(string $snapshotService) + { + $this->set("SnapshotService", $snapshotService); + } + + /** + * Tag: 业务组 默认:Default + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组 默认:Default + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * DiskType: UDisk 类型: DataDisk(普通数据盘),SSDDataDisk(SSD数据盘),RSSDDataDisk(RSSD数据盘),EfficiencyDataDisk(高效数据盘),默认值(DataDisk) + * + * @return string|null + */ + public function getDiskType(): string + { + return $this->get("DiskType"); + } + + /** + * DiskType: UDisk 类型: DataDisk(普通数据盘),SSDDataDisk(SSD数据盘),RSSDDataDisk(RSSD数据盘),EfficiencyDataDisk(高效数据盘),默认值(DataDisk) + * + * @param string $diskType + */ + public function setDiskType(string $diskType) + { + $this->set("DiskType", $diskType); + } + + /** + * UKmsMode: 是否加密。Yes:加密,No:不加密,默认值(No) + * + * @return string|null + */ + public function getUKmsMode(): string + { + return $this->get("UKmsMode"); + } + + /** + * UKmsMode: 是否加密。Yes:加密,No:不加密,默认值(No) + * + * @param string $uKmsMode + */ + public function setUKmsMode(string $uKmsMode) + { + $this->set("UKmsMode", $uKmsMode); + } + + /** + * CmkId: 加密需要的cmk id,UKmsMode为Yes时,必填 + * + * @return string|null + */ + public function getCmkId(): string + { + return $this->get("CmkId"); + } + + /** + * CmkId: 加密需要的cmk id,UKmsMode为Yes时,必填 + * + * @param string $cmkId + */ + public function setCmkId(string $cmkId) + { + $this->set("CmkId", $cmkId); + } + + /** + * RdmaClusterId: RDMA集群id。DiskType为RSSDDataDisk可填,指定云盘创建到对应的RDMA集群。 + * + * @return string|null + */ + public function getRdmaClusterId(): string + { + return $this->get("RdmaClusterId"); + } + + /** + * RdmaClusterId: RDMA集群id。DiskType为RSSDDataDisk可填,指定云盘创建到对应的RDMA集群。 + * + * @param string $rdmaClusterId + */ + public function setRdmaClusterId(string $rdmaClusterId) + { + $this->set("RdmaClusterId", $rdmaClusterId); + } + + /** + * CouponId: 使用的代金券id + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 使用的代金券id + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UDisk/Apis/CreateUDiskResponse.php b/src/UDisk/Apis/CreateUDiskResponse.php new file mode 100644 index 00000000..542dbbf6 --- /dev/null +++ b/src/UDisk/Apis/CreateUDiskResponse.php @@ -0,0 +1,44 @@ +get("UDiskId"); + } + + /** + * UDiskId: UDisk实例Id + * + * @param string[] $uDiskId + */ + public function setUDiskId(array $uDiskId) + { + $this->set("UDiskId", $uDiskId); + } +} diff --git a/src/UDisk/Apis/CreateUDiskSnapshotRequest.php b/src/UDisk/Apis/CreateUDiskSnapshotRequest.php new file mode 100644 index 00000000..f1c27c5e --- /dev/null +++ b/src/UDisk/Apis/CreateUDiskSnapshotRequest.php @@ -0,0 +1,193 @@ + "CreateUDiskSnapshot"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("UDiskId"); + $this->markRequired("Name"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UDiskId: 快照的UDisk的Id + * + * @return string|null + */ + public function getUDiskId(): string + { + return $this->get("UDiskId"); + } + + /** + * UDiskId: 快照的UDisk的Id + * + * @param string $uDiskId + */ + public function setUDiskId(string $uDiskId) + { + $this->set("UDiskId", $uDiskId); + } + + /** + * Name: 快照名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 快照名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Quantity: 购买时长 默认: 1 (已废弃) + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长 默认: 1 (已废弃) + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * ChargeType: Year , Month, Dynamic 默认: Dynamic (已废弃) + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: Year , Month, Dynamic 默认: Dynamic (已废弃) + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Comment: 快照描述 + * + * @return string|null + */ + public function getComment(): string + { + return $this->get("Comment"); + } + + /** + * Comment: 快照描述 + * + * @param string $comment + */ + public function setComment(string $comment) + { + $this->set("Comment", $comment); + } +} diff --git a/src/UDisk/Apis/CreateUDiskSnapshotResponse.php b/src/UDisk/Apis/CreateUDiskSnapshotResponse.php new file mode 100644 index 00000000..5fd7e97d --- /dev/null +++ b/src/UDisk/Apis/CreateUDiskSnapshotResponse.php @@ -0,0 +1,44 @@ +get("SnapshotId"); + } + + /** + * SnapshotId: 快照Id + * + * @param string[] $snapshotId + */ + public function setSnapshotId(array $snapshotId) + { + $this->set("SnapshotId", $snapshotId); + } +} diff --git a/src/UDisk/Apis/DeleteUDiskRequest.php b/src/UDisk/Apis/DeleteUDiskRequest.php new file mode 100644 index 00000000..d2b663f2 --- /dev/null +++ b/src/UDisk/Apis/DeleteUDiskRequest.php @@ -0,0 +1,112 @@ + "DeleteUDisk"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("UDiskId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UDiskId: 要删除的UDisk的Id + * + * @return string|null + */ + public function getUDiskId(): string + { + return $this->get("UDiskId"); + } + + /** + * UDiskId: 要删除的UDisk的Id + * + * @param string $uDiskId + */ + public function setUDiskId(string $uDiskId) + { + $this->set("UDiskId", $uDiskId); + } +} diff --git a/src/UDisk/Apis/DeleteUDiskResponse.php b/src/UDisk/Apis/DeleteUDiskResponse.php new file mode 100644 index 00000000..5f8a9ffc --- /dev/null +++ b/src/UDisk/Apis/DeleteUDiskResponse.php @@ -0,0 +1,26 @@ + "DeleteUDiskSnapshot"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SnapshotId: 快照Id(填写后不能填写UDisk Id) + * + * @return string|null + */ + public function getSnapshotId(): string + { + return $this->get("SnapshotId"); + } + + /** + * SnapshotId: 快照Id(填写后不能填写UDisk Id) + * + * @param string $snapshotId + */ + public function setSnapshotId(string $snapshotId) + { + $this->set("SnapshotId", $snapshotId); + } + + /** + * UDiskId: UDisk Id,删除该盘所创建出来的所有快照(填写后不能填写SnapshotId) + * + * @return string|null + */ + public function getUDiskId(): string + { + return $this->get("UDiskId"); + } + + /** + * UDiskId: UDisk Id,删除该盘所创建出来的所有快照(填写后不能填写SnapshotId) + * + * @param string $uDiskId + */ + public function setUDiskId(string $uDiskId) + { + $this->set("UDiskId", $uDiskId); + } +} diff --git a/src/UDisk/Apis/DeleteUDiskSnapshotResponse.php b/src/UDisk/Apis/DeleteUDiskSnapshotResponse.php new file mode 100644 index 00000000..be16881f --- /dev/null +++ b/src/UDisk/Apis/DeleteUDiskSnapshotResponse.php @@ -0,0 +1,26 @@ + "DescribeRecycleUDisk"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Limit: 返回数据长度, 默认为20 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数据长度, 默认为20 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * Offset: 数据偏移量, 默认为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 数据偏移量, 默认为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } +} diff --git a/src/UDisk/Apis/DescribeRecycleUDiskResponse.php b/src/UDisk/Apis/DescribeRecycleUDiskResponse.php new file mode 100644 index 00000000..14c67f9d --- /dev/null +++ b/src/UDisk/Apis/DescribeRecycleUDiskResponse.php @@ -0,0 +1,74 @@ +get("TotalCount"); + } + + /** + * TotalCount: 磁盘数量 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * DataSet: 回收站磁盘列表 + * + * @return RecycleUDiskSet[]|null + */ + public function getDataSet(): array + { + $items = $this->get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new RecycleUDiskSet($item)); + } + return $result; + } + + /** + * DataSet: 回收站磁盘列表 + * + * @param RecycleUDiskSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UDisk/Apis/DescribeUDiskPriceRequest.php b/src/UDisk/Apis/DescribeUDiskPriceRequest.php new file mode 100644 index 00000000..14d67d9a --- /dev/null +++ b/src/UDisk/Apis/DescribeUDiskPriceRequest.php @@ -0,0 +1,252 @@ + "DescribeUDiskPrice"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("Size"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Size: 购买UDisk大小,单位:GB,普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];普通系统盘:范围[1~8000];SSD系统盘:范围[1~4000];RSSD数据盘:范围[1~32000];RSSD系统盘:范围[1~4000];高效数据盘:范围[1~32000];高效系统盘:范围[1~500]。 + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 购买UDisk大小,单位:GB,普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];普通系统盘:范围[1~8000];SSD系统盘:范围[1~4000];RSSD数据盘:范围[1~32000];RSSD系统盘:范围[1~4000];高效数据盘:范围[1~32000];高效系统盘:范围[1~500]。 + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * ChargeType: Year , Month, Dynamic,Postpay,Trial 默认: Month + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: Year , Month, Dynamic,Postpay,Trial 默认: Month + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买UDisk的时长,默认值为1 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买UDisk的时长,默认值为1 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * UDataArkMode: 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + * + * @return string|null + */ + public function getUDataArkMode(): string + { + return $this->get("UDataArkMode"); + } + + /** + * UDataArkMode: 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + * + * @param string $uDataArkMode + */ + public function setUDataArkMode(string $uDataArkMode) + { + $this->set("UDataArkMode", $uDataArkMode); + } + + /** + * SnapshotService: 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + * + * @return string|null + */ + public function getSnapshotService(): string + { + return $this->get("SnapshotService"); + } + + /** + * SnapshotService: 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + * + * @param string $snapshotService + */ + public function setSnapshotService(string $snapshotService) + { + $this->set("SnapshotService", $snapshotService); + } + + /** + * DiskType: UDisk 类型: DataDisk(普通数据盘),SSDDataDisk(SSD数据盘),RSSDDataDisk(RSSD数据盘),EfficiencyDataDisk(高效数据盘),SystemDisk(普通系统盘),SSDSystemDisk(SSD系统盘),RSSDSystemDisk(RSSD系统盘),EfficiencySystemDisk(高效系统盘),默认值(DataDisk) + * + * @return string|null + */ + public function getDiskType(): string + { + return $this->get("DiskType"); + } + + /** + * DiskType: UDisk 类型: DataDisk(普通数据盘),SSDDataDisk(SSD数据盘),RSSDDataDisk(RSSD数据盘),EfficiencyDataDisk(高效数据盘),SystemDisk(普通系统盘),SSDSystemDisk(SSD系统盘),RSSDSystemDisk(RSSD系统盘),EfficiencySystemDisk(高效系统盘),默认值(DataDisk) + * + * @param string $diskType + */ + public function setDiskType(string $diskType) + { + $this->set("DiskType", $diskType); + } + + /** + * IsTotalPrice: 是否将快照服务(数据方舟),云硬盘放入一张订单, 是:"Yes",否:"No",默认是"No" + * + * @return string|null + */ + public function getIsTotalPrice(): string + { + return $this->get("IsTotalPrice"); + } + + /** + * IsTotalPrice: 是否将快照服务(数据方舟),云硬盘放入一张订单, 是:"Yes",否:"No",默认是"No" + * + * @param string $isTotalPrice + */ + public function setIsTotalPrice(string $isTotalPrice) + { + $this->set("IsTotalPrice", $isTotalPrice); + } + + /** + * MachineType: 云主机机型(V2.0),枚举值["N", "C", "G", "O", "OM"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * + * @return string|null + */ + public function getMachineType(): string + { + return $this->get("MachineType"); + } + + /** + * MachineType: 云主机机型(V2.0),枚举值["N", "C", "G", "O", "OM"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * + * @param string $machineType + */ + public function setMachineType(string $machineType) + { + $this->set("MachineType", $machineType); + } +} diff --git a/src/UDisk/Apis/DescribeUDiskPriceResponse.php b/src/UDisk/Apis/DescribeUDiskPriceResponse.php new file mode 100644 index 00000000..8218da2f --- /dev/null +++ b/src/UDisk/Apis/DescribeUDiskPriceResponse.php @@ -0,0 +1,54 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UDiskPriceDataSet($item)); + } + return $result; + } + + /** + * DataSet: 价格参数列表,具体说明见 UDiskPriceDataSet + * + * @param UDiskPriceDataSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UDisk/Apis/DescribeUDiskRequest.php b/src/UDisk/Apis/DescribeUDiskRequest.php new file mode 100644 index 00000000..a0015e9c --- /dev/null +++ b/src/UDisk/Apis/DescribeUDiskRequest.php @@ -0,0 +1,290 @@ + "DescribeUDisk"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UDiskId: UDisk Id(留空返回全部) + * + * @return string|null + */ + public function getUDiskId(): string + { + return $this->get("UDiskId"); + } + + /** + * UDiskId: UDisk Id(留空返回全部) + * + * @param string $uDiskId + */ + public function setUDiskId(string $uDiskId) + { + $this->set("UDiskId", $uDiskId); + } + + /** + * Offset: 数据偏移量, 默认为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 数据偏移量, 默认为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 返回数据长度, 默认为20 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数据长度, 默认为20 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * DiskType: ProtocolVersion字段为1时,需结合IsBoot确定具体磁盘类型:普通数据盘:DiskType:"CLOUD_NORMAL",IsBoot:"False";普通系统盘:DiskType:"CLOUD_NORMAL",IsBoot:"True";SSD数据盘:DiskType:"CLOUD_SSD",IsBoot:"False";SSD系统盘:DiskType:"CLOUD_SSD",IsBoot:"True";RSSD数据盘:DiskType:"CLOUD_RSSD",IsBoot:"False";为空拉取所有。ProtocolVersion字段为0或没有该字段时,可设为以下几个值:普通数据盘:DataDisk;普通系统盘:SystemDisk;SSD数据盘:SSDDataDisk;SSD系统盘:SSDSystemDisk;RSSD数据盘:RSSDDataDisk;为空拉取所有。 + * + * @return string|null + */ + public function getDiskType(): string + { + return $this->get("DiskType"); + } + + /** + * DiskType: ProtocolVersion字段为1时,需结合IsBoot确定具体磁盘类型:普通数据盘:DiskType:"CLOUD_NORMAL",IsBoot:"False";普通系统盘:DiskType:"CLOUD_NORMAL",IsBoot:"True";SSD数据盘:DiskType:"CLOUD_SSD",IsBoot:"False";SSD系统盘:DiskType:"CLOUD_SSD",IsBoot:"True";RSSD数据盘:DiskType:"CLOUD_RSSD",IsBoot:"False";为空拉取所有。ProtocolVersion字段为0或没有该字段时,可设为以下几个值:普通数据盘:DataDisk;普通系统盘:SystemDisk;SSD数据盘:SSDDataDisk;SSD系统盘:SSDSystemDisk;RSSD数据盘:RSSDDataDisk;为空拉取所有。 + * + * @param string $diskType + */ + public function setDiskType(string $diskType) + { + $this->set("DiskType", $diskType); + } + + /** + * ProtocolVersion: 请求协议版本,建议升级为1,为1时DiskType与UHost磁盘类型定义一致;默认为0 + * + * @return integer|null + */ + public function getProtocolVersion(): int + { + return $this->get("ProtocolVersion"); + } + + /** + * ProtocolVersion: 请求协议版本,建议升级为1,为1时DiskType与UHost磁盘类型定义一致;默认为0 + * + * @param int $protocolVersion + */ + public function setProtocolVersion(int $protocolVersion) + { + $this->set("ProtocolVersion", $protocolVersion); + } + + /** + * IsBoot: ProtocolVersion字段为1且DiskType不为空时,必须设置,设置规则请参照DiskType;ProtocolVersion字段为1且DiskType为空时,该字段无效。ProtocolVersion字段为0或没有该字段时,该字段无效。 + * + * @return string|null + */ + public function getIsBoot(): string + { + return $this->get("IsBoot"); + } + + /** + * IsBoot: ProtocolVersion字段为1且DiskType不为空时,必须设置,设置规则请参照DiskType;ProtocolVersion字段为1且DiskType为空时,该字段无效。ProtocolVersion字段为0或没有该字段时,该字段无效。 + * + * @param string $isBoot + */ + public function setIsBoot(string $isBoot) + { + $this->set("IsBoot", $isBoot); + } + + /** + * IgnoreUBillInfo: 是否忽略计费信息。Yes:忽略,No:不忽略,默认值(No)。(如不关心账单信息,建议选填“Yes”,可降低请求延时) + * + * @return string|null + */ + public function getIgnoreUBillInfo(): string + { + return $this->get("IgnoreUBillInfo"); + } + + /** + * IgnoreUBillInfo: 是否忽略计费信息。Yes:忽略,No:不忽略,默认值(No)。(如不关心账单信息,建议选填“Yes”,可降低请求延时) + * + * @param string $ignoreUBillInfo + */ + public function setIgnoreUBillInfo(string $ignoreUBillInfo) + { + $this->set("IgnoreUBillInfo", $ignoreUBillInfo); + } + + /** + * UHostIdForAttachment: 根据传入的UHostIdForAttachment,筛选出虚机在同一PodId下的云盘【本字段即将废弃,建议使用HostIdForAttachment】 + * + * @return string|null + */ + public function getUHostIdForAttachment(): string + { + return $this->get("UHostIdForAttachment"); + } + + /** + * UHostIdForAttachment: 根据传入的UHostIdForAttachment,筛选出虚机在同一PodId下的云盘【本字段即将废弃,建议使用HostIdForAttachment】 + * + * @param string $uHostIdForAttachment + */ + public function setUHostIdForAttachment(string $uHostIdForAttachment) + { + $this->set("UHostIdForAttachment", $uHostIdForAttachment); + } + + /** + * HostIdForAttachment: 根据传入的HostIdForAttachment,筛选出虚机在同一PodId下的云盘 + * + * @return string|null + */ + public function getHostIdForAttachment(): string + { + return $this->get("HostIdForAttachment"); + } + + /** + * HostIdForAttachment: 根据传入的HostIdForAttachment,筛选出虚机在同一PodId下的云盘 + * + * @param string $hostIdForAttachment + */ + public function setHostIdForAttachment(string $hostIdForAttachment) + { + $this->set("HostIdForAttachment", $hostIdForAttachment); + } + + /** + * HostProduct: 宿主产品类型,可筛选挂载在该类型宿主上的云盘。可选值:uhost, uphost。为空拉取所有。(当HostIdForAttachment字段不为空时,该字段可以不填,若HostIdForAttachment与该字段宿主类型冲突,则以HostIdForAttachment字段为准。) + * + * @return string|null + */ + public function getHostProduct(): string + { + return $this->get("HostProduct"); + } + + /** + * HostProduct: 宿主产品类型,可筛选挂载在该类型宿主上的云盘。可选值:uhost, uphost。为空拉取所有。(当HostIdForAttachment字段不为空时,该字段可以不填,若HostIdForAttachment与该字段宿主类型冲突,则以HostIdForAttachment字段为准。) + * + * @param string $hostProduct + */ + public function setHostProduct(string $hostProduct) + { + $this->set("HostProduct", $hostProduct); + } +} diff --git a/src/UDisk/Apis/DescribeUDiskResponse.php b/src/UDisk/Apis/DescribeUDiskResponse.php new file mode 100644 index 00000000..47aea850 --- /dev/null +++ b/src/UDisk/Apis/DescribeUDiskResponse.php @@ -0,0 +1,74 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UDiskDataSet($item)); + } + return $result; + } + + /** + * DataSet: JSON 格式的UDisk数据列表, 每项参数可见下面 UDiskDataSet + * + * @param UDiskDataSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalCount: 根据过滤条件得到的总数 + * + * @return integer|null + */ + public function getTotalCount(): int + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 根据过滤条件得到的总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/UDisk/Apis/DescribeUDiskSnapshotRequest.php b/src/UDisk/Apis/DescribeUDiskSnapshotRequest.php new file mode 100644 index 00000000..7fb8664d --- /dev/null +++ b/src/UDisk/Apis/DescribeUDiskSnapshotRequest.php @@ -0,0 +1,170 @@ + "DescribeUDiskSnapshot"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Offset: 数据偏移量, 默认为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 数据偏移量, 默认为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 返回数据长度, 默认为20 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数据长度, 默认为20 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * UDiskId: UDiskId,返回该盘所做快照.(必须同时传Zone) + * + * @return string|null + */ + public function getUDiskId(): string + { + return $this->get("UDiskId"); + } + + /** + * UDiskId: UDiskId,返回该盘所做快照.(必须同时传Zone) + * + * @param string $uDiskId + */ + public function setUDiskId(string $uDiskId) + { + $this->set("UDiskId", $uDiskId); + } + + /** + * SnapshotId: 快照id,SnapshotId , UDiskId 同时传SnapshotId优先 + * + * @return string|null + */ + public function getSnapshotId(): string + { + return $this->get("SnapshotId"); + } + + /** + * SnapshotId: 快照id,SnapshotId , UDiskId 同时传SnapshotId优先 + * + * @param string $snapshotId + */ + public function setSnapshotId(string $snapshotId) + { + $this->set("SnapshotId", $snapshotId); + } +} diff --git a/src/UDisk/Apis/DescribeUDiskSnapshotResponse.php b/src/UDisk/Apis/DescribeUDiskSnapshotResponse.php new file mode 100644 index 00000000..6a065611 --- /dev/null +++ b/src/UDisk/Apis/DescribeUDiskSnapshotResponse.php @@ -0,0 +1,74 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UDiskSnapshotSet($item)); + } + return $result; + } + + /** + * DataSet: JSON 格式的Snapshot列表, 详细参见 UDiskSnapshotSet + * + * @param UDiskSnapshotSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalCount: 根据过滤条件得到的总数 + * + * @return integer|null + */ + public function getTotalCount(): int + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 根据过滤条件得到的总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/UDisk/Apis/DescribeUDiskUpgradePriceRequest.php b/src/UDisk/Apis/DescribeUDiskUpgradePriceRequest.php new file mode 100644 index 00000000..75bbc8a5 --- /dev/null +++ b/src/UDisk/Apis/DescribeUDiskUpgradePriceRequest.php @@ -0,0 +1,213 @@ + "DescribeUDiskUpgradePrice"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("Size"); + $this->markRequired("SourceId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Size: 购买UDisk大小,单位:GB,普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];普通系统盘:范围[1~8000];SSD系统盘:范围[1~4000];RSSD数据盘:范围[1~32000];RSSD系统盘:范围[1~4000];高效数据盘:范围[1~32000];高效系统盘:范围[1~500]。 + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 购买UDisk大小,单位:GB,普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];普通系统盘:范围[1~8000];SSD系统盘:范围[1~4000];RSSD数据盘:范围[1~32000];RSSD系统盘:范围[1~4000];高效数据盘:范围[1~32000];高效系统盘:范围[1~500]。 + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * SourceId: 升级目标UDisk ID + * + * @return string|null + */ + public function getSourceId(): string + { + return $this->get("SourceId"); + } + + /** + * SourceId: 升级目标UDisk ID + * + * @param string $sourceId + */ + public function setSourceId(string $sourceId) + { + $this->set("SourceId", $sourceId); + } + + /** + * UDataArkMode: 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + * + * @return string|null + */ + public function getUDataArkMode(): string + { + return $this->get("UDataArkMode"); + } + + /** + * UDataArkMode: 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + * + * @param string $uDataArkMode + */ + public function setUDataArkMode(string $uDataArkMode) + { + $this->set("UDataArkMode", $uDataArkMode); + } + + /** + * SnapshotService: 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + * + * @return string|null + */ + public function getSnapshotService(): string + { + return $this->get("SnapshotService"); + } + + /** + * SnapshotService: 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + * + * @param string $snapshotService + */ + public function setSnapshotService(string $snapshotService) + { + $this->set("SnapshotService", $snapshotService); + } + + /** + * DiskType: 【已废弃】UDisk 类型: DataDisk(普通数据盘),SSDDataDisk(SSD数据盘),RSSDDataDisk(RSSD数据盘),EfficiencyDataDisk(高效数据盘),SystemDisk(普通系统盘),SSDSystemDisk(SSD系统盘),RSSDSystemDisk(RSSD系统盘),EfficiencySystemDisk(高效系统盘),默认值(DataDisk) + * + * @return string|null + */ + public function getDiskType(): string + { + return $this->get("DiskType"); + } + + /** + * DiskType: 【已废弃】UDisk 类型: DataDisk(普通数据盘),SSDDataDisk(SSD数据盘),RSSDDataDisk(RSSD数据盘),EfficiencyDataDisk(高效数据盘),SystemDisk(普通系统盘),SSDSystemDisk(SSD系统盘),RSSDSystemDisk(RSSD系统盘),EfficiencySystemDisk(高效系统盘),默认值(DataDisk) + * + * @param string $diskType + */ + public function setDiskType(string $diskType) + { + $this->set("DiskType", $diskType); + } + + /** + * MachineType: 【已废弃】云主机机型(V2.0),枚举值["N", "C", "G", "O", "OM"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * + * @return string|null + */ + public function getMachineType(): string + { + return $this->get("MachineType"); + } + + /** + * MachineType: 【已废弃】云主机机型(V2.0),枚举值["N", "C", "G", "O", "OM"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * + * @param string $machineType + */ + public function setMachineType(string $machineType) + { + $this->set("MachineType", $machineType); + } +} diff --git a/src/UDisk/Apis/DescribeUDiskUpgradePriceResponse.php b/src/UDisk/Apis/DescribeUDiskUpgradePriceResponse.php new file mode 100644 index 00000000..c8ecba86 --- /dev/null +++ b/src/UDisk/Apis/DescribeUDiskUpgradePriceResponse.php @@ -0,0 +1,64 @@ +get("Price"); + } + + /** + * Price: 价格 + * + * @param int $price + */ + public function setPrice(int $price) + { + $this->set("Price", $price); + } + + /** + * OriginalPrice: 用户折后价 (对应计费CustomPrice) + * + * @return integer|null + */ + public function getOriginalPrice(): int + { + return $this->get("OriginalPrice"); + } + + /** + * OriginalPrice: 用户折后价 (对应计费CustomPrice) + * + * @param int $originalPrice + */ + public function setOriginalPrice(int $originalPrice) + { + $this->set("OriginalPrice", $originalPrice); + } +} diff --git a/src/UDisk/Apis/DetachUDiskRequest.php b/src/UDisk/Apis/DetachUDiskRequest.php new file mode 100644 index 00000000..60d38a98 --- /dev/null +++ b/src/UDisk/Apis/DetachUDiskRequest.php @@ -0,0 +1,151 @@ + "DetachUDisk"]); + $this->markRequired("Region"); + $this->markRequired("UDiskId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UDiskId: 需要卸载的UDisk实例ID + * + * @return string|null + */ + public function getUDiskId(): string + { + return $this->get("UDiskId"); + } + + /** + * UDiskId: 需要卸载的UDisk实例ID + * + * @param string $uDiskId + */ + public function setUDiskId(string $uDiskId) + { + $this->set("UDiskId", $uDiskId); + } + + /** + * UHostId: UHost实例ID。【UHostId和HostId必须选填一个,本字段即将废弃,建议使用HostId】 + * + * @return string|null + */ + public function getUHostId(): string + { + return $this->get("UHostId"); + } + + /** + * UHostId: UHost实例ID。【UHostId和HostId必须选填一个,本字段即将废弃,建议使用HostId】 + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } + + /** + * HostId: Host实例ID + * + * @return string|null + */ + public function getHostId(): string + { + return $this->get("HostId"); + } + + /** + * HostId: Host实例ID + * + * @param string $hostId + */ + public function setHostId(string $hostId) + { + $this->set("HostId", $hostId); + } +} diff --git a/src/UDisk/Apis/DetachUDiskResponse.php b/src/UDisk/Apis/DetachUDiskResponse.php new file mode 100644 index 00000000..cb08d2b4 --- /dev/null +++ b/src/UDisk/Apis/DetachUDiskResponse.php @@ -0,0 +1,84 @@ +get("UHostId"); + } + + /** + * UHostId: 卸载的UHost实例ID。【即将废弃,建议使用HostId】 + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } + + /** + * UDiskId: 卸载的UDisk实例ID + * + * @return string|null + */ + public function getUDiskId(): string + { + return $this->get("UDiskId"); + } + + /** + * UDiskId: 卸载的UDisk实例ID + * + * @param string $uDiskId + */ + public function setUDiskId(string $uDiskId) + { + $this->set("UDiskId", $uDiskId); + } + + /** + * HostId: 卸载的Host实例ID + * + * @return string|null + */ + public function getHostId(): string + { + return $this->get("HostId"); + } + + /** + * HostId: 卸载的Host实例ID + * + * @param string $hostId + */ + public function setHostId(string $hostId) + { + $this->set("HostId", $hostId); + } +} diff --git a/src/UDisk/Apis/RecoverUDiskRequest.php b/src/UDisk/Apis/RecoverUDiskRequest.php new file mode 100644 index 00000000..4b704600 --- /dev/null +++ b/src/UDisk/Apis/RecoverUDiskRequest.php @@ -0,0 +1,152 @@ + "RecoverUDisk"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("UDiskId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UDiskId: 云硬盘资源ID + * + * @return string|null + */ + public function getUDiskId(): string + { + return $this->get("UDiskId"); + } + + /** + * UDiskId: 云硬盘资源ID + * + * @param string $uDiskId + */ + public function setUDiskId(string $uDiskId) + { + $this->set("UDiskId", $uDiskId); + } + + /** + * ChargeType: Year , Month, Dynamic 默认: Dynamic + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: Year , Month, Dynamic 默认: Dynamic + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时长 默认: 1 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长 默认: 1 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } +} diff --git a/src/UDisk/Apis/RecoverUDiskResponse.php b/src/UDisk/Apis/RecoverUDiskResponse.php new file mode 100644 index 00000000..7b7327a4 --- /dev/null +++ b/src/UDisk/Apis/RecoverUDiskResponse.php @@ -0,0 +1,26 @@ + "RenameUDisk"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("UDiskId"); + $this->markRequired("UDiskName"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UDiskId: 重命名的UDisk的Id + * + * @return string|null + */ + public function getUDiskId(): string + { + return $this->get("UDiskId"); + } + + /** + * UDiskId: 重命名的UDisk的Id + * + * @param string $uDiskId + */ + public function setUDiskId(string $uDiskId) + { + $this->set("UDiskId", $uDiskId); + } + + /** + * UDiskName: 重命名UDisk的name + * + * @return string|null + */ + public function getUDiskName(): string + { + return $this->get("UDiskName"); + } + + /** + * UDiskName: 重命名UDisk的name + * + * @param string $uDiskName + */ + public function setUDiskName(string $uDiskName) + { + $this->set("UDiskName", $uDiskName); + } +} diff --git a/src/UDisk/Apis/RenameUDiskResponse.php b/src/UDisk/Apis/RenameUDiskResponse.php new file mode 100644 index 00000000..0570c3e5 --- /dev/null +++ b/src/UDisk/Apis/RenameUDiskResponse.php @@ -0,0 +1,26 @@ + "ResizeUDisk"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("UDiskId"); + $this->markRequired("Size"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UDiskId: UDisk Id + * + * @return string|null + */ + public function getUDiskId(): string + { + return $this->get("UDiskId"); + } + + /** + * UDiskId: UDisk Id + * + * @param string $uDiskId + */ + public function setUDiskId(string $uDiskId) + { + $this->set("UDiskId", $uDiskId); + } + + /** + * Size: 调整后大小, 单位:GB,普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];RSSD数据盘:范围[1~32000]。 + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 调整后大小, 单位:GB,普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];RSSD数据盘:范围[1~32000]。 + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * MachineType: 云主机机型(V2.0),枚举值["N", "C", "G", "O", "OM"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * + * @return string|null + */ + public function getMachineType(): string + { + return $this->get("MachineType"); + } + + /** + * MachineType: 云主机机型(V2.0),枚举值["N", "C", "G", "O", "OM"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * + * @param string $machineType + */ + public function setMachineType(string $machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * CouponId: 使用的代金券id + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 使用的代金券id + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UDisk/Apis/ResizeUDiskResponse.php b/src/UDisk/Apis/ResizeUDiskResponse.php new file mode 100644 index 00000000..3b8d8177 --- /dev/null +++ b/src/UDisk/Apis/ResizeUDiskResponse.php @@ -0,0 +1,26 @@ + "RestoreUDisk"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("UDiskId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UDiskId: 需要恢复的盘ID + * + * @return string|null + */ + public function getUDiskId(): string + { + return $this->get("UDiskId"); + } + + /** + * UDiskId: 需要恢复的盘ID + * + * @param string $uDiskId + */ + public function setUDiskId(string $uDiskId) + { + $this->set("UDiskId", $uDiskId); + } + + /** + * SnapshotId: 从指定的快照恢复 + * + * @return string|null + */ + public function getSnapshotId(): string + { + return $this->get("SnapshotId"); + } + + /** + * SnapshotId: 从指定的快照恢复 + * + * @param string $snapshotId + */ + public function setSnapshotId(string $snapshotId) + { + $this->set("SnapshotId", $snapshotId); + } + + /** + * SnapshotTime: 指定从方舟恢复的备份时间点 + * + * @return integer|null + */ + public function getSnapshotTime(): int + { + return $this->get("SnapshotTime"); + } + + /** + * SnapshotTime: 指定从方舟恢复的备份时间点 + * + * @param int $snapshotTime + */ + public function setSnapshotTime(int $snapshotTime) + { + $this->set("SnapshotTime", $snapshotTime); + } +} diff --git a/src/UDisk/Apis/RestoreUDiskResponse.php b/src/UDisk/Apis/RestoreUDiskResponse.php new file mode 100644 index 00000000..ca29d50d --- /dev/null +++ b/src/UDisk/Apis/RestoreUDiskResponse.php @@ -0,0 +1,26 @@ + "SetUDiskUDataArkMode"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("UDiskId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UDiskId: 需要设置数据方舟的UDisk的Id + * + * @return string|null + */ + public function getUDiskId(): string + { + return $this->get("UDiskId"); + } + + /** + * UDiskId: 需要设置数据方舟的UDisk的Id + * + * @param string $uDiskId + */ + public function setUDiskId(string $uDiskId) + { + $this->set("UDiskId", $uDiskId); + } + + /** + * UDataArkMode: 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + * + * @return string|null + */ + public function getUDataArkMode(): string + { + return $this->get("UDataArkMode"); + } + + /** + * UDataArkMode: 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + * + * @param string $uDataArkMode + */ + public function setUDataArkMode(string $uDataArkMode) + { + $this->set("UDataArkMode", $uDataArkMode); + } + + /** + * CouponId: 使用的代金券id + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 使用的代金券id + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UDisk/Apis/SetUDiskUDataArkModeResponse.php b/src/UDisk/Apis/SetUDiskUDataArkModeResponse.php new file mode 100644 index 00000000..254ce871 --- /dev/null +++ b/src/UDisk/Apis/SetUDiskUDataArkModeResponse.php @@ -0,0 +1,26 @@ +get("UDiskId"); + } + + /** + * UDiskId: 磁盘id + * + * @param string $uDiskId + */ + public function setUDiskId(string $uDiskId) + { + $this->set("UDiskId", $uDiskId); + } + + /** + * CreateTime: 创建时间 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ExpiredTime: 过期时间 + * + * @return integer|null + */ + public function getExpiredTime(): int + { + return $this->get("ExpiredTime"); + } + + /** + * ExpiredTime: 过期时间 + * + * @param int $expiredTime + */ + public function setExpiredTime(int $expiredTime) + { + $this->set("ExpiredTime", $expiredTime); + } + + /** + * CountdownTime: 销毁倒计时 + * + * @return integer|null + */ + public function getCountdownTime(): int + { + return $this->get("CountdownTime"); + } + + /** + * CountdownTime: 销毁倒计时 + * + * @param int $countdownTime + */ + public function setCountdownTime(int $countdownTime) + { + $this->set("CountdownTime", $countdownTime); + } + + /** + * Name: 磁盘名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 磁盘名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Size: 磁盘容量 + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 磁盘容量 + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * Tag: 业务组 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Zone: 可用区 + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区 + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } +} diff --git a/src/UDisk/Models/UDiskDataSet.php b/src/UDisk/Models/UDiskDataSet.php new file mode 100644 index 00000000..b1fe54ed --- /dev/null +++ b/src/UDisk/Models/UDiskDataSet.php @@ -0,0 +1,684 @@ +get("Zone"); + } + + /** + * Zone: 可用区 + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * UDiskId: UDisk实例Id + * + * @return string|null + */ + public function getUDiskId(): string + { + return $this->get("UDiskId"); + } + + /** + * UDiskId: UDisk实例Id + * + * @param string $uDiskId + */ + public function setUDiskId(string $uDiskId) + { + $this->set("UDiskId", $uDiskId); + } + + /** + * Name: 实例名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 实例名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Size: 容量单位GB + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 容量单位GB + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * Status: 状态:Available(可用),Attaching(挂载中), InUse(已挂载), Detaching(卸载中), Initializating(分配中), Failed(创建失败),Cloning(克隆中),Restoring(恢复中),RestoreFailed(恢复失败), + * + * @return string|null + */ + public function getStatus(): string + { + return $this->get("Status"); + } + + /** + * Status: 状态:Available(可用),Attaching(挂载中), InUse(已挂载), Detaching(卸载中), Initializating(分配中), Failed(创建失败),Cloning(克隆中),Restoring(恢复中),RestoreFailed(恢复失败), + * + * @param string $status + */ + public function setStatus(string $status) + { + $this->set("Status", $status); + } + + /** + * CreateTime: 创建时间 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ExpiredTime: 过期时间 + * + * @return integer|null + */ + public function getExpiredTime(): int + { + return $this->get("ExpiredTime"); + } + + /** + * ExpiredTime: 过期时间 + * + * @param int $expiredTime + */ + public function setExpiredTime(int $expiredTime) + { + $this->set("ExpiredTime", $expiredTime); + } + + /** + * UHostId: 挂载的UHost的Id。【即将废弃,建议使用HostId】 + * + * @return string|null + */ + public function getUHostId(): string + { + return $this->get("UHostId"); + } + + /** + * UHostId: 挂载的UHost的Id。【即将废弃,建议使用HostId】 + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } + + /** + * UHostName: 挂载的UHost的Name。【即将废弃,建议使用HostName】 + * + * @return string|null + */ + public function getUHostName(): string + { + return $this->get("UHostName"); + } + + /** + * UHostName: 挂载的UHost的Name。【即将废弃,建议使用HostName】 + * + * @param string $uHostName + */ + public function setUHostName(string $uHostName) + { + $this->set("UHostName", $uHostName); + } + + /** + * UHostIP: 挂载的UHost的IP。【即将废弃,建议使用HostIP】 + * + * @return string|null + */ + public function getUHostIP(): string + { + return $this->get("UHostIP"); + } + + /** + * UHostIP: 挂载的UHost的IP。【即将废弃,建议使用HostIP】 + * + * @param string $uHostIP + */ + public function setUHostIP(string $uHostIP) + { + $this->set("UHostIP", $uHostIP); + } + + /** + * HostId: 挂载的Host的Id + * + * @return string|null + */ + public function getHostId(): string + { + return $this->get("HostId"); + } + + /** + * HostId: 挂载的Host的Id + * + * @param string $hostId + */ + public function setHostId(string $hostId) + { + $this->set("HostId", $hostId); + } + + /** + * HostName: 挂载的Host的Name + * + * @return string|null + */ + public function getHostName(): string + { + return $this->get("HostName"); + } + + /** + * HostName: 挂载的Host的Name + * + * @param string $hostName + */ + public function setHostName(string $hostName) + { + $this->set("HostName", $hostName); + } + + /** + * HostIP: 挂载的Host的IP + * + * @return string|null + */ + public function getHostIP(): string + { + return $this->get("HostIP"); + } + + /** + * HostIP: 挂载的Host的IP + * + * @param string $hostIP + */ + public function setHostIP(string $hostIP) + { + $this->set("HostIP", $hostIP); + } + + /** + * DeviceName: 挂载的设备名称 + * + * @return string|null + */ + public function getDeviceName(): string + { + return $this->get("DeviceName"); + } + + /** + * DeviceName: 挂载的设备名称 + * + * @param string $deviceName + */ + public function setDeviceName(string $deviceName) + { + $this->set("DeviceName", $deviceName); + } + + /** + * ChargeType: Year,Month,Dynamic,Trial,Postpay + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: Year,Month,Dynamic,Trial,Postpay + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Tag: 业务组名称 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组名称 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * IsExpire: 资源是否过期,过期:"Yes", 未过期:"No" + * + * @return string|null + */ + public function getIsExpire(): string + { + return $this->get("IsExpire"); + } + + /** + * IsExpire: 资源是否过期,过期:"Yes", 未过期:"No" + * + * @param string $isExpire + */ + public function setIsExpire(string $isExpire) + { + $this->set("IsExpire", $isExpire); + } + + /** + * Version: 是否支持数据方舟,支持:"2.0", 不支持:"1.0" + * + * @return string|null + */ + public function getVersion(): string + { + return $this->get("Version"); + } + + /** + * Version: 是否支持数据方舟,支持:"2.0", 不支持:"1.0" + * + * @param string $version + */ + public function setVersion(string $version) + { + $this->set("Version", $version); + } + + /** + * UDataArkMode: 是否开启数据方舟,开启:"Yes", 不支持:"No" + * + * @return string|null + */ + public function getUDataArkMode(): string + { + return $this->get("UDataArkMode"); + } + + /** + * UDataArkMode: 是否开启数据方舟,开启:"Yes", 不支持:"No" + * + * @param string $uDataArkMode + */ + public function setUDataArkMode(string $uDataArkMode) + { + $this->set("UDataArkMode", $uDataArkMode); + } + + /** + * SnapshotCount: 该盘快照个数 + * + * @return integer|null + */ + public function getSnapshotCount(): int + { + return $this->get("SnapshotCount"); + } + + /** + * SnapshotCount: 该盘快照个数 + * + * @param int $snapshotCount + */ + public function setSnapshotCount(int $snapshotCount) + { + $this->set("SnapshotCount", $snapshotCount); + } + + /** + * SnapshotLimit: 该盘快照上限 + * + * @return integer|null + */ + public function getSnapshotLimit(): int + { + return $this->get("SnapshotLimit"); + } + + /** + * SnapshotLimit: 该盘快照上限 + * + * @param int $snapshotLimit + */ + public function setSnapshotLimit(int $snapshotLimit) + { + $this->set("SnapshotLimit", $snapshotLimit); + } + + /** + * DiskType: 请求中的ProtocolVersion字段为1时,需结合IsBoot确定具体磁盘类型:普通数据盘:DiskType:"CLOUD_NORMAL",IsBoot:"False"; 普通系统盘:DiskType:"CLOUD_NORMAL",IsBoot:"True";SSD数据盘:DiskType:"CLOUD_SSD",IsBoot:"False";SSD系统盘:DiskType:"CLOUD_SSD",IsBoot:"True";RSSD数据盘:DiskType:"CLOUD_RSSD",IsBoot:"False"。请求中的ProtocolVersion字段为0或没有该字段时,云硬盘类型参照如下:普通数据盘:DataDisk;普通系统盘:SystemDisk;SSD数据盘:SSDDataDisk;SSD系统盘:SSDSystemDisk;RSSD数据盘:RSSDDataDisk。 + * + * @return string|null + */ + public function getDiskType(): string + { + return $this->get("DiskType"); + } + + /** + * DiskType: 请求中的ProtocolVersion字段为1时,需结合IsBoot确定具体磁盘类型:普通数据盘:DiskType:"CLOUD_NORMAL",IsBoot:"False"; 普通系统盘:DiskType:"CLOUD_NORMAL",IsBoot:"True";SSD数据盘:DiskType:"CLOUD_SSD",IsBoot:"False";SSD系统盘:DiskType:"CLOUD_SSD",IsBoot:"True";RSSD数据盘:DiskType:"CLOUD_RSSD",IsBoot:"False"。请求中的ProtocolVersion字段为0或没有该字段时,云硬盘类型参照如下:普通数据盘:DataDisk;普通系统盘:SystemDisk;SSD数据盘:SSDDataDisk;SSD系统盘:SSDSystemDisk;RSSD数据盘:RSSDDataDisk。 + * + * @param string $diskType + */ + public function setDiskType(string $diskType) + { + $this->set("DiskType", $diskType); + } + + /** + * CloneEnable: 是否支持克隆,1支持 ,0不支持 + * + * @return integer|null + */ + public function getCloneEnable(): int + { + return $this->get("CloneEnable"); + } + + /** + * CloneEnable: 是否支持克隆,1支持 ,0不支持 + * + * @param int $cloneEnable + */ + public function setCloneEnable(int $cloneEnable) + { + $this->set("CloneEnable", $cloneEnable); + } + + /** + * SnapEnable: 是否支持快照,1支持 ,0不支持 + * + * @return integer|null + */ + public function getSnapEnable(): int + { + return $this->get("SnapEnable"); + } + + /** + * SnapEnable: 是否支持快照,1支持 ,0不支持 + * + * @param int $snapEnable + */ + public function setSnapEnable(int $snapEnable) + { + $this->set("SnapEnable", $snapEnable); + } + + /** + * ArkSwitchEnable: 是否支持开启方舟,1支持 ,0不支持 + * + * @return integer|null + */ + public function getArkSwitchEnable(): int + { + return $this->get("ArkSwitchEnable"); + } + + /** + * ArkSwitchEnable: 是否支持开启方舟,1支持 ,0不支持 + * + * @param int $arkSwitchEnable + */ + public function setArkSwitchEnable(int $arkSwitchEnable) + { + $this->set("ArkSwitchEnable", $arkSwitchEnable); + } + + /** + * UKmsMode: 是否是加密盘,是:"Yes", 否:"No" + * + * @return string|null + */ + public function getUKmsMode(): string + { + return $this->get("UKmsMode"); + } + + /** + * UKmsMode: 是否是加密盘,是:"Yes", 否:"No" + * + * @param string $uKmsMode + */ + public function setUKmsMode(string $uKmsMode) + { + $this->set("UKmsMode", $uKmsMode); + } + + /** + * CmkId: 该盘的cmk id + * + * @return string|null + */ + public function getCmkId(): string + { + return $this->get("CmkId"); + } + + /** + * CmkId: 该盘的cmk id + * + * @param string $cmkId + */ + public function setCmkId(string $cmkId) + { + $this->set("CmkId", $cmkId); + } + + /** + * DataKey: 该盘的密文密钥 + * + * @return string|null + */ + public function getDataKey(): string + { + return $this->get("DataKey"); + } + + /** + * DataKey: 该盘的密文密钥 + * + * @param string $dataKey + */ + public function setDataKey(string $dataKey) + { + $this->set("DataKey", $dataKey); + } + + /** + * CmkIdStatus: 该盘cmk的状态, Enabled(正常),Disabled(失效),Deleted(删除),NoCmkId(非加密盘) + * + * @return string|null + */ + public function getCmkIdStatus(): string + { + return $this->get("CmkIdStatus"); + } + + /** + * CmkIdStatus: 该盘cmk的状态, Enabled(正常),Disabled(失效),Deleted(删除),NoCmkId(非加密盘) + * + * @param string $cmkIdStatus + */ + public function setCmkIdStatus(string $cmkIdStatus) + { + $this->set("CmkIdStatus", $cmkIdStatus); + } + + /** + * CmkIdAlias: cmk id 别名 + * + * @return string|null + */ + public function getCmkIdAlias(): string + { + return $this->get("CmkIdAlias"); + } + + /** + * CmkIdAlias: cmk id 别名 + * + * @param string $cmkIdAlias + */ + public function setCmkIdAlias(string $cmkIdAlias) + { + $this->set("CmkIdAlias", $cmkIdAlias); + } + + /** + * IsBoot: 是否是系统盘,是:"True", 否:"False" + * + * @return string|null + */ + public function getIsBoot(): string + { + return $this->get("IsBoot"); + } + + /** + * IsBoot: 是否是系统盘,是:"True", 否:"False" + * + * @param string $isBoot + */ + public function setIsBoot(string $isBoot) + { + $this->set("IsBoot", $isBoot); + } + + /** + * BackupMode: 该盘的备份方式。快照服务:"SnapshotService";数据方舟:"UDataArk";无备份方式:"" + * + * @return string|null + */ + public function getBackupMode(): string + { + return $this->get("BackupMode"); + } + + /** + * BackupMode: 该盘的备份方式。快照服务:"SnapshotService";数据方舟:"UDataArk";无备份方式:"" + * + * @param string $backupMode + */ + public function setBackupMode(string $backupMode) + { + $this->set("BackupMode", $backupMode); + } + + /** + * RdmaClusterId: RDMA集群id,仅RSSD返回该值;其他类型云盘返回""。当云盘的此值与快杰云主机的RdmaClusterId相同时,RSSD可以挂载到这台云主机。 + * + * @return string|null + */ + public function getRdmaClusterId(): string + { + return $this->get("RdmaClusterId"); + } + + /** + * RdmaClusterId: RDMA集群id,仅RSSD返回该值;其他类型云盘返回""。当云盘的此值与快杰云主机的RdmaClusterId相同时,RSSD可以挂载到这台云主机。 + * + * @param string $rdmaClusterId + */ + public function setRdmaClusterId(string $rdmaClusterId) + { + $this->set("RdmaClusterId", $rdmaClusterId); + } +} diff --git a/src/UDisk/Models/UDiskPriceDataSet.php b/src/UDisk/Models/UDiskPriceDataSet.php new file mode 100644 index 00000000..7ed9047e --- /dev/null +++ b/src/UDisk/Models/UDiskPriceDataSet.php @@ -0,0 +1,124 @@ +get("ChargeType"); + } + + /** + * ChargeType: Year, Month, Dynamic,Trial + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Price: 实际价格 (单位: 分) + * + * @return integer|null + */ + public function getPrice(): int + { + return $this->get("Price"); + } + + /** + * Price: 实际价格 (单位: 分) + * + * @param int $price + */ + public function setPrice(int $price) + { + $this->set("Price", $price); + } + + /** + * ChargeName: "UDataArk","SnapshotService","UDisk","Total" + * + * @return string|null + */ + public function getChargeName(): string + { + return $this->get("ChargeName"); + } + + /** + * ChargeName: "UDataArk","SnapshotService","UDisk","Total" + * + * @param string $chargeName + */ + public function setChargeName(string $chargeName) + { + $this->set("ChargeName", $chargeName); + } + + /** + * OriginalPrice: 用户折后价(对应计费CustomPrice) + * + * @return integer|null + */ + public function getOriginalPrice(): int + { + return $this->get("OriginalPrice"); + } + + /** + * OriginalPrice: 用户折后价(对应计费CustomPrice) + * + * @param int $originalPrice + */ + public function setOriginalPrice(int $originalPrice) + { + $this->set("OriginalPrice", $originalPrice); + } + + /** + * ListPrice: 原价(对应计费OriginalPrice) + * + * @return integer|null + */ + public function getListPrice(): int + { + return $this->get("ListPrice"); + } + + /** + * ListPrice: 原价(对应计费OriginalPrice) + * + * @param int $listPrice + */ + public function setListPrice(int $listPrice) + { + $this->set("ListPrice", $listPrice); + } +} diff --git a/src/UDisk/Models/UDiskSnapshotSet.php b/src/UDisk/Models/UDiskSnapshotSet.php new file mode 100644 index 00000000..86103ec8 --- /dev/null +++ b/src/UDisk/Models/UDiskSnapshotSet.php @@ -0,0 +1,404 @@ +get("Zone"); + } + + /** + * Zone: 可用区 + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * SnapshotId: 快照Id + * + * @return string|null + */ + public function getSnapshotId(): string + { + return $this->get("SnapshotId"); + } + + /** + * SnapshotId: 快照Id + * + * @param string $snapshotId + */ + public function setSnapshotId(string $snapshotId) + { + $this->set("SnapshotId", $snapshotId); + } + + /** + * Name: 快照名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 快照名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * UDiskId: 快照的源UDisk的Id + * + * @return string|null + */ + public function getUDiskId(): string + { + return $this->get("UDiskId"); + } + + /** + * UDiskId: 快照的源UDisk的Id + * + * @param string $uDiskId + */ + public function setUDiskId(string $uDiskId) + { + $this->set("UDiskId", $uDiskId); + } + + /** + * UDiskName: 快照的源UDisk的Name + * + * @return string|null + */ + public function getUDiskName(): string + { + return $this->get("UDiskName"); + } + + /** + * UDiskName: 快照的源UDisk的Name + * + * @param string $uDiskName + */ + public function setUDiskName(string $uDiskName) + { + $this->set("UDiskName", $uDiskName); + } + + /** + * CreateTime: 创建时间 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * Size: 容量单位GB + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 容量单位GB + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * Status: 快照状态,Normal:正常,Failed:失败,Creating:制作中 + * + * @return string|null + */ + public function getStatus(): string + { + return $this->get("Status"); + } + + /** + * Status: 快照状态,Normal:正常,Failed:失败,Creating:制作中 + * + * @param string $status + */ + public function setStatus(string $status) + { + $this->set("Status", $status); + } + + /** + * DiskType: 磁盘类型,0:数据盘,1:系统盘 + * + * @return integer|null + */ + public function getDiskType(): int + { + return $this->get("DiskType"); + } + + /** + * DiskType: 磁盘类型,0:数据盘,1:系统盘 + * + * @param int $diskType + */ + public function setDiskType(int $diskType) + { + $this->set("DiskType", $diskType); + } + + /** + * ExpiredTime: 过期时间 + * + * @return integer|null + */ + public function getExpiredTime(): int + { + return $this->get("ExpiredTime"); + } + + /** + * ExpiredTime: 过期时间 + * + * @param int $expiredTime + */ + public function setExpiredTime(int $expiredTime) + { + $this->set("ExpiredTime", $expiredTime); + } + + /** + * Comment: 快照描述 + * + * @return string|null + */ + public function getComment(): string + { + return $this->get("Comment"); + } + + /** + * Comment: 快照描述 + * + * @param string $comment + */ + public function setComment(string $comment) + { + $this->set("Comment", $comment); + } + + /** + * IsUDiskAvailable: 对应磁盘是否处于可用状态 + * + * @return boolean|null + */ + public function getIsUDiskAvailable(): bool + { + return $this->get("IsUDiskAvailable"); + } + + /** + * IsUDiskAvailable: 对应磁盘是否处于可用状态 + * + * @param boolean $isUDiskAvailable + */ + public function setIsUDiskAvailable(bool $isUDiskAvailable) + { + $this->set("IsUDiskAvailable", $isUDiskAvailable); + } + + /** + * Version: 快照版本 + * + * @return string|null + */ + public function getVersion(): string + { + return $this->get("Version"); + } + + /** + * Version: 快照版本 + * + * @param string $version + */ + public function setVersion(string $version) + { + $this->set("Version", $version); + } + + /** + * UHostId: 对应磁盘制作快照时所挂载的主机 + * + * @return string|null + */ + public function getUHostId(): string + { + return $this->get("UHostId"); + } + + /** + * UHostId: 对应磁盘制作快照时所挂载的主机 + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } + + /** + * UKmsMode: 是否是加密盘快照,是:"Yes", 否:"No" + * + * @return string|null + */ + public function getUKmsMode(): string + { + return $this->get("UKmsMode"); + } + + /** + * UKmsMode: 是否是加密盘快照,是:"Yes", 否:"No" + * + * @param string $uKmsMode + */ + public function setUKmsMode(string $uKmsMode) + { + $this->set("UKmsMode", $uKmsMode); + } + + /** + * CmkId: 该快照的cmk id + * + * @return string|null + */ + public function getCmkId(): string + { + return $this->get("CmkId"); + } + + /** + * CmkId: 该快照的cmk id + * + * @param string $cmkId + */ + public function setCmkId(string $cmkId) + { + $this->set("CmkId", $cmkId); + } + + /** + * DataKey: 该快照的密文密钥 + * + * @return string|null + */ + public function getDataKey(): string + { + return $this->get("DataKey"); + } + + /** + * DataKey: 该快照的密文密钥 + * + * @param string $dataKey + */ + public function setDataKey(string $dataKey) + { + $this->set("DataKey", $dataKey); + } + + /** + * CmkIdStatus: 该快照cmk的状态, Enabled(正常),Disabled(失效),Deleted(删除),NoCmkId(非加密盘) + * + * @return string|null + */ + public function getCmkIdStatus(): string + { + return $this->get("CmkIdStatus"); + } + + /** + * CmkIdStatus: 该快照cmk的状态, Enabled(正常),Disabled(失效),Deleted(删除),NoCmkId(非加密盘) + * + * @param string $cmkIdStatus + */ + public function setCmkIdStatus(string $cmkIdStatus) + { + $this->set("CmkIdStatus", $cmkIdStatus); + } + + /** + * CmkIdAlias: cmk id 别名 + * + * @return string|null + */ + public function getCmkIdAlias(): string + { + return $this->get("CmkIdAlias"); + } + + /** + * CmkIdAlias: cmk id 别名 + * + * @param string $cmkIdAlias + */ + public function setCmkIdAlias(string $cmkIdAlias) + { + $this->set("CmkIdAlias", $cmkIdAlias); + } +} diff --git a/src/UDisk/UDiskClient.php b/src/UDisk/UDiskClient.php new file mode 100644 index 00000000..43879b07 --- /dev/null +++ b/src/UDisk/UDiskClient.php @@ -0,0 +1,808 @@ + (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "UDiskId" => (string) 需要挂载的UDisk实例ID. + * "UHostId" => (string) UHost实例ID。【UHostId和HostId必须选填一个,本字段即将废弃,建议使用HostId】 + * "MultiAttach" => (string) 是否允许多点挂载(Yes: 允许多点挂载, No: 不允许多点挂载, 不填默认Yes ) + * "HostId" => (string) Host实例ID + * ] + * + * Outputs: + * + * $outputs = [ + * "UHostId" => (string) 挂载的UHost实例ID。【即将废弃,建议使用HostId】 + * "UDiskId" => (string) 挂载的UDisk实例ID + * "DeviceName" => (string) 挂载的设备名称 + * "HostId" => (string) 挂载的Host实例ID + * ] + * + * @throws UCloudException + */ + public function attachUDisk(AttachUDiskRequest $request = null): AttachUDiskResponse + { + $resp = $this->invoke($request); + return new AttachUDiskResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CloneUDisk - 从UDisk创建UDisk克隆 + * + * See also: https://docs.ucloud.cn/api/UDisk-api/clone_udisk + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Name" => (string) 实例名称 + * "SourceId" => (string) 克隆父Disk的Id + * "UDataArkMode" => (string) 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + * "SnapshotService" => (string) 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + * "Quantity" => (integer) 购买时长 默认: 1 + * "Comment" => (string) Disk注释 + * "ChargeType" => (string) Year , Month, Dynamic,Postpay,Trial 默认: Month + * "Tag" => (string) 业务组 默认:Default + * "RdmaClusterId" => (string) RDMA集群id。指定RSSD云盘克隆到对应的RDMA集群。 + * "CouponId" => (string) 使用的代金券id + * ] + * + * Outputs: + * + * $outputs = [ + * "UDiskId" => (array) 创建UDisk Id + * ] + * + * @throws UCloudException + */ + public function cloneUDisk(CloneUDiskRequest $request = null): CloneUDiskResponse + { + $resp = $this->invoke($request); + return new CloneUDiskResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CloneUDiskSnapshot - 从快照创建UDisk克隆 + * + * See also: https://docs.ucloud.cn/api/UDisk-api/clone_udisk_snapshot + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Name" => (string) 实例名称 + * "SourceId" => (string) 克隆父Snapshot的Id + * "Size" => (integer) 购买UDisk大小,单位:GB,范围[1~8000]。(UDisk大小设定对本地盘快照有效,对云盘快照无效) + * "Comment" => (string) Disk注释 + * "ChargeType" => (string) Year , Month, Dynamic,Postpay 默认: Dynamic + * "Quantity" => (integer) 购买时长 默认: 1 + * "UDataArkMode" => (string) 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + * "SnapshotService" => (string) 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + * "Tag" => (string) 业务组 默认:Default + * "RdmaClusterId" => (string) RDMA集群id。指定RSSD云盘克隆到对应的RDMA集群。 + * "CouponId" => (string) 使用的代金券id + * ] + * + * Outputs: + * + * $outputs = [ + * "UDiskId" => (array) 创建UDisk Id + * ] + * + * @throws UCloudException + */ + public function cloneUDiskSnapshot(CloneUDiskSnapshotRequest $request = null): CloneUDiskSnapshotResponse + { + $resp = $this->invoke($request); + return new CloneUDiskSnapshotResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CloneUDiskUDataArk - 从数据方舟的备份创建UDisk + * + * See also: https://docs.ucloud.cn/api/UDisk-api/clone_udisk_udataark + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Name" => (string) 实例名称 + * "UDiskId" => (string) 需要克隆的源盘id + * "SnapshotTime" => (integer) 指定从方舟克隆的备份时间点 + * "Comment" => (string) Disk注释 + * "ChargeType" => (string) Year , Month, Dynamic,Postpay 默认: Dynamic + * "Quantity" => (integer) 购买时长 默认: 1 + * "UDataArkMode" => (string) 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + * "SnapshotService" => (string) 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + * "Size" => (integer) 购买UDisk大小,单位:GB,范围[1~8000]。(UDisk大小设定对本地盘备份有效,对云盘备份无效) + * "Tag" => (string) 业务组 默认:Default + * "RdmaClusterId" => (string) RDMA集群id。指定RSSD云盘克隆到对应的RDMA集群。 + * "CouponId" => (string) 使用的代金券id + * ] + * + * Outputs: + * + * $outputs = [ + * "UDiskId" => (array) 创建UDisk Id + * ] + * + * @throws UCloudException + */ + public function cloneUDiskUDataArk(CloneUDiskUDataArkRequest $request = null): CloneUDiskUDataArkResponse + { + $resp = $this->invoke($request); + return new CloneUDiskUDataArkResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateAttachUDisk - 创建并挂载UDisk磁盘 + * + * See also: https://docs.ucloud.cn/api/UDisk-api/create_attach_udisk + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Size" => (integer) 购买UDisk大小,单位:GB,普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];RSSD数据盘:范围[1~32000];高效数据盘:范围[1~32000]。 + * "Name" => (string) 实例名称 + * "UHostId" => (string) UHost实例ID。当创建云盘类型为RSSDDataDisk时,根据传入的UHostId,创建与虚机在同一PodId下的云盘。【UHostId和HostId必须选填一个,本字段即将废弃,建议使用HostId】 + * "ChargeType" => (string) Year , Month, Dynamic, Postpay, Trial 。 Size小于等于2000时,默认为Dynamic;Size大于2000时,默认为Month。 + * "Quantity" => (integer) 购买时长 默认: 1 + * "UDataArkMode" => (string) 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + * "SnapshotService" => (string) 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + * "Tag" => (string) 业务组 默认:Default + * "DiskType" => (string) UDisk 类型: DataDisk(普通数据盘),SSDDataDisk(SSD数据盘),RSSDDataDisk(RSSD数据盘),EfficiencyDataDisk(高效数据盘),默认值(DataDisk) + * "UKmsMode" => (string) 是否加密。Yes:加密,No:不加密,默认值(No) + * "CmkId" => (string) 加密需要的cmk id,UKmsMode为Yes时,必填 + * "MultiAttach" => (string) 是否允许多点挂载(Yes: 允许多点挂载, No: 不允许多点挂载, 不填默认Yes ) + * "HostId" => (string) Host实例ID。当创建云盘类型为RSSDDataDisk时,根据传入的HostId,创建与虚机在同一PodId下的云盘。 + * "CouponId" => (string) 使用的代金券id + * ] + * + * Outputs: + * + * $outputs = [ + * "UDiskId" => (string) 挂载的UDisk实例ID + * "UHostId" => (string) 挂载的UHost实例ID。【即将废弃,建议使用HostId】 + * "HostId" => (string) 挂载的Host实例ID + * "DeviceName" => (string) 挂载设备名称 + * ] + * + * @throws UCloudException + */ + public function createAttachUDisk(CreateAttachUDiskRequest $request = null): CreateAttachUDiskResponse + { + $resp = $this->invoke($request); + return new CreateAttachUDiskResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUDisk - 创建UDisk磁盘 + * + * See also: https://docs.ucloud.cn/api/UDisk-api/create_udisk + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Size" => (integer) 购买UDisk大小,单位:GB,普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];RSSD数据盘:范围[1~32000];高效数据盘:范围[1~32000]。 + * "Name" => (string) 实例名称 + * "ChargeType" => (string) Year , Month, Dynamic, Postpay, Trial 。默认为Dynamic。 + * "Quantity" => (integer) 购买时长 默认: 1 + * "UDataArkMode" => (string) 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + * "SnapshotService" => (string) 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + * "Tag" => (string) 业务组 默认:Default + * "DiskType" => (string) UDisk 类型: DataDisk(普通数据盘),SSDDataDisk(SSD数据盘),RSSDDataDisk(RSSD数据盘),EfficiencyDataDisk(高效数据盘),默认值(DataDisk) + * "UKmsMode" => (string) 是否加密。Yes:加密,No:不加密,默认值(No) + * "CmkId" => (string) 加密需要的cmk id,UKmsMode为Yes时,必填 + * "RdmaClusterId" => (string) RDMA集群id。DiskType为RSSDDataDisk可填,指定云盘创建到对应的RDMA集群。 + * "CouponId" => (string) 使用的代金券id + * ] + * + * Outputs: + * + * $outputs = [ + * "UDiskId" => (array) UDisk实例Id + * ] + * + * @throws UCloudException + */ + public function createUDisk(CreateUDiskRequest $request = null): CreateUDiskResponse + { + $resp = $this->invoke($request); + return new CreateUDiskResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUDiskSnapshot - 创建snapshot快照 + * + * See also: https://docs.ucloud.cn/api/UDisk-api/create_udisk_snapshot + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "UDiskId" => (string) 快照的UDisk的Id + * "Name" => (string) 快照名称 + * "Quantity" => (integer) 购买时长 默认: 1 (已废弃) + * "ChargeType" => (string) Year , Month, Dynamic 默认: Dynamic (已废弃) + * "Comment" => (string) 快照描述 + * ] + * + * Outputs: + * + * $outputs = [ + * "SnapshotId" => (array) 快照Id + * ] + * + * @throws UCloudException + */ + public function createUDiskSnapshot(CreateUDiskSnapshotRequest $request = null): CreateUDiskSnapshotResponse + { + $resp = $this->invoke($request); + return new CreateUDiskSnapshotResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteUDisk - 删除UDisk + * + * See also: https://docs.ucloud.cn/api/UDisk-api/delete_udisk + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "UDiskId" => (string) 要删除的UDisk的Id + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteUDisk(DeleteUDiskRequest $request = null): DeleteUDiskResponse + { + $resp = $this->invoke($request); + return new DeleteUDiskResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteUDiskSnapshot - 删除Snapshot + * + * See also: https://docs.ucloud.cn/api/UDisk-api/delete_udisk_snapshot + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "SnapshotId" => (string) 快照Id(填写后不能填写UDisk Id) + * "UDiskId" => (string) UDisk Id,删除该盘所创建出来的所有快照(填写后不能填写SnapshotId) + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteUDiskSnapshot(DeleteUDiskSnapshotRequest $request = null): DeleteUDiskSnapshotResponse + { + $resp = $this->invoke($request); + return new DeleteUDiskSnapshotResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeRecycleUDisk - 拉取回收站中云硬盘列表 + * + * See also: https://docs.ucloud.cn/api/UDisk-api/describe_recycle_udisk + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Limit" => (integer) 返回数据长度, 默认为20 + * "Offset" => (integer) 数据偏移量, 默认为0 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 磁盘数量 + * "DataSet" => (array) 回收站磁盘列表[ + * [ + * "UDiskId" => (string) 磁盘id + * "CreateTime" => (integer) 创建时间 + * "ExpiredTime" => (integer) 过期时间 + * "CountdownTime" => (integer) 销毁倒计时 + * "Name" => (string) 磁盘名称 + * "Size" => (integer) 磁盘容量 + * "Tag" => (string) 业务组 + * "Zone" => (string) 可用区 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeRecycleUDisk(DescribeRecycleUDiskRequest $request = null): DescribeRecycleUDiskResponse + { + $resp = $this->invoke($request); + return new DescribeRecycleUDiskResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDisk - 获取UDisk实例 + * + * See also: https://docs.ucloud.cn/api/UDisk-api/describe_udisk + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "UDiskId" => (string) UDisk Id(留空返回全部) + * "Offset" => (integer) 数据偏移量, 默认为0 + * "Limit" => (integer) 返回数据长度, 默认为20 + * "DiskType" => (string) ProtocolVersion字段为1时,需结合IsBoot确定具体磁盘类型:普通数据盘:DiskType:"CLOUD_NORMAL",IsBoot:"False";普通系统盘:DiskType:"CLOUD_NORMAL",IsBoot:"True";SSD数据盘:DiskType:"CLOUD_SSD",IsBoot:"False";SSD系统盘:DiskType:"CLOUD_SSD",IsBoot:"True";RSSD数据盘:DiskType:"CLOUD_RSSD",IsBoot:"False";为空拉取所有。ProtocolVersion字段为0或没有该字段时,可设为以下几个值:普通数据盘:DataDisk;普通系统盘:SystemDisk;SSD数据盘:SSDDataDisk;SSD系统盘:SSDSystemDisk;RSSD数据盘:RSSDDataDisk;为空拉取所有。 + * "ProtocolVersion" => (integer) 请求协议版本,建议升级为1,为1时DiskType与UHost磁盘类型定义一致;默认为0 + * "IsBoot" => (string) ProtocolVersion字段为1且DiskType不为空时,必须设置,设置规则请参照DiskType;ProtocolVersion字段为1且DiskType为空时,该字段无效。ProtocolVersion字段为0或没有该字段时,该字段无效。 + * "IgnoreUBillInfo" => (string) 是否忽略计费信息。Yes:忽略,No:不忽略,默认值(No)。(如不关心账单信息,建议选填“Yes”,可降低请求延时) + * "UHostIdForAttachment" => (string) 根据传入的UHostIdForAttachment,筛选出虚机在同一PodId下的云盘【本字段即将废弃,建议使用HostIdForAttachment】 + * "HostIdForAttachment" => (string) 根据传入的HostIdForAttachment,筛选出虚机在同一PodId下的云盘 + * "HostProduct" => (string) 宿主产品类型,可筛选挂载在该类型宿主上的云盘。可选值:uhost, uphost。为空拉取所有。(当HostIdForAttachment字段不为空时,该字段可以不填,若HostIdForAttachment与该字段宿主类型冲突,则以HostIdForAttachment字段为准。) + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) JSON 格式的UDisk数据列表, 每项参数可见下面 UDiskDataSet[ + * [ + * "Zone" => (string) 可用区 + * "UDiskId" => (string) UDisk实例Id + * "Name" => (string) 实例名称 + * "Size" => (integer) 容量单位GB + * "Status" => (string) 状态:Available(可用),Attaching(挂载中), InUse(已挂载), Detaching(卸载中), Initializating(分配中), Failed(创建失败),Cloning(克隆中),Restoring(恢复中),RestoreFailed(恢复失败), + * "CreateTime" => (integer) 创建时间 + * "ExpiredTime" => (integer) 过期时间 + * "UHostId" => (string) 挂载的UHost的Id。【即将废弃,建议使用HostId】 + * "UHostName" => (string) 挂载的UHost的Name。【即将废弃,建议使用HostName】 + * "UHostIP" => (string) 挂载的UHost的IP。【即将废弃,建议使用HostIP】 + * "HostId" => (string) 挂载的Host的Id + * "HostName" => (string) 挂载的Host的Name + * "HostIP" => (string) 挂载的Host的IP + * "DeviceName" => (string) 挂载的设备名称 + * "ChargeType" => (string) Year,Month,Dynamic,Trial,Postpay + * "Tag" => (string) 业务组名称 + * "IsExpire" => (string) 资源是否过期,过期:"Yes", 未过期:"No" + * "Version" => (string) 是否支持数据方舟,支持:"2.0", 不支持:"1.0" + * "UDataArkMode" => (string) 是否开启数据方舟,开启:"Yes", 不支持:"No" + * "SnapshotCount" => (integer) 该盘快照个数 + * "SnapshotLimit" => (integer) 该盘快照上限 + * "DiskType" => (string) 请求中的ProtocolVersion字段为1时,需结合IsBoot确定具体磁盘类型:普通数据盘:DiskType:"CLOUD_NORMAL",IsBoot:"False"; 普通系统盘:DiskType:"CLOUD_NORMAL",IsBoot:"True";SSD数据盘:DiskType:"CLOUD_SSD",IsBoot:"False";SSD系统盘:DiskType:"CLOUD_SSD",IsBoot:"True";RSSD数据盘:DiskType:"CLOUD_RSSD",IsBoot:"False"。请求中的ProtocolVersion字段为0或没有该字段时,云硬盘类型参照如下:普通数据盘:DataDisk;普通系统盘:SystemDisk;SSD数据盘:SSDDataDisk;SSD系统盘:SSDSystemDisk;RSSD数据盘:RSSDDataDisk。 + * "CloneEnable" => (integer) 是否支持克隆,1支持 ,0不支持 + * "SnapEnable" => (integer) 是否支持快照,1支持 ,0不支持 + * "ArkSwitchEnable" => (integer) 是否支持开启方舟,1支持 ,0不支持 + * "UKmsMode" => (string) 是否是加密盘,是:"Yes", 否:"No" + * "CmkId" => (string) 该盘的cmk id + * "DataKey" => (string) 该盘的密文密钥 + * "CmkIdStatus" => (string) 该盘cmk的状态, Enabled(正常),Disabled(失效),Deleted(删除),NoCmkId(非加密盘) + * "CmkIdAlias" => (string) cmk id 别名 + * "IsBoot" => (string) 是否是系统盘,是:"True", 否:"False" + * "BackupMode" => (string) 该盘的备份方式。快照服务:"SnapshotService";数据方舟:"UDataArk";无备份方式:"" + * "RdmaClusterId" => (string) RDMA集群id,仅RSSD返回该值;其他类型云盘返回""。当云盘的此值与快杰云主机的RdmaClusterId相同时,RSSD可以挂载到这台云主机。 + * ] + * ] + * "TotalCount" => (integer) 根据过滤条件得到的总数 + * ] + * + * @throws UCloudException + */ + public function describeUDisk(DescribeUDiskRequest $request = null): DescribeUDiskResponse + { + $resp = $this->invoke($request); + return new DescribeUDiskResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDiskPrice - 获取UDisk实例价格信息 + * + * See also: https://docs.ucloud.cn/api/UDisk-api/describe_udisk_price + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Size" => (integer) 购买UDisk大小,单位:GB,普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];普通系统盘:范围[1~8000];SSD系统盘:范围[1~4000];RSSD数据盘:范围[1~32000];RSSD系统盘:范围[1~4000];高效数据盘:范围[1~32000];高效系统盘:范围[1~500]。 + * "ChargeType" => (string) Year , Month, Dynamic,Postpay,Trial 默认: Month + * "Quantity" => (integer) 购买UDisk的时长,默认值为1 + * "UDataArkMode" => (string) 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + * "SnapshotService" => (string) 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + * "DiskType" => (string) UDisk 类型: DataDisk(普通数据盘),SSDDataDisk(SSD数据盘),RSSDDataDisk(RSSD数据盘),EfficiencyDataDisk(高效数据盘),SystemDisk(普通系统盘),SSDSystemDisk(SSD系统盘),RSSDSystemDisk(RSSD系统盘),EfficiencySystemDisk(高效系统盘),默认值(DataDisk) + * "IsTotalPrice" => (string) 是否将快照服务(数据方舟),云硬盘放入一张订单, 是:"Yes",否:"No",默认是"No" + * "MachineType" => (string) 云主机机型(V2.0),枚举值["N", "C", "G", "O", "OM"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 价格参数列表,具体说明见 UDiskPriceDataSet[ + * [ + * "ChargeType" => (string) Year, Month, Dynamic,Trial + * "Price" => (integer) 实际价格 (单位: 分) + * "ChargeName" => (string) "UDataArk","SnapshotService","UDisk","Total" + * "OriginalPrice" => (integer) 用户折后价(对应计费CustomPrice) + * "ListPrice" => (integer) 原价(对应计费OriginalPrice) + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeUDiskPrice(DescribeUDiskPriceRequest $request = null): DescribeUDiskPriceResponse + { + $resp = $this->invoke($request); + return new DescribeUDiskPriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDiskSnapshot - 获取UDisk快照 + * + * See also: https://docs.ucloud.cn/api/UDisk-api/describe_udisk_snapshot + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Offset" => (integer) 数据偏移量, 默认为0 + * "Limit" => (integer) 返回数据长度, 默认为20 + * "UDiskId" => (string) UDiskId,返回该盘所做快照.(必须同时传Zone) + * "SnapshotId" => (string) 快照id,SnapshotId , UDiskId 同时传SnapshotId优先 + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) JSON 格式的Snapshot列表, 详细参见 UDiskSnapshotSet[ + * [ + * "Zone" => (string) 可用区 + * "SnapshotId" => (string) 快照Id + * "Name" => (string) 快照名称 + * "UDiskId" => (string) 快照的源UDisk的Id + * "UDiskName" => (string) 快照的源UDisk的Name + * "CreateTime" => (integer) 创建时间 + * "Size" => (integer) 容量单位GB + * "Status" => (string) 快照状态,Normal:正常,Failed:失败,Creating:制作中 + * "DiskType" => (integer) 磁盘类型,0:数据盘,1:系统盘 + * "ExpiredTime" => (integer) 过期时间 + * "Comment" => (string) 快照描述 + * "IsUDiskAvailable" => (boolean) 对应磁盘是否处于可用状态 + * "Version" => (string) 快照版本 + * "UHostId" => (string) 对应磁盘制作快照时所挂载的主机 + * "UKmsMode" => (string) 是否是加密盘快照,是:"Yes", 否:"No" + * "CmkId" => (string) 该快照的cmk id + * "DataKey" => (string) 该快照的密文密钥 + * "CmkIdStatus" => (string) 该快照cmk的状态, Enabled(正常),Disabled(失效),Deleted(删除),NoCmkId(非加密盘) + * "CmkIdAlias" => (string) cmk id 别名 + * ] + * ] + * "TotalCount" => (integer) 根据过滤条件得到的总数 + * ] + * + * @throws UCloudException + */ + public function describeUDiskSnapshot(DescribeUDiskSnapshotRequest $request = null): DescribeUDiskSnapshotResponse + { + $resp = $this->invoke($request); + return new DescribeUDiskSnapshotResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDiskUpgradePrice - 获取UDisk升级价格信息 + * + * See also: https://docs.ucloud.cn/api/UDisk-api/describe_udisk_upgrade_price + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Size" => (integer) 购买UDisk大小,单位:GB,普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];普通系统盘:范围[1~8000];SSD系统盘:范围[1~4000];RSSD数据盘:范围[1~32000];RSSD系统盘:范围[1~4000];高效数据盘:范围[1~32000];高效系统盘:范围[1~500]。 + * "SourceId" => (string) 升级目标UDisk ID + * "UDataArkMode" => (string) 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + * "SnapshotService" => (string) 是否开启快照服务(开启快照服务,可免费开启数据方舟)。Yes:开启,No:不开启,默认值:No + * "DiskType" => (string) 【已废弃】UDisk 类型: DataDisk(普通数据盘),SSDDataDisk(SSD数据盘),RSSDDataDisk(RSSD数据盘),EfficiencyDataDisk(高效数据盘),SystemDisk(普通系统盘),SSDSystemDisk(SSD系统盘),RSSDSystemDisk(RSSD系统盘),EfficiencySystemDisk(高效系统盘),默认值(DataDisk) + * "MachineType" => (string) 【已废弃】云主机机型(V2.0),枚举值["N", "C", "G", "O", "OM"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * ] + * + * Outputs: + * + * $outputs = [ + * "Price" => (integer) 价格 + * "OriginalPrice" => (integer) 用户折后价 (对应计费CustomPrice) + * ] + * + * @throws UCloudException + */ + public function describeUDiskUpgradePrice(DescribeUDiskUpgradePriceRequest $request = null): DescribeUDiskUpgradePriceResponse + { + $resp = $this->invoke($request); + return new DescribeUDiskUpgradePriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DetachUDisk - 卸载某个已经挂载在指定UHost实例上的UDisk + * + * See also: https://docs.ucloud.cn/api/UDisk-api/detach_udisk + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "UDiskId" => (string) 需要卸载的UDisk实例ID + * "UHostId" => (string) UHost实例ID。【UHostId和HostId必须选填一个,本字段即将废弃,建议使用HostId】 + * "HostId" => (string) Host实例ID + * ] + * + * Outputs: + * + * $outputs = [ + * "UHostId" => (string) 卸载的UHost实例ID。【即将废弃,建议使用HostId】 + * "UDiskId" => (string) 卸载的UDisk实例ID + * "HostId" => (string) 卸载的Host实例ID + * ] + * + * @throws UCloudException + */ + public function detachUDisk(DetachUDiskRequest $request = null): DetachUDiskResponse + { + $resp = $this->invoke($request); + return new DetachUDiskResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * RecoverUDisk - 从回收站中恢复云硬盘 + * + * See also: https://docs.ucloud.cn/api/UDisk-api/recover_udisk + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "UDiskId" => (string) 云硬盘资源ID + * "ChargeType" => (string) Year , Month, Dynamic 默认: Dynamic + * "Quantity" => (integer) 购买时长 默认: 1 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function recoverUDisk(RecoverUDiskRequest $request = null): RecoverUDiskResponse + { + $resp = $this->invoke($request); + return new RecoverUDiskResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * RenameUDisk - 重命名UDisk + * + * See also: https://docs.ucloud.cn/api/UDisk-api/rename_udisk + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "UDiskId" => (string) 重命名的UDisk的Id + * "UDiskName" => (string) 重命名UDisk的name + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function renameUDisk(RenameUDiskRequest $request = null): RenameUDiskResponse + { + $resp = $this->invoke($request); + return new RenameUDiskResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ResizeUDisk - 调整UDisk容量 + * + * See also: https://docs.ucloud.cn/api/UDisk-api/resize_udisk + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "UDiskId" => (string) UDisk Id + * "Size" => (integer) 调整后大小, 单位:GB,普通数据盘:范围[1~8000];SSD数据盘:范围[1~8000];RSSD数据盘:范围[1~32000]。 + * "MachineType" => (string) 云主机机型(V2.0),枚举值["N", "C", "G", "O", "OM"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * "CouponId" => (string) 使用的代金券id + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function resizeUDisk(ResizeUDiskRequest $request = null): ResizeUDiskResponse + { + $resp = $this->invoke($request); + return new ResizeUDiskResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * RestoreUDisk - 从备份恢复数据至UDisk + * + * See also: https://docs.ucloud.cn/api/UDisk-api/restore_udisk + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "UDiskId" => (string) 需要恢复的盘ID + * "SnapshotId" => (string) 从指定的快照恢复 + * "SnapshotTime" => (integer) 指定从方舟恢复的备份时间点 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function restoreUDisk(RestoreUDiskRequest $request = null): RestoreUDiskResponse + { + $resp = $this->invoke($request); + return new RestoreUDiskResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * SetUDiskUDataArkMode - 设置UDisk数据方舟的状态 + * + * See also: https://docs.ucloud.cn/api/UDisk-api/set_udisk_udataark_mode + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "UDiskId" => (string) 需要设置数据方舟的UDisk的Id + * "UDataArkMode" => (string) 【开启数据方舟入口已关闭】是否开启数据方舟。Yes:开启,No:不开启,默认值:No + * "CouponId" => (string) 使用的代金券id + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function setUDiskUDataArkMode(SetUDiskUDataArkModeRequest $request = null): SetUDiskUDataArkModeResponse + { + $resp = $this->invoke($request); + return new SetUDiskUDataArkModeResponse($resp->toArray(), $resp->getRequestId()); + } +} diff --git a/src/UEC/Apis/BindUEcFirewallRequest.php b/src/UEC/Apis/BindUEcFirewallRequest.php new file mode 100644 index 00000000..d10268e1 --- /dev/null +++ b/src/UEC/Apis/BindUEcFirewallRequest.php @@ -0,0 +1,91 @@ + "BindUEcFirewall"]); + $this->markRequired("FirewallId"); + $this->markRequired("ResourceId"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * FirewallId: 防火墙Id + * + * @return string|null + */ + public function getFirewallId(): string + { + return $this->get("FirewallId"); + } + + /** + * FirewallId: 防火墙Id + * + * @param string $firewallId + */ + public function setFirewallId(string $firewallId) + { + $this->set("FirewallId", $firewallId); + } + + /** + * ResourceId: 虚拟机资源Id或容器组资源id + * + * @return string|null + */ + public function getResourceId(): string + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: 虚拟机资源Id或容器组资源id + * + * @param string $resourceId + */ + public function setResourceId(string $resourceId) + { + $this->set("ResourceId", $resourceId); + } +} diff --git a/src/UEC/Apis/BindUEcFirewallResponse.php b/src/UEC/Apis/BindUEcFirewallResponse.php new file mode 100644 index 00000000..da34665d --- /dev/null +++ b/src/UEC/Apis/BindUEcFirewallResponse.php @@ -0,0 +1,26 @@ + "CreateUEcFirewall"]); + $this->markRequired("Name"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Name: 防火墙名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 防火墙名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Rule: + * + * @return CreateUEcFirewallParamRule[]|null + */ + public function getRule(): array + { + $items = $this->get("Rule") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateUEcFirewallParamRule($item)); + } + return $result; + } + + /** + * Rule: + * + * @param CreateUEcFirewallParamRule[] $rule + */ + public function setRule(array $rule) + { + $result = []; + foreach ($rule as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * Remark: 描述 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 描述 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } +} diff --git a/src/UEC/Apis/CreateUEcFirewallResponse.php b/src/UEC/Apis/CreateUEcFirewallResponse.php new file mode 100644 index 00000000..6355fb41 --- /dev/null +++ b/src/UEC/Apis/CreateUEcFirewallResponse.php @@ -0,0 +1,44 @@ +get("FirewallId"); + } + + /** + * FirewallId: 防火墙Id + * + * @param string $firewallId + */ + public function setFirewallId(string $firewallId) + { + $this->set("FirewallId", $firewallId); + } +} diff --git a/src/UEC/Apis/CreateUEcHolderRequest.php b/src/UEC/Apis/CreateUEcHolderRequest.php new file mode 100644 index 00000000..1b7dbf9a --- /dev/null +++ b/src/UEC/Apis/CreateUEcHolderRequest.php @@ -0,0 +1,383 @@ + "CreateUEcHolder"]); + $this->markRequired("IdcId"); + $this->markRequired("CpuCore"); + $this->markRequired("MemSize"); + $this->markRequired("SubnetId"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * IdcId: 机房id + * + * @return string|null + */ + public function getIdcId(): string + { + return $this->get("IdcId"); + } + + /** + * IdcId: 机房id + * + * @param string $idcId + */ + public function setIdcId(string $idcId) + { + $this->set("IdcId", $idcId); + } + + /** + * CpuCore: 容器组Cpu总核数 + * + * @return float|null + */ + public function getCpuCore(): float + { + return $this->get("CpuCore"); + } + + /** + * CpuCore: 容器组Cpu总核数 + * + * @param float $cpuCore + */ + public function setCpuCore(float $cpuCore) + { + $this->set("CpuCore", $cpuCore); + } + + /** + * MemSize: 容器组总内存,单位MB + * + * @return integer|null + */ + public function getMemSize(): int + { + return $this->get("MemSize"); + } + + /** + * MemSize: 容器组总内存,单位MB + * + * @param int $memSize + */ + public function setMemSize(int $memSize) + { + $this->set("MemSize", $memSize); + } + + /** + * SubnetId: 子网ID + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网ID + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * Name: 容器组名称(默认default) + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 容器组名称(默认default) + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * ProductType: 机型(normal-标准型,hf-高性能型,默认normal) + * + * @return string|null + */ + public function getProductType(): string + { + return $this->get("ProductType"); + } + + /** + * ProductType: 机型(normal-标准型,hf-高性能型,默认normal) + * + * @param string $productType + */ + public function setProductType(string $productType) + { + $this->set("ProductType", $productType); + } + + /** + * RestartStrategy: 重启策略(0总是,1失败是,2永不,默认0) + * + * @return integer|null + */ + public function getRestartStrategy(): int + { + return $this->get("RestartStrategy"); + } + + /** + * RestartStrategy: 重启策略(0总是,1失败是,2永不,默认0) + * + * @param int $restartStrategy + */ + public function setRestartStrategy(int $restartStrategy) + { + $this->set("RestartStrategy", $restartStrategy); + } + + /** + * ElasticIp: 绑定外网ip(yes-绑定,no-不绑定,默认no) + * + * @return string|null + */ + public function getElasticIp(): string + { + return $this->get("ElasticIp"); + } + + /** + * ElasticIp: 绑定外网ip(yes-绑定,no-不绑定,默认no) + * + * @param string $elasticIp + */ + public function setElasticIp(string $elasticIp) + { + $this->set("ElasticIp", $elasticIp); + } + + /** + * Bandwidth: 外网绑定的带宽(单位M,默认0,只有当ElasticIp为yes时,默认1) + * + * @return integer|null + */ + public function getBandwidth(): int + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: 外网绑定的带宽(单位M,默认0,只有当ElasticIp为yes时,默认1) + * + * @param int $bandwidth + */ + public function setBandwidth(int $bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * FirewallId: 防火墙ID + * + * @return string|null + */ + public function getFirewallId(): string + { + return $this->get("FirewallId"); + } + + /** + * FirewallId: 防火墙ID + * + * @param string $firewallId + */ + public function setFirewallId(string $firewallId) + { + $this->set("FirewallId", $firewallId); + } + + /** + * ChargeType: 付费方式(2按月、3按年。默认2,默认月付) + * + * @return integer|null + */ + public function getChargeType(): int + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费方式(2按月、3按年。默认2,默认月付) + * + * @param int $chargeType + */ + public function setChargeType(int $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * ChargeQuantity: 月数或者年数(默认值:1,当为按月计费时,0表示计费到月底,默认值为0) + * + * @return integer|null + */ + public function getChargeQuantity(): int + { + return $this->get("ChargeQuantity"); + } + + /** + * ChargeQuantity: 月数或者年数(默认值:1,当为按月计费时,0表示计费到月底,默认值为0) + * + * @param int $chargeQuantity + */ + public function setChargeQuantity(int $chargeQuantity) + { + $this->set("ChargeQuantity", $chargeQuantity); + } + + /** + * Pack: + * + * @return CreateUEcHolderParamPack[]|null + */ + public function getPack(): array + { + $items = $this->get("Pack") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateUEcHolderParamPack($item)); + } + return $result; + } + + /** + * Pack: + * + * @param CreateUEcHolderParamPack[] $pack + */ + public function setPack(array $pack) + { + $result = []; + foreach ($pack as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * Image: + * + * @return CreateUEcHolderParamImage[]|null + */ + public function getImage(): array + { + $items = $this->get("Image") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateUEcHolderParamImage($item)); + } + return $result; + } + + /** + * Image: + * + * @param CreateUEcHolderParamImage[] $image + */ + public function setImage(array $image) + { + $result = []; + foreach ($image as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * Storage: + * + * @return CreateUEcHolderParamStorage[]|null + */ + public function getStorage(): array + { + $items = $this->get("Storage") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateUEcHolderParamStorage($item)); + } + return $result; + } + + /** + * Storage: + * + * @param CreateUEcHolderParamStorage[] $storage + */ + public function setStorage(array $storage) + { + $result = []; + foreach ($storage as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UEC/Apis/CreateUEcHolderResponse.php b/src/UEC/Apis/CreateUEcHolderResponse.php new file mode 100644 index 00000000..c70cfe45 --- /dev/null +++ b/src/UEC/Apis/CreateUEcHolderResponse.php @@ -0,0 +1,44 @@ +get("ResourceId"); + } + + /** + * ResourceId: 容器组资源id + * + * @param string $resourceId + */ + public function setResourceId(string $resourceId) + { + $this->set("ResourceId", $resourceId); + } +} diff --git a/src/UEC/Apis/CreateUEcSubnetRequest.php b/src/UEC/Apis/CreateUEcSubnetRequest.php new file mode 100644 index 00000000..0ce72ac5 --- /dev/null +++ b/src/UEC/Apis/CreateUEcSubnetRequest.php @@ -0,0 +1,131 @@ + "CreateUEcSubnet"]); + $this->markRequired("IdcId"); + $this->markRequired("CIDR"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * IdcId: 机房ID + * + * @return string|null + */ + public function getIdcId(): string + { + return $this->get("IdcId"); + } + + /** + * IdcId: 机房ID + * + * @param string $idcId + */ + public function setIdcId(string $idcId) + { + $this->set("IdcId", $idcId); + } + + /** + * CIDR: 子网cidr + * + * @return string|null + */ + public function getCIDR(): string + { + return $this->get("CIDR"); + } + + /** + * CIDR: 子网cidr + * + * @param string $cidr + */ + public function setCIDR(string $cidr) + { + $this->set("CIDR", $cidr); + } + + /** + * SubnetName: 子网名称 + * + * @return string|null + */ + public function getSubnetName(): string + { + return $this->get("SubnetName"); + } + + /** + * SubnetName: 子网名称 + * + * @param string $subnetName + */ + public function setSubnetName(string $subnetName) + { + $this->set("SubnetName", $subnetName); + } + + /** + * Comment: 备注 + * + * @return string|null + */ + public function getComment(): string + { + return $this->get("Comment"); + } + + /** + * Comment: 备注 + * + * @param string $comment + */ + public function setComment(string $comment) + { + $this->set("Comment", $comment); + } +} diff --git a/src/UEC/Apis/CreateUEcSubnetResponse.php b/src/UEC/Apis/CreateUEcSubnetResponse.php new file mode 100644 index 00000000..532b272d --- /dev/null +++ b/src/UEC/Apis/CreateUEcSubnetResponse.php @@ -0,0 +1,44 @@ +get("SubnetId"); + } + + /** + * SubnetId: 子网ID + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } +} diff --git a/src/UEC/Apis/CreateUEcVHostRequest.php b/src/UEC/Apis/CreateUEcVHostRequest.php new file mode 100644 index 00000000..bf489fdf --- /dev/null +++ b/src/UEC/Apis/CreateUEcVHostRequest.php @@ -0,0 +1,415 @@ + "CreateUEcVHost"]); + $this->markRequired("IdcId"); + $this->markRequired("CpuCore"); + $this->markRequired("MemSize"); + $this->markRequired("DiskSize"); + $this->markRequired("ImageId"); + $this->markRequired("NetLimit"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * IdcId: 机房id + * + * @return string|null + */ + public function getIdcId(): string + { + return $this->get("IdcId"); + } + + /** + * IdcId: 机房id + * + * @param string $idcId + */ + public function setIdcId(string $idcId) + { + $this->set("IdcId", $idcId); + } + + /** + * CpuCore: cpu核心数 + * + * @return integer|null + */ + public function getCpuCore(): int + { + return $this->get("CpuCore"); + } + + /** + * CpuCore: cpu核心数 + * + * @param int $cpuCore + */ + public function setCpuCore(int $cpuCore) + { + $this->set("CpuCore", $cpuCore); + } + + /** + * MemSize: 内存大小,单位GB + * + * @return integer|null + */ + public function getMemSize(): int + { + return $this->get("MemSize"); + } + + /** + * MemSize: 内存大小,单位GB + * + * @param int $memSize + */ + public function setMemSize(int $memSize) + { + $this->set("MemSize", $memSize); + } + + /** + * DiskSize: 数据盘大小,单位GB + * + * @return integer|null + */ + public function getDiskSize(): int + { + return $this->get("DiskSize"); + } + + /** + * DiskSize: 数据盘大小,单位GB + * + * @param int $diskSize + */ + public function setDiskSize(int $diskSize) + { + $this->set("DiskSize", $diskSize); + } + + /** + * ImageId: 镜像ID + * + * @return string|null + */ + public function getImageId(): string + { + return $this->get("ImageId"); + } + + /** + * ImageId: 镜像ID + * + * @param string $imageId + */ + public function setImageId(string $imageId) + { + $this->set("ImageId", $imageId); + } + + /** + * NetLimit: 节点带宽限制,单位Mbs + * + * @return integer|null + */ + public function getNetLimit(): int + { + return $this->get("NetLimit"); + } + + /** + * NetLimit: 节点带宽限制,单位Mbs + * + * @param int $netLimit + */ + public function setNetLimit(int $netLimit) + { + $this->set("NetLimit", $netLimit); + } + + /** + * NodeName: 节点名称 + * + * @return string|null + */ + public function getNodeName(): string + { + return $this->get("NodeName"); + } + + /** + * NodeName: 节点名称 + * + * @param string $nodeName + */ + public function setNodeName(string $nodeName) + { + $this->set("NodeName", $nodeName); + } + + /** + * SysDiskSize: 系统盘大小,单位GB, 默认20GB + * + * @return integer|null + */ + public function getSysDiskSize(): int + { + return $this->get("SysDiskSize"); + } + + /** + * SysDiskSize: 系统盘大小,单位GB, 默认20GB + * + * @param int $sysDiskSize + */ + public function setSysDiskSize(int $sysDiskSize) + { + $this->set("SysDiskSize", $sysDiskSize); + } + + /** + * AccountName: 账户名,默认root + * + * @return string|null + */ + public function getAccountName(): string + { + return $this->get("AccountName"); + } + + /** + * AccountName: 账户名,默认root + * + * @param string $accountName + */ + public function setAccountName(string $accountName) + { + $this->set("AccountName", $accountName); + } + + /** + * PassWord: 密码 + * + * @return string|null + */ + public function getPassWord(): string + { + return $this->get("PassWord"); + } + + /** + * PassWord: 密码 + * + * @param string $passWord + */ + public function setPassWord(string $passWord) + { + $this->set("PassWord", $passWord); + } + + /** + * NodeCount: 创建节点数量,默认1 + * + * @return integer|null + */ + public function getNodeCount(): int + { + return $this->get("NodeCount"); + } + + /** + * NodeCount: 创建节点数量,默认1 + * + * @param int $nodeCount + */ + public function setNodeCount(int $nodeCount) + { + $this->set("NodeCount", $nodeCount); + } + + /** + * ChargeType: 付费方式,1按时,2按月,3按年,默认2 + * + * @return integer|null + */ + public function getChargeType(): int + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费方式,1按时,2按月,3按年,默认2 + * + * @param int $chargeType + */ + public function setChargeType(int $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * ChargeQuantity: 月数或者年数,0计费到月底, 默认0 + * + * @return integer|null + */ + public function getChargeQuantity(): int + { + return $this->get("ChargeQuantity"); + } + + /** + * ChargeQuantity: 月数或者年数,0计费到月底, 默认0 + * + * @param int $chargeQuantity + */ + public function setChargeQuantity(int $chargeQuantity) + { + $this->set("ChargeQuantity", $chargeQuantity); + } + + /** + * SubnetId: 子网ID + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网ID + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * ProductType: 产品类型:normal(标准型),hf(高频型) + * + * @return string|null + */ + public function getProductType(): string + { + return $this->get("ProductType"); + } + + /** + * ProductType: 产品类型:normal(标准型),hf(高频型) + * + * @param string $productType + */ + public function setProductType(string $productType) + { + $this->set("ProductType", $productType); + } + + /** + * FirewallId: 外网防护墙规则组,默认 + * + * @return string|null + */ + public function getFirewallId(): string + { + return $this->get("FirewallId"); + } + + /** + * FirewallId: 外网防护墙规则组,默认 + * + * @param string $firewallId + */ + public function setFirewallId(string $firewallId) + { + $this->set("FirewallId", $firewallId); + } + + /** + * Isp: 运营商(1-电信,2-联通,4移动) + * + * @return int[]|null + */ + public function getIsp(): array + { + return $this->get("Isp"); + } + + /** + * Isp: 运营商(1-电信,2-联通,4移动) + * + * @param int[] $isp + */ + public function setIsp(array $isp) + { + $this->set("Isp", $isp); + } + + /** + * IsNeedOuterIp: (已废弃)是否需要外网ip(yes-是,no-否) + * + * @return string|null + */ + public function getIsNeedOuterIp(): string + { + return $this->get("IsNeedOuterIp"); + } + + /** + * IsNeedOuterIp: (已废弃)是否需要外网ip(yes-是,no-否) + * + * @param string $isNeedOuterIp + */ + public function setIsNeedOuterIp(string $isNeedOuterIp) + { + $this->set("IsNeedOuterIp", $isNeedOuterIp); + } +} diff --git a/src/UEC/Apis/CreateUEcVHostResponse.php b/src/UEC/Apis/CreateUEcVHostResponse.php new file mode 100644 index 00000000..27d81567 --- /dev/null +++ b/src/UEC/Apis/CreateUEcVHostResponse.php @@ -0,0 +1,54 @@ +get("NodeList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new NodeList($item)); + } + return $result; + } + + /** + * NodeList: 节点id(详情参考NodeList) + * + * @param NodeList[] $nodeList + */ + public function setNodeList(array $nodeList) + { + $result = []; + foreach ($nodeList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UEC/Apis/DeleteUEcCustomImageRequest.php b/src/UEC/Apis/DeleteUEcCustomImageRequest.php new file mode 100644 index 00000000..fe71a357 --- /dev/null +++ b/src/UEC/Apis/DeleteUEcCustomImageRequest.php @@ -0,0 +1,90 @@ + "DeleteUEcCustomImage"]); + $this->markRequired("ImageId"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ImageId: 镜像ID + * + * @return string|null + */ + public function getImageId(): string + { + return $this->get("ImageId"); + } + + /** + * ImageId: 镜像ID + * + * @param string $imageId + */ + public function setImageId(string $imageId) + { + $this->set("ImageId", $imageId); + } + + /** + * IdcId: 机房ID,带机房ID表示只删除指定机房镜像 + * + * @return string|null + */ + public function getIdcId(): string + { + return $this->get("IdcId"); + } + + /** + * IdcId: 机房ID,带机房ID表示只删除指定机房镜像 + * + * @param string $idcId + */ + public function setIdcId(string $idcId) + { + $this->set("IdcId", $idcId); + } +} diff --git a/src/UEC/Apis/DeleteUEcCustomImageResponse.php b/src/UEC/Apis/DeleteUEcCustomImageResponse.php new file mode 100644 index 00000000..05897078 --- /dev/null +++ b/src/UEC/Apis/DeleteUEcCustomImageResponse.php @@ -0,0 +1,44 @@ +get("ImageId"); + } + + /** + * ImageId: 镜像ID + * + * @param int $imageId + */ + public function setImageId(int $imageId) + { + $this->set("ImageId", $imageId); + } +} diff --git a/src/UEC/Apis/DeleteUEcHolderRequest.php b/src/UEC/Apis/DeleteUEcHolderRequest.php new file mode 100644 index 00000000..753caff7 --- /dev/null +++ b/src/UEC/Apis/DeleteUEcHolderRequest.php @@ -0,0 +1,70 @@ + "DeleteUEcHolder"]); + $this->markRequired("HolderId"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * HolderId: 容器组资源id,n为0,1,2... + * + * @return string[]|null + */ + public function getHolderId(): array + { + return $this->get("HolderId"); + } + + /** + * HolderId: 容器组资源id,n为0,1,2... + * + * @param string[] $holderId + */ + public function setHolderId(array $holderId) + { + $this->set("HolderId", $holderId); + } +} diff --git a/src/UEC/Apis/DeleteUEcHolderResponse.php b/src/UEC/Apis/DeleteUEcHolderResponse.php new file mode 100644 index 00000000..7101b3b0 --- /dev/null +++ b/src/UEC/Apis/DeleteUEcHolderResponse.php @@ -0,0 +1,26 @@ + "DeleteUEcSubnet"]); + $this->markRequired("SubnetId"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SubnetId: 子网ID + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网ID + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } +} diff --git a/src/UEC/Apis/DeleteUEcSubnetResponse.php b/src/UEC/Apis/DeleteUEcSubnetResponse.php new file mode 100644 index 00000000..42b8a671 --- /dev/null +++ b/src/UEC/Apis/DeleteUEcSubnetResponse.php @@ -0,0 +1,26 @@ + "DeleteUEcVHost"]); + $this->markRequired("NodeId"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * NodeId: 节点id + * + * @return string[]|null + */ + public function getNodeId(): array + { + return $this->get("NodeId"); + } + + /** + * NodeId: 节点id + * + * @param string[] $nodeId + */ + public function setNodeId(array $nodeId) + { + $this->set("NodeId", $nodeId); + } +} diff --git a/src/UEC/Apis/DeleteUEcVHostResponse.php b/src/UEC/Apis/DeleteUEcVHostResponse.php new file mode 100644 index 00000000..a121de7d --- /dev/null +++ b/src/UEC/Apis/DeleteUEcVHostResponse.php @@ -0,0 +1,26 @@ + "DescribeUEcFirewall"]); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * FirewallId: 防火墙ID,默认为返回所有防火墙 + * + * @return string|null + */ + public function getFirewallId(): string + { + return $this->get("FirewallId"); + } + + /** + * FirewallId: 防火墙ID,默认为返回所有防火墙 + * + * @param string $firewallId + */ + public function setFirewallId(string $firewallId) + { + $this->set("FirewallId", $firewallId); + } + + /** + * ResourceId: 绑定防火墙组的虚拟机资源ID + * + * @return string|null + */ + public function getResourceId(): string + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: 绑定防火墙组的虚拟机资源ID + * + * @param string $resourceId + */ + public function setResourceId(string $resourceId) + { + $this->set("ResourceId", $resourceId); + } + + /** + * Limit: 返回数据长度,默认为20 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数据长度,默认为20 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * Offset: 列表起始位置偏移量,默认为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 列表起始位置偏移量,默认为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } +} diff --git a/src/UEC/Apis/DescribeUEcFirewallResourceRequest.php b/src/UEC/Apis/DescribeUEcFirewallResourceRequest.php new file mode 100644 index 00000000..8d350ef9 --- /dev/null +++ b/src/UEC/Apis/DescribeUEcFirewallResourceRequest.php @@ -0,0 +1,70 @@ + "DescribeUEcFirewallResource"]); + $this->markRequired("FirewallId"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * FirewallId: 防火墙Id + * + * @return string|null + */ + public function getFirewallId(): string + { + return $this->get("FirewallId"); + } + + /** + * FirewallId: 防火墙Id + * + * @param string $firewallId + */ + public function setFirewallId(string $firewallId) + { + $this->set("FirewallId", $firewallId); + } +} diff --git a/src/UEC/Apis/DescribeUEcFirewallResourceResponse.php b/src/UEC/Apis/DescribeUEcFirewallResourceResponse.php new file mode 100644 index 00000000..c7e40ee2 --- /dev/null +++ b/src/UEC/Apis/DescribeUEcFirewallResourceResponse.php @@ -0,0 +1,74 @@ +get("ResourceSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ResourceInfo($item)); + } + return $result; + } + + /** + * ResourceSet: 资源列表,详情参见ResourceInfo + * + * @param ResourceInfo[] $resourceSet + */ + public function setResourceSet(array $resourceSet) + { + $result = []; + foreach ($resourceSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalCount: 资源总数 + * + * @return integer|null + */ + public function getTotalCount(): int + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 资源总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/UEC/Apis/DescribeUEcFirewallResponse.php b/src/UEC/Apis/DescribeUEcFirewallResponse.php new file mode 100644 index 00000000..f4707956 --- /dev/null +++ b/src/UEC/Apis/DescribeUEcFirewallResponse.php @@ -0,0 +1,75 @@ +get("FirewallSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new FirewallInfo($item)); + } + return $result; + } + + /** + * FirewallSet: 防火墙组详细信息,参见 FirewallInfo + * + * @param FirewallInfo[] $firewallSet + */ + public function setFirewallSet(array $firewallSet) + { + $result = []; + foreach ($firewallSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalCount: 满足条件的节点总数 + * + * @return integer|null + */ + public function getTotalCount(): int + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 满足条件的节点总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/UEC/Apis/DescribeUEcHolderIDCRequest.php b/src/UEC/Apis/DescribeUEcHolderIDCRequest.php new file mode 100644 index 00000000..0b8ddce5 --- /dev/null +++ b/src/UEC/Apis/DescribeUEcHolderIDCRequest.php @@ -0,0 +1,151 @@ + "DescribeUEcHolderIDC"]); + $this->markRequired("Cpu"); + $this->markRequired("Memory"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Cpu: 容器组Cpu核数 + * + * @return float|null + */ + public function getCpu(): float + { + return $this->get("Cpu"); + } + + /** + * Cpu: 容器组Cpu核数 + * + * @param float $cpu + */ + public function setCpu(float $cpu) + { + $this->set("Cpu", $cpu); + } + + /** + * Memory: 容器组内存大小(单位MB) + * + * @return integer|null + */ + public function getMemory(): int + { + return $this->get("Memory"); + } + + /** + * Memory: 容器组内存大小(单位MB) + * + * @param int $memory + */ + public function setMemory(int $memory) + { + $this->set("Memory", $memory); + } + + /** + * IdcId: Idc机房id。默认全部机房 + * + * @return string[]|null + */ + public function getIdcId(): array + { + return $this->get("IdcId"); + } + + /** + * IdcId: Idc机房id。默认全部机房 + * + * @param string[] $idcId + */ + public function setIdcId(array $idcId) + { + $this->set("IdcId", $idcId); + } + + /** + * Type: 0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通 + * + * @return integer|null + */ + public function getType(): int + { + return $this->get("Type"); + } + + /** + * Type: 0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通 + * + * @param int $type + */ + public function setType(int $type) + { + $this->set("Type", $type); + } + + /** + * ProductType: 产品类型,normal标准型,hf高性能型 + * + * @return string|null + */ + public function getProductType(): string + { + return $this->get("ProductType"); + } + + /** + * ProductType: 产品类型,normal标准型,hf高性能型 + * + * @param string $productType + */ + public function setProductType(string $productType) + { + $this->set("ProductType", $productType); + } +} diff --git a/src/UEC/Apis/DescribeUEcHolderIDCResponse.php b/src/UEC/Apis/DescribeUEcHolderIDCResponse.php new file mode 100644 index 00000000..bc50747b --- /dev/null +++ b/src/UEC/Apis/DescribeUEcHolderIDCResponse.php @@ -0,0 +1,54 @@ +get("IdcList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new IdcInfo($item)); + } + return $result; + } + + /** + * IdcList: 机房列表,具体参考下面IdcInfo + * + * @param IdcInfo[] $idcList + */ + public function setIdcList(array $idcList) + { + $result = []; + foreach ($idcList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UEC/Apis/DescribeUEcHolderRequest.php b/src/UEC/Apis/DescribeUEcHolderRequest.php new file mode 100644 index 00000000..752feb41 --- /dev/null +++ b/src/UEC/Apis/DescribeUEcHolderRequest.php @@ -0,0 +1,109 @@ + "DescribeUEcHolder"]); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * HolderId: 容器组资源id + * + * @return string[]|null + */ + public function getHolderId(): array + { + return $this->get("HolderId"); + } + + /** + * HolderId: 容器组资源id + * + * @param string[] $holderId + */ + public function setHolderId(array $holderId) + { + $this->set("HolderId", $holderId); + } + + /** + * Limit: 返回数据长度,默认为20,非负整数 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数据长度,默认为20,非负整数 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * Offset: 列表起始位置偏移量,默认为0。非负整数 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 列表起始位置偏移量,默认为0。非负整数 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } +} diff --git a/src/UEC/Apis/DescribeUEcHolderResponse.php b/src/UEC/Apis/DescribeUEcHolderResponse.php new file mode 100644 index 00000000..b1d7024d --- /dev/null +++ b/src/UEC/Apis/DescribeUEcHolderResponse.php @@ -0,0 +1,80 @@ +get("HolderList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new HolderList($item)); + } + return $result; + } + + /** + * HolderList: 容器组列表(详情参考HolderList) + * + * @param HolderList[] $holderList + */ + public function setHolderList(array $holderList) + { + $result = []; + foreach ($holderList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalCount: 满足条件的容器组总数 + * + * @return integer|null + */ + public function getTotalCount(): int + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 满足条件的容器组总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/UEC/Apis/DescribeUEcIDCRequest.php b/src/UEC/Apis/DescribeUEcIDCRequest.php new file mode 100644 index 00000000..9aae039e --- /dev/null +++ b/src/UEC/Apis/DescribeUEcIDCRequest.php @@ -0,0 +1,151 @@ + "DescribeUEcIDC"]); + $this->markRequired("Cpu"); + $this->markRequired("Memory"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Cpu: 节点cpu核数 + * + * @return integer|null + */ + public function getCpu(): int + { + return $this->get("Cpu"); + } + + /** + * Cpu: 节点cpu核数 + * + * @param int $cpu + */ + public function setCpu(int $cpu) + { + $this->set("Cpu", $cpu); + } + + /** + * Memory: 节点内存大小, 单位GB + * + * @return integer|null + */ + public function getMemory(): int + { + return $this->get("Memory"); + } + + /** + * Memory: 节点内存大小, 单位GB + * + * @param int $memory + */ + public function setMemory(int $memory) + { + $this->set("Memory", $memory); + } + + /** + * IdcId: Idc机房id。默认全部机房 + * + * @return string[]|null + */ + public function getIdcId(): array + { + return $this->get("IdcId"); + } + + /** + * IdcId: Idc机房id。默认全部机房 + * + * @param string[] $idcId + */ + public function setIdcId(array $idcId) + { + $this->set("IdcId", $idcId); + } + + /** + * Type: 0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通 + * + * @return integer|null + */ + public function getType(): int + { + return $this->get("Type"); + } + + /** + * Type: 0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通 + * + * @param int $type + */ + public function setType(int $type) + { + $this->set("Type", $type); + } + + /** + * ProductType: 产品类型:normal(通用型),hf(高主频型) + * + * @return string|null + */ + public function getProductType(): string + { + return $this->get("ProductType"); + } + + /** + * ProductType: 产品类型:normal(通用型),hf(高主频型) + * + * @param string $productType + */ + public function setProductType(string $productType) + { + $this->set("ProductType", $productType); + } +} diff --git a/src/UEC/Apis/DescribeUEcIDCResponse.php b/src/UEC/Apis/DescribeUEcIDCResponse.php new file mode 100644 index 00000000..bdc71d7c --- /dev/null +++ b/src/UEC/Apis/DescribeUEcIDCResponse.php @@ -0,0 +1,54 @@ +get("IdcList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new IdcInfo($item)); + } + return $result; + } + + /** + * IdcList: 获取的机房信息,具体参考下面IdcInfo + * + * @param IdcInfo[] $idcList + */ + public function setIdcList(array $idcList) + { + $result = []; + foreach ($idcList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UEC/Apis/DescribeUEcSubnetRequest.php b/src/UEC/Apis/DescribeUEcSubnetRequest.php new file mode 100644 index 00000000..f224585a --- /dev/null +++ b/src/UEC/Apis/DescribeUEcSubnetRequest.php @@ -0,0 +1,89 @@ + "DescribeUEcSubnet"]); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * IdcId: 机房ID + * + * @return string|null + */ + public function getIdcId(): string + { + return $this->get("IdcId"); + } + + /** + * IdcId: 机房ID + * + * @param string $idcId + */ + public function setIdcId(string $idcId) + { + $this->set("IdcId", $idcId); + } + + /** + * SubnetId: 子网ID + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网ID + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } +} diff --git a/src/UEC/Apis/DescribeUEcSubnetResponse.php b/src/UEC/Apis/DescribeUEcSubnetResponse.php new file mode 100644 index 00000000..68fe1b12 --- /dev/null +++ b/src/UEC/Apis/DescribeUEcSubnetResponse.php @@ -0,0 +1,54 @@ +get("SubnetList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new SubnetInfo($item)); + } + return $result; + } + + /** + * SubnetList: 子网信息列表 + * + * @param SubnetInfo[] $subnetList + */ + public function setSubnetList(array $subnetList) + { + $result = []; + foreach ($subnetList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UEC/Apis/DescribeUEcVHostISPRequest.php b/src/UEC/Apis/DescribeUEcVHostISPRequest.php new file mode 100644 index 00000000..7084976c --- /dev/null +++ b/src/UEC/Apis/DescribeUEcVHostISPRequest.php @@ -0,0 +1,89 @@ + "DescribeUEcVHostISP"]); + } + + + + /** + * IspName: 运营商名称 + * + * @return string|null + */ + public function getIspName(): string + { + return $this->get("IspName"); + } + + /** + * IspName: 运营商名称 + * + * @param string $ispName + */ + public function setIspName(string $ispName) + { + $this->set("IspName", $ispName); + } + + /** + * Province: 省份 + * + * @return string|null + */ + public function getProvince(): string + { + return $this->get("Province"); + } + + /** + * Province: 省份 + * + * @param string $province + */ + public function setProvince(string $province) + { + $this->set("Province", $province); + } + + /** + * City: 城市 + * + * @return string|null + */ + public function getCity(): string + { + return $this->get("City"); + } + + /** + * City: 城市 + * + * @param string $city + */ + public function setCity(string $city) + { + $this->set("City", $city); + } +} diff --git a/src/UEC/Apis/DescribeUEcVHostISPResponse.php b/src/UEC/Apis/DescribeUEcVHostISPResponse.php new file mode 100644 index 00000000..17bceaed --- /dev/null +++ b/src/UEC/Apis/DescribeUEcVHostISPResponse.php @@ -0,0 +1,54 @@ +get("NodeIspList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new NodeIspList($item)); + } + return $result; + } + + /** + * NodeIspList: 节点运营商列表 + * + * @param NodeIspList[] $nodeIspList + */ + public function setNodeIspList(array $nodeIspList) + { + $result = []; + foreach ($nodeIspList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UEC/Apis/DescribeUEcVHostRequest.php b/src/UEC/Apis/DescribeUEcVHostRequest.php new file mode 100644 index 00000000..67c63a06 --- /dev/null +++ b/src/UEC/Apis/DescribeUEcVHostRequest.php @@ -0,0 +1,129 @@ + "DescribeUEcVHost"]); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * IdcId: Idc机房id。默认全部机房 + * + * @return string[]|null + */ + public function getIdcId(): array + { + return $this->get("IdcId"); + } + + /** + * IdcId: Idc机房id。默认全部机房 + * + * @param string[] $idcId + */ + public function setIdcId(array $idcId) + { + $this->set("IdcId", $idcId); + } + + /** + * NodeId: 节点id,创建节点时生成的id。默认全部节点 + * + * @return string[]|null + */ + public function getNodeId(): array + { + return $this->get("NodeId"); + } + + /** + * NodeId: 节点id,创建节点时生成的id。默认全部节点 + * + * @param string[] $nodeId + */ + public function setNodeId(array $nodeId) + { + $this->set("NodeId", $nodeId); + } + + /** + * Offset: 数据偏移量,默认0,非负整数 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 数据偏移量,默认0,非负整数 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 返回数据长度, 默认20,非负整数 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数据长度, 默认20,非负整数 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/UEC/Apis/DescribeUEcVHostResponse.php b/src/UEC/Apis/DescribeUEcVHostResponse.php new file mode 100644 index 00000000..6d8b5606 --- /dev/null +++ b/src/UEC/Apis/DescribeUEcVHostResponse.php @@ -0,0 +1,75 @@ +get("TotalCount"); + } + + /** + * TotalCount: 满足条件的节点总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * NodeList: 节点列表 + * + * @return NodeInfo[]|null + */ + public function getNodeList(): array + { + $items = $this->get("NodeList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new NodeInfo($item)); + } + return $result; + } + + /** + * NodeList: 节点列表 + * + * @param NodeInfo[] $nodeList + */ + public function setNodeList(array $nodeList) + { + $result = []; + foreach ($nodeList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UEC/Apis/GetUEcHolderLogRequest.php b/src/UEC/Apis/GetUEcHolderLogRequest.php new file mode 100644 index 00000000..39c2c2c4 --- /dev/null +++ b/src/UEC/Apis/GetUEcHolderLogRequest.php @@ -0,0 +1,91 @@ + "GetUEcHolderLog"]); + $this->markRequired("PackName"); + $this->markRequired("ResourceId"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * PackName: 容器名称 + * + * @return string|null + */ + public function getPackName(): string + { + return $this->get("PackName"); + } + + /** + * PackName: 容器名称 + * + * @param string $packName + */ + public function setPackName(string $packName) + { + $this->set("PackName", $packName); + } + + /** + * ResourceId: 容器组资源id + * + * @return string|null + */ + public function getResourceId(): string + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: 容器组资源id + * + * @param string $resourceId + */ + public function setResourceId(string $resourceId) + { + $this->set("ResourceId", $resourceId); + } +} diff --git a/src/UEC/Apis/GetUEcHolderLogResponse.php b/src/UEC/Apis/GetUEcHolderLogResponse.php new file mode 100644 index 00000000..9bf4dc51 --- /dev/null +++ b/src/UEC/Apis/GetUEcHolderLogResponse.php @@ -0,0 +1,44 @@ +get("Data"); + } + + /** + * Data: 返回的日志数据 + * + * @param string $data + */ + public function setData(string $data) + { + $this->set("Data", $data); + } +} diff --git a/src/UEC/Apis/GetUEcHolderMetricsRequest.php b/src/UEC/Apis/GetUEcHolderMetricsRequest.php new file mode 100644 index 00000000..ed835c8b --- /dev/null +++ b/src/UEC/Apis/GetUEcHolderMetricsRequest.php @@ -0,0 +1,152 @@ + "GetUEcHolderMetrics"]); + $this->markRequired("PackName"); + $this->markRequired("Type"); + $this->markRequired("ResourceId"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * PackName: 容器名称 + * + * @return string|null + */ + public function getPackName(): string + { + return $this->get("PackName"); + } + + /** + * PackName: 容器名称 + * + * @param string $packName + */ + public function setPackName(string $packName) + { + $this->set("PackName", $packName); + } + + /** + * Type: n为0 CPU利用率, 1内存使用率, 2网卡出带宽, 3网卡入带宽, 4网卡出包数, 5网卡入包数 + * + * @return string[]|null + */ + public function getType(): array + { + return $this->get("Type"); + } + + /** + * Type: n为0 CPU利用率, 1内存使用率, 2网卡出带宽, 3网卡入带宽, 4网卡出包数, 5网卡入包数 + * + * @param string[] $type + */ + public function setType(array $type) + { + $this->set("Type", $type); + } + + /** + * ResourceId: 容器组资源id + * + * @return string|null + */ + public function getResourceId(): string + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: 容器组资源id + * + * @param string $resourceId + */ + public function setResourceId(string $resourceId) + { + $this->set("ResourceId", $resourceId); + } + + /** + * StartTime: 开始时间 + * + * @return integer|null + */ + public function getStartTime(): int + { + return $this->get("StartTime"); + } + + /** + * StartTime: 开始时间 + * + * @param int $startTime + */ + public function setStartTime(int $startTime) + { + $this->set("StartTime", $startTime); + } + + /** + * EndTime: 结束时间 + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 结束时间 + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } +} diff --git a/src/UEC/Apis/GetUEcHolderMetricsResponse.php b/src/UEC/Apis/GetUEcHolderMetricsResponse.php new file mode 100644 index 00000000..23861bd1 --- /dev/null +++ b/src/UEC/Apis/GetUEcHolderMetricsResponse.php @@ -0,0 +1,51 @@ +get("DataSets")); + } + + /** + * DataSets: 获得的监控数据(详情参考MetricisDataSet) + * + * @param MetricisDataSet $dataSets + */ + public function setDataSets(MetricisDataSet $dataSets) + { + $this->set("DataSets", $dataSets->getAll()); + } +} diff --git a/src/UEC/Apis/GetUEcIDCCutInfoRequest.php b/src/UEC/Apis/GetUEcIDCCutInfoRequest.php new file mode 100644 index 00000000..e6a60589 --- /dev/null +++ b/src/UEC/Apis/GetUEcIDCCutInfoRequest.php @@ -0,0 +1,27 @@ + "GetUEcIDCCutInfo"]); + } +} diff --git a/src/UEC/Apis/GetUEcIDCCutInfoResponse.php b/src/UEC/Apis/GetUEcIDCCutInfoResponse.php new file mode 100644 index 00000000..dfd1d429 --- /dev/null +++ b/src/UEC/Apis/GetUEcIDCCutInfoResponse.php @@ -0,0 +1,75 @@ +get("IDCCutInfo") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new IDCCutInfo($item)); + } + return $result; + } + + /** + * IDCCutInfo: 机房割接信息 + * + * @param IDCCutInfo[] $idcCutInfo + */ + public function setIDCCutInfo(array $idcCutInfo) + { + $result = []; + foreach ($idcCutInfo as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalCount: 满足条件的机房总数 + * + * @return integer|null + */ + public function getTotalCount(): int + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 满足条件的机房总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/UEC/Apis/GetUEcIDCVHostDataRequest.php b/src/UEC/Apis/GetUEcIDCVHostDataRequest.php new file mode 100644 index 00000000..50dad817 --- /dev/null +++ b/src/UEC/Apis/GetUEcIDCVHostDataRequest.php @@ -0,0 +1,131 @@ + "GetUEcIDCVHostData"]); + $this->markRequired("NodeId"); + $this->markRequired("Type"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * NodeId: 节点资源id;n为0,1,2... + * + * @return string[]|null + */ + public function getNodeId(): array + { + return $this->get("NodeId"); + } + + /** + * NodeId: 节点资源id;n为0,1,2... + * + * @param string[] $nodeId + */ + public function setNodeId(array $nodeId) + { + $this->set("NodeId", $nodeId); + } + + /** + * Type: 监控数据类型;n为0,1,2,3,4...,9 + * + * @return string[]|null + */ + public function getType(): array + { + return $this->get("Type"); + } + + /** + * Type: 监控数据类型;n为0,1,2,3,4...,9 + * + * @param string[] $type + */ + public function setType(array $type) + { + $this->set("Type", $type); + } + + /** + * BeginTime: 开始时间戳 + * + * @return integer|null + */ + public function getBeginTime(): int + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 开始时间戳 + * + * @param int $beginTime + */ + public function setBeginTime(int $beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 结束时间戳 + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 结束时间戳 + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } +} diff --git a/src/UEC/Apis/GetUEcIDCVHostDataResponse.php b/src/UEC/Apis/GetUEcIDCVHostDataResponse.php new file mode 100644 index 00000000..c317dc9b --- /dev/null +++ b/src/UEC/Apis/GetUEcIDCVHostDataResponse.php @@ -0,0 +1,55 @@ +get("DataSets")); + } + + /** + * DataSets: 监控数据集合 + * + * @param DataSet $dataSets + */ + public function setDataSets(DataSet $dataSets) + { + $this->set("DataSets", $dataSets->getAll()); + } +} diff --git a/src/UEC/Apis/GetUEcImageRequest.php b/src/UEC/Apis/GetUEcImageRequest.php new file mode 100644 index 00000000..0514938a --- /dev/null +++ b/src/UEC/Apis/GetUEcImageRequest.php @@ -0,0 +1,109 @@ + "GetUEcImage"]); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ImageType: 镜像类型:1标准镜像,2行业镜像,3自定义镜像 + * + * @return string|null + */ + public function getImageType(): string + { + return $this->get("ImageType"); + } + + /** + * ImageType: 镜像类型:1标准镜像,2行业镜像,3自定义镜像 + * + * @param string $imageType + */ + public function setImageType(string $imageType) + { + $this->set("ImageType", $imageType); + } + + /** + * Offset: 数据偏移量,默认0,非负整数 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 数据偏移量,默认0,非负整数 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 返回数据长度, 默认20,非负整数 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数据长度, 默认20,非负整数 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/UEC/Apis/GetUEcImageResponse.php b/src/UEC/Apis/GetUEcImageResponse.php new file mode 100644 index 00000000..86bc18c8 --- /dev/null +++ b/src/UEC/Apis/GetUEcImageResponse.php @@ -0,0 +1,75 @@ +get("ImageList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ImageInfo($item)); + } + return $result; + } + + /** + * ImageList: 获取的镜像信息,具体参考下面ImageInfo + * + * @param ImageInfo[] $imageList + */ + public function setImageList(array $imageList) + { + $result = []; + foreach ($imageList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalCount: 镜像总数 + * + * @return integer|null + */ + public function getTotalCount(): int + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 镜像总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/UEC/Apis/GetUEcPodPriceRequest.php b/src/UEC/Apis/GetUEcPodPriceRequest.php new file mode 100644 index 00000000..b5d1bb33 --- /dev/null +++ b/src/UEC/Apis/GetUEcPodPriceRequest.php @@ -0,0 +1,190 @@ + "GetUEcPodPrice"]); + $this->markRequired("IdcId"); + } + + + + /** + * IdcId: 机房id + * + * @return string|null + */ + public function getIdcId(): string + { + return $this->get("IdcId"); + } + + /** + * IdcId: 机房id + * + * @param string $idcId + */ + public function setIdcId(string $idcId) + { + $this->set("IdcId", $idcId); + } + + /** + * CpuCore: 容器组总Cpu核心数 + * + * @return float|null + */ + public function getCpuCore(): float + { + return $this->get("CpuCore"); + } + + /** + * CpuCore: 容器组总Cpu核心数 + * + * @param float $cpuCore + */ + public function setCpuCore(float $cpuCore) + { + $this->set("CpuCore", $cpuCore); + } + + /** + * MemSize: 容器组总内存大小(单位M) + * + * @return integer|null + */ + public function getMemSize(): int + { + return $this->get("MemSize"); + } + + /** + * MemSize: 容器组总内存大小(单位M) + * + * @param int $memSize + */ + public function setMemSize(int $memSize) + { + $this->set("MemSize", $memSize); + } + + /** + * ChargeType: 支付类型(2按月,3按年,默认2) + * + * @return integer|null + */ + public function getChargeType(): int + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 支付类型(2按月,3按年,默认2) + * + * @param int $chargeType + */ + public function setChargeType(int $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * ChargeQuantity: 月数或年数(默认值:1,当支付类型为按月时,默认值为0) + * + * @return integer|null + */ + public function getChargeQuantity(): int + { + return $this->get("ChargeQuantity"); + } + + /** + * ChargeQuantity: 月数或年数(默认值:1,当支付类型为按月时,默认值为0) + * + * @param int $chargeQuantity + */ + public function setChargeQuantity(int $chargeQuantity) + { + $this->set("ChargeQuantity", $chargeQuantity); + } + + /** + * ProductType: 产品类型(normal:标准型,hf:高性能型,默认:normal) + * + * @return string|null + */ + public function getProductType(): string + { + return $this->get("ProductType"); + } + + /** + * ProductType: 产品类型(normal:标准型,hf:高性能型,默认:normal) + * + * @param string $productType + */ + public function setProductType(string $productType) + { + $this->set("ProductType", $productType); + } + + /** + * ElasticIp: 是否绑定外网IP(yes:是,no:否,默认:no) + * + * @return string|null + */ + public function getElasticIp(): string + { + return $this->get("ElasticIp"); + } + + /** + * ElasticIp: 是否绑定外网IP(yes:是,no:否,默认:no) + * + * @param string $elasticIp + */ + public function setElasticIp(string $elasticIp) + { + $this->set("ElasticIp", $elasticIp); + } + + /** + * Bandwidth: 绑定的带宽,默认0,当绑定外网IP时默认1(单位M) + * + * @return integer|null + */ + public function getBandwidth(): int + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: 绑定的带宽,默认0,当绑定外网IP时默认1(单位M) + * + * @param int $bandwidth + */ + public function setBandwidth(int $bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } +} diff --git a/src/UEC/Apis/GetUEcPodPriceResponse.php b/src/UEC/Apis/GetUEcPodPriceResponse.php new file mode 100644 index 00000000..35df0544 --- /dev/null +++ b/src/UEC/Apis/GetUEcPodPriceResponse.php @@ -0,0 +1,64 @@ +get("HolderPrice"); + } + + /** + * HolderPrice: 容器组价格 + * + * @param float $holderPrice + */ + public function setHolderPrice(float $holderPrice) + { + $this->set("HolderPrice", $holderPrice); + } + + /** + * IpPrice: IP和带宽价格 + * + * @return float|null + */ + public function getIpPrice(): float + { + return $this->get("IpPrice"); + } + + /** + * IpPrice: IP和带宽价格 + * + * @param float $ipPrice + */ + public function setIpPrice(float $ipPrice) + { + $this->set("IpPrice", $ipPrice); + } +} diff --git a/src/UEC/Apis/GetUEcUpgradePriceRequest.php b/src/UEC/Apis/GetUEcUpgradePriceRequest.php new file mode 100644 index 00000000..03d7a903 --- /dev/null +++ b/src/UEC/Apis/GetUEcUpgradePriceRequest.php @@ -0,0 +1,170 @@ + "GetUEcUpgradePrice"]); + $this->markRequired("NodeId"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * NodeId: 虚拟机资源ID + * + * @return string|null + */ + public function getNodeId(): string + { + return $this->get("NodeId"); + } + + /** + * NodeId: 虚拟机资源ID + * + * @param string $nodeId + */ + public function setNodeId(string $nodeId) + { + $this->set("NodeId", $nodeId); + } + + /** + * CpuCore: cpu核心数 + * + * @return integer|null + */ + public function getCpuCore(): int + { + return $this->get("CpuCore"); + } + + /** + * CpuCore: cpu核心数 + * + * @param int $cpuCore + */ + public function setCpuCore(int $cpuCore) + { + $this->set("CpuCore", $cpuCore); + } + + /** + * MemSize: 内存大小,单位GB + * + * @return integer|null + */ + public function getMemSize(): int + { + return $this->get("MemSize"); + } + + /** + * MemSize: 内存大小,单位GB + * + * @param int $memSize + */ + public function setMemSize(int $memSize) + { + $this->set("MemSize", $memSize); + } + + /** + * SysDiskSize: 系统盘大小,单位GB + * + * @return integer|null + */ + public function getSysDiskSize(): int + { + return $this->get("SysDiskSize"); + } + + /** + * SysDiskSize: 系统盘大小,单位GB + * + * @param int $sysDiskSize + */ + public function setSysDiskSize(int $sysDiskSize) + { + $this->set("SysDiskSize", $sysDiskSize); + } + + /** + * DiskSize: 数据盘大小,单位GB + * + * @return integer|null + */ + public function getDiskSize(): int + { + return $this->get("DiskSize"); + } + + /** + * DiskSize: 数据盘大小,单位GB + * + * @param int $diskSize + */ + public function setDiskSize(int $diskSize) + { + $this->set("DiskSize", $diskSize); + } + + /** + * NetLimit: 节点带宽限制,单位Mbs + * + * @return integer|null + */ + public function getNetLimit(): int + { + return $this->get("NetLimit"); + } + + /** + * NetLimit: 节点带宽限制,单位Mbs + * + * @param int $netLimit + */ + public function setNetLimit(int $netLimit) + { + $this->set("NetLimit", $netLimit); + } +} diff --git a/src/UEC/Apis/GetUEcUpgradePriceResponse.php b/src/UEC/Apis/GetUEcUpgradePriceResponse.php new file mode 100644 index 00000000..ca382f18 --- /dev/null +++ b/src/UEC/Apis/GetUEcUpgradePriceResponse.php @@ -0,0 +1,44 @@ +get("Price"); + } + + /** + * Price: 规格调整差价 + * + * @param int $price + */ + public function setPrice(int $price) + { + $this->set("Price", $price); + } +} diff --git a/src/UEC/Apis/GetUEcVHostDataRequest.php b/src/UEC/Apis/GetUEcVHostDataRequest.php new file mode 100644 index 00000000..9b60d355 --- /dev/null +++ b/src/UEC/Apis/GetUEcVHostDataRequest.php @@ -0,0 +1,131 @@ + "GetUEcVHostData"]); + $this->markRequired("NodeId"); + $this->markRequired("Type"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * NodeId: 节点id + * + * @return string|null + */ + public function getNodeId(): string + { + return $this->get("NodeId"); + } + + /** + * NodeId: 节点id + * + * @param string $nodeId + */ + public function setNodeId(string $nodeId) + { + $this->set("NodeId", $nodeId); + } + + /** + * Type: 0CPU使用率, 1内存使用率, 2 网卡出流量, 3网卡入流量, 4网卡出包量, 5网卡入包量, 6磁盘读流量, 7磁盘写流量, 8磁盘读次数, 9磁盘写次数 + * + * @return int[]|null + */ + public function getType(): array + { + return $this->get("Type"); + } + + /** + * Type: 0CPU使用率, 1内存使用率, 2 网卡出流量, 3网卡入流量, 4网卡出包量, 5网卡入包量, 6磁盘读流量, 7磁盘写流量, 8磁盘读次数, 9磁盘写次数 + * + * @param int[] $type + */ + public function setType(array $type) + { + $this->set("Type", $type); + } + + /** + * BeginTime: 查询起始时间 + * + * @return integer|null + */ + public function getBeginTime(): int + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 查询起始时间 + * + * @param int $beginTime + */ + public function setBeginTime(int $beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 查询结束时间 + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 查询结束时间 + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } +} diff --git a/src/UEC/Apis/GetUEcVHostDataResponse.php b/src/UEC/Apis/GetUEcVHostDataResponse.php new file mode 100644 index 00000000..d70f1bba --- /dev/null +++ b/src/UEC/Apis/GetUEcVHostDataResponse.php @@ -0,0 +1,55 @@ +get("DataSets")); + } + + /** + * DataSets: 带宽数据实例集合 + * + * @param DataSet $dataSets + */ + public function setDataSets(DataSet $dataSets) + { + $this->set("DataSets", $dataSets->getAll()); + } +} diff --git a/src/UEC/Apis/GetUEcVHostPriceRequest.php b/src/UEC/Apis/GetUEcVHostPriceRequest.php new file mode 100644 index 00000000..52e8d7bb --- /dev/null +++ b/src/UEC/Apis/GetUEcVHostPriceRequest.php @@ -0,0 +1,250 @@ + "GetUEcVHostPrice"]); + $this->markRequired("IdcId"); + } + + + + /** + * IdcId: 机房Id + * + * @return string|null + */ + public function getIdcId(): string + { + return $this->get("IdcId"); + } + + /** + * IdcId: 机房Id + * + * @param string $idcId + */ + public function setIdcId(string $idcId) + { + $this->set("IdcId", $idcId); + } + + /** + * NodeCount: 节点数量,默认1 + * + * @return integer|null + */ + public function getNodeCount(): int + { + return $this->get("NodeCount"); + } + + /** + * NodeCount: 节点数量,默认1 + * + * @param int $nodeCount + */ + public function setNodeCount(int $nodeCount) + { + $this->set("NodeCount", $nodeCount); + } + + /** + * CpuCore: CPU核数 + * + * @return integer|null + */ + public function getCpuCore(): int + { + return $this->get("CpuCore"); + } + + /** + * CpuCore: CPU核数 + * + * @param int $cpuCore + */ + public function setCpuCore(int $cpuCore) + { + $this->set("CpuCore", $cpuCore); + } + + /** + * MemSize: 内存大小,单位GB + * + * @return integer|null + */ + public function getMemSize(): int + { + return $this->get("MemSize"); + } + + /** + * MemSize: 内存大小,单位GB + * + * @param int $memSize + */ + public function setMemSize(int $memSize) + { + $this->set("MemSize", $memSize); + } + + /** + * SysDiskSize: 系统盘大小,单位GB + * + * @return integer|null + */ + public function getSysDiskSize(): int + { + return $this->get("SysDiskSize"); + } + + /** + * SysDiskSize: 系统盘大小,单位GB + * + * @param int $sysDiskSize + */ + public function setSysDiskSize(int $sysDiskSize) + { + $this->set("SysDiskSize", $sysDiskSize); + } + + /** + * DiskSize: 数据盘大小,单位GB + * + * @return integer|null + */ + public function getDiskSize(): int + { + return $this->get("DiskSize"); + } + + /** + * DiskSize: 数据盘大小,单位GB + * + * @param int $diskSize + */ + public function setDiskSize(int $diskSize) + { + $this->set("DiskSize", $diskSize); + } + + /** + * NetLimit: 网络带宽限速,单位Mbs + * + * @return integer|null + */ + public function getNetLimit(): int + { + return $this->get("NetLimit"); + } + + /** + * NetLimit: 网络带宽限速,单位Mbs + * + * @param int $netLimit + */ + public function setNetLimit(int $netLimit) + { + $this->set("NetLimit", $netLimit); + } + + /** + * ChargeType: 付费方式,1按时,2按月,3按年,默认2 + * + * @return integer|null + */ + public function getChargeType(): int + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费方式,1按时,2按月,3按年,默认2 + * + * @param int $chargeType + */ + public function setChargeType(int $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * ChargeQuantity: 月数或者年数,0计费到月底, 默认0 + * + * @return integer|null + */ + public function getChargeQuantity(): int + { + return $this->get("ChargeQuantity"); + } + + /** + * ChargeQuantity: 月数或者年数,0计费到月底, 默认0 + * + * @param int $chargeQuantity + */ + public function setChargeQuantity(int $chargeQuantity) + { + $this->set("ChargeQuantity", $chargeQuantity); + } + + /** + * ProductType: 产品类型:normal(标准型),hf(高频型),默认normal + * + * @return string|null + */ + public function getProductType(): string + { + return $this->get("ProductType"); + } + + /** + * ProductType: 产品类型:normal(标准型),hf(高频型),默认normal + * + * @param string $productType + */ + public function setProductType(string $productType) + { + $this->set("ProductType", $productType); + } + + /** + * IpCount: 外网IP的数量,默认1 + * + * @return integer|null + */ + public function getIpCount(): int + { + return $this->get("IpCount"); + } + + /** + * IpCount: 外网IP的数量,默认1 + * + * @param int $ipCount + */ + public function setIpCount(int $ipCount) + { + $this->set("IpCount", $ipCount); + } +} diff --git a/src/UEC/Apis/GetUEcVHostPriceResponse.php b/src/UEC/Apis/GetUEcVHostPriceResponse.php new file mode 100644 index 00000000..d0cd532e --- /dev/null +++ b/src/UEC/Apis/GetUEcVHostPriceResponse.php @@ -0,0 +1,64 @@ +get("NodePrice"); + } + + /** + * NodePrice: 节点价格 + * + * @param float $nodePrice + */ + public function setNodePrice(float $nodePrice) + { + $this->set("NodePrice", $nodePrice); + } + + /** + * IpPrice: Ip和带宽价格 + * + * @return float|null + */ + public function getIpPrice(): float + { + return $this->get("IpPrice"); + } + + /** + * IpPrice: Ip和带宽价格 + * + * @param float $ipPrice + */ + public function setIpPrice(float $ipPrice) + { + $this->set("IpPrice", $ipPrice); + } +} diff --git a/src/UEC/Apis/ImportUEcCustomImageRequest.php b/src/UEC/Apis/ImportUEcCustomImageRequest.php new file mode 100644 index 00000000..2e3980e2 --- /dev/null +++ b/src/UEC/Apis/ImportUEcCustomImageRequest.php @@ -0,0 +1,189 @@ + "ImportUEcCustomImage"]); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * IdcId: 镜像需要导入机房,默认分发到所有机房 + * + * @return string[]|null + */ + public function getIdcId(): array + { + return $this->get("IdcId"); + } + + /** + * IdcId: 镜像需要导入机房,默认分发到所有机房 + * + * @param string[] $idcId + */ + public function setIdcId(array $idcId) + { + $this->set("IdcId", $idcId); + } + + /** + * ImageId: 镜像Id,不传参表示新导入镜像,传参表示已有镜像分发到指定机房 + * + * @return string|null + */ + public function getImageId(): string + { + return $this->get("ImageId"); + } + + /** + * ImageId: 镜像Id,不传参表示新导入镜像,传参表示已有镜像分发到指定机房 + * + * @param string $imageId + */ + public function setImageId(string $imageId) + { + $this->set("ImageId", $imageId); + } + + /** + * ImageName: 镜像名称,不带镜像ID时必填 + * + * @return string|null + */ + public function getImageName(): string + { + return $this->get("ImageName"); + } + + /** + * ImageName: 镜像名称,不带镜像ID时必填 + * + * @param string $imageName + */ + public function setImageName(string $imageName) + { + $this->set("ImageName", $imageName); + } + + /** + * UFileUrl: UFile镜像文件下载地址,不带镜像ID时必填 + * + * @return string|null + */ + public function getUFileUrl(): string + { + return $this->get("UFileUrl"); + } + + /** + * UFileUrl: UFile镜像文件下载地址,不带镜像ID时必填 + * + * @param string $uFileUrl + */ + public function setUFileUrl(string $uFileUrl) + { + $this->set("UFileUrl", $uFileUrl); + } + + /** + * OsType: 操作系统平台,linux、windows(当前版本暂不支持windows),不带镜像ID时必填 + * + * @return string|null + */ + public function getOsType(): string + { + return $this->get("OsType"); + } + + /** + * OsType: 操作系统平台,linux、windows(当前版本暂不支持windows),不带镜像ID时必填 + * + * @param string $osType + */ + public function setOsType(string $osType) + { + $this->set("OsType", $osType); + } + + /** + * Format: 镜像格式,可选RAW、qcow2, 不带镜像ID时必填 + * + * @return string|null + */ + public function getFormat(): string + { + return $this->get("Format"); + } + + /** + * Format: 镜像格式,可选RAW、qcow2, 不带镜像ID时必填 + * + * @param string $format + */ + public function setFormat(string $format) + { + $this->set("Format", $format); + } + + /** + * ImageDesc: 镜像描述 + * + * @return string|null + */ + public function getImageDesc(): string + { + return $this->get("ImageDesc"); + } + + /** + * ImageDesc: 镜像描述 + * + * @param string $imageDesc + */ + public function setImageDesc(string $imageDesc) + { + $this->set("ImageDesc", $imageDesc); + } +} diff --git a/src/UEC/Apis/ImportUEcCustomImageResponse.php b/src/UEC/Apis/ImportUEcCustomImageResponse.php new file mode 100644 index 00000000..432417ab --- /dev/null +++ b/src/UEC/Apis/ImportUEcCustomImageResponse.php @@ -0,0 +1,44 @@ +get("ImageId"); + } + + /** + * ImageId: 镜像Id + * + * @param string $imageId + */ + public function setImageId(string $imageId) + { + $this->set("ImageId", $imageId); + } +} diff --git a/src/UEC/Apis/LoginUEcDockerRequest.php b/src/UEC/Apis/LoginUEcDockerRequest.php new file mode 100644 index 00000000..cfe327e3 --- /dev/null +++ b/src/UEC/Apis/LoginUEcDockerRequest.php @@ -0,0 +1,91 @@ + "LoginUEcDocker"]); + $this->markRequired("ResourceId"); + $this->markRequired("Name"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ResourceId: 容器组资源id + * + * @return string|null + */ + public function getResourceId(): string + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: 容器组资源id + * + * @param string $resourceId + */ + public function setResourceId(string $resourceId) + { + $this->set("ResourceId", $resourceId); + } + + /** + * Name: 容器名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 容器名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } +} diff --git a/src/UEC/Apis/LoginUEcDockerResponse.php b/src/UEC/Apis/LoginUEcDockerResponse.php new file mode 100644 index 00000000..489cea5c --- /dev/null +++ b/src/UEC/Apis/LoginUEcDockerResponse.php @@ -0,0 +1,84 @@ +get("SessionId"); + } + + /** + * SessionId: 返回的token + * + * @param string $sessionId + */ + public function setSessionId(string $sessionId) + { + $this->set("SessionId", $sessionId); + } + + /** + * Link: 登录地址 + * + * @return string|null + */ + public function getLink(): string + { + return $this->get("Link"); + } + + /** + * Link: 登录地址 + * + * @param string $link + */ + public function setLink(string $link) + { + $this->set("Link", $link); + } + + /** + * LinkPort: 登录端口 + * + * @return integer|null + */ + public function getLinkPort(): int + { + return $this->get("LinkPort"); + } + + /** + * LinkPort: 登录端口 + * + * @param int $linkPort + */ + public function setLinkPort(int $linkPort) + { + $this->set("LinkPort", $linkPort); + } +} diff --git a/src/UEC/Apis/ModifyUEcBandwidthRequest.php b/src/UEC/Apis/ModifyUEcBandwidthRequest.php new file mode 100644 index 00000000..aba46cb6 --- /dev/null +++ b/src/UEC/Apis/ModifyUEcBandwidthRequest.php @@ -0,0 +1,91 @@ + "ModifyUEcBandwidth"]); + $this->markRequired("NodeId"); + $this->markRequired("NetLimit"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * NodeId: 节点Id + * + * @return string|null + */ + public function getNodeId(): string + { + return $this->get("NodeId"); + } + + /** + * NodeId: 节点Id + * + * @param string $nodeId + */ + public function setNodeId(string $nodeId) + { + $this->set("NodeId", $nodeId); + } + + /** + * NetLimit: 节点带宽限制,单位Mbs + * + * @return string|null + */ + public function getNetLimit(): string + { + return $this->get("NetLimit"); + } + + /** + * NetLimit: 节点带宽限制,单位Mbs + * + * @param string $netLimit + */ + public function setNetLimit(string $netLimit) + { + $this->set("NetLimit", $netLimit); + } +} diff --git a/src/UEC/Apis/ModifyUEcBandwidthResponse.php b/src/UEC/Apis/ModifyUEcBandwidthResponse.php new file mode 100644 index 00000000..06c8c3ca --- /dev/null +++ b/src/UEC/Apis/ModifyUEcBandwidthResponse.php @@ -0,0 +1,26 @@ + "ModifyUEcHolderName"]); + $this->markRequired("ResourceId"); + $this->markRequired("Name"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ResourceId: 容器组资源id + * + * @return string|null + */ + public function getResourceId(): string + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: 容器组资源id + * + * @param string $resourceId + */ + public function setResourceId(string $resourceId) + { + $this->set("ResourceId", $resourceId); + } + + /** + * Name: 容器组名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 容器组名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } +} diff --git a/src/UEC/Apis/ModifyUEcHolderNameResponse.php b/src/UEC/Apis/ModifyUEcHolderNameResponse.php new file mode 100644 index 00000000..5d52636c --- /dev/null +++ b/src/UEC/Apis/ModifyUEcHolderNameResponse.php @@ -0,0 +1,26 @@ + "ModifyUEcImageName"]); + $this->markRequired("ImageId"); + $this->markRequired("ImageName"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ImageId: 镜像ID + * + * @return string|null + */ + public function getImageId(): string + { + return $this->get("ImageId"); + } + + /** + * ImageId: 镜像ID + * + * @param string $imageId + */ + public function setImageId(string $imageId) + { + $this->set("ImageId", $imageId); + } + + /** + * ImageName: 镜像名称 + * + * @return string|null + */ + public function getImageName(): string + { + return $this->get("ImageName"); + } + + /** + * ImageName: 镜像名称 + * + * @param string $imageName + */ + public function setImageName(string $imageName) + { + $this->set("ImageName", $imageName); + } + + /** + * ImageDesc: 镜像描述 + * + * @return string|null + */ + public function getImageDesc(): string + { + return $this->get("ImageDesc"); + } + + /** + * ImageDesc: 镜像描述 + * + * @param string $imageDesc + */ + public function setImageDesc(string $imageDesc) + { + $this->set("ImageDesc", $imageDesc); + } +} diff --git a/src/UEC/Apis/ModifyUEcImageNameResponse.php b/src/UEC/Apis/ModifyUEcImageNameResponse.php new file mode 100644 index 00000000..11c9c130 --- /dev/null +++ b/src/UEC/Apis/ModifyUEcImageNameResponse.php @@ -0,0 +1,26 @@ + "PoweroffUEcVHost"]); + $this->markRequired("NodeId"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * NodeId: 虚拟机资源ID + * + * @return string[]|null + */ + public function getNodeId(): array + { + return $this->get("NodeId"); + } + + /** + * NodeId: 虚拟机资源ID + * + * @param string[] $nodeId + */ + public function setNodeId(array $nodeId) + { + $this->set("NodeId", $nodeId); + } +} diff --git a/src/UEC/Apis/PoweroffUEcVHostResponse.php b/src/UEC/Apis/PoweroffUEcVHostResponse.php new file mode 100644 index 00000000..0c7ede28 --- /dev/null +++ b/src/UEC/Apis/PoweroffUEcVHostResponse.php @@ -0,0 +1,26 @@ + "ReinstallUEcVHost"]); + $this->markRequired("NodeId"); + $this->markRequired("ImageId"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * NodeId: 虚拟机资源ID + * + * @return string|null + */ + public function getNodeId(): string + { + return $this->get("NodeId"); + } + + /** + * NodeId: 虚拟机资源ID + * + * @param string $nodeId + */ + public function setNodeId(string $nodeId) + { + $this->set("NodeId", $nodeId); + } + + /** + * ImageId: 镜像ID + * + * @return string|null + */ + public function getImageId(): string + { + return $this->get("ImageId"); + } + + /** + * ImageId: 镜像ID + * + * @param string $imageId + */ + public function setImageId(string $imageId) + { + $this->set("ImageId", $imageId); + } + + /** + * KeepData: 是否保留数据盘数据, 0-不保留,1-保留,默认为1 + * + * @return integer|null + */ + public function getKeepData(): int + { + return $this->get("KeepData"); + } + + /** + * KeepData: 是否保留数据盘数据, 0-不保留,1-保留,默认为1 + * + * @param int $keepData + */ + public function setKeepData(int $keepData) + { + $this->set("KeepData", $keepData); + } + + /** + * Password: 节点密码 + * + * @return string|null + */ + public function getPassword(): string + { + return $this->get("Password"); + } + + /** + * Password: 节点密码 + * + * @param string $password + */ + public function setPassword(string $password) + { + $this->set("Password", $password); + } + + /** + * SysDiskSize: 系统盘大小,单位GB + * + * @return integer|null + */ + public function getSysDiskSize(): int + { + return $this->get("SysDiskSize"); + } + + /** + * SysDiskSize: 系统盘大小,单位GB + * + * @param int $sysDiskSize + */ + public function setSysDiskSize(int $sysDiskSize) + { + $this->set("SysDiskSize", $sysDiskSize); + } +} diff --git a/src/UEC/Apis/ReinstallUEcVHostResponse.php b/src/UEC/Apis/ReinstallUEcVHostResponse.php new file mode 100644 index 00000000..23d08d25 --- /dev/null +++ b/src/UEC/Apis/ReinstallUEcVHostResponse.php @@ -0,0 +1,26 @@ + "RestartUEcHolder"]); + $this->markRequired("ResourceId"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ResourceId: 容器组资源id,n为0,1,2... + * + * @return string[]|null + */ + public function getResourceId(): array + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: 容器组资源id,n为0,1,2... + * + * @param string[] $resourceId + */ + public function setResourceId(array $resourceId) + { + $this->set("ResourceId", $resourceId); + } +} diff --git a/src/UEC/Apis/RestartUEcHolderResponse.php b/src/UEC/Apis/RestartUEcHolderResponse.php new file mode 100644 index 00000000..c25806a0 --- /dev/null +++ b/src/UEC/Apis/RestartUEcHolderResponse.php @@ -0,0 +1,26 @@ + "RestartUEcVHost"]); + $this->markRequired("NodeId"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * NodeId: 节点id + * + * @return string[]|null + */ + public function getNodeId(): array + { + return $this->get("NodeId"); + } + + /** + * NodeId: 节点id + * + * @param string[] $nodeId + */ + public function setNodeId(array $nodeId) + { + $this->set("NodeId", $nodeId); + } +} diff --git a/src/UEC/Apis/RestartUEcVHostResponse.php b/src/UEC/Apis/RestartUEcVHostResponse.php new file mode 100644 index 00000000..8b4cde44 --- /dev/null +++ b/src/UEC/Apis/RestartUEcVHostResponse.php @@ -0,0 +1,26 @@ + "StartUEcVHost"]); + $this->markRequired("NodeId"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * NodeId: 虚拟机资源ID + * + * @return string[]|null + */ + public function getNodeId(): array + { + return $this->get("NodeId"); + } + + /** + * NodeId: 虚拟机资源ID + * + * @param string[] $nodeId + */ + public function setNodeId(array $nodeId) + { + $this->set("NodeId", $nodeId); + } +} diff --git a/src/UEC/Apis/StartUEcVHostResponse.php b/src/UEC/Apis/StartUEcVHostResponse.php new file mode 100644 index 00000000..c59aab15 --- /dev/null +++ b/src/UEC/Apis/StartUEcVHostResponse.php @@ -0,0 +1,26 @@ + "StopUEcVHost"]); + $this->markRequired("NodeId"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * NodeId: 虚拟机资源ID + * + * @return string[]|null + */ + public function getNodeId(): array + { + return $this->get("NodeId"); + } + + /** + * NodeId: 虚拟机资源ID + * + * @param string[] $nodeId + */ + public function setNodeId(array $nodeId) + { + $this->set("NodeId", $nodeId); + } +} diff --git a/src/UEC/Apis/StopUEcVHostResponse.php b/src/UEC/Apis/StopUEcVHostResponse.php new file mode 100644 index 00000000..39f19059 --- /dev/null +++ b/src/UEC/Apis/StopUEcVHostResponse.php @@ -0,0 +1,26 @@ + "UnBindUEcFirewall"]); + $this->markRequired("FirewallId"); + $this->markRequired("ResourceId"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * FirewallId: 防火墙Id + * + * @return string|null + */ + public function getFirewallId(): string + { + return $this->get("FirewallId"); + } + + /** + * FirewallId: 防火墙Id + * + * @param string $firewallId + */ + public function setFirewallId(string $firewallId) + { + $this->set("FirewallId", $firewallId); + } + + /** + * ResourceId: 节点Id或容器组资源id + * + * @return string|null + */ + public function getResourceId(): string + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: 节点Id或容器组资源id + * + * @param string $resourceId + */ + public function setResourceId(string $resourceId) + { + $this->set("ResourceId", $resourceId); + } +} diff --git a/src/UEC/Apis/UnBindUEcFirewallResponse.php b/src/UEC/Apis/UnBindUEcFirewallResponse.php new file mode 100644 index 00000000..c919bca0 --- /dev/null +++ b/src/UEC/Apis/UnBindUEcFirewallResponse.php @@ -0,0 +1,26 @@ + "UpdateUEcFirewallAttribute"]); + $this->markRequired("FirewallId"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * FirewallId: 防火墙Id + * + * @return string|null + */ + public function getFirewallId(): string + { + return $this->get("FirewallId"); + } + + /** + * FirewallId: 防火墙Id + * + * @param string $firewallId + */ + public function setFirewallId(string $firewallId) + { + $this->set("FirewallId", $firewallId); + } + + /** + * Name: 防火墙名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 防火墙名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Remark: 描述 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 描述 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } +} diff --git a/src/UEC/Apis/UpdateUEcFirewallAttributeResponse.php b/src/UEC/Apis/UpdateUEcFirewallAttributeResponse.php new file mode 100644 index 00000000..2913b413 --- /dev/null +++ b/src/UEC/Apis/UpdateUEcFirewallAttributeResponse.php @@ -0,0 +1,26 @@ + "UpdateUEcFirewall"]); + $this->markRequired("FirewallId"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * FirewallId: 防火墙Id + * + * @return string|null + */ + public function getFirewallId(): string + { + return $this->get("FirewallId"); + } + + /** + * FirewallId: 防火墙Id + * + * @param string $firewallId + */ + public function setFirewallId(string $firewallId) + { + $this->set("FirewallId", $firewallId); + } + + /** + * Rule: + * + * @return UpdateUEcFirewallParamRule[]|null + */ + public function getRule(): array + { + $items = $this->get("Rule") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UpdateUEcFirewallParamRule($item)); + } + return $result; + } + + /** + * Rule: + * + * @param UpdateUEcFirewallParamRule[] $rule + */ + public function setRule(array $rule) + { + $result = []; + foreach ($rule as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UEC/Apis/UpdateUEcFirewallResponse.php b/src/UEC/Apis/UpdateUEcFirewallResponse.php new file mode 100644 index 00000000..1afe933c --- /dev/null +++ b/src/UEC/Apis/UpdateUEcFirewallResponse.php @@ -0,0 +1,26 @@ + "UpdateUEcSubnet"]); + $this->markRequired("SubnetId"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SubnetId: 子网ID + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网ID + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * SubnetName: 子网名称 + * + * @return string|null + */ + public function getSubnetName(): string + { + return $this->get("SubnetName"); + } + + /** + * SubnetName: 子网名称 + * + * @param string $subnetName + */ + public function setSubnetName(string $subnetName) + { + $this->set("SubnetName", $subnetName); + } + + /** + * Comment: 备注 + * + * @return string|null + */ + public function getComment(): string + { + return $this->get("Comment"); + } + + /** + * Comment: 备注 + * + * @param string $comment + */ + public function setComment(string $comment) + { + $this->set("Comment", $comment); + } +} diff --git a/src/UEC/Apis/UpdateUEcSubnetResponse.php b/src/UEC/Apis/UpdateUEcSubnetResponse.php new file mode 100644 index 00000000..33ec57fa --- /dev/null +++ b/src/UEC/Apis/UpdateUEcSubnetResponse.php @@ -0,0 +1,26 @@ +get("Name"); + } + + /** + * Name: 名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * MountPath: 挂载路径 + * + * @return string|null + */ + public function getMountPath(): string + { + return $this->get("MountPath"); + } + + /** + * MountPath: 挂载路径 + * + * @param string $mountPath + */ + public function setMountPath(string $mountPath) + { + $this->set("MountPath", $mountPath); + } + + /** + * ResourceId: 资源id + * + * @return string|null + */ + public function getResourceId(): string + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: 资源id + * + * @param string $resourceId + */ + public function setResourceId(string $resourceId) + { + $this->set("ResourceId", $resourceId); + } +} diff --git a/src/UEC/Models/DataSet.php b/src/UEC/Models/DataSet.php new file mode 100644 index 00000000..bfd5d1e7 --- /dev/null +++ b/src/UEC/Models/DataSet.php @@ -0,0 +1,314 @@ +get("CPUUtilization") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new MonitorInfo($item)); + } + return $result; + } + + /** + * CPUUtilization: cpu使用率 + * + * @param MonitorInfo[] $cpuUtilization + */ + public function setCPUUtilization(array $cpuUtilization) + { + $result = []; + foreach ($cpuUtilization as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * MemUtilization: 内存使用率 + * + * @return MonitorInfo[]|null + */ + public function getMemUtilization(): array + { + $items = $this->get("MemUtilization") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new MonitorInfo($item)); + } + return $result; + } + + /** + * MemUtilization: 内存使用率 + * + * @param MonitorInfo[] $memUtilization + */ + public function setMemUtilization(array $memUtilization) + { + $result = []; + foreach ($memUtilization as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * NICOut: 网卡出带宽 + * + * @return MonitorInfo[]|null + */ + public function getNICOut(): array + { + $items = $this->get("NICOut") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new MonitorInfo($item)); + } + return $result; + } + + /** + * NICOut: 网卡出带宽 + * + * @param MonitorInfo[] $nicOut + */ + public function setNICOut(array $nicOut) + { + $result = []; + foreach ($nicOut as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * NICIn: 网卡入带宽 + * + * @return MonitorInfo[]|null + */ + public function getNICIn(): array + { + $items = $this->get("NICIn") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new MonitorInfo($item)); + } + return $result; + } + + /** + * NICIn: 网卡入带宽 + * + * @param MonitorInfo[] $nicIn + */ + public function setNICIn(array $nicIn) + { + $result = []; + foreach ($nicIn as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * NetPacketOut: 网卡出包量 + * + * @return MonitorInfo[]|null + */ + public function getNetPacketOut(): array + { + $items = $this->get("NetPacketOut") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new MonitorInfo($item)); + } + return $result; + } + + /** + * NetPacketOut: 网卡出包量 + * + * @param MonitorInfo[] $netPacketOut + */ + public function setNetPacketOut(array $netPacketOut) + { + $result = []; + foreach ($netPacketOut as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * NetPacketIn: 网卡入包量 + * + * @return MonitorInfo[]|null + */ + public function getNetPacketIn(): array + { + $items = $this->get("NetPacketIn") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new MonitorInfo($item)); + } + return $result; + } + + /** + * NetPacketIn: 网卡入包量 + * + * @param MonitorInfo[] $netPacketIn + */ + public function setNetPacketIn(array $netPacketIn) + { + $result = []; + foreach ($netPacketIn as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * IORead: 磁盘读取量 + * + * @return MonitorInfo[]|null + */ + public function getIORead(): array + { + $items = $this->get("IORead") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new MonitorInfo($item)); + } + return $result; + } + + /** + * IORead: 磁盘读取量 + * + * @param MonitorInfo[] $ioRead + */ + public function setIORead(array $ioRead) + { + $result = []; + foreach ($ioRead as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * IOWrite: 磁盘写入量 + * + * @return MonitorInfo[]|null + */ + public function getIOWrite(): array + { + $items = $this->get("IOWrite") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new MonitorInfo($item)); + } + return $result; + } + + /** + * IOWrite: 磁盘写入量 + * + * @param MonitorInfo[] $ioWrite + */ + public function setIOWrite(array $ioWrite) + { + $result = []; + foreach ($ioWrite as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * DiskReadOps: 磁盘读取次数 + * + * @return MonitorInfo[]|null + */ + public function getDiskReadOps(): array + { + $items = $this->get("DiskReadOps") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new MonitorInfo($item)); + } + return $result; + } + + /** + * DiskReadOps: 磁盘读取次数 + * + * @param MonitorInfo[] $diskReadOps + */ + public function setDiskReadOps(array $diskReadOps) + { + $result = []; + foreach ($diskReadOps as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * DiskWriteOps: 磁盘写入次数 + * + * @return MonitorInfo[]|null + */ + public function getDiskWriteOps(): array + { + $items = $this->get("DiskWriteOps") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new MonitorInfo($item)); + } + return $result; + } + + /** + * DiskWriteOps: 磁盘写入次数 + * + * @param MonitorInfo[] $diskWriteOps + */ + public function setDiskWriteOps(array $diskWriteOps) + { + $result = []; + foreach ($diskWriteOps as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UEC/Models/DeployImageInfo.php b/src/UEC/Models/DeployImageInfo.php new file mode 100644 index 00000000..dc12035b --- /dev/null +++ b/src/UEC/Models/DeployImageInfo.php @@ -0,0 +1,64 @@ +get("IdcId"); + } + + /** + * IdcId: 机房ID + * + * @param string $idcId + */ + public function setIdcId(string $idcId) + { + $this->set("IdcId", $idcId); + } + + /** + * State: 镜像状态 1-可用, 2-不可用, 3-获取中, 4-转换中, 5-部署中 + * + * @return integer|null + */ + public function getState(): int + { + return $this->get("State"); + } + + /** + * State: 镜像状态 1-可用, 2-不可用, 3-获取中, 4-转换中, 5-部署中 + * + * @param int $state + */ + public function setState(int $state) + { + $this->set("State", $state); + } +} diff --git a/src/UEC/Models/DockerInfo.php b/src/UEC/Models/DockerInfo.php new file mode 100644 index 00000000..17de8ebd --- /dev/null +++ b/src/UEC/Models/DockerInfo.php @@ -0,0 +1,242 @@ +get("CpuCores"); + } + + /** + * CpuCores: CPU核数(/核)精度0.1核 + * + * @param float $cpuCores + */ + public function setCpuCores(float $cpuCores) + { + $this->set("CpuCores", $cpuCores); + } + + /** + * MemSize: 内存大小(Gi) + * + * @return float|null + */ + public function getMemSize(): float + { + return $this->get("MemSize"); + } + + /** + * MemSize: 内存大小(Gi) + * + * @param float $memSize + */ + public function setMemSize(float $memSize) + { + $this->set("MemSize", $memSize); + } + + /** + * Name: 容器名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 容器名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * State: 容器状态,0:初始化;1:拉取镜像;2:拉取镜像失败;3:启动中;4:运行中;5:正在停止;6:已停止;7:已删除;8:镜像拉取成功;9:启动失败;99:异常 + * + * @return integer|null + */ + public function getState(): int + { + return $this->get("State"); + } + + /** + * State: 容器状态,0:初始化;1:拉取镜像;2:拉取镜像失败;3:启动中;4:运行中;5:正在停止;6:已停止;7:已删除;8:镜像拉取成功;9:启动失败;99:异常 + * + * @param int $state + */ + public function setState(int $state) + { + $this->set("State", $state); + } + + /** + * ImageName: 镜像名称 + * + * @return string|null + */ + public function getImageName(): string + { + return $this->get("ImageName"); + } + + /** + * ImageName: 镜像名称 + * + * @param string $imageName + */ + public function setImageName(string $imageName) + { + $this->set("ImageName", $imageName); + } + + /** + * WorkDir: 工作目录 + * + * @return string|null + */ + public function getWorkDir(): string + { + return $this->get("WorkDir"); + } + + /** + * WorkDir: 工作目录 + * + * @param string $workDir + */ + public function setWorkDir(string $workDir) + { + $this->set("WorkDir", $workDir); + } + + /** + * Command: 命令 + * + * @return string|null + */ + public function getCommand(): string + { + return $this->get("Command"); + } + + /** + * Command: 命令 + * + * @param string $command + */ + public function setCommand(string $command) + { + $this->set("Command", $command); + } + + /** + * Args: 参数 + * + * @return string|null + */ + public function getArgs(): string + { + return $this->get("Args"); + } + + /** + * Args: 参数 + * + * @param string $args + */ + public function setArgs(string $args) + { + $this->set("Args", $args); + } + + /** + * EnvList: 环境变量(详情参考EnvList) + * + * @return EnvList[]|null + */ + public function getEnvList(): array + { + $items = $this->get("EnvList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new EnvList($item)); + } + return $result; + } + + /** + * EnvList: 环境变量(详情参考EnvList) + * + * @param EnvList[] $envList + */ + public function setEnvList(array $envList) + { + $result = []; + foreach ($envList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * CfgDictList: 容器配置字典(详情参考CfgDictList) + * + * @return CfgDictList[]|null + */ + public function getCfgDictList(): array + { + $items = $this->get("CfgDictList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CfgDictList($item)); + } + return $result; + } + + /** + * CfgDictList: 容器配置字典(详情参考CfgDictList) + * + * @param CfgDictList[] $cfgDictList + */ + public function setCfgDictList(array $cfgDictList) + { + $result = []; + foreach ($cfgDictList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UEC/Models/EnvList.php b/src/UEC/Models/EnvList.php new file mode 100644 index 00000000..9fa29ff8 --- /dev/null +++ b/src/UEC/Models/EnvList.php @@ -0,0 +1,64 @@ +get("Key"); + } + + /** + * Key: 环境变量key值 + * + * @param string $key + */ + public function setKey(string $key) + { + $this->set("Key", $key); + } + + /** + * Value: 环境变量Value值 + * + * @return string|null + */ + public function getValue(): string + { + return $this->get("Value"); + } + + /** + * Value: 环境变量Value值 + * + * @param string $value + */ + public function setValue(string $value) + { + $this->set("Value", $value); + } +} diff --git a/src/UEC/Models/FirewallInfo.php b/src/UEC/Models/FirewallInfo.php new file mode 100644 index 00000000..9ab3cd32 --- /dev/null +++ b/src/UEC/Models/FirewallInfo.php @@ -0,0 +1,173 @@ +get("FirewallId"); + } + + /** + * FirewallId: 防火墙Id + * + * @param string $firewallId + */ + public function setFirewallId(string $firewallId) + { + $this->set("FirewallId", $firewallId); + } + + /** + * Name: 防火墙名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 防火墙名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * CreateTime: 创建时间 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * Rule: 防火墙规则组,详情参见RuleInfo + * + * @return RuleInfo[]|null + */ + public function getRule(): array + { + $items = $this->get("Rule") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new RuleInfo($item)); + } + return $result; + } + + /** + * Rule: 防火墙规则组,详情参见RuleInfo + * + * @param RuleInfo[] $rule + */ + public function setRule(array $rule) + { + $result = []; + foreach ($rule as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * ResourceCount: 防火墙绑定资源数量 + * + * @return integer|null + */ + public function getResourceCount(): int + { + return $this->get("ResourceCount"); + } + + /** + * ResourceCount: 防火墙绑定资源数量 + * + * @param int $resourceCount + */ + public function setResourceCount(int $resourceCount) + { + $this->set("ResourceCount", $resourceCount); + } + + /** + * Type: 防火墙组类型,枚举值为: "user defined", 用户自定义防火墙; "recommend web", 默认Web防火墙; "recommend non web", 默认非Web防火墙 + * + * @return string|null + */ + public function getType(): string + { + return $this->get("Type"); + } + + /** + * Type: 防火墙组类型,枚举值为: "user defined", 用户自定义防火墙; "recommend web", 默认Web防火墙; "recommend non web", 默认非Web防火墙 + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } + + /** + * Remark: 描述 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 描述 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } +} diff --git a/src/UEC/Models/HolderList.php b/src/UEC/Models/HolderList.php new file mode 100644 index 00000000..b2443cf4 --- /dev/null +++ b/src/UEC/Models/HolderList.php @@ -0,0 +1,500 @@ +get("ResourceId"); + } + + /** + * ResourceId: 容器组资源id + * + * @param string $resourceId + */ + public function setResourceId(string $resourceId) + { + $this->set("ResourceId", $resourceId); + } + + /** + * HolderName: 容器组名称 + * + * @return string|null + */ + public function getHolderName(): string + { + return $this->get("HolderName"); + } + + /** + * HolderName: 容器组名称 + * + * @param string $holderName + */ + public function setHolderName(string $holderName) + { + $this->set("HolderName", $holderName); + } + + /** + * SubnetId: 容器组子网id + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 容器组子网id + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * InnerIp: 容器组内网ip + * + * @return string|null + */ + public function getInnerIp(): string + { + return $this->get("InnerIp"); + } + + /** + * InnerIp: 容器组内网ip + * + * @param string $innerIp + */ + public function setInnerIp(string $innerIp) + { + $this->set("InnerIp", $innerIp); + } + + /** + * IpList: 容器组外网ip集合(详情参考IpList) + * + * @return IpList[]|null + */ + public function getIpList(): array + { + $items = $this->get("IpList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new IpList($item)); + } + return $result; + } + + /** + * IpList: 容器组外网ip集合(详情参考IpList) + * + * @param IpList[] $ipList + */ + public function setIpList(array $ipList) + { + $result = []; + foreach ($ipList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * State: 容器组运行状态0:初始化;1:拉取镜像;2:启动中;3:运行中;4:错误;5:正在重启;6:正在删除;7:已经删除;8:容器运行错误;9:启动失败;99:异常 + * + * @return integer|null + */ + public function getState(): int + { + return $this->get("State"); + } + + /** + * State: 容器组运行状态0:初始化;1:拉取镜像;2:启动中;3:运行中;4:错误;5:正在重启;6:正在删除;7:已经删除;8:容器运行错误;9:启动失败;99:异常 + * + * @param int $state + */ + public function setState(int $state) + { + $this->set("State", $state); + } + + /** + * CreateTime: 创建时间 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ExpireTime: 过期时间 + * + * @return integer|null + */ + public function getExpireTime(): int + { + return $this->get("ExpireTime"); + } + + /** + * ExpireTime: 过期时间 + * + * @param int $expireTime + */ + public function setExpireTime(int $expireTime) + { + $this->set("ExpireTime", $expireTime); + } + + /** + * Type: 线路类型(运营商类型: 0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通) + * + * @return integer|null + */ + public function getType(): int + { + return $this->get("Type"); + } + + /** + * Type: 线路类型(运营商类型: 0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通) + * + * @param int $type + */ + public function setType(int $type) + { + $this->set("Type", $type); + } + + /** + * IdcId: 机房id + * + * @return string|null + */ + public function getIdcId(): string + { + return $this->get("IdcId"); + } + + /** + * IdcId: 机房id + * + * @param string $idcId + */ + public function setIdcId(string $idcId) + { + $this->set("IdcId", $idcId); + } + + /** + * OcName: 机房名称 + * + * @return string|null + */ + public function getOcName(): string + { + return $this->get("OcName"); + } + + /** + * OcName: 机房名称 + * + * @param string $ocName + */ + public function setOcName(string $ocName) + { + $this->set("OcName", $ocName); + } + + /** + * Province: 省份名称 + * + * @return string|null + */ + public function getProvince(): string + { + return $this->get("Province"); + } + + /** + * Province: 省份名称 + * + * @param string $province + */ + public function setProvince(string $province) + { + $this->set("Province", $province); + } + + /** + * City: 城市名称 + * + * @return string|null + */ + public function getCity(): string + { + return $this->get("City"); + } + + /** + * City: 城市名称 + * + * @param string $city + */ + public function setCity(string $city) + { + $this->set("City", $city); + } + + /** + * RestartStrategy: 0:总是;1:失败是;2:永不 + * + * @return integer|null + */ + public function getRestartStrategy(): int + { + return $this->get("RestartStrategy"); + } + + /** + * RestartStrategy: 0:总是;1:失败是;2:永不 + * + * @param int $restartStrategy + */ + public function setRestartStrategy(int $restartStrategy) + { + $this->set("RestartStrategy", $restartStrategy); + } + + /** + * DockerCount: 容器数量 + * + * @return integer|null + */ + public function getDockerCount(): int + { + return $this->get("DockerCount"); + } + + /** + * DockerCount: 容器数量 + * + * @param int $dockerCount + */ + public function setDockerCount(int $dockerCount) + { + $this->set("DockerCount", $dockerCount); + } + + /** + * DockerInfo: 容器信息(详情参考DockerInfo) + * + * @return DockerInfo[]|null + */ + public function getDockerInfo(): array + { + $items = $this->get("DockerInfo") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new DockerInfo($item)); + } + return $result; + } + + /** + * DockerInfo: 容器信息(详情参考DockerInfo) + * + * @param DockerInfo[] $dockerInfo + */ + public function setDockerInfo(array $dockerInfo) + { + $result = []; + foreach ($dockerInfo as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * ProductType: 机器类型(normal通用型,hf高性能型) + * + * @return string|null + */ + public function getProductType(): string + { + return $this->get("ProductType"); + } + + /** + * ProductType: 机器类型(normal通用型,hf高性能型) + * + * @param string $productType + */ + public function setProductType(string $productType) + { + $this->set("ProductType", $productType); + } + + /** + * NetLimit: 外网绑定的带宽 + * + * @return integer|null + */ + public function getNetLimit(): int + { + return $this->get("NetLimit"); + } + + /** + * NetLimit: 外网绑定的带宽 + * + * @param int $netLimit + */ + public function setNetLimit(int $netLimit) + { + $this->set("NetLimit", $netLimit); + } + + /** + * FirewallId: 外网防火墙id + * + * @return string|null + */ + public function getFirewallId(): string + { + return $this->get("FirewallId"); + } + + /** + * FirewallId: 外网防火墙id + * + * @param string $firewallId + */ + public function setFirewallId(string $firewallId) + { + $this->set("FirewallId", $firewallId); + } + + /** + * StorVolumeInfo: 存储卷信息(详情参考StorVolumeInfo) + * + * @return StorVolumeInfo[]|null + */ + public function getStorVolumeInfo(): array + { + $items = $this->get("StorVolumeInfo") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new StorVolumeInfo($item)); + } + return $result; + } + + /** + * StorVolumeInfo: 存储卷信息(详情参考StorVolumeInfo) + * + * @param StorVolumeInfo[] $storVolumeInfo + */ + public function setStorVolumeInfo(array $storVolumeInfo) + { + $result = []; + foreach ($storVolumeInfo as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * StorVolumeCount: 存储卷数量 + * + * @return integer|null + */ + public function getStorVolumeCount(): int + { + return $this->get("StorVolumeCount"); + } + + /** + * StorVolumeCount: 存储卷数量 + * + * @param int $storVolumeCount + */ + public function setStorVolumeCount(int $storVolumeCount) + { + $this->set("StorVolumeCount", $storVolumeCount); + } + + /** + * ImageList: 容器组镜像密钥列表(详情参考ImageList) + * + * @return ImageList[]|null + */ + public function getImageList(): array + { + $items = $this->get("ImageList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ImageList($item)); + } + return $result; + } + + /** + * ImageList: 容器组镜像密钥列表(详情参考ImageList) + * + * @param ImageList[] $imageList + */ + public function setImageList(array $imageList) + { + $result = []; + foreach ($imageList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UEC/Models/IDCCutInfo.php b/src/UEC/Models/IDCCutInfo.php new file mode 100644 index 00000000..04a35849 --- /dev/null +++ b/src/UEC/Models/IDCCutInfo.php @@ -0,0 +1,173 @@ +get("IDCName"); + } + + /** + * IDCName: 机房名称 + * + * @param string $idcName + */ + public function setIDCName(string $idcName) + { + $this->set("IDCName", $idcName); + } + + /** + * Province: 省份 + * + * @return string|null + */ + public function getProvince(): string + { + return $this->get("Province"); + } + + /** + * Province: 省份 + * + * @param string $province + */ + public function setProvince(string $province) + { + $this->set("Province", $province); + } + + /** + * City: 城市 + * + * @return string|null + */ + public function getCity(): string + { + return $this->get("City"); + } + + /** + * City: 城市 + * + * @param string $city + */ + public function setCity(string $city) + { + $this->set("City", $city); + } + + /** + * StartTime: 割接开始时间 + * + * @return integer|null + */ + public function getStartTime(): int + { + return $this->get("StartTime"); + } + + /** + * StartTime: 割接开始时间 + * + * @param int $startTime + */ + public function setStartTime(int $startTime) + { + $this->set("StartTime", $startTime); + } + + /** + * EndTime: 割接结束时间 + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 割接结束时间 + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } + + /** + * CutType: 割接类型(中断、抖动、断电) + * + * @return string|null + */ + public function getCutType(): string + { + return $this->get("CutType"); + } + + /** + * CutType: 割接类型(中断、抖动、断电) + * + * @param string $cutType + */ + public function setCutType(string $cutType) + { + $this->set("CutType", $cutType); + } + + /** + * ResourceSet: 受影响的资源信息列表 + * + * @return ResourceSet[]|null + */ + public function getResourceSet(): array + { + $items = $this->get("ResourceSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ResourceSet($item)); + } + return $result; + } + + /** + * ResourceSet: 受影响的资源信息列表 + * + * @param ResourceSet[] $resourceSet + */ + public function setResourceSet(array $resourceSet) + { + $result = []; + foreach ($resourceSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UEC/Models/IdcInfo.php b/src/UEC/Models/IdcInfo.php new file mode 100644 index 00000000..d057fd9a --- /dev/null +++ b/src/UEC/Models/IdcInfo.php @@ -0,0 +1,164 @@ +get("IdcId"); + } + + /** + * IdcId: 机房ID + * + * @param string $idcId + */ + public function setIdcId(string $idcId) + { + $this->set("IdcId", $idcId); + } + + /** + * Name: 机房名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 机房名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Isp: 运营商 + * + * @return string|null + */ + public function getIsp(): string + { + return $this->get("Isp"); + } + + /** + * Isp: 运营商 + * + * @param string $isp + */ + public function setIsp(string $isp) + { + $this->set("Isp", $isp); + } + + /** + * Province: 省份 + * + * @return string|null + */ + public function getProvince(): string + { + return $this->get("Province"); + } + + /** + * Province: 省份 + * + * @param string $province + */ + public function setProvince(string $province) + { + $this->set("Province", $province); + } + + /** + * City: 城市 + * + * @return string|null + */ + public function getCity(): string + { + return $this->get("City"); + } + + /** + * City: 城市 + * + * @param string $city + */ + public function setCity(string $city) + { + $this->set("City", $city); + } + + /** + * Type: 运营商类型:0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通 + * + * @return integer|null + */ + public function getType(): int + { + return $this->get("Type"); + } + + /** + * Type: 运营商类型:0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通 + * + * @param int $type + */ + public function setType(int $type) + { + $this->set("Type", $type); + } + + /** + * MaxNodeCnt: 机房可创建节点最大数量 + * + * @return integer|null + */ + public function getMaxNodeCnt(): int + { + return $this->get("MaxNodeCnt"); + } + + /** + * MaxNodeCnt: 机房可创建节点最大数量 + * + * @param int $maxNodeCnt + */ + public function setMaxNodeCnt(int $maxNodeCnt) + { + $this->set("MaxNodeCnt", $maxNodeCnt); + } +} diff --git a/src/UEC/Models/ImageInfo.php b/src/UEC/Models/ImageInfo.php new file mode 100644 index 00000000..c47b0c65 --- /dev/null +++ b/src/UEC/Models/ImageInfo.php @@ -0,0 +1,213 @@ +get("ImageId"); + } + + /** + * ImageId: 镜像ID + * + * @param string $imageId + */ + public function setImageId(string $imageId) + { + $this->set("ImageId", $imageId); + } + + /** + * ImageName: 镜像名称 + * + * @return string|null + */ + public function getImageName(): string + { + return $this->get("ImageName"); + } + + /** + * ImageName: 镜像名称 + * + * @param string $imageName + */ + public function setImageName(string $imageName) + { + $this->set("ImageName", $imageName); + } + + /** + * ImageType: 镜像类型:1标准镜像,2行业镜像,3自定义镜像 + * + * @return integer|null + */ + public function getImageType(): int + { + return $this->get("ImageType"); + } + + /** + * ImageType: 镜像类型:1标准镜像,2行业镜像,3自定义镜像 + * + * @param int $imageType + */ + public function setImageType(int $imageType) + { + $this->set("ImageType", $imageType); + } + + /** + * OcType: 系统类型:unix, windows + * + * @return string|null + */ + public function getOcType(): string + { + return $this->get("OcType"); + } + + /** + * OcType: 系统类型:unix, windows + * + * @param string $ocType + */ + public function setOcType(string $ocType) + { + $this->set("OcType", $ocType); + } + + /** + * ImageDesc: 镜像描述 + * + * @return string|null + */ + public function getImageDesc(): string + { + return $this->get("ImageDesc"); + } + + /** + * ImageDesc: 镜像描述 + * + * @param string $imageDesc + */ + public function setImageDesc(string $imageDesc) + { + $this->set("ImageDesc", $imageDesc); + } + + /** + * State: 镜像状态:镜像状态 1可用,2不可用 + * + * @return integer|null + */ + public function getState(): int + { + return $this->get("State"); + } + + /** + * State: 镜像状态:镜像状态 1可用,2不可用 + * + * @param int $state + */ + public function setState(int $state) + { + $this->set("State", $state); + } + + /** + * ImageSize: 镜像大小,单位GB + * + * @return integer|null + */ + public function getImageSize(): int + { + return $this->get("ImageSize"); + } + + /** + * ImageSize: 镜像大小,单位GB + * + * @param int $imageSize + */ + public function setImageSize(int $imageSize) + { + $this->set("ImageSize", $imageSize); + } + + /** + * CreateTime: 镜像创建时间戳 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 镜像创建时间戳 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * DeployInfoList: 部署详情列表 + * + * @return DeployImageInfo[]|null + */ + public function getDeployInfoList(): array + { + $items = $this->get("DeployInfoList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new DeployImageInfo($item)); + } + return $result; + } + + /** + * DeployInfoList: 部署详情列表 + * + * @param DeployImageInfo[] $deployInfoList + */ + public function setDeployInfoList(array $deployInfoList) + { + $result = []; + foreach ($deployInfoList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UEC/Models/ImageList.php b/src/UEC/Models/ImageList.php new file mode 100644 index 00000000..e7edb7c9 --- /dev/null +++ b/src/UEC/Models/ImageList.php @@ -0,0 +1,84 @@ +get("StoreAddr"); + } + + /** + * StoreAddr: 仓库地址 + * + * @param string $storeAddr + */ + public function setStoreAddr(string $storeAddr) + { + $this->set("StoreAddr", $storeAddr); + } + + /** + * UserName: 用户名称 + * + * @return string|null + */ + public function getUserName(): string + { + return $this->get("UserName"); + } + + /** + * UserName: 用户名称 + * + * @param string $userName + */ + public function setUserName(string $userName) + { + $this->set("UserName", $userName); + } + + /** + * ImageKey: 镜像密钥 + * + * @return string|null + */ + public function getImageKey(): string + { + return $this->get("ImageKey"); + } + + /** + * ImageKey: 镜像密钥 + * + * @param string $imageKey + */ + public function setImageKey(string $imageKey) + { + $this->set("ImageKey", $imageKey); + } +} diff --git a/src/UEC/Models/IpList.php b/src/UEC/Models/IpList.php new file mode 100644 index 00000000..f65aa9aa --- /dev/null +++ b/src/UEC/Models/IpList.php @@ -0,0 +1,64 @@ +get("Ip"); + } + + /** + * Ip: 外网ip + * + * @param string $ip + */ + public function setIp(string $ip) + { + $this->set("Ip", $ip); + } + + /** + * Isp: 运营商 + * + * @return string|null + */ + public function getIsp(): string + { + return $this->get("Isp"); + } + + /** + * Isp: 运营商 + * + * @param string $isp + */ + public function setIsp(string $isp) + { + $this->set("Isp", $isp); + } +} diff --git a/src/UEC/Models/MetricisDataSet.php b/src/UEC/Models/MetricisDataSet.php new file mode 100644 index 00000000..90ae678e --- /dev/null +++ b/src/UEC/Models/MetricisDataSet.php @@ -0,0 +1,198 @@ +get("CPUUtilization") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new MonitorInfo($item)); + } + return $result; + } + + /** + * CPUUtilization: cpu利用率(详情参考MonitorInfo) + * + * @param MonitorInfo[] $cpuUtilization + */ + public function setCPUUtilization(array $cpuUtilization) + { + $result = []; + foreach ($cpuUtilization as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * MemUtilization: 内存使用率(详情参考MonitorInfo) + * + * @return MonitorInfo[]|null + */ + public function getMemUtilization(): array + { + $items = $this->get("MemUtilization") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new MonitorInfo($item)); + } + return $result; + } + + /** + * MemUtilization: 内存使用率(详情参考MonitorInfo) + * + * @param MonitorInfo[] $memUtilization + */ + public function setMemUtilization(array $memUtilization) + { + $result = []; + foreach ($memUtilization as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * NetPacketOut: 网卡出包数(详情参考MonitorInfo) + * + * @return MonitorInfo[]|null + */ + public function getNetPacketOut(): array + { + $items = $this->get("NetPacketOut") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new MonitorInfo($item)); + } + return $result; + } + + /** + * NetPacketOut: 网卡出包数(详情参考MonitorInfo) + * + * @param MonitorInfo[] $netPacketOut + */ + public function setNetPacketOut(array $netPacketOut) + { + $result = []; + foreach ($netPacketOut as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * NetPacketIn: 网卡入包数(详情参考MonitorInfo) + * + * @return MonitorInfo[]|null + */ + public function getNetPacketIn(): array + { + $items = $this->get("NetPacketIn") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new MonitorInfo($item)); + } + return $result; + } + + /** + * NetPacketIn: 网卡入包数(详情参考MonitorInfo) + * + * @param MonitorInfo[] $netPacketIn + */ + public function setNetPacketIn(array $netPacketIn) + { + $result = []; + foreach ($netPacketIn as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * NICOut: 网卡出带宽(详情参考MonitorInfo) + * + * @return MonitorInfo[]|null + */ + public function getNICOut(): array + { + $items = $this->get("NICOut") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new MonitorInfo($item)); + } + return $result; + } + + /** + * NICOut: 网卡出带宽(详情参考MonitorInfo) + * + * @param MonitorInfo[] $nicOut + */ + public function setNICOut(array $nicOut) + { + $result = []; + foreach ($nicOut as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * NICIn: 网卡入带宽(详情参考MonitorInfo) + * + * @return MonitorInfo[]|null + */ + public function getNICIn(): array + { + $items = $this->get("NICIn") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new MonitorInfo($item)); + } + return $result; + } + + /** + * NICIn: 网卡入带宽(详情参考MonitorInfo) + * + * @param MonitorInfo[] $nicIn + */ + public function setNICIn(array $nicIn) + { + $result = []; + foreach ($nicIn as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UEC/Models/MonitorInfo.php b/src/UEC/Models/MonitorInfo.php new file mode 100644 index 00000000..0a60e2db --- /dev/null +++ b/src/UEC/Models/MonitorInfo.php @@ -0,0 +1,64 @@ +get("TimeStamp"); + } + + /** + * TimeStamp: 时间戳 + * + * @param int $timeStamp + */ + public function setTimeStamp(int $timeStamp) + { + $this->set("TimeStamp", $timeStamp); + } + + /** + * Value: 值 + * + * @return integer|null + */ + public function getValue(): int + { + return $this->get("Value"); + } + + /** + * Value: 值 + * + * @param int $value + */ + public function setValue(int $value) + { + $this->set("Value", $value); + } +} diff --git a/src/UEC/Models/NodeInfo.php b/src/UEC/Models/NodeInfo.php new file mode 100644 index 00000000..a5b5351f --- /dev/null +++ b/src/UEC/Models/NodeInfo.php @@ -0,0 +1,433 @@ +get("NodeName"); + } + + /** + * NodeName: 节点名称 + * + * @param string $nodeName + */ + public function setNodeName(string $nodeName) + { + $this->set("NodeName", $nodeName); + } + + /** + * NodeId: 节点ID + * + * @return string|null + */ + public function getNodeId(): string + { + return $this->get("NodeId"); + } + + /** + * NodeId: 节点ID + * + * @param string $nodeId + */ + public function setNodeId(string $nodeId) + { + $this->set("NodeId", $nodeId); + } + + /** + * CoreNum: Cpu核数 + * + * @return integer|null + */ + public function getCoreNum(): int + { + return $this->get("CoreNum"); + } + + /** + * CoreNum: Cpu核数 + * + * @param int $coreNum + */ + public function setCoreNum(int $coreNum) + { + $this->set("CoreNum", $coreNum); + } + + /** + * MemSize: 节点内存大小,单位GB + * + * @return integer|null + */ + public function getMemSize(): int + { + return $this->get("MemSize"); + } + + /** + * MemSize: 节点内存大小,单位GB + * + * @param int $memSize + */ + public function setMemSize(int $memSize) + { + $this->set("MemSize", $memSize); + } + + /** + * SysDiskSize: 系统盘大小, 单位GB + * + * @return integer|null + */ + public function getSysDiskSize(): int + { + return $this->get("SysDiskSize"); + } + + /** + * SysDiskSize: 系统盘大小, 单位GB + * + * @param int $sysDiskSize + */ + public function setSysDiskSize(int $sysDiskSize) + { + $this->set("SysDiskSize", $sysDiskSize); + } + + /** + * DiskSize: 数据盘大小, 单位GB + * + * @return integer|null + */ + public function getDiskSize(): int + { + return $this->get("DiskSize"); + } + + /** + * DiskSize: 数据盘大小, 单位GB + * + * @param int $diskSize + */ + public function setDiskSize(int $diskSize) + { + $this->set("DiskSize", $diskSize); + } + + /** + * State: 节点状态,1部署中,2待启动,3启动中,4运行中,5正在停止,6已停止,7正在更新,8正在重启,9正在删除, 10已经删除,11异常 + * + * @return integer|null + */ + public function getState(): int + { + return $this->get("State"); + } + + /** + * State: 节点状态,1部署中,2待启动,3启动中,4运行中,5正在停止,6已停止,7正在更新,8正在重启,9正在删除, 10已经删除,11异常 + * + * @param int $state + */ + public function setState(int $state) + { + $this->set("State", $state); + } + + /** + * NetLimit: 节点带宽限制, 单位Mbs + * + * @return integer|null + */ + public function getNetLimit(): int + { + return $this->get("NetLimit"); + } + + /** + * NetLimit: 节点带宽限制, 单位Mbs + * + * @param int $netLimit + */ + public function setNetLimit(int $netLimit) + { + $this->set("NetLimit", $netLimit); + } + + /** + * IdcId: 机房ID + * + * @return string|null + */ + public function getIdcId(): string + { + return $this->get("IdcId"); + } + + /** + * IdcId: 机房ID + * + * @param string $idcId + */ + public function setIdcId(string $idcId) + { + $this->set("IdcId", $idcId); + } + + /** + * OcName: 机房名称 + * + * @return string|null + */ + public function getOcName(): string + { + return $this->get("OcName"); + } + + /** + * OcName: 机房名称 + * + * @param string $ocName + */ + public function setOcName(string $ocName) + { + $this->set("OcName", $ocName); + } + + /** + * Province: 省份 + * + * @return string|null + */ + public function getProvince(): string + { + return $this->get("Province"); + } + + /** + * Province: 省份 + * + * @param string $province + */ + public function setProvince(string $province) + { + $this->set("Province", $province); + } + + /** + * City: 城市 + * + * @return string|null + */ + public function getCity(): string + { + return $this->get("City"); + } + + /** + * City: 城市 + * + * @param string $city + */ + public function setCity(string $city) + { + $this->set("City", $city); + } + + /** + * Type: 运营商类型: 0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通 + * + * @return integer|null + */ + public function getType(): int + { + return $this->get("Type"); + } + + /** + * Type: 运营商类型: 0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通 + * + * @param int $type + */ + public function setType(int $type) + { + $this->set("Type", $type); + } + + /** + * ChargeType: 付费类型:1按时, 2按月,3按年 + * + * @return integer|null + */ + public function getChargeType(): int + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费类型:1按时, 2按月,3按年 + * + * @param int $chargeType + */ + public function setChargeType(int $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * CreateTime: 创建时间 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ExpiredTime: 过期时间 + * + * @return integer|null + */ + public function getExpiredTime(): int + { + return $this->get("ExpiredTime"); + } + + /** + * ExpiredTime: 过期时间 + * + * @param int $expiredTime + */ + public function setExpiredTime(int $expiredTime) + { + $this->set("ExpiredTime", $expiredTime); + } + + /** + * ImageName: 镜像名称 + * + * @return string|null + */ + public function getImageName(): string + { + return $this->get("ImageName"); + } + + /** + * ImageName: 镜像名称 + * + * @param string $imageName + */ + public function setImageName(string $imageName) + { + $this->set("ImageName", $imageName); + } + + /** + * NodeIpList: 外网ip集合(详情参考NodeIpList) + * + * @return NodeIpList[]|null + */ + public function getNodeIpList(): array + { + $items = $this->get("NodeIpList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new NodeIpList($item)); + } + return $result; + } + + /** + * NodeIpList: 外网ip集合(详情参考NodeIpList) + * + * @param NodeIpList[] $nodeIpList + */ + public function setNodeIpList(array $nodeIpList) + { + $result = []; + foreach ($nodeIpList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * FirewallId: 防火墙Id + * + * @return string|null + */ + public function getFirewallId(): string + { + return $this->get("FirewallId"); + } + + /** + * FirewallId: 防火墙Id + * + * @param string $firewallId + */ + public function setFirewallId(string $firewallId) + { + $this->set("FirewallId", $firewallId); + } + + /** + * ProductType: 机器类型 + * + * @return string|null + */ + public function getProductType(): string + { + return $this->get("ProductType"); + } + + /** + * ProductType: 机器类型 + * + * @param string $productType + */ + public function setProductType(string $productType) + { + $this->set("ProductType", $productType); + } +} diff --git a/src/UEC/Models/NodeIpList.php b/src/UEC/Models/NodeIpList.php new file mode 100644 index 00000000..e3d2eb14 --- /dev/null +++ b/src/UEC/Models/NodeIpList.php @@ -0,0 +1,84 @@ +get("Ip"); + } + + /** + * Ip: 外网ip + * + * @param string $ip + */ + public function setIp(string $ip) + { + $this->set("Ip", $ip); + } + + /** + * Isp: 运营商 + * + * @return string|null + */ + public function getIsp(): string + { + return $this->get("Isp"); + } + + /** + * Isp: 运营商 + * + * @param string $isp + */ + public function setIsp(string $isp) + { + $this->set("Isp", $isp); + } + + /** + * IspName: 运营商名称 + * + * @return string|null + */ + public function getIspName(): string + { + return $this->get("IspName"); + } + + /** + * IspName: 运营商名称 + * + * @param string $ispName + */ + public function setIspName(string $ispName) + { + $this->set("IspName", $ispName); + } +} diff --git a/src/UEC/Models/NodeIspList.php b/src/UEC/Models/NodeIspList.php new file mode 100644 index 00000000..63145c10 --- /dev/null +++ b/src/UEC/Models/NodeIspList.php @@ -0,0 +1,124 @@ +get("Province"); + } + + /** + * Province: 省份 + * + * @param string $province + */ + public function setProvince(string $province) + { + $this->set("Province", $province); + } + + /** + * City: 城市 + * + * @return string|null + */ + public function getCity(): string + { + return $this->get("City"); + } + + /** + * City: 城市 + * + * @param string $city + */ + public function setCity(string $city) + { + $this->set("City", $city); + } + + /** + * LineType: 线路类型 + * + * @return string|null + */ + public function getLineType(): string + { + return $this->get("LineType"); + } + + /** + * LineType: 线路类型 + * + * @param string $lineType + */ + public function setLineType(string $lineType) + { + $this->set("LineType", $lineType); + } + + /** + * IspName: 机房运营商名称 + * + * @return string|null + */ + public function getIspName(): string + { + return $this->get("IspName"); + } + + /** + * IspName: 机房运营商名称 + * + * @param string $ispName + */ + public function setIspName(string $ispName) + { + $this->set("IspName", $ispName); + } + + /** + * IdcName: 机房名称 + * + * @return string|null + */ + public function getIdcName(): string + { + return $this->get("IdcName"); + } + + /** + * IdcName: 机房名称 + * + * @param string $idcName + */ + public function setIdcName(string $idcName) + { + $this->set("IdcName", $idcName); + } +} diff --git a/src/UEC/Models/NodeList.php b/src/UEC/Models/NodeList.php new file mode 100644 index 00000000..cbae7d09 --- /dev/null +++ b/src/UEC/Models/NodeList.php @@ -0,0 +1,44 @@ +get("NodeId"); + } + + /** + * NodeId: 虚拟机资源id + * + * @param string $nodeId + */ + public function setNodeId(string $nodeId) + { + $this->set("NodeId", $nodeId); + } +} diff --git a/src/UEC/Models/ResourceInfo.php b/src/UEC/Models/ResourceInfo.php new file mode 100644 index 00000000..fc22b436 --- /dev/null +++ b/src/UEC/Models/ResourceInfo.php @@ -0,0 +1,124 @@ +get("ResourceId"); + } + + /** + * ResourceId: 资源Id + * + * @param string $resourceId + */ + public function setResourceId(string $resourceId) + { + $this->set("ResourceId", $resourceId); + } + + /** + * PublicIpList: 节点公网Ip列表 + * + * @return string[]|null + */ + public function getPublicIpList(): array + { + return $this->get("PublicIpList"); + } + + /** + * PublicIpList: 节点公网Ip列表 + * + * @param string[] $publicIpList + */ + public function setPublicIpList(array $publicIpList) + { + $this->set("PublicIpList", $publicIpList); + } + + /** + * Name: 节点名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 节点名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * State: 节点状态,1部署中,2待启动,3启动中,4运行中,5正在停止,6已停止,7正在更新,8正在重启,9正在删除, 10已经删除,11异常 + * + * @return integer|null + */ + public function getState(): int + { + return $this->get("State"); + } + + /** + * State: 节点状态,1部署中,2待启动,3启动中,4运行中,5正在停止,6已停止,7正在更新,8正在重启,9正在删除, 10已经删除,11异常 + * + * @param int $state + */ + public function setState(int $state) + { + $this->set("State", $state); + } + + /** + * Remark: 节点备注 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 节点备注 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } +} diff --git a/src/UEC/Models/ResourceSet.php b/src/UEC/Models/ResourceSet.php new file mode 100644 index 00000000..d2fcafcc --- /dev/null +++ b/src/UEC/Models/ResourceSet.php @@ -0,0 +1,64 @@ +get("NodeId"); + } + + /** + * NodeId: 节点id + * + * @param string $nodeId + */ + public function setNodeId(string $nodeId) + { + $this->set("NodeId", $nodeId); + } + + /** + * OuterIps: 机器外网ip集合 + * + * @return string[]|null + */ + public function getOuterIps(): array + { + return $this->get("OuterIps"); + } + + /** + * OuterIps: 机器外网ip集合 + * + * @param string[] $outerIps + */ + public function setOuterIps(array $outerIps) + { + $this->set("OuterIps", $outerIps); + } +} diff --git a/src/UEC/Models/RuleInfo.php b/src/UEC/Models/RuleInfo.php new file mode 100644 index 00000000..f59d753c --- /dev/null +++ b/src/UEC/Models/RuleInfo.php @@ -0,0 +1,144 @@ +get("ProtocolType"); + } + + /** + * ProtocolType: 协议,可选值:TCP,UDP,ICMP + * + * @param string $protocolType + */ + public function setProtocolType(string $protocolType) + { + $this->set("ProtocolType", $protocolType); + } + + /** + * Port: 端口,范围用"-"符号分隔,如:1-65535 + * + * @return string|null + */ + public function getPort(): string + { + return $this->get("Port"); + } + + /** + * Port: 端口,范围用"-"符号分隔,如:1-65535 + * + * @param string $port + */ + public function setPort(string $port) + { + $this->set("Port", $port); + } + + /** + * SrcIp: 源ip + * + * @return string|null + */ + public function getSrcIp(): string + { + return $this->get("SrcIp"); + } + + /** + * SrcIp: 源ip + * + * @param string $srcIp + */ + public function setSrcIp(string $srcIp) + { + $this->set("SrcIp", $srcIp); + } + + /** + * Action: ACCEPT(接受)和DROP(拒绝) + * + * @return string|null + */ + public function getAction(): string + { + return $this->get("Action"); + } + + /** + * Action: ACCEPT(接受)和DROP(拒绝) + * + * @param string $action + */ + public function setAction(string $action) + { + $this->set("Action", $action); + } + + /** + * Priority: 优先级:HIGH(高),MEDIUM(中),LOW(低) + * + * @return string|null + */ + public function getPriority(): string + { + return $this->get("Priority"); + } + + /** + * Priority: 优先级:HIGH(高),MEDIUM(中),LOW(低) + * + * @param string $priority + */ + public function setPriority(string $priority) + { + $this->set("Priority", $priority); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } +} diff --git a/src/UEC/Models/StorVolumeInfo.php b/src/UEC/Models/StorVolumeInfo.php new file mode 100644 index 00000000..3a6d6371 --- /dev/null +++ b/src/UEC/Models/StorVolumeInfo.php @@ -0,0 +1,104 @@ +get("Name"); + } + + /** + * Name: 名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * ResourceId: 资源id + * + * @return string|null + */ + public function getResourceId(): string + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: 资源id + * + * @param string $resourceId + */ + public function setResourceId(string $resourceId) + { + $this->set("ResourceId", $resourceId); + } + + /** + * MountPoint: 挂载点 + * + * @return string|null + */ + public function getMountPoint(): string + { + return $this->get("MountPoint"); + } + + /** + * MountPoint: 挂载点 + * + * @param string $mountPoint + */ + public function setMountPoint(string $mountPoint) + { + $this->set("MountPoint", $mountPoint); + } + + /** + * DiskSize: 容量(单位GB) + * + * @return integer|null + */ + public function getDiskSize(): int + { + return $this->get("DiskSize"); + } + + /** + * DiskSize: 容量(单位GB) + * + * @param int $diskSize + */ + public function setDiskSize(int $diskSize) + { + $this->set("DiskSize", $diskSize); + } +} diff --git a/src/UEC/Models/SubnetInfo.php b/src/UEC/Models/SubnetInfo.php new file mode 100644 index 00000000..20c8075b --- /dev/null +++ b/src/UEC/Models/SubnetInfo.php @@ -0,0 +1,184 @@ +get("SubnetId"); + } + + /** + * SubnetId: 子网ID + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * SubnetName: 子网名称 + * + * @return string|null + */ + public function getSubnetName(): string + { + return $this->get("SubnetName"); + } + + /** + * SubnetName: 子网名称 + * + * @param string $subnetName + */ + public function setSubnetName(string $subnetName) + { + $this->set("SubnetName", $subnetName); + } + + /** + * IdcId: 机房ID + * + * @return string|null + */ + public function getIdcId(): string + { + return $this->get("IdcId"); + } + + /** + * IdcId: 机房ID + * + * @param string $idcId + */ + public function setIdcId(string $idcId) + { + $this->set("IdcId", $idcId); + } + + /** + * CIDR: 子网cidr + * + * @return string|null + */ + public function getCIDR(): string + { + return $this->get("CIDR"); + } + + /** + * CIDR: 子网cidr + * + * @param string $cidr + */ + public function setCIDR(string $cidr) + { + $this->set("CIDR", $cidr); + } + + /** + * CreateTime: 创建时间 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * Comment: 备注 + * + * @return string|null + */ + public function getComment(): string + { + return $this->get("Comment"); + } + + /** + * Comment: 备注 + * + * @param string $comment + */ + public function setComment(string $comment) + { + $this->set("Comment", $comment); + } + + /** + * TotalIpCnt: 总ip数 + * + * @return integer|null + */ + public function getTotalIpCnt(): int + { + return $this->get("TotalIpCnt"); + } + + /** + * TotalIpCnt: 总ip数 + * + * @param int $totalIpCnt + */ + public function setTotalIpCnt(int $totalIpCnt) + { + $this->set("TotalIpCnt", $totalIpCnt); + } + + /** + * AvailableIPCnt: 可用ip数 + * + * @return integer|null + */ + public function getAvailableIPCnt(): int + { + return $this->get("AvailableIPCnt"); + } + + /** + * AvailableIPCnt: 可用ip数 + * + * @param int $availableIPCnt + */ + public function setAvailableIPCnt(int $availableIPCnt) + { + $this->set("AvailableIPCnt", $availableIPCnt); + } +} diff --git a/src/UEC/Params/CreateUEcFirewallParamRule.php b/src/UEC/Params/CreateUEcFirewallParamRule.php new file mode 100644 index 00000000..9f3ef5e4 --- /dev/null +++ b/src/UEC/Params/CreateUEcFirewallParamRule.php @@ -0,0 +1,144 @@ +get("ProtocolType"); + } + + /** + * ProtocolType: 协议,可选值:TCP,UDP,ICMP + * + * @param string $protocolType + */ + public function setProtocolType(string $protocolType) + { + $this->set("ProtocolType", $protocolType); + } + + /** + * Port: 端口,范围用"-"符号分隔,如:1-65535 + * + * @return string|null + */ + public function getPort(): string + { + return $this->get("Port"); + } + + /** + * Port: 端口,范围用"-"符号分隔,如:1-65535 + * + * @param string $port + */ + public function setPort(string $port) + { + $this->set("Port", $port); + } + + /** + * SrcIp: 源ip + * + * @return string|null + */ + public function getSrcIp(): string + { + return $this->get("SrcIp"); + } + + /** + * SrcIp: 源ip + * + * @param string $srcIp + */ + public function setSrcIp(string $srcIp) + { + $this->set("SrcIp", $srcIp); + } + + /** + * Action: ACCEPT(接受)和DROP(拒绝) + * + * @return string|null + */ + public function getAction(): string + { + return $this->get("Action"); + } + + /** + * Action: ACCEPT(接受)和DROP(拒绝) + * + * @param string $action + */ + public function setAction(string $action) + { + $this->set("Action", $action); + } + + /** + * Priority: 优先级:HIGH(高),MEDIUM(中),LOW(低) + * + * @return string|null + */ + public function getPriority(): string + { + return $this->get("Priority"); + } + + /** + * Priority: 优先级:HIGH(高),MEDIUM(中),LOW(低) + * + * @param string $priority + */ + public function setPriority(string $priority) + { + $this->set("Priority", $priority); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } +} diff --git a/src/UEC/Params/CreateUEcHolderParamImage.php b/src/UEC/Params/CreateUEcHolderParamImage.php new file mode 100644 index 00000000..de7a66b8 --- /dev/null +++ b/src/UEC/Params/CreateUEcHolderParamImage.php @@ -0,0 +1,64 @@ +get("Message"); + } + + /** + * Message: 镜像用户名和密码(如镜像名:密码) + * + * @param string $message + */ + public function setMessage(string $message) + { + $this->set("Message", $message); + } + + /** + * StoreAddress: 镜像仓库地址 + * + * @return string|null + */ + public function getStoreAddress(): string + { + return $this->get("StoreAddress"); + } + + /** + * StoreAddress: 镜像仓库地址 + * + * @param string $storeAddress + */ + public function setStoreAddress(string $storeAddress) + { + $this->set("StoreAddress", $storeAddress); + } +} diff --git a/src/UEC/Params/CreateUEcHolderParamPack.php b/src/UEC/Params/CreateUEcHolderParamPack.php new file mode 100644 index 00000000..7222cec7 --- /dev/null +++ b/src/UEC/Params/CreateUEcHolderParamPack.php @@ -0,0 +1,204 @@ +get("Name"); + } + + /** + * Name: 容器名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * CpuCore: 容器Cpu核数 + * + * @return float|null + */ + public function getCpuCore(): float + { + return $this->get("CpuCore"); + } + + /** + * CpuCore: 容器Cpu核数 + * + * @param float $cpuCore + */ + public function setCpuCore(float $cpuCore) + { + $this->set("CpuCore", $cpuCore); + } + + /** + * MemSize: 容器内存,单位MB + * + * @return integer|null + */ + public function getMemSize(): int + { + return $this->get("MemSize"); + } + + /** + * MemSize: 容器内存,单位MB + * + * @param int $memSize + */ + public function setMemSize(int $memSize) + { + $this->set("MemSize", $memSize); + } + + /** + * ImageName: 容器镜像名称 + * + * @return string|null + */ + public function getImageName(): string + { + return $this->get("ImageName"); + } + + /** + * ImageName: 容器镜像名称 + * + * @param string $imageName + */ + public function setImageName(string $imageName) + { + $this->set("ImageName", $imageName); + } + + /** + * WorkDir: 容器工作目录 + * + * @return string|null + */ + public function getWorkDir(): string + { + return $this->get("WorkDir"); + } + + /** + * WorkDir: 容器工作目录 + * + * @param string $workDir + */ + public function setWorkDir(string $workDir) + { + $this->set("WorkDir", $workDir); + } + + /** + * Cmd: 开启容器的命令 + * + * @return string|null + */ + public function getCmd(): string + { + return $this->get("Cmd"); + } + + /** + * Cmd: 开启容器的命令 + * + * @param string $cmd + */ + public function setCmd(string $cmd) + { + $this->set("Cmd", $cmd); + } + + /** + * Args: 容器参数(多个用;隔开) + * + * @return string|null + */ + public function getArgs(): string + { + return $this->get("Args"); + } + + /** + * Args: 容器参数(多个用;隔开) + * + * @param string $args + */ + public function setArgs(string $args) + { + $this->set("Args", $args); + } + + /** + * Environment: 容器环境变量(多个用;隔开,如:key1:value1;key2:value2) + * + * @return string|null + */ + public function getEnvironment(): string + { + return $this->get("Environment"); + } + + /** + * Environment: 容器环境变量(多个用;隔开,如:key1:value1;key2:value2) + * + * @param string $environment + */ + public function setEnvironment(string $environment) + { + $this->set("Environment", $environment); + } + + /** + * ConfigDict: 容器配置字典(多个用;隔开,如:/data1:resId1;/data2:resId2) + * + * @return string|null + */ + public function getConfigDict(): string + { + return $this->get("ConfigDict"); + } + + /** + * ConfigDict: 容器配置字典(多个用;隔开,如:/data1:resId1;/data2:resId2) + * + * @param string $configDict + */ + public function setConfigDict(string $configDict) + { + $this->set("ConfigDict", $configDict); + } +} diff --git a/src/UEC/Params/CreateUEcHolderParamStorage.php b/src/UEC/Params/CreateUEcHolderParamStorage.php new file mode 100644 index 00000000..61eecb6c --- /dev/null +++ b/src/UEC/Params/CreateUEcHolderParamStorage.php @@ -0,0 +1,64 @@ +get("Path"); + } + + /** + * Path: 存储卷挂载路径 + * + * @param string $path + */ + public function setPath(string $path) + { + $this->set("Path", $path); + } + + /** + * ResourceId: 存储卷资源id + * + * @return string|null + */ + public function getResourceId(): string + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: 存储卷资源id + * + * @param string $resourceId + */ + public function setResourceId(string $resourceId) + { + $this->set("ResourceId", $resourceId); + } +} diff --git a/src/UEC/Params/UpdateUEcFirewallParamRule.php b/src/UEC/Params/UpdateUEcFirewallParamRule.php new file mode 100644 index 00000000..ac8500f3 --- /dev/null +++ b/src/UEC/Params/UpdateUEcFirewallParamRule.php @@ -0,0 +1,144 @@ +get("ProtocolType"); + } + + /** + * ProtocolType: 协议,可选值:TCP,UDP,ICMP + * + * @param string $protocolType + */ + public function setProtocolType(string $protocolType) + { + $this->set("ProtocolType", $protocolType); + } + + /** + * Port: 端口,范围用"-"符号分隔,如:1-65535 + * + * @return string|null + */ + public function getPort(): string + { + return $this->get("Port"); + } + + /** + * Port: 端口,范围用"-"符号分隔,如:1-65535 + * + * @param string $port + */ + public function setPort(string $port) + { + $this->set("Port", $port); + } + + /** + * SrcIp: 源ip + * + * @return string|null + */ + public function getSrcIp(): string + { + return $this->get("SrcIp"); + } + + /** + * SrcIp: 源ip + * + * @param string $srcIp + */ + public function setSrcIp(string $srcIp) + { + $this->set("SrcIp", $srcIp); + } + + /** + * Action: ACCEPT(接受)和DROP(拒绝) + * + * @return string|null + */ + public function getAction(): string + { + return $this->get("Action"); + } + + /** + * Action: ACCEPT(接受)和DROP(拒绝) + * + * @param string $action + */ + public function setAction(string $action) + { + $this->set("Action", $action); + } + + /** + * Priority: 优先级:HIGH(高),MEDIUM(中),LOW(低) + * + * @return string|null + */ + public function getPriority(): string + { + return $this->get("Priority"); + } + + /** + * Priority: 优先级:HIGH(高),MEDIUM(中),LOW(低) + * + * @param string $priority + */ + public function setPriority(string $priority) + { + $this->set("Priority", $priority); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } +} diff --git a/src/UEC/UECClient.php b/src/UEC/UECClient.php new file mode 100644 index 00000000..0fac169a --- /dev/null +++ b/src/UEC/UECClient.php @@ -0,0 +1,1673 @@ + (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "FirewallId" => (string) 防火墙Id + * "ResourceId" => (string) 虚拟机资源Id或容器组资源id + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function bindUEcFirewall(BindUEcFirewallRequest $request = null): BindUEcFirewallResponse + { + $resp = $this->invoke($request); + return new BindUEcFirewallResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUEcFirewall - 创建外网防火墙 + * + * See also: https://docs.ucloud.cn/api/UEC-api/create_u_ec_firewall + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Name" => (string) 防火墙名称 + * "Rule" => (array) [ + * [ + * "ProtocolType" => (string) 协议,可选值:TCP,UDP,ICMP + * "Port" => (string) 端口,范围用"-"符号分隔,如:1-65535 + * "SrcIp" => (string) 源ip + * "Action" => (string) ACCEPT(接受)和DROP(拒绝) + * "Priority" => (string) 优先级:HIGH(高),MEDIUM(中),LOW(低) + * "Remark" => (string) 备注 + * ] + * ] + * "Remark" => (string) 描述 + * ] + * + * Outputs: + * + * $outputs = [ + * "FirewallId" => (string) 防火墙Id + * ] + * + * @throws UCloudException + */ + public function createUEcFirewall(CreateUEcFirewallRequest $request = null): CreateUEcFirewallResponse + { + $resp = $this->invoke($request); + return new CreateUEcFirewallResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUEcHolder - 创建容器组 + * + * See also: https://docs.ucloud.cn/api/UEC-api/create_u_ec_holder + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "IdcId" => (string) 机房id + * "CpuCore" => (number) 容器组Cpu总核数 + * "MemSize" => (integer) 容器组总内存,单位MB + * "SubnetId" => (string) 子网ID + * "Name" => (string) 容器组名称(默认default) + * "ProductType" => (string) 机型(normal-标准型,hf-高性能型,默认normal) + * "RestartStrategy" => (integer) 重启策略(0总是,1失败是,2永不,默认0) + * "ElasticIp" => (string) 绑定外网ip(yes-绑定,no-不绑定,默认no) + * "Bandwidth" => (integer) 外网绑定的带宽(单位M,默认0,只有当ElasticIp为yes时,默认1) + * "FirewallId" => (string) 防火墙ID + * "ChargeType" => (integer) 付费方式(2按月、3按年。默认2,默认月付) + * "ChargeQuantity" => (integer) 月数或者年数(默认值:1,当为按月计费时,0表示计费到月底,默认值为0) + * "Pack" => (array) [ + * [ + * "Name" => (string) 容器名称 + * "CpuCore" => (number) 容器Cpu核数 + * "MemSize" => (integer) 容器内存,单位MB + * "ImageName" => (string) 容器镜像名称 + * "WorkDir" => (string) 容器工作目录 + * "Cmd" => (string) 开启容器的命令 + * "Args" => (string) 容器参数(多个用;隔开) + * "Environment" => (string) 容器环境变量(多个用;隔开,如:key1:value1;key2:value2) + * "ConfigDict" => (string) 容器配置字典(多个用;隔开,如:/data1:resId1;/data2:resId2) + * ] + * ] + * "Image" => (array) [ + * [ + * "Message" => (string) 镜像用户名和密码(如镜像名:密码) + * "StoreAddress" => (string) 镜像仓库地址 + * ] + * ] + * "Storage" => (array) [ + * [ + * "Path" => (string) 存储卷挂载路径 + * "ResourceId" => (string) 存储卷资源id + * ] + * ] + * ] + * + * Outputs: + * + * $outputs = [ + * "ResourceId" => (string) 容器组资源id + * ] + * + * @throws UCloudException + */ + public function createUEcHolder(CreateUEcHolderRequest $request = null): CreateUEcHolderResponse + { + $resp = $this->invoke($request); + return new CreateUEcHolderResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUEcSubnet - 创建子网 + * + * See also: https://docs.ucloud.cn/api/UEC-api/create_u_ec_subnet + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "IdcId" => (string) 机房ID + * "CIDR" => (string) 子网cidr + * "SubnetName" => (string) 子网名称 + * "Comment" => (string) 备注 + * ] + * + * Outputs: + * + * $outputs = [ + * "SubnetId" => (string) 子网ID + * ] + * + * @throws UCloudException + */ + public function createUEcSubnet(CreateUEcSubnetRequest $request = null): CreateUEcSubnetResponse + { + $resp = $this->invoke($request); + return new CreateUEcSubnetResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUEcVHost - 创建虚拟机v2.0 + * + * See also: https://docs.ucloud.cn/api/UEC-api/create_u_ec_v_host + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "IdcId" => (string) 机房id + * "CpuCore" => (integer) cpu核心数 + * "MemSize" => (integer) 内存大小,单位GB + * "DiskSize" => (integer) 数据盘大小,单位GB + * "ImageId" => (string) 镜像ID + * "NetLimit" => (integer) 节点带宽限制,单位Mbs + * "NodeName" => (string) 节点名称 + * "SysDiskSize" => (integer) 系统盘大小,单位GB, 默认20GB + * "AccountName" => (string) 账户名,默认root + * "PassWord" => (string) 密码 + * "NodeCount" => (integer) 创建节点数量,默认1 + * "ChargeType" => (integer) 付费方式,1按时,2按月,3按年,默认2 + * "ChargeQuantity" => (integer) 月数或者年数,0计费到月底, 默认0 + * "SubnetId" => (string) 子网ID + * "ProductType" => (string) 产品类型:normal(标准型),hf(高频型) + * "FirewallId" => (string) 外网防护墙规则组,默认 + * "Isp" => (array) 运营商(1-电信,2-联通,4移动) + * "IsNeedOuterIp" => (string) (已废弃)是否需要外网ip(yes-是,no-否) + * ] + * + * Outputs: + * + * $outputs = [ + * "NodeList" => (array) 节点id(详情参考NodeList)[ + * [ + * "NodeId" => (string) 虚拟机资源id + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function createUEcVHost(CreateUEcVHostRequest $request = null): CreateUEcVHostResponse + { + $resp = $this->invoke($request); + return new CreateUEcVHostResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteUEcCustomImage - 删除UEDN客户自定义镜像 + * + * See also: https://docs.ucloud.cn/api/UEC-api/delete_u_ec_custom_image + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ImageId" => (string) 镜像ID + * "IdcId" => (string) 机房ID,带机房ID表示只删除指定机房镜像 + * ] + * + * Outputs: + * + * $outputs = [ + * "ImageId" => (integer) 镜像ID + * ] + * + * @throws UCloudException + */ + public function deleteUEcCustomImage(DeleteUEcCustomImageRequest $request = null): DeleteUEcCustomImageResponse + { + $resp = $this->invoke($request); + return new DeleteUEcCustomImageResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteUEcHolder - 删除容器组 + * + * See also: https://docs.ucloud.cn/api/UEC-api/delete_u_ec_holder + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "HolderId" => (array) 容器组资源id,n为0,1,2... + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteUEcHolder(DeleteUEcHolderRequest $request = null): DeleteUEcHolderResponse + { + $resp = $this->invoke($request); + return new DeleteUEcHolderResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteUEcSubnet - 删除子网 + * + * See also: https://docs.ucloud.cn/api/UEC-api/delete_u_ec_subnet + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "SubnetId" => (string) 子网ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteUEcSubnet(DeleteUEcSubnetRequest $request = null): DeleteUEcSubnetResponse + { + $resp = $this->invoke($request); + return new DeleteUEcSubnetResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteUEcVHost - 删除vhost虚拟机 v2.0 + * + * See also: https://docs.ucloud.cn/api/UEC-api/delete_u_ec_v_host + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "NodeId" => (array) 节点id + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteUEcVHost(DeleteUEcVHostRequest $request = null): DeleteUEcVHostResponse + { + $resp = $this->invoke($request); + return new DeleteUEcVHostResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUEcFirewall - 获取防火墙信息 + * + * See also: https://docs.ucloud.cn/api/UEC-api/describe_u_ec_firewall + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "FirewallId" => (string) 防火墙ID,默认为返回所有防火墙 + * "ResourceId" => (string) 绑定防火墙组的虚拟机资源ID + * "Limit" => (integer) 返回数据长度,默认为20 + * "Offset" => (integer) 列表起始位置偏移量,默认为0 + * ] + * + * Outputs: + * + * $outputs = [ + * "FirewallSet" => (array) 防火墙组详细信息,参见 FirewallInfo[ + * [ + * "FirewallId" => (string) 防火墙Id + * "Name" => (string) 防火墙名称 + * "CreateTime" => (integer) 创建时间 + * "Rule" => (array) 防火墙规则组,详情参见RuleInfo[ + * [ + * "ProtocolType" => (string) 协议,可选值:TCP,UDP,ICMP + * "Port" => (string) 端口,范围用"-"符号分隔,如:1-65535 + * "SrcIp" => (string) 源ip + * "Action" => (string) ACCEPT(接受)和DROP(拒绝) + * "Priority" => (string) 优先级:HIGH(高),MEDIUM(中),LOW(低) + * "Remark" => (string) 备注 + * ] + * ] + * "ResourceCount" => (integer) 防火墙绑定资源数量 + * "Type" => (string) 防火墙组类型,枚举值为: "user defined", 用户自定义防火墙; "recommend web", 默认Web防火墙; "recommend non web", 默认非Web防火墙 + * "Remark" => (string) 描述 + * ] + * ] + * "TotalCount" => (integer) 满足条件的节点总数 + * ] + * + * @throws UCloudException + */ + public function describeUEcFirewall(DescribeUEcFirewallRequest $request = null): DescribeUEcFirewallResponse + { + $resp = $this->invoke($request); + return new DescribeUEcFirewallResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUEcFirewallResource - 防火墙绑定的资源列表 + * + * See also: https://docs.ucloud.cn/api/UEC-api/describe_u_ec_firewall_resource + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "FirewallId" => (string) 防火墙Id + * ] + * + * Outputs: + * + * $outputs = [ + * "ResourceSet" => (array) 资源列表,详情参见ResourceInfo[ + * [ + * "ResourceId" => (string) 资源Id + * "PublicIpList" => (array) 节点公网Ip列表 + * "Name" => (string) 节点名称 + * "State" => (integer) 节点状态,1部署中,2待启动,3启动中,4运行中,5正在停止,6已停止,7正在更新,8正在重启,9正在删除, 10已经删除,11异常 + * "Remark" => (string) 节点备注 + * ] + * ] + * "TotalCount" => (integer) 资源总数 + * ] + * + * @throws UCloudException + */ + public function describeUEcFirewallResource(DescribeUEcFirewallResourceRequest $request = null): DescribeUEcFirewallResourceResponse + { + $resp = $this->invoke($request); + return new DescribeUEcFirewallResourceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUEcHolder - 获得容器组信息 + * + * See also: https://docs.ucloud.cn/api/UEC-api/describe_u_ec_holder + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "HolderId" => (array) 容器组资源id + * "Limit" => (integer) 返回数据长度,默认为20,非负整数 + * "Offset" => (integer) 列表起始位置偏移量,默认为0。非负整数 + * ] + * + * Outputs: + * + * $outputs = [ + * "HolderList" => (array) 容器组列表(详情参考HolderList)[ + * [ + * "ResourceId" => (string) 容器组资源id + * "HolderName" => (string) 容器组名称 + * "SubnetId" => (string) 容器组子网id + * "InnerIp" => (string) 容器组内网ip + * "IpList" => (array) 容器组外网ip集合(详情参考IpList)[ + * [ + * "Ip" => (string) 外网ip + * "Isp" => (string) 运营商 + * ] + * ] + * "State" => (integer) 容器组运行状态0:初始化;1:拉取镜像;2:启动中;3:运行中;4:错误;5:正在重启;6:正在删除;7:已经删除;8:容器运行错误;9:启动失败;99:异常 + * "CreateTime" => (integer) 创建时间 + * "ExpireTime" => (integer) 过期时间 + * "Type" => (integer) 线路类型(运营商类型: 0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通) + * "IdcId" => (string) 机房id + * "OcName" => (string) 机房名称 + * "Province" => (string) 省份名称 + * "City" => (string) 城市名称 + * "RestartStrategy" => (integer) 0:总是;1:失败是;2:永不 + * "DockerCount" => (integer) 容器数量 + * "DockerInfo" => (array) 容器信息(详情参考DockerInfo)[ + * [ + * "CpuCores" => (number) CPU核数(/核)精度0.1核 + * "MemSize" => (number) 内存大小(Gi) + * "Name" => (string) 容器名称 + * "State" => (integer) 容器状态,0:初始化;1:拉取镜像;2:拉取镜像失败;3:启动中;4:运行中;5:正在停止;6:已停止;7:已删除;8:镜像拉取成功;9:启动失败;99:异常 + * "ImageName" => (string) 镜像名称 + * "WorkDir" => (string) 工作目录 + * "Command" => (string) 命令 + * "Args" => (string) 参数 + * "EnvList" => (array) 环境变量(详情参考EnvList)[ + * [ + * "Key" => (string) 环境变量key值 + * "Value" => (string) 环境变量Value值 + * ] + * ] + * "CfgDictList" => (array) 容器配置字典(详情参考CfgDictList)[ + * [ + * "Name" => (string) 名称 + * "MountPath" => (string) 挂载路径 + * "ResourceId" => (string) 资源id + * ] + * ] + * ] + * ] + * "ProductType" => (string) 机器类型(normal通用型,hf高性能型) + * "NetLimit" => (integer) 外网绑定的带宽 + * "FirewallId" => (string) 外网防火墙id + * "StorVolumeInfo" => (array) 存储卷信息(详情参考StorVolumeInfo)[ + * [ + * "Name" => (string) 名称 + * "ResourceId" => (string) 资源id + * "MountPoint" => (string) 挂载点 + * "DiskSize" => (integer) 容量(单位GB) + * ] + * ] + * "StorVolumeCount" => (integer) 存储卷数量 + * "ImageList" => (array) 容器组镜像密钥列表(详情参考ImageList)[ + * [ + * "StoreAddr" => (string) 仓库地址 + * "UserName" => (string) 用户名称 + * "ImageKey" => (string) 镜像密钥 + * ] + * ] + * ] + * ] + * "TotalCount" => (integer) 满足条件的容器组总数 + * ] + * + * @throws UCloudException + */ + public function describeUEcHolder(DescribeUEcHolderRequest $request = null): DescribeUEcHolderResponse + { + $resp = $this->invoke($request); + return new DescribeUEcHolderResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUEcHolderIDC - 获取容器组机房信息 + * + * See also: https://docs.ucloud.cn/api/UEC-api/describe_u_ec_holder_idc + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Cpu" => (number) 容器组Cpu核数 + * "Memory" => (integer) 容器组内存大小(单位MB) + * "IdcId" => (array) Idc机房id。默认全部机房 + * "Type" => (integer) 0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通 + * "ProductType" => (string) 产品类型,normal标准型,hf高性能型 + * ] + * + * Outputs: + * + * $outputs = [ + * "IdcList" => (array) 机房列表,具体参考下面IdcInfo[ + * [ + * "IdcId" => (string) 机房ID + * "Name" => (string) 机房名称 + * "Isp" => (string) 运营商 + * "Province" => (string) 省份 + * "City" => (string) 城市 + * "Type" => (integer) 运营商类型:0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通 + * "MaxNodeCnt" => (integer) 机房可创建节点最大数量 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeUEcHolderIDC(DescribeUEcHolderIDCRequest $request = null): DescribeUEcHolderIDCResponse + { + $resp = $this->invoke($request); + return new DescribeUEcHolderIDCResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUEcIDC - 获取IDC机房列表 + * + * See also: https://docs.ucloud.cn/api/UEC-api/describe_u_ec_idc + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Cpu" => (integer) 节点cpu核数 + * "Memory" => (integer) 节点内存大小, 单位GB + * "IdcId" => (array) Idc机房id。默认全部机房 + * "Type" => (integer) 0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通 + * "ProductType" => (string) 产品类型:normal(通用型),hf(高主频型) + * ] + * + * Outputs: + * + * $outputs = [ + * "IdcList" => (array) 获取的机房信息,具体参考下面IdcInfo[ + * [ + * "IdcId" => (string) 机房ID + * "Name" => (string) 机房名称 + * "Isp" => (string) 运营商 + * "Province" => (string) 省份 + * "City" => (string) 城市 + * "Type" => (integer) 运营商类型:0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通 + * "MaxNodeCnt" => (integer) 机房可创建节点最大数量 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeUEcIDC(DescribeUEcIDCRequest $request = null): DescribeUEcIDCResponse + { + $resp = $this->invoke($request); + return new DescribeUEcIDCResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUEcSubnet - 获取子网列表 + * + * See also: https://docs.ucloud.cn/api/UEC-api/describe_u_ec_subnet + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "IdcId" => (string) 机房ID + * "SubnetId" => (string) 子网ID + * ] + * + * Outputs: + * + * $outputs = [ + * "SubnetList" => (array) 子网信息列表[ + * [ + * "SubnetId" => (string) 子网ID + * "SubnetName" => (string) 子网名称 + * "IdcId" => (string) 机房ID + * "CIDR" => (string) 子网cidr + * "CreateTime" => (integer) 创建时间 + * "Comment" => (string) 备注 + * "TotalIpCnt" => (integer) 总ip数 + * "AvailableIPCnt" => (integer) 可用ip数 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeUEcSubnet(DescribeUEcSubnetRequest $request = null): DescribeUEcSubnetResponse + { + $resp = $this->invoke($request); + return new DescribeUEcSubnetResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUEcVHost - 获取虚拟机列表 2.0 + * + * See also: https://docs.ucloud.cn/api/UEC-api/describe_u_ec_v_host + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "IdcId" => (array) Idc机房id。默认全部机房 + * "NodeId" => (array) 节点id,创建节点时生成的id。默认全部节点 + * "Offset" => (integer) 数据偏移量,默认0,非负整数 + * "Limit" => (integer) 返回数据长度, 默认20,非负整数 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 满足条件的节点总数 + * "NodeList" => (array) 节点列表[ + * [ + * "NodeName" => (string) 节点名称 + * "NodeId" => (string) 节点ID + * "CoreNum" => (integer) Cpu核数 + * "MemSize" => (integer) 节点内存大小,单位GB + * "SysDiskSize" => (integer) 系统盘大小, 单位GB + * "DiskSize" => (integer) 数据盘大小, 单位GB + * "State" => (integer) 节点状态,1部署中,2待启动,3启动中,4运行中,5正在停止,6已停止,7正在更新,8正在重启,9正在删除, 10已经删除,11异常 + * "NetLimit" => (integer) 节点带宽限制, 单位Mbs + * "IdcId" => (string) 机房ID + * "OcName" => (string) 机房名称 + * "Province" => (string) 省份 + * "City" => (string) 城市 + * "Type" => (integer) 运营商类型: 0-其它, 1-一线城市单线,2-二线城市单线, 3-全国教育网, 4-全国三通 + * "ChargeType" => (integer) 付费类型:1按时, 2按月,3按年 + * "CreateTime" => (integer) 创建时间 + * "ExpiredTime" => (integer) 过期时间 + * "ImageName" => (string) 镜像名称 + * "NodeIpList" => (array) 外网ip集合(详情参考NodeIpList)[ + * [ + * "Ip" => (string) 外网ip + * "Isp" => (string) 运营商 + * "IspName" => (string) 运营商名称 + * ] + * ] + * "FirewallId" => (string) 防火墙Id + * "ProductType" => (string) 机器类型 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeUEcVHost(DescribeUEcVHostRequest $request = null): DescribeUEcVHostResponse + { + $resp = $this->invoke($request); + return new DescribeUEcVHostResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUEcVHostISP - 获取虚拟机运营商信息 + * + * See also: https://docs.ucloud.cn/api/UEC-api/describe_u_ec_v_host_isp + * + * Arguments: + * + * $args = [ + * "IspName" => (string) 运营商名称 + * "Province" => (string) 省份 + * "City" => (string) 城市 + * ] + * + * Outputs: + * + * $outputs = [ + * "NodeIspList" => (array) 节点运营商列表[ + * [ + * "Province" => (string) 省份 + * "City" => (string) 城市 + * "LineType" => (string) 线路类型 + * "IspName" => (string) 机房运营商名称 + * "IdcName" => (string) 机房名称 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeUEcVHostISP(DescribeUEcVHostISPRequest $request = null): DescribeUEcVHostISPResponse + { + $resp = $this->invoke($request); + return new DescribeUEcVHostISPResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUEcHolderLog - 获取单个容器日志 + * + * See also: https://docs.ucloud.cn/api/UEC-api/get_u_ec_holder_log + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "PackName" => (string) 容器名称 + * "ResourceId" => (string) 容器组资源id + * ] + * + * Outputs: + * + * $outputs = [ + * "Data" => (string) 返回的日志数据 + * ] + * + * @throws UCloudException + */ + public function getUEcHolderLog(GetUEcHolderLogRequest $request = null): GetUEcHolderLogResponse + { + $resp = $this->invoke($request); + return new GetUEcHolderLogResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUEcHolderMetrics - 获取容器(CPU利用率,带宽,内存)数据 + * + * See also: https://docs.ucloud.cn/api/UEC-api/get_u_ec_holder_metrics + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "PackName" => (string) 容器名称 + * "Type" => (array) n为0 CPU利用率, 1内存使用率, 2网卡出带宽, 3网卡入带宽, 4网卡出包数, 5网卡入包数 + * "ResourceId" => (string) 容器组资源id + * "StartTime" => (integer) 开始时间 + * "EndTime" => (integer) 结束时间 + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSets" => (object) 获得的监控数据(详情参考MetricisDataSet)[ + * "CPUUtilization" => (array) cpu利用率(详情参考MonitorInfo)[ + * [ + * "TimeStamp" => (integer) 时间戳 + * "Value" => (integer) 值 + * ] + * ] + * "MemUtilization" => (array) 内存使用率(详情参考MonitorInfo)[ + * [ + * "TimeStamp" => (integer) 时间戳 + * "Value" => (integer) 值 + * ] + * ] + * "NetPacketOut" => (array) 网卡出包数(详情参考MonitorInfo)[ + * [ + * "TimeStamp" => (integer) 时间戳 + * "Value" => (integer) 值 + * ] + * ] + * "NetPacketIn" => (array) 网卡入包数(详情参考MonitorInfo)[ + * [ + * "TimeStamp" => (integer) 时间戳 + * "Value" => (integer) 值 + * ] + * ] + * "NICOut" => (array) 网卡出带宽(详情参考MonitorInfo)[ + * [ + * "TimeStamp" => (integer) 时间戳 + * "Value" => (integer) 值 + * ] + * ] + * "NICIn" => (array) 网卡入带宽(详情参考MonitorInfo)[ + * [ + * "TimeStamp" => (integer) 时间戳 + * "Value" => (integer) 值 + * ] + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getUEcHolderMetrics(GetUEcHolderMetricsRequest $request = null): GetUEcHolderMetricsResponse + { + $resp = $this->invoke($request); + return new GetUEcHolderMetricsResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUEcIDCCutInfo - 获取机房割接信息 + * + * See also: https://docs.ucloud.cn/api/UEC-api/get_u_ec_idc_cut_info + * + * Arguments: + * + * $args = [ + * ] + * + * Outputs: + * + * $outputs = [ + * "IDCCutInfo" => (array) 机房割接信息[ + * [ + * "IDCName" => (string) 机房名称 + * "Province" => (string) 省份 + * "City" => (string) 城市 + * "StartTime" => (integer) 割接开始时间 + * "EndTime" => (integer) 割接结束时间 + * "CutType" => (string) 割接类型(中断、抖动、断电) + * "ResourceSet" => (array) 受影响的资源信息列表[ + * [ + * "NodeId" => (string) 节点id + * "OuterIps" => (array) 机器外网ip集合 + * ] + * ] + * ] + * ] + * "TotalCount" => (integer) 满足条件的机房总数 + * ] + * + * @throws UCloudException + */ + public function getUEcIDCCutInfo(GetUEcIDCCutInfoRequest $request = null): GetUEcIDCCutInfoResponse + { + $resp = $this->invoke($request); + return new GetUEcIDCCutInfoResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUEcIDCVHostData - 获取机房虚拟机监控数据 + * + * See also: https://docs.ucloud.cn/api/UEC-api/get_u_ec_idcv_host_data + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "NodeId" => (array) 节点资源id;n为0,1,2... + * "Type" => (array) 监控数据类型;n为0,1,2,3,4...,9 + * "BeginTime" => (integer) 开始时间戳 + * "EndTime" => (integer) 结束时间戳 + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSets" => (object) 监控数据集合[ + * "CPUUtilization" => (array) cpu使用率[ + * [ + * "TimeStamp" => (integer) 时间戳 + * "Value" => (integer) 值 + * ] + * ] + * "MemUtilization" => (array) 内存使用率[ + * [ + * "TimeStamp" => (integer) 时间戳 + * "Value" => (integer) 值 + * ] + * ] + * "NICOut" => (array) 网卡出带宽[ + * [ + * "TimeStamp" => (integer) 时间戳 + * "Value" => (integer) 值 + * ] + * ] + * "NICIn" => (array) 网卡入带宽[ + * [ + * "TimeStamp" => (integer) 时间戳 + * "Value" => (integer) 值 + * ] + * ] + * "NetPacketOut" => (array) 网卡出包量[ + * [ + * "TimeStamp" => (integer) 时间戳 + * "Value" => (integer) 值 + * ] + * ] + * "NetPacketIn" => (array) 网卡入包量[ + * [ + * "TimeStamp" => (integer) 时间戳 + * "Value" => (integer) 值 + * ] + * ] + * "IORead" => (array) 磁盘读取量[ + * [ + * "TimeStamp" => (integer) 时间戳 + * "Value" => (integer) 值 + * ] + * ] + * "IOWrite" => (array) 磁盘写入量[ + * [ + * "TimeStamp" => (integer) 时间戳 + * "Value" => (integer) 值 + * ] + * ] + * "DiskReadOps" => (array) 磁盘读取次数[ + * [ + * "TimeStamp" => (integer) 时间戳 + * "Value" => (integer) 值 + * ] + * ] + * "DiskWriteOps" => (array) 磁盘写入次数[ + * [ + * "TimeStamp" => (integer) 时间戳 + * "Value" => (integer) 值 + * ] + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getUEcIDCVHostData(GetUEcIDCVHostDataRequest $request = null): GetUEcIDCVHostDataResponse + { + $resp = $this->invoke($request); + return new GetUEcIDCVHostDataResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUEcImage - uec2.0 + * + * See also: https://docs.ucloud.cn/api/UEC-api/get_u_ec_image + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ImageType" => (string) 镜像类型:1标准镜像,2行业镜像,3自定义镜像 + * "Offset" => (integer) 数据偏移量,默认0,非负整数 + * "Limit" => (integer) 返回数据长度, 默认20,非负整数 + * ] + * + * Outputs: + * + * $outputs = [ + * "ImageList" => (array) 获取的镜像信息,具体参考下面ImageInfo[ + * [ + * "ImageId" => (string) 镜像ID + * "ImageName" => (string) 镜像名称 + * "ImageType" => (integer) 镜像类型:1标准镜像,2行业镜像,3自定义镜像 + * "OcType" => (string) 系统类型:unix, windows + * "ImageDesc" => (string) 镜像描述 + * "State" => (integer) 镜像状态:镜像状态 1可用,2不可用 + * "ImageSize" => (integer) 镜像大小,单位GB + * "CreateTime" => (integer) 镜像创建时间戳 + * "DeployInfoList" => (array) 部署详情列表[ + * [ + * "IdcId" => (string) 机房ID + * "State" => (integer) 镜像状态 1-可用, 2-不可用, 3-获取中, 4-转换中, 5-部署中 + * ] + * ] + * ] + * ] + * "TotalCount" => (integer) 镜像总数 + * ] + * + * @throws UCloudException + */ + public function getUEcImage(GetUEcImageRequest $request = null): GetUEcImageResponse + { + $resp = $this->invoke($request); + return new GetUEcImageResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUEcPodPrice - 获得容器组价格 + * + * See also: https://docs.ucloud.cn/api/UEC-api/get_u_ec_pod_price + * + * Arguments: + * + * $args = [ + * "IdcId" => (string) 机房id + * "CpuCore" => (number) 容器组总Cpu核心数 + * "MemSize" => (integer) 容器组总内存大小(单位M) + * "ChargeType" => (integer) 支付类型(2按月,3按年,默认2) + * "ChargeQuantity" => (integer) 月数或年数(默认值:1,当支付类型为按月时,默认值为0) + * "ProductType" => (string) 产品类型(normal:标准型,hf:高性能型,默认:normal) + * "ElasticIp" => (string) 是否绑定外网IP(yes:是,no:否,默认:no) + * "Bandwidth" => (integer) 绑定的带宽,默认0,当绑定外网IP时默认1(单位M) + * ] + * + * Outputs: + * + * $outputs = [ + * "HolderPrice" => (number) 容器组价格 + * "IpPrice" => (number) IP和带宽价格 + * ] + * + * @throws UCloudException + */ + public function getUEcPodPrice(GetUEcPodPriceRequest $request = null): GetUEcPodPriceResponse + { + $resp = $this->invoke($request); + return new GetUEcPodPriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUEcUpgradePrice - 获取虚拟机调整差价 + * + * See also: https://docs.ucloud.cn/api/UEC-api/get_u_ec_upgrade_price + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "NodeId" => (string) 虚拟机资源ID + * "CpuCore" => (integer) cpu核心数 + * "MemSize" => (integer) 内存大小,单位GB + * "SysDiskSize" => (integer) 系统盘大小,单位GB + * "DiskSize" => (integer) 数据盘大小,单位GB + * "NetLimit" => (integer) 节点带宽限制,单位Mbs + * ] + * + * Outputs: + * + * $outputs = [ + * "Price" => (integer) 规格调整差价 + * ] + * + * @throws UCloudException + */ + public function getUEcUpgradePrice(GetUEcUpgradePriceRequest $request = null): GetUEcUpgradePriceResponse + { + $resp = $this->invoke($request); + return new GetUEcUpgradePriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUEcVHostData - 获取虚拟机监控数据 + * + * See also: https://docs.ucloud.cn/api/UEC-api/get_u_ec_v_host_data + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "NodeId" => (string) 节点id + * "Type" => (array) 0CPU使用率, 1内存使用率, 2 网卡出流量, 3网卡入流量, 4网卡出包量, 5网卡入包量, 6磁盘读流量, 7磁盘写流量, 8磁盘读次数, 9磁盘写次数 + * "BeginTime" => (integer) 查询起始时间 + * "EndTime" => (integer) 查询结束时间 + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSets" => (object) 带宽数据实例集合[ + * "CPUUtilization" => (array) cpu使用率[ + * [ + * "TimeStamp" => (integer) 时间戳 + * "Value" => (integer) 值 + * ] + * ] + * "MemUtilization" => (array) 内存使用率[ + * [ + * "TimeStamp" => (integer) 时间戳 + * "Value" => (integer) 值 + * ] + * ] + * "NICOut" => (array) 网卡出带宽[ + * [ + * "TimeStamp" => (integer) 时间戳 + * "Value" => (integer) 值 + * ] + * ] + * "NICIn" => (array) 网卡入带宽[ + * [ + * "TimeStamp" => (integer) 时间戳 + * "Value" => (integer) 值 + * ] + * ] + * "NetPacketOut" => (array) 网卡出包量[ + * [ + * "TimeStamp" => (integer) 时间戳 + * "Value" => (integer) 值 + * ] + * ] + * "NetPacketIn" => (array) 网卡入包量[ + * [ + * "TimeStamp" => (integer) 时间戳 + * "Value" => (integer) 值 + * ] + * ] + * "IORead" => (array) 磁盘读取量[ + * [ + * "TimeStamp" => (integer) 时间戳 + * "Value" => (integer) 值 + * ] + * ] + * "IOWrite" => (array) 磁盘写入量[ + * [ + * "TimeStamp" => (integer) 时间戳 + * "Value" => (integer) 值 + * ] + * ] + * "DiskReadOps" => (array) 磁盘读取次数[ + * [ + * "TimeStamp" => (integer) 时间戳 + * "Value" => (integer) 值 + * ] + * ] + * "DiskWriteOps" => (array) 磁盘写入次数[ + * [ + * "TimeStamp" => (integer) 时间戳 + * "Value" => (integer) 值 + * ] + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getUEcVHostData(GetUEcVHostDataRequest $request = null): GetUEcVHostDataResponse + { + $resp = $this->invoke($request); + return new GetUEcVHostDataResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUEcVHostPrice - 获取虚拟机价格 + * + * See also: https://docs.ucloud.cn/api/UEC-api/get_u_ec_v_host_price + * + * Arguments: + * + * $args = [ + * "IdcId" => (string) 机房Id + * "NodeCount" => (integer) 节点数量,默认1 + * "CpuCore" => (integer) CPU核数 + * "MemSize" => (integer) 内存大小,单位GB + * "SysDiskSize" => (integer) 系统盘大小,单位GB + * "DiskSize" => (integer) 数据盘大小,单位GB + * "NetLimit" => (integer) 网络带宽限速,单位Mbs + * "ChargeType" => (integer) 付费方式,1按时,2按月,3按年,默认2 + * "ChargeQuantity" => (integer) 月数或者年数,0计费到月底, 默认0 + * "ProductType" => (string) 产品类型:normal(标准型),hf(高频型),默认normal + * "IpCount" => (integer) 外网IP的数量,默认1 + * ] + * + * Outputs: + * + * $outputs = [ + * "NodePrice" => (number) 节点价格 + * "IpPrice" => (number) Ip和带宽价格 + * ] + * + * @throws UCloudException + */ + public function getUEcVHostPrice(GetUEcVHostPriceRequest $request = null): GetUEcVHostPriceResponse + { + $resp = $this->invoke($request); + return new GetUEcVHostPriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ImportUEcCustomImage - 导入自定义镜像 + * + * See also: https://docs.ucloud.cn/api/UEC-api/import_u_ec_custom_image + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "IdcId" => (array) 镜像需要导入机房,默认分发到所有机房 + * "ImageId" => (string) 镜像Id,不传参表示新导入镜像,传参表示已有镜像分发到指定机房 + * "ImageName" => (string) 镜像名称,不带镜像ID时必填 + * "UFileUrl" => (string) UFile镜像文件下载地址,不带镜像ID时必填 + * "OsType" => (string) 操作系统平台,linux、windows(当前版本暂不支持windows),不带镜像ID时必填 + * "Format" => (string) 镜像格式,可选RAW、qcow2, 不带镜像ID时必填 + * "ImageDesc" => (string) 镜像描述 + * ] + * + * Outputs: + * + * $outputs = [ + * "ImageId" => (string) 镜像Id + * ] + * + * @throws UCloudException + */ + public function importUEcCustomImage(ImportUEcCustomImageRequest $request = null): ImportUEcCustomImageResponse + { + $resp = $this->invoke($request); + return new ImportUEcCustomImageResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * LoginUEcDocker - 登录容器 + * + * See also: https://docs.ucloud.cn/api/UEC-api/login_u_ec_docker + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ResourceId" => (string) 容器组资源id + * "Name" => (string) 容器名称 + * ] + * + * Outputs: + * + * $outputs = [ + * "SessionId" => (string) 返回的token + * "Link" => (string) 登录地址 + * "LinkPort" => (integer) 登录端口 + * ] + * + * @throws UCloudException + */ + public function loginUEcDocker(LoginUEcDockerRequest $request = null): LoginUEcDockerResponse + { + $resp = $this->invoke($request); + return new LoginUEcDockerResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyUEcBandwidth - 修改节点带宽限制 + * + * See also: https://docs.ucloud.cn/api/UEC-api/modify_u_ec_bandwidth + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "NodeId" => (string) 节点Id + * "NetLimit" => (string) 节点带宽限制,单位Mbs + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function modifyUEcBandwidth(ModifyUEcBandwidthRequest $request = null): ModifyUEcBandwidthResponse + { + $resp = $this->invoke($request); + return new ModifyUEcBandwidthResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyUEcHolderName - 修改容器组名称 + * + * See also: https://docs.ucloud.cn/api/UEC-api/modify_u_ec_holder_name + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ResourceId" => (string) 容器组资源id + * "Name" => (string) 容器组名称 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function modifyUEcHolderName(ModifyUEcHolderNameRequest $request = null): ModifyUEcHolderNameResponse + { + $resp = $this->invoke($request); + return new ModifyUEcHolderNameResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyUEcImageName - 修改镜像名称 + * + * See also: https://docs.ucloud.cn/api/UEC-api/modify_u_ec_image_name + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ImageId" => (string) 镜像ID + * "ImageName" => (string) 镜像名称 + * "ImageDesc" => (string) 镜像描述 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function modifyUEcImageName(ModifyUEcImageNameRequest $request = null): ModifyUEcImageNameResponse + { + $resp = $this->invoke($request); + return new ModifyUEcImageNameResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * PoweroffUEcVHost - 虚拟机断电 + * + * See also: https://docs.ucloud.cn/api/UEC-api/poweroff_u_ec_v_host + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "NodeId" => (array) 虚拟机资源ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function poweroffUEcVHost(PoweroffUEcVHostRequest $request = null): PoweroffUEcVHostResponse + { + $resp = $this->invoke($request); + return new PoweroffUEcVHostResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ReinstallUEcVHost - 虚拟机重装系统 + * + * See also: https://docs.ucloud.cn/api/UEC-api/reinstall_u_ec_v_host + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "NodeId" => (string) 虚拟机资源ID + * "ImageId" => (string) 镜像ID + * "KeepData" => (integer) 是否保留数据盘数据, 0-不保留,1-保留,默认为1 + * "Password" => (string) 节点密码 + * "SysDiskSize" => (integer) 系统盘大小,单位GB + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function reinstallUEcVHost(ReinstallUEcVHostRequest $request = null): ReinstallUEcVHostResponse + { + $resp = $this->invoke($request); + return new ReinstallUEcVHostResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * RestartUEcHolder - 重启容器组 + * + * See also: https://docs.ucloud.cn/api/UEC-api/restart_u_ec_holder + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ResourceId" => (array) 容器组资源id,n为0,1,2... + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function restartUEcHolder(RestartUEcHolderRequest $request = null): RestartUEcHolderResponse + { + $resp = $this->invoke($request); + return new RestartUEcHolderResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * RestartUEcVHost - 重启虚拟机v2.0 + * + * See also: https://docs.ucloud.cn/api/UEC-api/restart_u_ec_v_host + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "NodeId" => (array) 节点id + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function restartUEcVHost(RestartUEcVHostRequest $request = null): RestartUEcVHostResponse + { + $resp = $this->invoke($request); + return new RestartUEcVHostResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * StartUEcVHost - 启动UEC虚拟机 + * + * See also: https://docs.ucloud.cn/api/UEC-api/start_u_ec_v_host + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "NodeId" => (array) 虚拟机资源ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function startUEcVHost(StartUEcVHostRequest $request = null): StartUEcVHostResponse + { + $resp = $this->invoke($request); + return new StartUEcVHostResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * StopUEcVHost - 停止UEC虚拟机 + * + * See also: https://docs.ucloud.cn/api/UEC-api/stop_u_ec_v_host + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "NodeId" => (array) 虚拟机资源ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function stopUEcVHost(StopUEcVHostRequest $request = null): StopUEcVHostResponse + { + $resp = $this->invoke($request); + return new StopUEcVHostResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UnBindUEcFirewall - 解绑防火墙 + * + * See also: https://docs.ucloud.cn/api/UEC-api/un_bind_u_ec_firewall + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "FirewallId" => (string) 防火墙Id + * "ResourceId" => (string) 节点Id或容器组资源id + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function unBindUEcFirewall(UnBindUEcFirewallRequest $request = null): UnBindUEcFirewallResponse + { + $resp = $this->invoke($request); + return new UnBindUEcFirewallResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateUEcFirewall - 更新防火墙信息,新增和删除规则 + * + * See also: https://docs.ucloud.cn/api/UEC-api/update_u_ec_firewall + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "FirewallId" => (string) 防火墙Id + * "Rule" => (array) [ + * [ + * "ProtocolType" => (string) 协议,可选值:TCP,UDP,ICMP + * "Port" => (string) 端口,范围用"-"符号分隔,如:1-65535 + * "SrcIp" => (string) 源ip + * "Action" => (string) ACCEPT(接受)和DROP(拒绝) + * "Priority" => (string) 优先级:HIGH(高),MEDIUM(中),LOW(低) + * "Remark" => (string) 备注 + * ] + * ] + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function updateUEcFirewall(UpdateUEcFirewallRequest $request = null): UpdateUEcFirewallResponse + { + $resp = $this->invoke($request); + return new UpdateUEcFirewallResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateUEcFirewallAttribute - 更新防火墙名称及描述 + * + * See also: https://docs.ucloud.cn/api/UEC-api/update_u_ec_firewall_attribute + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "FirewallId" => (string) 防火墙Id + * "Name" => (string) 防火墙名称 + * "Remark" => (string) 描述 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function updateUEcFirewallAttribute(UpdateUEcFirewallAttributeRequest $request = null): UpdateUEcFirewallAttributeResponse + { + $resp = $this->invoke($request); + return new UpdateUEcFirewallAttributeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateUEcSubnet - 更新子网信息 + * + * See also: https://docs.ucloud.cn/api/UEC-api/update_u_ec_subnet + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "SubnetId" => (string) 子网ID + * "SubnetName" => (string) 子网名称 + * "Comment" => (string) 备注 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function updateUEcSubnet(UpdateUEcSubnetRequest $request = null): UpdateUEcSubnetResponse + { + $resp = $this->invoke($request); + return new UpdateUEcSubnetResponse($resp->toArray(), $resp->getRequestId()); + } +} diff --git a/src/UFS/Apis/CreateUFSVolumeRequest.php b/src/UFS/Apis/CreateUFSVolumeRequest.php new file mode 100644 index 00000000..3bc99e97 --- /dev/null +++ b/src/UFS/Apis/CreateUFSVolumeRequest.php @@ -0,0 +1,253 @@ + "CreateUFSVolume"]); + $this->markRequired("Region"); + $this->markRequired("Size"); + $this->markRequired("StorageType"); + $this->markRequired("ProtocolType"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Size: 文件系统大小,单位为GB,最大不超过20T,香港容量型必须为100的整数倍,Size最小为500GB,北京,上海,广州的容量型必须为1024的整数倍,Size最小为1024GB。性能型文件系统Size最小为100GB + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 文件系统大小,单位为GB,最大不超过20T,香港容量型必须为100的整数倍,Size最小为500GB,北京,上海,广州的容量型必须为1024的整数倍,Size最小为1024GB。性能型文件系统Size最小为100GB + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * StorageType: 文件系统存储类型,枚举值,Basic表示容量型,Advanced表示性能型 + * + * @return string|null + */ + public function getStorageType(): string + { + return $this->get("StorageType"); + } + + /** + * StorageType: 文件系统存储类型,枚举值,Basic表示容量型,Advanced表示性能型 + * + * @param string $storageType + */ + public function setStorageType(string $storageType) + { + $this->set("StorageType", $storageType); + } + + /** + * ProtocolType: 文件系统协议,枚举值,NFSv3表示NFS V3协议,NFSv4表示NFS V4协议 + * + * @return string|null + */ + public function getProtocolType(): string + { + return $this->get("ProtocolType"); + } + + /** + * ProtocolType: 文件系统协议,枚举值,NFSv3表示NFS V3协议,NFSv4表示NFS V4协议 + * + * @param string $protocolType + */ + public function setProtocolType(string $protocolType) + { + $this->set("ProtocolType", $protocolType); + } + + /** + * VolumeName: 文件系统名称 + * + * @return string|null + */ + public function getVolumeName(): string + { + return $this->get("VolumeName"); + } + + /** + * VolumeName: 文件系统名称 + * + * @param string $volumeName + */ + public function setVolumeName(string $volumeName) + { + $this->set("VolumeName", $volumeName); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } + + /** + * Tag: 文件系统所属业务组 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 文件系统所属业务组 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * ChargeType: 计费模式,枚举值为: Year,按年付费; Month,按月付费; Dynamic,按需付费(需开启权限); Trial,试用(需开启权限) 默认为Dynamic + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式,枚举值为: Year,按年付费; Month,按月付费; Dynamic,按需付费(需开启权限); Trial,试用(需开启权限) 默认为Dynamic + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时长 默认: 1 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长 默认: 1 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * CouponId: 使用的代金券id + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 使用的代金券id + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UFS/Apis/CreateUFSVolumeResponse.php b/src/UFS/Apis/CreateUFSVolumeResponse.php new file mode 100644 index 00000000..3be9f30f --- /dev/null +++ b/src/UFS/Apis/CreateUFSVolumeResponse.php @@ -0,0 +1,84 @@ +get("VolumeName"); + } + + /** + * VolumeName: 文件系统名称 + * + * @param string $volumeName + */ + public function setVolumeName(string $volumeName) + { + $this->set("VolumeName", $volumeName); + } + + /** + * VolumeId: 文件系统ID + * + * @return string|null + */ + public function getVolumeId(): string + { + return $this->get("VolumeId"); + } + + /** + * VolumeId: 文件系统ID + * + * @param string $volumeId + */ + public function setVolumeId(string $volumeId) + { + $this->set("VolumeId", $volumeId); + } + + /** + * VolumeStatus: 文件系统挂载点状态 + * + * @return string|null + */ + public function getVolumeStatus(): string + { + return $this->get("VolumeStatus"); + } + + /** + * VolumeStatus: 文件系统挂载点状态 + * + * @param string $volumeStatus + */ + public function setVolumeStatus(string $volumeStatus) + { + $this->set("VolumeStatus", $volumeStatus); + } +} diff --git a/src/UFS/Apis/DescribeUFSVolume2Request.php b/src/UFS/Apis/DescribeUFSVolume2Request.php new file mode 100644 index 00000000..9b1225ad --- /dev/null +++ b/src/UFS/Apis/DescribeUFSVolume2Request.php @@ -0,0 +1,130 @@ + "DescribeUFSVolume2"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VolumeId: 文件系统ID + * + * @return string|null + */ + public function getVolumeId(): string + { + return $this->get("VolumeId"); + } + + /** + * VolumeId: 文件系统ID + * + * @param string $volumeId + */ + public function setVolumeId(string $volumeId) + { + $this->set("VolumeId", $volumeId); + } + + /** + * Offset: 文件列表起始 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 文件列表起始 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 文件列表长度 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 文件列表长度 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/UFS/Apis/DescribeUFSVolume2Response.php b/src/UFS/Apis/DescribeUFSVolume2Response.php new file mode 100644 index 00000000..3df9d416 --- /dev/null +++ b/src/UFS/Apis/DescribeUFSVolume2Response.php @@ -0,0 +1,74 @@ +get("TotalCount"); + } + + /** + * TotalCount: 文件系统总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * DataSet: 文件系统详细信息列表 + * + * @return UFSVolumeInfo2[]|null + */ + public function getDataSet(): array + { + $items = $this->get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UFSVolumeInfo2($item)); + } + return $result; + } + + /** + * DataSet: 文件系统详细信息列表 + * + * @param UFSVolumeInfo2[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UFS/Apis/ExtendUFSVolumeRequest.php b/src/UFS/Apis/ExtendUFSVolumeRequest.php new file mode 100644 index 00000000..551ca89d --- /dev/null +++ b/src/UFS/Apis/ExtendUFSVolumeRequest.php @@ -0,0 +1,112 @@ + "ExtendUFSVolume"]); + $this->markRequired("Region"); + $this->markRequired("VolumeId"); + $this->markRequired("Size"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VolumeId: 文件系统ID + * + * @return string|null + */ + public function getVolumeId(): string + { + return $this->get("VolumeId"); + } + + /** + * VolumeId: 文件系统ID + * + * @param string $volumeId + */ + public function setVolumeId(string $volumeId) + { + $this->set("VolumeId", $volumeId); + } + + /** + * Size: 文件系统大小,单位为GB,最大不超过20T,香港容量型必须为100的整数倍,Size最小为500GB,北京,上海,广州的容量型必须为1024的整数倍,Size最小为1024GB。性能型文件系统Size最小为100GB + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 文件系统大小,单位为GB,最大不超过20T,香港容量型必须为100的整数倍,Size最小为500GB,北京,上海,广州的容量型必须为1024的整数倍,Size最小为1024GB。性能型文件系统Size最小为100GB + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } +} diff --git a/src/UFS/Apis/ExtendUFSVolumeResponse.php b/src/UFS/Apis/ExtendUFSVolumeResponse.php new file mode 100644 index 00000000..adba4756 --- /dev/null +++ b/src/UFS/Apis/ExtendUFSVolumeResponse.php @@ -0,0 +1,26 @@ + "RemoveUFSVolume"]); + $this->markRequired("Region"); + $this->markRequired("VolumeId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VolumeId: 文件系统ID + * + * @return string|null + */ + public function getVolumeId(): string + { + return $this->get("VolumeId"); + } + + /** + * VolumeId: 文件系统ID + * + * @param string $volumeId + */ + public function setVolumeId(string $volumeId) + { + $this->set("VolumeId", $volumeId); + } +} diff --git a/src/UFS/Apis/RemoveUFSVolumeResponse.php b/src/UFS/Apis/RemoveUFSVolumeResponse.php new file mode 100644 index 00000000..8286c869 --- /dev/null +++ b/src/UFS/Apis/RemoveUFSVolumeResponse.php @@ -0,0 +1,26 @@ +get("VolumeName"); + } + + /** + * VolumeName: 文件系统名称 + * + * @param string $volumeName + */ + public function setVolumeName(string $volumeName) + { + $this->set("VolumeName", $volumeName); + } + + /** + * VolumeId: 文件系统ID + * + * @return string|null + */ + public function getVolumeId(): string + { + return $this->get("VolumeId"); + } + + /** + * VolumeId: 文件系统ID + * + * @param string $volumeId + */ + public function setVolumeId(string $volumeId) + { + $this->set("VolumeId", $volumeId); + } + + /** + * TotalMountPointNum: 当前文件系统已创建的挂载点数目 + * + * @return integer|null + */ + public function getTotalMountPointNum(): int + { + return $this->get("TotalMountPointNum"); + } + + /** + * TotalMountPointNum: 当前文件系统已创建的挂载点数目 + * + * @param int $totalMountPointNum + */ + public function setTotalMountPointNum(int $totalMountPointNum) + { + $this->set("TotalMountPointNum", $totalMountPointNum); + } + + /** + * MaxMountPointNum: 文件系统允许创建的最大挂载点数目 + * + * @return integer|null + */ + public function getMaxMountPointNum(): int + { + return $this->get("MaxMountPointNum"); + } + + /** + * MaxMountPointNum: 文件系统允许创建的最大挂载点数目 + * + * @param int $maxMountPointNum + */ + public function setMaxMountPointNum(int $maxMountPointNum) + { + $this->set("MaxMountPointNum", $maxMountPointNum); + } + + /** + * StorageType: 文件系统存储类型,枚举值,Basic表示容量型,Advanced表示性能型 + * + * @return string|null + */ + public function getStorageType(): string + { + return $this->get("StorageType"); + } + + /** + * StorageType: 文件系统存储类型,枚举值,Basic表示容量型,Advanced表示性能型 + * + * @param string $storageType + */ + public function setStorageType(string $storageType) + { + $this->set("StorageType", $storageType); + } + + /** + * ProtocolType: 文件系统协议,枚举值,NFSv3表示NFS V3协议,NFSv4表示NFS V4协议 + * + * @return string|null + */ + public function getProtocolType(): string + { + return $this->get("ProtocolType"); + } + + /** + * ProtocolType: 文件系统协议,枚举值,NFSv3表示NFS V3协议,NFSv4表示NFS V4协议 + * + * @param string $protocolType + */ + public function setProtocolType(string $protocolType) + { + $this->set("ProtocolType", $protocolType); + } + + /** + * Remark: 文件系统备注信息 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 文件系统备注信息 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } + + /** + * Tag: 文件系统所属业务组 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 文件系统所属业务组 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * CreateTime: 文件系统创建时间(unix时间戳) + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 文件系统创建时间(unix时间戳) + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ExpiredTime: 文件系统过期时间(unix时间戳) + * + * @return integer|null + */ + public function getExpiredTime(): int + { + return $this->get("ExpiredTime"); + } + + /** + * ExpiredTime: 文件系统过期时间(unix时间戳) + * + * @param int $expiredTime + */ + public function setExpiredTime(int $expiredTime) + { + $this->set("ExpiredTime", $expiredTime); + } + + /** + * Size: 文件系统大小,单位GB + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 文件系统大小,单位GB + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * UsedSize: 文件系统当前使用容量,单位GB + * + * @return integer|null + */ + public function getUsedSize(): int + { + return $this->get("UsedSize"); + } + + /** + * UsedSize: 文件系统当前使用容量,单位GB + * + * @param int $usedSize + */ + public function setUsedSize(int $usedSize) + { + $this->set("UsedSize", $usedSize); + } + + /** + * IsExpired: 是否过期 + * + * @return string|null + */ + public function getIsExpired(): string + { + return $this->get("IsExpired"); + } + + /** + * IsExpired: 是否过期 + * + * @param string $isExpired + */ + public function setIsExpired(string $isExpired) + { + $this->set("IsExpired", $isExpired); + } +} diff --git a/src/UFS/UFSClient.php b/src/UFS/UFSClient.php new file mode 100644 index 00000000..82c3fe03 --- /dev/null +++ b/src/UFS/UFSClient.php @@ -0,0 +1,171 @@ + (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Size" => (integer) 文件系统大小,单位为GB,最大不超过20T,香港容量型必须为100的整数倍,Size最小为500GB,北京,上海,广州的容量型必须为1024的整数倍,Size最小为1024GB。性能型文件系统Size最小为100GB + * "StorageType" => (string) 文件系统存储类型,枚举值,Basic表示容量型,Advanced表示性能型 + * "ProtocolType" => (string) 文件系统协议,枚举值,NFSv3表示NFS V3协议,NFSv4表示NFS V4协议 + * "VolumeName" => (string) 文件系统名称 + * "Remark" => (string) 备注 + * "Tag" => (string) 文件系统所属业务组 + * "ChargeType" => (string) 计费模式,枚举值为: Year,按年付费; Month,按月付费; Dynamic,按需付费(需开启权限); Trial,试用(需开启权限) 默认为Dynamic + * "Quantity" => (integer) 购买时长 默认: 1 + * "CouponId" => (string) 使用的代金券id + * ] + * + * Outputs: + * + * $outputs = [ + * "VolumeName" => (string) 文件系统名称 + * "VolumeId" => (string) 文件系统ID + * "VolumeStatus" => (string) 文件系统挂载点状态 + * ] + * + * @throws UCloudException + */ + public function createUFSVolume(CreateUFSVolumeRequest $request = null): CreateUFSVolumeResponse + { + $resp = $this->invoke($request); + return new CreateUFSVolumeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUFSVolume2 - 获取文件系统列表 + * + * See also: https://docs.ucloud.cn/api/UFS-api/describe_ufs_volume2 + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "VolumeId" => (string) 文件系统ID + * "Offset" => (integer) 文件列表起始 + * "Limit" => (integer) 文件列表长度 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 文件系统总数 + * "DataSet" => (array) 文件系统详细信息列表[ + * [ + * "VolumeName" => (string) 文件系统名称 + * "VolumeId" => (string) 文件系统ID + * "TotalMountPointNum" => (integer) 当前文件系统已创建的挂载点数目 + * "MaxMountPointNum" => (integer) 文件系统允许创建的最大挂载点数目 + * "StorageType" => (string) 文件系统存储类型,枚举值,Basic表示容量型,Advanced表示性能型 + * "ProtocolType" => (string) 文件系统协议,枚举值,NFSv3表示NFS V3协议,NFSv4表示NFS V4协议 + * "Remark" => (string) 文件系统备注信息 + * "Tag" => (string) 文件系统所属业务组 + * "CreateTime" => (integer) 文件系统创建时间(unix时间戳) + * "ExpiredTime" => (integer) 文件系统过期时间(unix时间戳) + * "Size" => (integer) 文件系统大小,单位GB + * "UsedSize" => (integer) 文件系统当前使用容量,单位GB + * "IsExpired" => (string) 是否过期 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeUFSVolume2(DescribeUFSVolume2Request $request = null): DescribeUFSVolume2Response + { + $resp = $this->invoke($request); + return new DescribeUFSVolume2Response($resp->toArray(), $resp->getRequestId()); + } + + /** + * ExtendUFSVolume - 文件系统扩容 + * + * See also: https://docs.ucloud.cn/api/UFS-api/extend_ufs_volume + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "VolumeId" => (string) 文件系统ID + * "Size" => (integer) 文件系统大小,单位为GB,最大不超过20T,香港容量型必须为100的整数倍,Size最小为500GB,北京,上海,广州的容量型必须为1024的整数倍,Size最小为1024GB。性能型文件系统Size最小为100GB + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function extendUFSVolume(ExtendUFSVolumeRequest $request = null): ExtendUFSVolumeResponse + { + $resp = $this->invoke($request); + return new ExtendUFSVolumeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * RemoveUFSVolume - 删除UFS文件系统 + * + * See also: https://docs.ucloud.cn/api/UFS-api/remove_ufs_volume + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "VolumeId" => (string) 文件系统ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function removeUFSVolume(RemoveUFSVolumeRequest $request = null): RemoveUFSVolumeResponse + { + $resp = $this->invoke($request); + return new RemoveUFSVolumeResponse($resp->toArray(), $resp->getRequestId()); + } +} diff --git a/src/UFile/Apis/CreateBucketRequest.php b/src/UFile/Apis/CreateBucketRequest.php new file mode 100644 index 00000000..8859a34c --- /dev/null +++ b/src/UFile/Apis/CreateBucketRequest.php @@ -0,0 +1,111 @@ + "CreateBucket"]); + $this->markRequired("Region"); + $this->markRequired("BucketName"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * BucketName: 待创建Bucket的名称,具有全局唯一性 + * + * @return string|null + */ + public function getBucketName(): string + { + return $this->get("BucketName"); + } + + /** + * BucketName: 待创建Bucket的名称,具有全局唯一性 + * + * @param string $bucketName + */ + public function setBucketName(string $bucketName) + { + $this->set("BucketName", $bucketName); + } + + /** + * Type: Bucket访问类型,public或private; 默认为private + * + * @return string|null + */ + public function getType(): string + { + return $this->get("Type"); + } + + /** + * Type: Bucket访问类型,public或private; 默认为private + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } +} diff --git a/src/UFile/Apis/CreateBucketResponse.php b/src/UFile/Apis/CreateBucketResponse.php new file mode 100644 index 00000000..9d12fc15 --- /dev/null +++ b/src/UFile/Apis/CreateBucketResponse.php @@ -0,0 +1,64 @@ +get("BucketName"); + } + + /** + * BucketName: 已创建Bucket的名称 + * + * @param string $bucketName + */ + public function setBucketName(string $bucketName) + { + $this->set("BucketName", $bucketName); + } + + /** + * BucketId: 已创建Bucket的ID + * + * @return string|null + */ + public function getBucketId(): string + { + return $this->get("BucketId"); + } + + /** + * BucketId: 已创建Bucket的ID + * + * @param string $bucketId + */ + public function setBucketId(string $bucketId) + { + $this->set("BucketId", $bucketId); + } +} diff --git a/src/UFile/Apis/CreateUFileTokenRequest.php b/src/UFile/Apis/CreateUFileTokenRequest.php new file mode 100644 index 00000000..820a27b9 --- /dev/null +++ b/src/UFile/Apis/CreateUFileTokenRequest.php @@ -0,0 +1,170 @@ + "CreateUFileToken"]); + $this->markRequired("TokenName"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * TokenName: 令牌名称 + * + * @return string|null + */ + public function getTokenName(): string + { + return $this->get("TokenName"); + } + + /** + * TokenName: 令牌名称 + * + * @param string $tokenName + */ + public function setTokenName(string $tokenName) + { + $this->set("TokenName", $tokenName); + } + + /** + * AllowedOps: 令牌允许执行的操作,[ TOKEN_ALLOW_NONE , TOKEN_ALLOW_READ , TOKEN_ALLOW_WRITE , TOKEN_ALLOW_DELETE , TOKEN_ALLOW_LIST, TOKEN_ALLOW_IOP , TOKEN_ALLOW_DP ]。默认TOKEN_ALLOW_NONE + * + * @return string[]|null + */ + public function getAllowedOps(): array + { + return $this->get("AllowedOps"); + } + + /** + * AllowedOps: 令牌允许执行的操作,[ TOKEN_ALLOW_NONE , TOKEN_ALLOW_READ , TOKEN_ALLOW_WRITE , TOKEN_ALLOW_DELETE , TOKEN_ALLOW_LIST, TOKEN_ALLOW_IOP , TOKEN_ALLOW_DP ]。默认TOKEN_ALLOW_NONE + * + * @param string[] $allowedOps + */ + public function setAllowedOps(array $allowedOps) + { + $this->set("AllowedOps", $allowedOps); + } + + /** + * AllowedPrefixes: 令牌允许操作的key前缀,默认*表示全部 + * + * @return string[]|null + */ + public function getAllowedPrefixes(): array + { + return $this->get("AllowedPrefixes"); + } + + /** + * AllowedPrefixes: 令牌允许操作的key前缀,默认*表示全部 + * + * @param string[] $allowedPrefixes + */ + public function setAllowedPrefixes(array $allowedPrefixes) + { + $this->set("AllowedPrefixes", $allowedPrefixes); + } + + /** + * AllowedBuckets: 令牌允许操作的bucket,默认*表示全部 + * + * @return string[]|null + */ + public function getAllowedBuckets(): array + { + return $this->get("AllowedBuckets"); + } + + /** + * AllowedBuckets: 令牌允许操作的bucket,默认*表示全部 + * + * @param string[] $allowedBuckets + */ + public function setAllowedBuckets(array $allowedBuckets) + { + $this->set("AllowedBuckets", $allowedBuckets); + } + + /** + * ExpireTime: Unix 时间戳,精确到秒,为令牌过期时间点。默认过期时间为一天(即当前Unix时间戳+86400);注意:过期时间不能超过 4102416000 + * + * @return integer|null + */ + public function getExpireTime(): int + { + return $this->get("ExpireTime"); + } + + /** + * ExpireTime: Unix 时间戳,精确到秒,为令牌过期时间点。默认过期时间为一天(即当前Unix时间戳+86400);注意:过期时间不能超过 4102416000 + * + * @param int $expireTime + */ + public function setExpireTime(int $expireTime) + { + $this->set("ExpireTime", $expireTime); + } +} diff --git a/src/UFile/Apis/CreateUFileTokenResponse.php b/src/UFile/Apis/CreateUFileTokenResponse.php new file mode 100644 index 00000000..d43479a1 --- /dev/null +++ b/src/UFile/Apis/CreateUFileTokenResponse.php @@ -0,0 +1,44 @@ +get("TokenId"); + } + + /** + * TokenId: 创建令牌的token_id + * + * @param string $tokenId + */ + public function setTokenId(string $tokenId) + { + $this->set("TokenId", $tokenId); + } +} diff --git a/src/UFile/Apis/DeleteBucketRequest.php b/src/UFile/Apis/DeleteBucketRequest.php new file mode 100644 index 00000000..f166e06b --- /dev/null +++ b/src/UFile/Apis/DeleteBucketRequest.php @@ -0,0 +1,70 @@ + "DeleteBucket"]); + $this->markRequired("BucketName"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * BucketName: 待删除Bucket的名称 + * + * @return string|null + */ + public function getBucketName(): string + { + return $this->get("BucketName"); + } + + /** + * BucketName: 待删除Bucket的名称 + * + * @param string $bucketName + */ + public function setBucketName(string $bucketName) + { + $this->set("BucketName", $bucketName); + } +} diff --git a/src/UFile/Apis/DeleteBucketResponse.php b/src/UFile/Apis/DeleteBucketResponse.php new file mode 100644 index 00000000..2f3d6f9d --- /dev/null +++ b/src/UFile/Apis/DeleteBucketResponse.php @@ -0,0 +1,64 @@ +get("BucketName"); + } + + /** + * BucketName: Bucket的名称 + * + * @param string $bucketName + */ + public function setBucketName(string $bucketName) + { + $this->set("BucketName", $bucketName); + } + + /** + * BucketId: Bucket的ID + * + * @return string|null + */ + public function getBucketId(): string + { + return $this->get("BucketId"); + } + + /** + * BucketId: Bucket的ID + * + * @param string $bucketId + */ + public function setBucketId(string $bucketId) + { + $this->set("BucketId", $bucketId); + } +} diff --git a/src/UFile/Apis/DeleteUFileTokenRequest.php b/src/UFile/Apis/DeleteUFileTokenRequest.php new file mode 100644 index 00000000..dcbe0c09 --- /dev/null +++ b/src/UFile/Apis/DeleteUFileTokenRequest.php @@ -0,0 +1,92 @@ + "DeleteUFileToken"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("TokenId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * TokenId: 令牌ID + * + * @return string|null + */ + public function getTokenId(): string + { + return $this->get("TokenId"); + } + + /** + * TokenId: 令牌ID + * + * @param string $tokenId + */ + public function setTokenId(string $tokenId) + { + $this->set("TokenId", $tokenId); + } +} diff --git a/src/UFile/Apis/DeleteUFileTokenResponse.php b/src/UFile/Apis/DeleteUFileTokenResponse.php new file mode 100644 index 00000000..b2d22173 --- /dev/null +++ b/src/UFile/Apis/DeleteUFileTokenResponse.php @@ -0,0 +1,26 @@ + "DescribeBucket"]); + } + + + + /** + * Region: 如果提供此参数,则获取相应地域下所有空间的空间名称(只返回空间名称信息) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 如果提供此参数,则获取相应地域下所有空间的空间名称(只返回空间名称信息) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * BucketName: 待获取Bucket的名称,若不提供,则获取所有Bucket + * + * @return string|null + */ + public function getBucketName(): string + { + return $this->get("BucketName"); + } + + /** + * BucketName: 待获取Bucket的名称,若不提供,则获取所有Bucket + * + * @param string $bucketName + */ + public function setBucketName(string $bucketName) + { + $this->set("BucketName", $bucketName); + } + + /** + * Offset: 获取所有Bucket列表的偏移数目,默认为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 获取所有Bucket列表的偏移数目,默认为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 获取所有Bucket列表的限制数目,默认为20 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 获取所有Bucket列表的限制数目,默认为20 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/UFile/Apis/DescribeBucketResponse.php b/src/UFile/Apis/DescribeBucketResponse.php new file mode 100644 index 00000000..74e2b22e --- /dev/null +++ b/src/UFile/Apis/DescribeBucketResponse.php @@ -0,0 +1,55 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UFileBucketSet($item)); + } + return $result; + } + + /** + * DataSet: Bucket的描述信息 参数见 UFileBucketSet + * + * @param UFileBucketSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UFile/Apis/DescribeUFileTokenRequest.php b/src/UFile/Apis/DescribeUFileTokenRequest.php new file mode 100644 index 00000000..bc9f4675 --- /dev/null +++ b/src/UFile/Apis/DescribeUFileTokenRequest.php @@ -0,0 +1,129 @@ + "DescribeUFileToken"]); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * TokenId: 令牌ID,只返回指定ID信息,否则拉取所有令牌 + * + * @return string|null + */ + public function getTokenId(): string + { + return $this->get("TokenId"); + } + + /** + * TokenId: 令牌ID,只返回指定ID信息,否则拉取所有令牌 + * + * @param string $tokenId + */ + public function setTokenId(string $tokenId) + { + $this->set("TokenId", $tokenId); + } + + /** + * TokenName: 令牌名称,只返回指定令牌名称信息,否则拉取所有令牌 + * + * @return string|null + */ + public function getTokenName(): string + { + return $this->get("TokenName"); + } + + /** + * TokenName: 令牌名称,只返回指定令牌名称信息,否则拉取所有令牌 + * + * @param string $tokenName + */ + public function setTokenName(string $tokenName) + { + $this->set("TokenName", $tokenName); + } + + /** + * Display: 0表示显示部分token信息;不传递和其他情况表示显示全部token信息 + * + * @return integer|null + */ + public function getDisplay(): int + { + return $this->get("Display"); + } + + /** + * Display: 0表示显示部分token信息;不传递和其他情况表示显示全部token信息 + * + * @param int $display + */ + public function setDisplay(int $display) + { + $this->set("Display", $display); + } +} diff --git a/src/UFile/Apis/DescribeUFileTokenResponse.php b/src/UFile/Apis/DescribeUFileTokenResponse.php new file mode 100644 index 00000000..22c7ab14 --- /dev/null +++ b/src/UFile/Apis/DescribeUFileTokenResponse.php @@ -0,0 +1,54 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UFileTokenSet($item)); + } + return $result; + } + + /** + * DataSet: 令牌描述信息 + * + * @param UFileTokenSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UFile/Apis/GetUFileQuotaInfoRequest.php b/src/UFile/Apis/GetUFileQuotaInfoRequest.php new file mode 100644 index 00000000..0f373522 --- /dev/null +++ b/src/UFile/Apis/GetUFileQuotaInfoRequest.php @@ -0,0 +1,91 @@ + "GetUFileQuotaInfo"]); + $this->markRequired("Region"); + $this->markRequired("QuotaType"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * QuotaType: 配额类型,取值为storage-volume, download-traffic或request-count + * + * @return string[]|null + */ + public function getQuotaType(): array + { + return $this->get("QuotaType"); + } + + /** + * QuotaType: 配额类型,取值为storage-volume, download-traffic或request-count + * + * @param string[] $quotaType + */ + public function setQuotaType(array $quotaType) + { + $this->set("QuotaType", $quotaType); + } +} diff --git a/src/UFile/Apis/GetUFileQuotaInfoResponse.php b/src/UFile/Apis/GetUFileQuotaInfoResponse.php new file mode 100644 index 00000000..40ee6979 --- /dev/null +++ b/src/UFile/Apis/GetUFileQuotaInfoResponse.php @@ -0,0 +1,57 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UFileQuotaDataSetItem($item)); + } + return $result; + } + + /** + * DataSet: 配额信息数据集 + * + * @param UFileQuotaDataSetItem[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UFile/Apis/GetUFileQuotaPriceRequest.php b/src/UFile/Apis/GetUFileQuotaPriceRequest.php new file mode 100644 index 00000000..de3f15f0 --- /dev/null +++ b/src/UFile/Apis/GetUFileQuotaPriceRequest.php @@ -0,0 +1,110 @@ + "GetUFileQuotaPrice"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * StorageVolume: 存储容量,单位: GB*天,范围: [0, 30 000 000],步长:100GB*天 + * + * @return integer|null + */ + public function getStorageVolume(): int + { + return $this->get("StorageVolume"); + } + + /** + * StorageVolume: 存储容量,单位: GB*天,范围: [0, 30 000 000],步长:100GB*天 + * + * @param int $storageVolume + */ + public function setStorageVolume(int $storageVolume) + { + $this->set("StorageVolume", $storageVolume); + } + + /** + * DownloadTraffic: 下载流量,单位: GB,范围: [0, 60 000],步长:1GB + * + * @return integer|null + */ + public function getDownloadTraffic(): int + { + return $this->get("DownloadTraffic"); + } + + /** + * DownloadTraffic: 下载流量,单位: GB,范围: [0, 60 000],步长:1GB + * + * @param int $downloadTraffic + */ + public function setDownloadTraffic(int $downloadTraffic) + { + $this->set("DownloadTraffic", $downloadTraffic); + } + + /** + * RequestCount: 请求次数,单位:万次,范围:[0, 1 000 000],步长:1万次 + * + * @return integer|null + */ + public function getRequestCount(): int + { + return $this->get("RequestCount"); + } + + /** + * RequestCount: 请求次数,单位:万次,范围:[0, 1 000 000],步长:1万次 + * + * @param int $requestCount + */ + public function setRequestCount(int $requestCount) + { + $this->set("RequestCount", $requestCount); + } +} diff --git a/src/UFile/Apis/GetUFileQuotaPriceResponse.php b/src/UFile/Apis/GetUFileQuotaPriceResponse.php new file mode 100644 index 00000000..f5f25abb --- /dev/null +++ b/src/UFile/Apis/GetUFileQuotaPriceResponse.php @@ -0,0 +1,44 @@ +get("Price"); + } + + /** + * Price: 待支付价格,单位:分 + * + * @param float $price + */ + public function setPrice(float $price) + { + $this->set("Price", $price); + } +} diff --git a/src/UFile/Apis/GetUFileQuotaRequest.php b/src/UFile/Apis/GetUFileQuotaRequest.php new file mode 100644 index 00000000..09df1b02 --- /dev/null +++ b/src/UFile/Apis/GetUFileQuotaRequest.php @@ -0,0 +1,70 @@ + "GetUFileQuota"]); + $this->markRequired("QuotaType"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * QuotaType: 配额类型,取值为storage-volume, download-traffic或request-count + * + * @return string|null + */ + public function getQuotaType(): string + { + return $this->get("QuotaType"); + } + + /** + * QuotaType: 配额类型,取值为storage-volume, download-traffic或request-count + * + * @param string $quotaType + */ + public function setQuotaType(string $quotaType) + { + $this->set("QuotaType", $quotaType); + } +} diff --git a/src/UFile/Apis/GetUFileQuotaResponse.php b/src/UFile/Apis/GetUFileQuotaResponse.php new file mode 100644 index 00000000..a2090e0b --- /dev/null +++ b/src/UFile/Apis/GetUFileQuotaResponse.php @@ -0,0 +1,44 @@ +get("LeftQuota"); + } + + /** + * LeftQuota: 剩余的配额数值 + * + * @param float $leftQuota + */ + public function setLeftQuota(float $leftQuota) + { + $this->set("LeftQuota", $leftQuota); + } +} diff --git a/src/UFile/Apis/GetUFileReportRequest.php b/src/UFile/Apis/GetUFileReportRequest.php new file mode 100644 index 00000000..b77bfea9 --- /dev/null +++ b/src/UFile/Apis/GetUFileReportRequest.php @@ -0,0 +1,112 @@ + "GetUFileReport"]); + $this->markRequired("Region"); + $this->markRequired("StartTime"); + $this->markRequired("EndTime"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * StartTime: 查询开始时间 + * + * @return integer|null + */ + public function getStartTime(): int + { + return $this->get("StartTime"); + } + + /** + * StartTime: 查询开始时间 + * + * @param int $startTime + */ + public function setStartTime(int $startTime) + { + $this->set("StartTime", $startTime); + } + + /** + * EndTime: 查询结束时间 + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 查询结束时间 + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } +} diff --git a/src/UFile/Apis/GetUFileReportResponse.php b/src/UFile/Apis/GetUFileReportResponse.php new file mode 100644 index 00000000..1365f8f8 --- /dev/null +++ b/src/UFile/Apis/GetUFileReportResponse.php @@ -0,0 +1,54 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UFileReportSet($item)); + } + return $result; + } + + /** + * DataSet: 报表内容 参数见 UFileReportSet + * + * @param UFileReportSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UFile/Apis/SetUFileRefererRequest.php b/src/UFile/Apis/SetUFileRefererRequest.php new file mode 100644 index 00000000..f55f4ce0 --- /dev/null +++ b/src/UFile/Apis/SetUFileRefererRequest.php @@ -0,0 +1,171 @@ + "SetUFileReferer"]); + $this->markRequired("BucketName"); + $this->markRequired("RefererStatus"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * BucketName: 存储空间名称 + * + * @return string|null + */ + public function getBucketName(): string + { + return $this->get("BucketName"); + } + + /** + * BucketName: 存储空间名称 + * + * @param string $bucketName + */ + public function setBucketName(string $bucketName) + { + $this->set("BucketName", $bucketName); + } + + /** + * RefererStatus: 开启关闭referer防盗链;关闭防盗链会清空防盗链参数设置,开启防盗链必须指定 RefererType、Referers;开启:on, 关闭:off; + * + * @return string|null + */ + public function getRefererStatus(): string + { + return $this->get("RefererStatus"); + } + + /** + * RefererStatus: 开启关闭referer防盗链;关闭防盗链会清空防盗链参数设置,开启防盗链必须指定 RefererType、Referers;开启:on, 关闭:off; + * + * @param string $refererStatus + */ + public function setRefererStatus(string $refererStatus) + { + $this->set("RefererStatus", $refererStatus); + } + + /** + * RefererAllowNull: RefererType为白名单时,RefererAllowNull为false代表不允许空referer访问,为true代表允许空referer访问;此参数默认为 true; + * + * @return boolean|null + */ + public function getRefererAllowNull(): bool + { + return $this->get("RefererAllowNull"); + } + + /** + * RefererAllowNull: RefererType为白名单时,RefererAllowNull为false代表不允许空referer访问,为true代表允许空referer访问;此参数默认为 true; + * + * @param boolean $refererAllowNull + */ + public function setRefererAllowNull(bool $refererAllowNull) + { + $this->set("RefererAllowNull", $refererAllowNull); + } + + /** + * RefererType: 防盗链Referer类型,支持两种类型,黑名单和白名单; 1黑名单,2白名单;RefererStatus为"on"时此参数必填; + * + * @return integer|null + */ + public function getRefererType(): int + { + return $this->get("RefererType"); + } + + /** + * RefererType: 防盗链Referer类型,支持两种类型,黑名单和白名单; 1黑名单,2白名单;RefererStatus为"on"时此参数必填; + * + * @param int $refererType + */ + public function setRefererType(int $refererType) + { + $this->set("RefererType", $refererType); + } + + /** + * Referers: 防盗链Referer规则,支持正则表达式(不支持符号';') + * + * @return string[]|null + */ + public function getReferers(): array + { + return $this->get("Referers"); + } + + /** + * Referers: 防盗链Referer规则,支持正则表达式(不支持符号';') + * + * @param string[] $referers + */ + public function setReferers(array $referers) + { + $this->set("Referers", $referers); + } +} diff --git a/src/UFile/Apis/SetUFileRefererResponse.php b/src/UFile/Apis/SetUFileRefererResponse.php new file mode 100644 index 00000000..e908d562 --- /dev/null +++ b/src/UFile/Apis/SetUFileRefererResponse.php @@ -0,0 +1,26 @@ + "UpdateBucket"]); + $this->markRequired("BucketName"); + $this->markRequired("Type"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * BucketName: 待修改Bucket的名称 + * + * @return string|null + */ + public function getBucketName(): string + { + return $this->get("BucketName"); + } + + /** + * BucketName: 待修改Bucket的名称 + * + * @param string $bucketName + */ + public function setBucketName(string $bucketName) + { + $this->set("BucketName", $bucketName); + } + + /** + * Type: Bucket访问类型;public或private + * + * @return string|null + */ + public function getType(): string + { + return $this->get("Type"); + } + + /** + * Type: Bucket访问类型;public或private + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } +} diff --git a/src/UFile/Apis/UpdateBucketResponse.php b/src/UFile/Apis/UpdateBucketResponse.php new file mode 100644 index 00000000..040ec184 --- /dev/null +++ b/src/UFile/Apis/UpdateBucketResponse.php @@ -0,0 +1,64 @@ +get("BucketName"); + } + + /** + * BucketName: Bucket的名称 + * + * @param string $bucketName + */ + public function setBucketName(string $bucketName) + { + $this->set("BucketName", $bucketName); + } + + /** + * BucketId: Bucket的ID + * + * @return string|null + */ + public function getBucketId(): string + { + return $this->get("BucketId"); + } + + /** + * BucketId: Bucket的ID + * + * @param string $bucketId + */ + public function setBucketId(string $bucketId) + { + $this->set("BucketId", $bucketId); + } +} diff --git a/src/UFile/Apis/UpdateUFileTokenRequest.php b/src/UFile/Apis/UpdateUFileTokenRequest.php new file mode 100644 index 00000000..92bb3c15 --- /dev/null +++ b/src/UFile/Apis/UpdateUFileTokenRequest.php @@ -0,0 +1,191 @@ + "UpdateUFileToken"]); + $this->markRequired("ProjectId"); + $this->markRequired("TokenId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * TokenId: 令牌ID + * + * @return string|null + */ + public function getTokenId(): string + { + return $this->get("TokenId"); + } + + /** + * TokenId: 令牌ID + * + * @param string $tokenId + */ + public function setTokenId(string $tokenId) + { + $this->set("TokenId", $tokenId); + } + + /** + * TokenName: 令牌名称 + * + * @return string|null + */ + public function getTokenName(): string + { + return $this->get("TokenName"); + } + + /** + * TokenName: 令牌名称 + * + * @param string $tokenName + */ + public function setTokenName(string $tokenName) + { + $this->set("TokenName", $tokenName); + } + + /** + * AllowedOps: 令牌允许执行的操作,[ TOKEN_ALLOW_NONE , TOKEN_ALLOW_READ , TOKEN_ALLOW_WRITE , TOKEN_ALLOW_DELETE , TOKEN_ALLOW_LIST, TOKEN_ALLOW_IOP , TOKEN_ALLOW_DP ] + * + * @return string[]|null + */ + public function getAllowedOps(): array + { + return $this->get("AllowedOps"); + } + + /** + * AllowedOps: 令牌允许执行的操作,[ TOKEN_ALLOW_NONE , TOKEN_ALLOW_READ , TOKEN_ALLOW_WRITE , TOKEN_ALLOW_DELETE , TOKEN_ALLOW_LIST, TOKEN_ALLOW_IOP , TOKEN_ALLOW_DP ] + * + * @param string[] $allowedOps + */ + public function setAllowedOps(array $allowedOps) + { + $this->set("AllowedOps", $allowedOps); + } + + /** + * AllowedPrefixes: 令牌允许操作的key前缀 + * + * @return string[]|null + */ + public function getAllowedPrefixes(): array + { + return $this->get("AllowedPrefixes"); + } + + /** + * AllowedPrefixes: 令牌允许操作的key前缀 + * + * @param string[] $allowedPrefixes + */ + public function setAllowedPrefixes(array $allowedPrefixes) + { + $this->set("AllowedPrefixes", $allowedPrefixes); + } + + /** + * AllowedBuckets: 令牌允许操作的bucket + * + * @return string[]|null + */ + public function getAllowedBuckets(): array + { + return $this->get("AllowedBuckets"); + } + + /** + * AllowedBuckets: 令牌允许操作的bucket + * + * @param string[] $allowedBuckets + */ + public function setAllowedBuckets(array $allowedBuckets) + { + $this->set("AllowedBuckets", $allowedBuckets); + } + + /** + * ExpireTime: 令牌的超时时间点(时间戳);注意:过期时间不能超过 4102416000 + * + * @return integer|null + */ + public function getExpireTime(): int + { + return $this->get("ExpireTime"); + } + + /** + * ExpireTime: 令牌的超时时间点(时间戳);注意:过期时间不能超过 4102416000 + * + * @param int $expireTime + */ + public function setExpireTime(int $expireTime) + { + $this->set("ExpireTime", $expireTime); + } +} diff --git a/src/UFile/Apis/UpdateUFileTokenResponse.php b/src/UFile/Apis/UpdateUFileTokenResponse.php new file mode 100644 index 00000000..8353977f --- /dev/null +++ b/src/UFile/Apis/UpdateUFileTokenResponse.php @@ -0,0 +1,26 @@ +get("Region"); + } + + /** + * Region: Bucket所属地域 + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * BucketName: Bucket名称 + * + * @return string|null + */ + public function getBucketName(): string + { + return $this->get("BucketName"); + } + + /** + * BucketName: Bucket名称 + * + * @param string $bucketName + */ + public function setBucketName(string $bucketName) + { + $this->set("BucketName", $bucketName); + } + + /** + * BucketId: Bucket的ID + * + * @return string|null + */ + public function getBucketId(): string + { + return $this->get("BucketId"); + } + + /** + * BucketId: Bucket的ID + * + * @param string $bucketId + */ + public function setBucketId(string $bucketId) + { + $this->set("BucketId", $bucketId); + } + + /** + * Domain: Bucket的域名集合 参数见 UFileDomainSet + * + * @return UFileDomainSet|null + */ + public function getDomain(): UFileDomainSet + { + return new UFileDomainSet($this->get("Domain")); + } + + /** + * Domain: Bucket的域名集合 参数见 UFileDomainSet + * + * @param UFileDomainSet $domain + */ + public function setDomain(UFileDomainSet $domain) + { + $this->set("Domain", $domain->getAll()); + } + + /** + * CdnDomainId: 与Bucket关联的CND加速域名的ID列表 + * + * @return string[]|null + */ + public function getCdnDomainId(): array + { + return $this->get("CdnDomainId"); + } + + /** + * CdnDomainId: 与Bucket关联的CND加速域名的ID列表 + * + * @param string[] $cdnDomainId + */ + public function setCdnDomainId(array $cdnDomainId) + { + $this->set("CdnDomainId", $cdnDomainId); + } + + /** + * Type: Bucket访问类型 + * + * @return string|null + */ + public function getType(): string + { + return $this->get("Type"); + } + + /** + * Type: Bucket访问类型 + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } + + /** + * CreateTime: Bucket的创建时间 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: Bucket的创建时间 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ModifyTime: Bucket的修改时间 + * + * @return integer|null + */ + public function getModifyTime(): int + { + return $this->get("ModifyTime"); + } + + /** + * ModifyTime: Bucket的修改时间 + * + * @param int $modifyTime + */ + public function setModifyTime(int $modifyTime) + { + $this->set("ModifyTime", $modifyTime); + } + + /** + * Biz: Bucket所属业务, general或vod或udb general: 普通业务; vod: 视频云业务; udb: 云数据库业务 + * + * @return string|null + */ + public function getBiz(): string + { + return $this->get("Biz"); + } + + /** + * Biz: Bucket所属业务, general或vod或udb general: 普通业务; vod: 视频云业务; udb: 云数据库业务 + * + * @param string $biz + */ + public function setBiz(string $biz) + { + $this->set("Biz", $biz); + } + + /** + * Tag: 所属业务组 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 所属业务组 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * HasUserDomain: 是否存在自定义域名。0不存在,1存在,2错误 + * + * @return integer|null + */ + public function getHasUserDomain(): int + { + return $this->get("HasUserDomain"); + } + + /** + * HasUserDomain: 是否存在自定义域名。0不存在,1存在,2错误 + * + * @param int $hasUserDomain + */ + public function setHasUserDomain(int $hasUserDomain) + { + $this->set("HasUserDomain", $hasUserDomain); + } +} diff --git a/src/UFile/Models/UFileDomainSet.php b/src/UFile/Models/UFileDomainSet.php new file mode 100644 index 00000000..2acc6843 --- /dev/null +++ b/src/UFile/Models/UFileDomainSet.php @@ -0,0 +1,104 @@ +get("Src"); + } + + /** + * Src: 源站域名 + * + * @param string[] $src + */ + public function setSrc(array $src) + { + $this->set("Src", $src); + } + + /** + * Cdn: UCDN加速域名 + * + * @return string[]|null + */ + public function getCdn(): array + { + return $this->get("Cdn"); + } + + /** + * Cdn: UCDN加速域名 + * + * @param string[] $cdn + */ + public function setCdn(array $cdn) + { + $this->set("Cdn", $cdn); + } + + /** + * CustomSrc: 用户自定义源站域名 + * + * @return string[]|null + */ + public function getCustomSrc(): array + { + return $this->get("CustomSrc"); + } + + /** + * CustomSrc: 用户自定义源站域名 + * + * @param string[] $customSrc + */ + public function setCustomSrc(array $customSrc) + { + $this->set("CustomSrc", $customSrc); + } + + /** + * CustomCdn: 用户自定义CDN加速域名 + * + * @return string[]|null + */ + public function getCustomCdn(): array + { + return $this->get("CustomCdn"); + } + + /** + * CustomCdn: 用户自定义CDN加速域名 + * + * @param string[] $customCdn + */ + public function setCustomCdn(array $customCdn) + { + $this->set("CustomCdn", $customCdn); + } +} diff --git a/src/UFile/Models/UFileQuotaDataSetItem.php b/src/UFile/Models/UFileQuotaDataSetItem.php new file mode 100644 index 00000000..9905cd8c --- /dev/null +++ b/src/UFile/Models/UFileQuotaDataSetItem.php @@ -0,0 +1,124 @@ +get("Region"); + } + + /** + * Region: 可用地域 + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Owe: 是否欠费:1表示欠费;0表示未欠费 + * + * @return integer|null + */ + public function getOwe(): int + { + return $this->get("Owe"); + } + + /** + * Owe: 是否欠费:1表示欠费;0表示未欠费 + * + * @param int $owe + */ + public function setOwe(int $owe) + { + $this->set("Owe", $owe); + } + + /** + * Storage: 剩余存储容量 + * + * @return UFileQuotaLeft|null + */ + public function getStorage(): UFileQuotaLeft + { + return new UFileQuotaLeft($this->get("Storage")); + } + + /** + * Storage: 剩余存储容量 + * + * @param UFileQuotaLeft $storage + */ + public function setStorage(UFileQuotaLeft $storage) + { + $this->set("Storage", $storage->getAll()); + } + + /** + * DownloadFlow: 剩余下载流量 + * + * @return UFileQuotaLeft|null + */ + public function getDownloadFlow(): UFileQuotaLeft + { + return new UFileQuotaLeft($this->get("DownloadFlow")); + } + + /** + * DownloadFlow: 剩余下载流量 + * + * @param UFileQuotaLeft $downloadFlow + */ + public function setDownloadFlow(UFileQuotaLeft $downloadFlow) + { + $this->set("DownloadFlow", $downloadFlow->getAll()); + } + + /** + * RequestCnt: 剩余请求次数 + * + * @return UFileQuotaLeft|null + */ + public function getRequestCnt(): UFileQuotaLeft + { + return new UFileQuotaLeft($this->get("RequestCnt")); + } + + /** + * RequestCnt: 剩余请求次数 + * + * @param UFileQuotaLeft $requestCnt + */ + public function setRequestCnt(UFileQuotaLeft $requestCnt) + { + $this->set("RequestCnt", $requestCnt->getAll()); + } +} diff --git a/src/UFile/Models/UFileQuotaLeft.php b/src/UFile/Models/UFileQuotaLeft.php new file mode 100644 index 00000000..ae2bcfca --- /dev/null +++ b/src/UFile/Models/UFileQuotaLeft.php @@ -0,0 +1,44 @@ +get("Left"); + } + + /** + * Left: 配额剩余量 + * + * @param float $left + */ + public function setLeft(float $left) + { + $this->set("Left", $left); + } +} diff --git a/src/UFile/Models/UFileReportSet.php b/src/UFile/Models/UFileReportSet.php new file mode 100644 index 00000000..00a125c5 --- /dev/null +++ b/src/UFile/Models/UFileReportSet.php @@ -0,0 +1,104 @@ +get("Time"); + } + + /** + * Time: 配额消费时间,unix时间戳,精确到日期 + * + * @param int $time + */ + public function setTime(int $time) + { + $this->set("Time", $time); + } + + /** + * StorageVolume: 配额消费当日使用的存储容量,单位:GB*天 + * + * @return float|null + */ + public function getStorageVolume(): float + { + return $this->get("StorageVolume"); + } + + /** + * StorageVolume: 配额消费当日使用的存储容量,单位:GB*天 + * + * @param float $storageVolume + */ + public function setStorageVolume(float $storageVolume) + { + $this->set("StorageVolume", $storageVolume); + } + + /** + * DownloadTraffic: 配额消费当日使用的下载流量,单位:GB + * + * @return float|null + */ + public function getDownloadTraffic(): float + { + return $this->get("DownloadTraffic"); + } + + /** + * DownloadTraffic: 配额消费当日使用的下载流量,单位:GB + * + * @param float $downloadTraffic + */ + public function setDownloadTraffic(float $downloadTraffic) + { + $this->set("DownloadTraffic", $downloadTraffic); + } + + /** + * RequestCount: 配额消费当日使用的请求次数,单位:万次 + * + * @return float|null + */ + public function getRequestCount(): float + { + return $this->get("RequestCount"); + } + + /** + * RequestCount: 配额消费当日使用的请求次数,单位:万次 + * + * @param float $requestCount + */ + public function setRequestCount(float $requestCount) + { + $this->set("RequestCount", $requestCount); + } +} diff --git a/src/UFile/Models/UFileTokenSet.php b/src/UFile/Models/UFileTokenSet.php new file mode 100644 index 00000000..e3ee80af --- /dev/null +++ b/src/UFile/Models/UFileTokenSet.php @@ -0,0 +1,244 @@ +get("TokenId"); + } + + /** + * TokenId: 令牌ID + * + * @param string $tokenId + */ + public function setTokenId(string $tokenId) + { + $this->set("TokenId", $tokenId); + } + + /** + * TokenName: 令牌名称 + * + * @return string|null + */ + public function getTokenName(): string + { + return $this->get("TokenName"); + } + + /** + * TokenName: 令牌名称 + * + * @param string $tokenName + */ + public function setTokenName(string $tokenName) + { + $this->set("TokenName", $tokenName); + } + + /** + * PublicKey: 令牌公钥 + * + * @return string|null + */ + public function getPublicKey(): string + { + return $this->get("PublicKey"); + } + + /** + * PublicKey: 令牌公钥 + * + * @param string $publicKey + */ + public function setPublicKey(string $publicKey) + { + $this->set("PublicKey", $publicKey); + } + + /** + * PrivateKey: 令牌私钥 + * + * @return string|null + */ + public function getPrivateKey(): string + { + return $this->get("PrivateKey"); + } + + /** + * PrivateKey: 令牌私钥 + * + * @param string $privateKey + */ + public function setPrivateKey(string $privateKey) + { + $this->set("PrivateKey", $privateKey); + } + + /** + * AllowedOps: 令牌允许执行的操作,[ TOKEN_ALLOW_NONE , TOKEN_ALLOW_READ , TOKEN_ALLOW_WRITE , TOKEN_ALLOW_DELETE , TOKEN_ALLOW_LIST, TOKEN_ALLOW_IOP , TOKEN_ALLOW_DP ] + * + * @return string[]|null + */ + public function getAllowedOps(): array + { + return $this->get("AllowedOps"); + } + + /** + * AllowedOps: 令牌允许执行的操作,[ TOKEN_ALLOW_NONE , TOKEN_ALLOW_READ , TOKEN_ALLOW_WRITE , TOKEN_ALLOW_DELETE , TOKEN_ALLOW_LIST, TOKEN_ALLOW_IOP , TOKEN_ALLOW_DP ] + * + * @param string[] $allowedOps + */ + public function setAllowedOps(array $allowedOps) + { + $this->set("AllowedOps", $allowedOps); + } + + /** + * AllowedPrefixes: 令牌允许操作的key前缀 + * + * @return string[]|null + */ + public function getAllowedPrefixes(): array + { + return $this->get("AllowedPrefixes"); + } + + /** + * AllowedPrefixes: 令牌允许操作的key前缀 + * + * @param string[] $allowedPrefixes + */ + public function setAllowedPrefixes(array $allowedPrefixes) + { + $this->set("AllowedPrefixes", $allowedPrefixes); + } + + /** + * AllowedBuckets: 令牌允许操作的bucket + * + * @return string[]|null + */ + public function getAllowedBuckets(): array + { + return $this->get("AllowedBuckets"); + } + + /** + * AllowedBuckets: 令牌允许操作的bucket + * + * @param string[] $allowedBuckets + */ + public function setAllowedBuckets(array $allowedBuckets) + { + $this->set("AllowedBuckets", $allowedBuckets); + } + + /** + * ExpireTime: 令牌的超时时间点 + * + * @return integer|null + */ + public function getExpireTime(): int + { + return $this->get("ExpireTime"); + } + + /** + * ExpireTime: 令牌的超时时间点 + * + * @param int $expireTime + */ + public function setExpireTime(int $expireTime) + { + $this->set("ExpireTime", $expireTime); + } + + /** + * CreateTime: 创建时间 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ModifyTime: 修改时间 + * + * @return integer|null + */ + public function getModifyTime(): int + { + return $this->get("ModifyTime"); + } + + /** + * ModifyTime: 修改时间 + * + * @param int $modifyTime + */ + public function setModifyTime(int $modifyTime) + { + $this->set("ModifyTime", $modifyTime); + } + + /** + * Region: 所属地区 + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 所属地区 + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } +} diff --git a/src/UFile/UFileClient.php b/src/UFile/UFileClient.php new file mode 100644 index 00000000..a636f406 --- /dev/null +++ b/src/UFile/UFileClient.php @@ -0,0 +1,476 @@ + (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "BucketName" => (string) 待创建Bucket的名称,具有全局唯一性 + * "Type" => (string) Bucket访问类型,public或private; 默认为private + * ] + * + * Outputs: + * + * $outputs = [ + * "BucketName" => (string) 已创建Bucket的名称 + * "BucketId" => (string) 已创建Bucket的ID + * ] + * + * @throws UCloudException + */ + public function createBucket(CreateBucketRequest $request = null): CreateBucketResponse + { + $resp = $this->invoke($request); + return new CreateBucketResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUFileToken - 创建US3令牌 + * + * See also: https://docs.ucloud.cn/api/UFile-api/create_ufile_token + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "TokenName" => (string) 令牌名称 + * "AllowedOps" => (array) 令牌允许执行的操作,[ TOKEN_ALLOW_NONE , TOKEN_ALLOW_READ , TOKEN_ALLOW_WRITE , TOKEN_ALLOW_DELETE , TOKEN_ALLOW_LIST, TOKEN_ALLOW_IOP , TOKEN_ALLOW_DP ]。默认TOKEN_ALLOW_NONE + * "AllowedPrefixes" => (array) 令牌允许操作的key前缀,默认*表示全部 + * "AllowedBuckets" => (array) 令牌允许操作的bucket,默认*表示全部 + * "ExpireTime" => (integer) Unix 时间戳,精确到秒,为令牌过期时间点。默认过期时间为一天(即当前Unix时间戳+86400);注意:过期时间不能超过 4102416000 + * ] + * + * Outputs: + * + * $outputs = [ + * "TokenId" => (string) 创建令牌的token_id + * ] + * + * @throws UCloudException + */ + public function createUFileToken(CreateUFileTokenRequest $request = null): CreateUFileTokenResponse + { + $resp = $this->invoke($request); + return new CreateUFileTokenResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteBucket - 删除Bucket + * + * See also: https://docs.ucloud.cn/api/UFile-api/delete_bucket + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "BucketName" => (string) 待删除Bucket的名称 + * ] + * + * Outputs: + * + * $outputs = [ + * "BucketName" => (string) Bucket的名称 + * "BucketId" => (string) Bucket的ID + * ] + * + * @throws UCloudException + */ + public function deleteBucket(DeleteBucketRequest $request = null): DeleteBucketResponse + { + $resp = $this->invoke($request); + return new DeleteBucketResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteUFileToken - 删除令牌 + * + * See also: https://docs.ucloud.cn/api/UFile-api/delete_ufile_token + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "TokenId" => (string) 令牌ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteUFileToken(DeleteUFileTokenRequest $request = null): DeleteUFileTokenResponse + { + $resp = $this->invoke($request); + return new DeleteUFileTokenResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeBucket - 获取Bucket的描述信息 + * + * See also: https://docs.ucloud.cn/api/UFile-api/describe_bucket + * + * Arguments: + * + * $args = [ + * "Region" => (string) 如果提供此参数,则获取相应地域下所有空间的空间名称(只返回空间名称信息) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "BucketName" => (string) 待获取Bucket的名称,若不提供,则获取所有Bucket + * "Offset" => (integer) 获取所有Bucket列表的偏移数目,默认为0 + * "Limit" => (integer) 获取所有Bucket列表的限制数目,默认为20 + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) Bucket的描述信息 参数见 UFileBucketSet[ + * [ + * "Region" => (string) Bucket所属地域 + * "BucketName" => (string) Bucket名称 + * "BucketId" => (string) Bucket的ID + * "Domain" => (object) Bucket的域名集合 参数见 UFileDomainSet[ + * "Src" => (array) 源站域名 + * "Cdn" => (array) UCDN加速域名 + * "CustomSrc" => (array) 用户自定义源站域名 + * "CustomCdn" => (array) 用户自定义CDN加速域名 + * ] + * "CdnDomainId" => (array) 与Bucket关联的CND加速域名的ID列表 + * "Type" => (string) Bucket访问类型 + * "CreateTime" => (integer) Bucket的创建时间 + * "ModifyTime" => (integer) Bucket的修改时间 + * "Biz" => (string) Bucket所属业务, general或vod或udb general: 普通业务; vod: 视频云业务; udb: 云数据库业务 + * "Tag" => (string) 所属业务组 + * "HasUserDomain" => (integer) 是否存在自定义域名。0不存在,1存在,2错误 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeBucket(DescribeBucketRequest $request = null): DescribeBucketResponse + { + $resp = $this->invoke($request); + return new DescribeBucketResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUFileToken - 获取令牌信息 + * + * See also: https://docs.ucloud.cn/api/UFile-api/describe_ufile_token + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "TokenId" => (string) 令牌ID,只返回指定ID信息,否则拉取所有令牌 + * "TokenName" => (string) 令牌名称,只返回指定令牌名称信息,否则拉取所有令牌 + * "Display" => (integer) 0表示显示部分token信息;不传递和其他情况表示显示全部token信息 + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 令牌描述信息[ + * [ + * "TokenId" => (string) 令牌ID + * "TokenName" => (string) 令牌名称 + * "PublicKey" => (string) 令牌公钥 + * "PrivateKey" => (string) 令牌私钥 + * "AllowedOps" => (array) 令牌允许执行的操作,[ TOKEN_ALLOW_NONE , TOKEN_ALLOW_READ , TOKEN_ALLOW_WRITE , TOKEN_ALLOW_DELETE , TOKEN_ALLOW_LIST, TOKEN_ALLOW_IOP , TOKEN_ALLOW_DP ] + * "AllowedPrefixes" => (array) 令牌允许操作的key前缀 + * "AllowedBuckets" => (array) 令牌允许操作的bucket + * "ExpireTime" => (integer) 令牌的超时时间点 + * "CreateTime" => (integer) 创建时间 + * "ModifyTime" => (integer) 修改时间 + * "Region" => (string) 所属地区 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeUFileToken(DescribeUFileTokenRequest $request = null): DescribeUFileTokenResponse + { + $resp = $this->invoke($request); + return new DescribeUFileTokenResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUFileQuota - 查看配额状态 + * + * See also: https://docs.ucloud.cn/api/UFile-api/get_ufile_quota + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "QuotaType" => (string) 配额类型,取值为storage-volume, download-traffic或request-count + * ] + * + * Outputs: + * + * $outputs = [ + * "LeftQuota" => (number) 剩余的配额数值 + * ] + * + * @throws UCloudException + */ + public function getUFileQuota(GetUFileQuotaRequest $request = null): GetUFileQuotaResponse + { + $resp = $this->invoke($request); + return new GetUFileQuotaResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUFileQuotaInfo - 获取配额信息 + * + * See also: https://docs.ucloud.cn/api/UFile-api/get_ufile_quota_info + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "QuotaType" => (array) 配额类型,取值为storage-volume, download-traffic或request-count + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 配额信息数据集[ + * [ + * "Region" => (string) 可用地域 + * "Owe" => (integer) 是否欠费:1表示欠费;0表示未欠费 + * "Storage" => (object) 剩余存储容量[ + * "Left" => (number) 配额剩余量 + * ] + * "DownloadFlow" => (object) 剩余下载流量[ + * "Left" => (number) 配额剩余量 + * ] + * "RequestCnt" => (object) 剩余请求次数[ + * "Left" => (number) 配额剩余量 + * ] + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getUFileQuotaInfo(GetUFileQuotaInfoRequest $request = null): GetUFileQuotaInfoResponse + { + $resp = $this->invoke($request); + return new GetUFileQuotaInfoResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUFileQuotaPrice - 根据US3的购买配额,查询需要支付的价格。 + * + * See also: https://docs.ucloud.cn/api/UFile-api/get_ufile_quota_price + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "StorageVolume" => (integer) 存储容量,单位: GB*天,范围: [0, 30 000 000],步长:100GB*天 + * "DownloadTraffic" => (integer) 下载流量,单位: GB,范围: [0, 60 000],步长:1GB + * "RequestCount" => (integer) 请求次数,单位:万次,范围:[0, 1 000 000],步长:1万次 + * ] + * + * Outputs: + * + * $outputs = [ + * "Price" => (number) 待支付价格,单位:分 + * ] + * + * @throws UCloudException + */ + public function getUFileQuotaPrice(GetUFileQuotaPriceRequest $request = null): GetUFileQuotaPriceResponse + { + $resp = $this->invoke($request); + return new GetUFileQuotaPriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUFileReport - 查看配额使用报表 + * + * See also: https://docs.ucloud.cn/api/UFile-api/get_ufile_report + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "StartTime" => (integer) 查询开始时间 + * "EndTime" => (integer) 查询结束时间 + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 报表内容 参数见 UFileReportSet[ + * [ + * "Time" => (integer) 配额消费时间,unix时间戳,精确到日期 + * "StorageVolume" => (number) 配额消费当日使用的存储容量,单位:GB*天 + * "DownloadTraffic" => (number) 配额消费当日使用的下载流量,单位:GB + * "RequestCount" => (number) 配额消费当日使用的请求次数,单位:万次 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getUFileReport(GetUFileReportRequest $request = null): GetUFileReportResponse + { + $resp = $this->invoke($request); + return new GetUFileReportResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * SetUFileReferer - 设置对象存储防盗链 + * + * See also: https://docs.ucloud.cn/api/UFile-api/set_ufile_referer + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "BucketName" => (string) 存储空间名称 + * "RefererStatus" => (string) 开启关闭referer防盗链;关闭防盗链会清空防盗链参数设置,开启防盗链必须指定 RefererType、Referers;开启:on, 关闭:off; + * "RefererAllowNull" => (boolean) RefererType为白名单时,RefererAllowNull为false代表不允许空referer访问,为true代表允许空referer访问;此参数默认为 true; + * "RefererType" => (integer) 防盗链Referer类型,支持两种类型,黑名单和白名单; 1黑名单,2白名单;RefererStatus为"on"时此参数必填; + * "Referers" => (array) 防盗链Referer规则,支持正则表达式(不支持符号';') + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function setUFileReferer(SetUFileRefererRequest $request = null): SetUFileRefererResponse + { + $resp = $this->invoke($request); + return new SetUFileRefererResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateBucket - 更改Bucket的属性 + * + * See also: https://docs.ucloud.cn/api/UFile-api/update_bucket + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "BucketName" => (string) 待修改Bucket的名称 + * "Type" => (string) Bucket访问类型;public或private + * ] + * + * Outputs: + * + * $outputs = [ + * "BucketName" => (string) Bucket的名称 + * "BucketId" => (string) Bucket的ID + * ] + * + * @throws UCloudException + */ + public function updateBucket(UpdateBucketRequest $request = null): UpdateBucketResponse + { + $resp = $this->invoke($request); + return new UpdateBucketResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateUFileToken - 更新令牌的操作权限,可操作key的前缀,可操作bucket和令牌超时时间点 + * + * See also: https://docs.ucloud.cn/api/UFile-api/update_ufile_token + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "TokenId" => (string) 令牌ID + * "TokenName" => (string) 令牌名称 + * "AllowedOps" => (array) 令牌允许执行的操作,[ TOKEN_ALLOW_NONE , TOKEN_ALLOW_READ , TOKEN_ALLOW_WRITE , TOKEN_ALLOW_DELETE , TOKEN_ALLOW_LIST, TOKEN_ALLOW_IOP , TOKEN_ALLOW_DP ] + * "AllowedPrefixes" => (array) 令牌允许操作的key前缀 + * "AllowedBuckets" => (array) 令牌允许操作的bucket + * "ExpireTime" => (integer) 令牌的超时时间点(时间戳);注意:过期时间不能超过 4102416000 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function updateUFileToken(UpdateUFileTokenRequest $request = null): UpdateUFileTokenResponse + { + $resp = $this->invoke($request); + return new UpdateUFileTokenResponse($resp->toArray(), $resp->getRequestId()); + } +} diff --git a/src/UHost/Apis/CopyCustomImageRequest.php b/src/UHost/Apis/CopyCustomImageRequest.php new file mode 100644 index 00000000..0fff051b --- /dev/null +++ b/src/UHost/Apis/CopyCustomImageRequest.php @@ -0,0 +1,192 @@ + "CopyCustomImage"]); + $this->markRequired("Region"); + $this->markRequired("SourceImageId"); + $this->markRequired("TargetProjectId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SourceImageId: 源镜像Id, 参见 DescribeImage + * + * @return string|null + */ + public function getSourceImageId(): string + { + return $this->get("SourceImageId"); + } + + /** + * SourceImageId: 源镜像Id, 参见 DescribeImage + * + * @param string $sourceImageId + */ + public function setSourceImageId(string $sourceImageId) + { + $this->set("SourceImageId", $sourceImageId); + } + + /** + * TargetProjectId: 目标项目Id, 参见 GetProjectList + * + * @return string|null + */ + public function getTargetProjectId(): string + { + return $this->get("TargetProjectId"); + } + + /** + * TargetProjectId: 目标项目Id, 参见 GetProjectList + * + * @param string $targetProjectId + */ + public function setTargetProjectId(string $targetProjectId) + { + $this->set("TargetProjectId", $targetProjectId); + } + + /** + * TargetRegion: 目标地域,不跨地域不用填 + * + * @return string|null + */ + public function getTargetRegion(): string + { + return $this->get("TargetRegion"); + } + + /** + * TargetRegion: 目标地域,不跨地域不用填 + * + * @param string $targetRegion + */ + public function setTargetRegion(string $targetRegion) + { + $this->set("TargetRegion", $targetRegion); + } + + /** + * TargetImageName: 目标镜像名称 + * + * @return string|null + */ + public function getTargetImageName(): string + { + return $this->get("TargetImageName"); + } + + /** + * TargetImageName: 目标镜像名称 + * + * @param string $targetImageName + */ + public function setTargetImageName(string $targetImageName) + { + $this->set("TargetImageName", $targetImageName); + } + + /** + * TargetImageDescription: 目标镜像描述 + * + * @return string|null + */ + public function getTargetImageDescription(): string + { + return $this->get("TargetImageDescription"); + } + + /** + * TargetImageDescription: 目标镜像描述 + * + * @param string $targetImageDescription + */ + public function setTargetImageDescription(string $targetImageDescription) + { + $this->set("TargetImageDescription", $targetImageDescription); + } +} diff --git a/src/UHost/Apis/CopyCustomImageResponse.php b/src/UHost/Apis/CopyCustomImageResponse.php new file mode 100644 index 00000000..abda719c --- /dev/null +++ b/src/UHost/Apis/CopyCustomImageResponse.php @@ -0,0 +1,44 @@ +get("TargetImageId"); + } + + /** + * TargetImageId: 目标镜像Id + * + * @param string $targetImageId + */ + public function setTargetImageId(string $targetImageId) + { + $this->set("TargetImageId", $targetImageId); + } +} diff --git a/src/UHost/Apis/CreateCustomImageRequest.php b/src/UHost/Apis/CreateCustomImageRequest.php new file mode 100644 index 00000000..b2836df9 --- /dev/null +++ b/src/UHost/Apis/CreateCustomImageRequest.php @@ -0,0 +1,152 @@ + "CreateCustomImage"]); + $this->markRequired("Region"); + $this->markRequired("UHostId"); + $this->markRequired("ImageName"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UHostId: UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + * + * @return string|null + */ + public function getUHostId(): string + { + return $this->get("UHostId"); + } + + /** + * UHostId: UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } + + /** + * ImageName: 镜像名称 + * + * @return string|null + */ + public function getImageName(): string + { + return $this->get("ImageName"); + } + + /** + * ImageName: 镜像名称 + * + * @param string $imageName + */ + public function setImageName(string $imageName) + { + $this->set("ImageName", $imageName); + } + + /** + * ImageDescription: 镜像描述 + * + * @return string|null + */ + public function getImageDescription(): string + { + return $this->get("ImageDescription"); + } + + /** + * ImageDescription: 镜像描述 + * + * @param string $imageDescription + */ + public function setImageDescription(string $imageDescription) + { + $this->set("ImageDescription", $imageDescription); + } +} diff --git a/src/UHost/Apis/CreateCustomImageResponse.php b/src/UHost/Apis/CreateCustomImageResponse.php new file mode 100644 index 00000000..451e2388 --- /dev/null +++ b/src/UHost/Apis/CreateCustomImageResponse.php @@ -0,0 +1,44 @@ +get("ImageId"); + } + + /** + * ImageId: 镜像Id + * + * @param string $imageId + */ + public function setImageId(string $imageId) + { + $this->set("ImageId", $imageId); + } +} diff --git a/src/UHost/Apis/CreateIsolationGroupRequest.php b/src/UHost/Apis/CreateIsolationGroupRequest.php new file mode 100644 index 00000000..55498516 --- /dev/null +++ b/src/UHost/Apis/CreateIsolationGroupRequest.php @@ -0,0 +1,111 @@ + "CreateIsolationGroup"]); + $this->markRequired("Region"); + $this->markRequired("GroupName"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目id + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目id + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * GroupName: 硬件隔离组名称。请遵照[[api:uhost-api:specification|字段规范]]设定隔离组名称。 + * + * @return string|null + */ + public function getGroupName(): string + { + return $this->get("GroupName"); + } + + /** + * GroupName: 硬件隔离组名称。请遵照[[api:uhost-api:specification|字段规范]]设定隔离组名称。 + * + * @param string $groupName + */ + public function setGroupName(string $groupName) + { + $this->set("GroupName", $groupName); + } + + /** + * Remark: 备注。请遵照[[api:uhost-api:specification|字段规范]]设定隔离组备注。 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 备注。请遵照[[api:uhost-api:specification|字段规范]]设定隔离组备注。 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } +} diff --git a/src/UHost/Apis/CreateIsolationGroupResponse.php b/src/UHost/Apis/CreateIsolationGroupResponse.php new file mode 100644 index 00000000..781551d1 --- /dev/null +++ b/src/UHost/Apis/CreateIsolationGroupResponse.php @@ -0,0 +1,44 @@ +get("GroupId"); + } + + /** + * GroupId: 硬件隔离组id + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } +} diff --git a/src/UHost/Apis/CreateUHostInstanceRequest.php b/src/UHost/Apis/CreateUHostInstanceRequest.php new file mode 100644 index 00000000..ccaa1c26 --- /dev/null +++ b/src/UHost/Apis/CreateUHostInstanceRequest.php @@ -0,0 +1,747 @@ + "CreateUHostInstance"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ImageId"); + $this->markRequired("LoginMode"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ImageId: 镜像ID。 请通过 [DescribeImage](describe_image.html)获取 + * + * @return string|null + */ + public function getImageId(): string + { + return $this->get("ImageId"); + } + + /** + * ImageId: 镜像ID。 请通过 [DescribeImage](describe_image.html)获取 + * + * @param string $imageId + */ + public function setImageId(string $imageId) + { + $this->set("ImageId", $imageId); + } + + /** + * Disks: + * + * @return CreateUHostInstanceParamDisks[]|null + */ + public function getDisks(): array + { + $items = $this->get("Disks") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateUHostInstanceParamDisks($item)); + } + return $result; + } + + /** + * Disks: + * + * @param CreateUHostInstanceParamDisks[] $disks + */ + public function setDisks(array $disks) + { + $result = []; + foreach ($disks as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * LoginMode: 主机登陆模式。密码(默认选项): Password,密钥:KeyPair。 + * + * @return string|null + */ + public function getLoginMode(): string + { + return $this->get("LoginMode"); + } + + /** + * LoginMode: 主机登陆模式。密码(默认选项): Password,密钥:KeyPair。 + * + * @param string $loginMode + */ + public function setLoginMode(string $loginMode) + { + $this->set("LoginMode", $loginMode); + } + + /** + * Password: UHost密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,举例如下:# echo -n Password1 | base64UGFzc3dvcmQx。 + * + * @return string|null + */ + public function getPassword(): string + { + return $this->get("Password"); + } + + /** + * Password: UHost密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,举例如下:# echo -n Password1 | base64UGFzc3dvcmQx。 + * + * @param string $password + */ + public function setPassword(string $password) + { + $this->set("Password", $password); + } + + /** + * Name: UHost实例名称。默认:UHost。请遵照[[api:uhost-api:specification|字段规范]]设定实例名称。 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: UHost实例名称。默认:UHost。请遵照[[api:uhost-api:specification|字段规范]]设定实例名称。 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Tag: 业务组。默认:Default(Default即为未分组)。请遵照[[api:uhost-api:specification|字段规范]]设定业务组。 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组。默认:Default(Default即为未分组)。请遵照[[api:uhost-api:specification|字段规范]]设定业务组。 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * ChargeType: 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按小时后付费(支持关机不收费,目前仅部分可用区支持,请联系您的客户经理) \\Preemptive计费为抢占式实例 \\ 默认为月付 + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按小时后付费(支持关机不收费,目前仅部分可用区支持,请联系您的客户经理) \\Preemptive计费为抢占式实例 \\ 默认为月付 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时长。默认:值 1。按小时购买(Dynamic/Postpay)时无需此参数。 月付时,此参数传0,代表购买至月末。 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长。默认:值 1。按小时购买(Dynamic/Postpay)时无需此参数。 月付时,此参数传0,代表购买至月末。 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * UHostType: 【建议后续不再使用】云主机机型(V1.0),在本字段和字段MachineType中,仅需要其中1个字段即可。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * + * @return string|null + */ + public function getUHostType(): string + { + return $this->get("UHostType"); + } + + /** + * UHostType: 【建议后续不再使用】云主机机型(V1.0),在本字段和字段MachineType中,仅需要其中1个字段即可。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * + * @param string $uHostType + */ + public function setUHostType(string $uHostType) + { + $this->set("UHostType", $uHostType); + } + + /** + * CPU: 虚拟CPU核数。可选参数:1-64(具体机型与CPU的对应关系参照控制台)。默认值: 4。 + * + * @return integer|null + */ + public function getCPU(): int + { + return $this->get("CPU"); + } + + /** + * CPU: 虚拟CPU核数。可选参数:1-64(具体机型与CPU的对应关系参照控制台)。默认值: 4。 + * + * @param int $cpu + */ + public function setCPU(int $cpu) + { + $this->set("CPU", $cpu); + } + + /** + * Memory: 内存大小。单位:MB。范围 :[1024, 262144],取值为1024的倍数(可选范围参考控制台)。默认值:8192 + * + * @return integer|null + */ + public function getMemory(): int + { + return $this->get("Memory"); + } + + /** + * Memory: 内存大小。单位:MB。范围 :[1024, 262144],取值为1024的倍数(可选范围参考控制台)。默认值:8192 + * + * @param int $memory + */ + public function setMemory(int $memory) + { + $this->set("Memory", $memory); + } + + /** + * GpuType: GPU类型,枚举值["K80", "P40", "V100", "T4", "T4S","2080Ti","2080Ti-4C","1080Ti"],MachineType为G时必填 + * + * @return string|null + */ + public function getGpuType(): string + { + return $this->get("GpuType"); + } + + /** + * GpuType: GPU类型,枚举值["K80", "P40", "V100", "T4", "T4S","2080Ti","2080Ti-4C","1080Ti"],MachineType为G时必填 + * + * @param string $gpuType + */ + public function setGpuType(string $gpuType) + { + $this->set("GpuType", $gpuType); + } + + /** + * GPU: GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关) + * + * @return integer|null + */ + public function getGPU(): int + { + return $this->get("GPU"); + } + + /** + * GPU: GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关) + * + * @param int $gpu + */ + public function setGPU(int $gpu) + { + $this->set("GPU", $gpu); + } + + /** + * VirtualGpu: + * + * @return CreateUHostInstanceParamVirtualGpu|null + */ + public function getVirtualGpu(): CreateUHostInstanceParamVirtualGpu + { + return new CreateUHostInstanceParamVirtualGpu($this->get("VirtualGpu")); + } + + /** + * VirtualGpu: + * + * @param CreateUHostInstanceParamVirtualGpu $virtualGpu + */ + public function setVirtualGpu(CreateUHostInstanceParamVirtualGpu $virtualGpu) + { + $this->set("VirtualGpu", $virtualGpu->getAll()); + } + + /** + * NetCapability: 网络增强特性。枚举值:Normal(默认),不开启; Super,开启网络增强1.0; Ultra,开启网络增强2.0(仅支持部分可用区,请参考控制台) + * + * @return string|null + */ + public function getNetCapability(): string + { + return $this->get("NetCapability"); + } + + /** + * NetCapability: 网络增强特性。枚举值:Normal(默认),不开启; Super,开启网络增强1.0; Ultra,开启网络增强2.0(仅支持部分可用区,请参考控制台) + * + * @param string $netCapability + */ + public function setNetCapability(string $netCapability) + { + $this->set("NetCapability", $netCapability); + } + + /** + * HotplugFeature: 热升级特性。True为开启,False为未开启,默认False。 + * + * @return boolean|null + */ + public function getHotplugFeature(): bool + { + return $this->get("HotplugFeature"); + } + + /** + * HotplugFeature: 热升级特性。True为开启,False为未开启,默认False。 + * + * @param boolean $hotplugFeature + */ + public function setHotplugFeature(bool $hotplugFeature) + { + $this->set("HotplugFeature", $hotplugFeature); + } + + /** + * VPCId: VPC ID。默认为当前地域的默认VPC。 + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPC ID。默认为当前地域的默认VPC。 + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: 子网 ID。默认为当前地域的默认子网。 + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网 ID。默认为当前地域的默认子网。 + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * PrivateIp: 【数组】创建云主机时指定内网IP。若不传值,则随机分配当前子网下的IP。调用方式举例:PrivateIp.0=x.x.x.x。当前只支持一个内网IP。 + * + * @return string[]|null + */ + public function getPrivateIp(): array + { + return $this->get("PrivateIp"); + } + + /** + * PrivateIp: 【数组】创建云主机时指定内网IP。若不传值,则随机分配当前子网下的IP。调用方式举例:PrivateIp.0=x.x.x.x。当前只支持一个内网IP。 + * + * @param string[] $privateIp + */ + public function setPrivateIp(array $privateIp) + { + $this->set("PrivateIp", $privateIp); + } + + /** + * SecurityGroupId: 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 + * + * @return string|null + */ + public function getSecurityGroupId(): string + { + return $this->get("SecurityGroupId"); + } + + /** + * SecurityGroupId: 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 + * + * @param string $securityGroupId + */ + public function setSecurityGroupId(string $securityGroupId) + { + $this->set("SecurityGroupId", $securityGroupId); + } + + /** + * IsolationGroup: 硬件隔离组id。可通过DescribeIsolationGroup获取。 + * + * @return string|null + */ + public function getIsolationGroup(): string + { + return $this->get("IsolationGroup"); + } + + /** + * IsolationGroup: 硬件隔离组id。可通过DescribeIsolationGroup获取。 + * + * @param string $isolationGroup + */ + public function setIsolationGroup(string $isolationGroup) + { + $this->set("IsolationGroup", $isolationGroup); + } + + /** + * AlarmTemplateId: 告警模板id,如果传了告警模板id,且告警模板id正确,则绑定告警模板。绑定告警模板失败只会在后台有日志,不会影响创建主机流程,也不会在前端报错。 + * + * @return integer|null + */ + public function getAlarmTemplateId(): int + { + return $this->get("AlarmTemplateId"); + } + + /** + * AlarmTemplateId: 告警模板id,如果传了告警模板id,且告警模板id正确,则绑定告警模板。绑定告警模板失败只会在后台有日志,不会影响创建主机流程,也不会在前端报错。 + * + * @param int $alarmTemplateId + */ + public function setAlarmTemplateId(int $alarmTemplateId) + { + $this->set("AlarmTemplateId", $alarmTemplateId); + } + + /** + * MachineType: 云主机机型(V2.0),在本字段和字段UHostType中,仅需要其中1个字段即可。枚举值["N", "C", "G", "O", "OS", "OPRO", "OMAX", "O.BM"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * + * @return string|null + */ + public function getMachineType(): string + { + return $this->get("MachineType"); + } + + /** + * MachineType: 云主机机型(V2.0),在本字段和字段UHostType中,仅需要其中1个字段即可。枚举值["N", "C", "G", "O", "OS", "OPRO", "OMAX", "O.BM"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * + * @param string $machineType + */ + public function setMachineType(string $machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * MinimalCpuPlatform: 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake";"Intel/CascadelakeR"; “Amd/Epyc2”,"Amd/Auto"],默认值是"Intel/Auto"。 + * + * @return string|null + */ + public function getMinimalCpuPlatform(): string + { + return $this->get("MinimalCpuPlatform"); + } + + /** + * MinimalCpuPlatform: 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake";"Intel/CascadelakeR"; “Amd/Epyc2”,"Amd/Auto"],默认值是"Intel/Auto"。 + * + * @param string $minimalCpuPlatform + */ + public function setMinimalCpuPlatform(string $minimalCpuPlatform) + { + $this->set("MinimalCpuPlatform", $minimalCpuPlatform); + } + + /** + * MaxCount: 本次最大创建主机数量,取值范围是[1,100],默认值为1。 + * + * @return integer|null + */ + public function getMaxCount(): int + { + return $this->get("MaxCount"); + } + + /** + * MaxCount: 本次最大创建主机数量,取值范围是[1,100],默认值为1。 + * + * @param int $maxCount + */ + public function setMaxCount(int $maxCount) + { + $this->set("MaxCount", $maxCount); + } + + /** + * NetworkInterface: + * + * @return CreateUHostInstanceParamNetworkInterface[]|null + */ + public function getNetworkInterface(): array + { + $items = $this->get("NetworkInterface") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateUHostInstanceParamNetworkInterface($item)); + } + return $result; + } + + /** + * NetworkInterface: + * + * @param CreateUHostInstanceParamNetworkInterface[] $networkInterface + */ + public function setNetworkInterface(array $networkInterface) + { + $result = []; + foreach ($networkInterface as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * UserData: 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码 + * + * @return string|null + */ + public function getUserData(): string + { + return $this->get("UserData"); + } + + /** + * UserData: 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码 + * + * @param string $userData + */ + public function setUserData(string $userData) + { + $this->set("UserData", $userData); + } + + /** + * AutoDataDiskInit: 数据盘是否需要自动分区挂载。当镜像支持“Cloud-init”Feature时可填写此字段。取值 >“On” 自动挂载(默认值)> “Off” 不自动挂载。 + * + * @return string|null + */ + public function getAutoDataDiskInit(): string + { + return $this->get("AutoDataDiskInit"); + } + + /** + * AutoDataDiskInit: 数据盘是否需要自动分区挂载。当镜像支持“Cloud-init”Feature时可填写此字段。取值 >“On” 自动挂载(默认值)> “Off” 不自动挂载。 + * + * @param string $autoDataDiskInit + */ + public function setAutoDataDiskInit(string $autoDataDiskInit) + { + $this->set("AutoDataDiskInit", $autoDataDiskInit); + } + + /** + * Volumes: + * + * @return CreateUHostInstanceParamVolumes[]|null + */ + public function getVolumes(): array + { + $items = $this->get("Volumes") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateUHostInstanceParamVolumes($item)); + } + return $result; + } + + /** + * Volumes: + * + * @param CreateUHostInstanceParamVolumes[] $volumes + */ + public function setVolumes(array $volumes) + { + $result = []; + foreach ($volumes as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * KeyPairId: KeypairId 密钥对ID,LoginMode为KeyPair时此项必须 + * + * @return string|null + */ + public function getKeyPairId(): string + { + return $this->get("KeyPairId"); + } + + /** + * KeyPairId: KeypairId 密钥对ID,LoginMode为KeyPair时此项必须 + * + * @param string $keyPairId + */ + public function setKeyPairId(string $keyPairId) + { + $this->set("KeyPairId", $keyPairId); + } + + /** + * CouponId: 主机代金券ID。请通过DescribeCoupon接口查询,或登录用户中心查看 + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 主机代金券ID。请通过DescribeCoupon接口查询,或登录用户中心查看 + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UHost/Apis/CreateUHostInstanceResponse.php b/src/UHost/Apis/CreateUHostInstanceResponse.php new file mode 100644 index 00000000..12ce14a5 --- /dev/null +++ b/src/UHost/Apis/CreateUHostInstanceResponse.php @@ -0,0 +1,64 @@ +get("UHostIds"); + } + + /** + * UHostIds: UHost实例Id集合 + * + * @param string[] $uHostIds + */ + public function setUHostIds(array $uHostIds) + { + $this->set("UHostIds", $uHostIds); + } + + /** + * IPs: 【批量创建不会返回】IP信息 + * + * @return string[]|null + */ + public function getIPs(): array + { + return $this->get("IPs"); + } + + /** + * IPs: 【批量创建不会返回】IP信息 + * + * @param string[] $iPs + */ + public function setIPs(array $iPs) + { + $this->set("IPs", $iPs); + } +} diff --git a/src/UHost/Apis/CreateUHostKeyPairRequest.php b/src/UHost/Apis/CreateUHostKeyPairRequest.php new file mode 100644 index 00000000..eefa8972 --- /dev/null +++ b/src/UHost/Apis/CreateUHostKeyPairRequest.php @@ -0,0 +1,110 @@ + "CreateUHostKeyPair"]); + $this->markRequired("KeyPairName"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * KeyPairName: 密钥对名称。 由字母,数字,符号组成,长度为1-63位。 + * + * @return string|null + */ + public function getKeyPairName(): string + { + return $this->get("KeyPairName"); + } + + /** + * KeyPairName: 密钥对名称。 由字母,数字,符号组成,长度为1-63位。 + * + * @param string $keyPairName + */ + public function setKeyPairName(string $keyPairName) + { + $this->set("KeyPairName", $keyPairName); + } +} diff --git a/src/UHost/Apis/CreateUHostKeyPairResponse.php b/src/UHost/Apis/CreateUHostKeyPairResponse.php new file mode 100644 index 00000000..3dfa4937 --- /dev/null +++ b/src/UHost/Apis/CreateUHostKeyPairResponse.php @@ -0,0 +1,45 @@ +get("KeyPair")); + } + + /** + * KeyPair: 密钥信息 + * + * @param KeyPair $keyPair + */ + public function setKeyPair(KeyPair $keyPair) + { + $this->set("KeyPair", $keyPair->getAll()); + } +} diff --git a/src/UHost/Apis/DeleteIsolationGroupRequest.php b/src/UHost/Apis/DeleteIsolationGroupRequest.php new file mode 100644 index 00000000..4be18316 --- /dev/null +++ b/src/UHost/Apis/DeleteIsolationGroupRequest.php @@ -0,0 +1,91 @@ + "DeleteIsolationGroup"]); + $this->markRequired("Region"); + $this->markRequired("GroupId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目id + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目id + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * GroupId: 硬件隔离组id + * + * @return string|null + */ + public function getGroupId(): string + { + return $this->get("GroupId"); + } + + /** + * GroupId: 硬件隔离组id + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } +} diff --git a/src/UHost/Apis/DeleteIsolationGroupResponse.php b/src/UHost/Apis/DeleteIsolationGroupResponse.php new file mode 100644 index 00000000..835915d4 --- /dev/null +++ b/src/UHost/Apis/DeleteIsolationGroupResponse.php @@ -0,0 +1,44 @@ +get("GroupId"); + } + + /** + * GroupId: 硬件隔离组id + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } +} diff --git a/src/UHost/Apis/DeleteUHostKeyPairsRequest.php b/src/UHost/Apis/DeleteUHostKeyPairsRequest.php new file mode 100644 index 00000000..327ce6a4 --- /dev/null +++ b/src/UHost/Apis/DeleteUHostKeyPairsRequest.php @@ -0,0 +1,110 @@ + "DeleteUHostKeyPairs"]); + $this->markRequired("KeyPairIds"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * KeyPairIds: 密钥对ID,最多支持 100 对。 + * + * @return string[]|null + */ + public function getKeyPairIds(): array + { + return $this->get("KeyPairIds"); + } + + /** + * KeyPairIds: 密钥对ID,最多支持 100 对。 + * + * @param string[] $keyPairIds + */ + public function setKeyPairIds(array $keyPairIds) + { + $this->set("KeyPairIds", $keyPairIds); + } +} diff --git a/src/UHost/Apis/DeleteUHostKeyPairsResponse.php b/src/UHost/Apis/DeleteUHostKeyPairsResponse.php new file mode 100644 index 00000000..ab5048c6 --- /dev/null +++ b/src/UHost/Apis/DeleteUHostKeyPairsResponse.php @@ -0,0 +1,26 @@ + "DescribeImage"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ImageType: 镜像类型。标准镜像:Base,镜像市场:Business, 自定义镜像:Custom,默认返回所有类型 + * + * @return string|null + */ + public function getImageType(): string + { + return $this->get("ImageType"); + } + + /** + * ImageType: 镜像类型。标准镜像:Base,镜像市场:Business, 自定义镜像:Custom,默认返回所有类型 + * + * @param string $imageType + */ + public function setImageType(string $imageType) + { + $this->set("ImageType", $imageType); + } + + /** + * OsType: 操作系统类型:Linux, Windows 默认返回所有类型 + * + * @return string|null + */ + public function getOsType(): string + { + return $this->get("OsType"); + } + + /** + * OsType: 操作系统类型:Linux, Windows 默认返回所有类型 + * + * @param string $osType + */ + public function setOsType(string $osType) + { + $this->set("OsType", $osType); + } + + /** + * ImageId: 镜像Id + * + * @return string|null + */ + public function getImageId(): string + { + return $this->get("ImageId"); + } + + /** + * ImageId: 镜像Id + * + * @param string $imageId + */ + public function setImageId(string $imageId) + { + $this->set("ImageId", $imageId); + } + + /** + * Offset: 列表起始位置偏移量,默认为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 列表起始位置偏移量,默认为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 返回数据长度,默认为20 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数据长度,默认为20 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * PriceSet: 是否返回价格:1返回,0不返回;默认不返回 + * + * @return integer|null + */ + public function getPriceSet(): int + { + return $this->get("PriceSet"); + } + + /** + * PriceSet: 是否返回价格:1返回,0不返回;默认不返回 + * + * @param int $priceSet + */ + public function setPriceSet(int $priceSet) + { + $this->set("PriceSet", $priceSet); + } +} diff --git a/src/UHost/Apis/DescribeImageResponse.php b/src/UHost/Apis/DescribeImageResponse.php new file mode 100644 index 00000000..22984c83 --- /dev/null +++ b/src/UHost/Apis/DescribeImageResponse.php @@ -0,0 +1,74 @@ +get("TotalCount"); + } + + /** + * TotalCount: 满足条件的镜像总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * ImageSet: 镜像列表详见 UHostImageSet + * + * @return UHostImageSet[]|null + */ + public function getImageSet(): array + { + $items = $this->get("ImageSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UHostImageSet($item)); + } + return $result; + } + + /** + * ImageSet: 镜像列表详见 UHostImageSet + * + * @param UHostImageSet[] $imageSet + */ + public function setImageSet(array $imageSet) + { + $result = []; + foreach ($imageSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UHost/Apis/DescribeIsolationGroupRequest.php b/src/UHost/Apis/DescribeIsolationGroupRequest.php new file mode 100644 index 00000000..79678f1a --- /dev/null +++ b/src/UHost/Apis/DescribeIsolationGroupRequest.php @@ -0,0 +1,130 @@ + "DescribeIsolationGroup"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目id + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目id + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * GroupId: 待查的硬件隔离组id + * + * @return string|null + */ + public function getGroupId(): string + { + return $this->get("GroupId"); + } + + /** + * GroupId: 待查的硬件隔离组id + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } + + /** + * Offset: 列表起始位置偏移量,默认为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 列表起始位置偏移量,默认为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 返回数据长度,默认为20,最大100 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数据长度,默认为20,最大100 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/UHost/Apis/DescribeIsolationGroupResponse.php b/src/UHost/Apis/DescribeIsolationGroupResponse.php new file mode 100644 index 00000000..bcca7789 --- /dev/null +++ b/src/UHost/Apis/DescribeIsolationGroupResponse.php @@ -0,0 +1,75 @@ +get("IsolationGroupSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new IsolationGroup($item)); + } + return $result; + } + + /** + * IsolationGroupSet: 硬件隔离组集合。参见数据结构IsolationGroup。 + * + * @param IsolationGroup[] $isolationGroupSet + */ + public function setIsolationGroupSet(array $isolationGroupSet) + { + $result = []; + foreach ($isolationGroupSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalCount: 硬件隔离组总数 + * + * @return integer|null + */ + public function getTotalCount(): int + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 硬件隔离组总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/UHost/Apis/DescribeUHostInstanceRequest.php b/src/UHost/Apis/DescribeUHostInstanceRequest.php new file mode 100644 index 00000000..cb31459e --- /dev/null +++ b/src/UHost/Apis/DescribeUHostInstanceRequest.php @@ -0,0 +1,250 @@ + "DescribeUHostInstance"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UHostIds: 【数组】UHost主机的资源ID,例如UHostIds.0代表希望获取信息 的主机1,UHostIds.1代表主机2。 如果不传入,则返回当前Region 所有符合条件的UHost实例。 + * + * @return string[]|null + */ + public function getUHostIds(): array + { + return $this->get("UHostIds"); + } + + /** + * UHostIds: 【数组】UHost主机的资源ID,例如UHostIds.0代表希望获取信息 的主机1,UHostIds.1代表主机2。 如果不传入,则返回当前Region 所有符合条件的UHost实例。 + * + * @param string[] $uHostIds + */ + public function setUHostIds(array $uHostIds) + { + $this->set("UHostIds", $uHostIds); + } + + /** + * Tag: 要查询的业务组名称 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 要查询的业务组名称 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Offset: 列表起始位置偏移量,默认为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 列表起始位置偏移量,默认为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 返回数据长度,默认为20,最大100 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数据长度,默认为20,最大100 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * IsolationGroup: 硬件隔离组id。通过硬件隔离组筛选主机。 + * + * @return string|null + */ + public function getIsolationGroup(): string + { + return $this->get("IsolationGroup"); + } + + /** + * IsolationGroup: 硬件隔离组id。通过硬件隔离组筛选主机。 + * + * @param string $isolationGroup + */ + public function setIsolationGroup(string $isolationGroup) + { + $this->set("IsolationGroup", $isolationGroup); + } + + /** + * VPCId: vpc id。通过VPC筛选主机。北京一地域无效。 + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: vpc id。通过VPC筛选主机。北京一地域无效。 + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: 子网id。通过子网筛选主机。北京一地域无效。 + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网id。通过子网筛选主机。北京一地域无效。 + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * UDiskIdForAttachment: 要挂载的云盘id,过滤返回能被UDiskId挂载的云主机。目前主要针对rssd云盘使用 + * + * @return string|null + */ + public function getUDiskIdForAttachment(): string + { + return $this->get("UDiskIdForAttachment"); + } + + /** + * UDiskIdForAttachment: 要挂载的云盘id,过滤返回能被UDiskId挂载的云主机。目前主要针对rssd云盘使用 + * + * @param string $uDiskIdForAttachment + */ + public function setUDiskIdForAttachment(string $uDiskIdForAttachment) + { + $this->set("UDiskIdForAttachment", $uDiskIdForAttachment); + } +} diff --git a/src/UHost/Apis/DescribeUHostInstanceResponse.php b/src/UHost/Apis/DescribeUHostInstanceResponse.php new file mode 100644 index 00000000..383baeaa --- /dev/null +++ b/src/UHost/Apis/DescribeUHostInstanceResponse.php @@ -0,0 +1,77 @@ +get("TotalCount"); + } + + /** + * TotalCount: UHostInstance总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * UHostSet: 云主机实例列表,每项参数可见下面 UHostInstanceSet + * + * @return UHostInstanceSet[]|null + */ + public function getUHostSet(): array + { + $items = $this->get("UHostSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UHostInstanceSet($item)); + } + return $result; + } + + /** + * UHostSet: 云主机实例列表,每项参数可见下面 UHostInstanceSet + * + * @param UHostInstanceSet[] $uHostSet + */ + public function setUHostSet(array $uHostSet) + { + $result = []; + foreach ($uHostSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UHost/Apis/DescribeUHostKeyPairsRequest.php b/src/UHost/Apis/DescribeUHostKeyPairsRequest.php new file mode 100644 index 00000000..3c2854ff --- /dev/null +++ b/src/UHost/Apis/DescribeUHostKeyPairsRequest.php @@ -0,0 +1,169 @@ + "DescribeUHostKeyPairs"]); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * KeyPairName: 密钥对名称。 + * + * @return string|null + */ + public function getKeyPairName(): string + { + return $this->get("KeyPairName"); + } + + /** + * KeyPairName: 密钥对名称。 + * + * @param string $keyPairName + */ + public function setKeyPairName(string $keyPairName) + { + $this->set("KeyPairName", $keyPairName); + } + + /** + * KeyPairFingerPrint: 密钥对的指纹。 + * + * @return string|null + */ + public function getKeyPairFingerPrint(): string + { + return $this->get("KeyPairFingerPrint"); + } + + /** + * KeyPairFingerPrint: 密钥对的指纹。 + * + * @param string $keyPairFingerPrint + */ + public function setKeyPairFingerPrint(string $keyPairFingerPrint) + { + $this->set("KeyPairFingerPrint", $keyPairFingerPrint); + } + + /** + * Offset: 列表起始位置偏移量,默认为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 列表起始位置偏移量,默认为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 返回数据长度,默认为20,最大100 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数据长度,默认为20,最大100 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/UHost/Apis/DescribeUHostKeyPairsResponse.php b/src/UHost/Apis/DescribeUHostKeyPairsResponse.php new file mode 100644 index 00000000..19704271 --- /dev/null +++ b/src/UHost/Apis/DescribeUHostKeyPairsResponse.php @@ -0,0 +1,74 @@ +get("KeyPairs") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new KeyPair($item)); + } + return $result; + } + + /** + * KeyPairs: 密钥对信息集合 + * + * @param KeyPair[] $keyPairs + */ + public function setKeyPairs(array $keyPairs) + { + $result = []; + foreach ($keyPairs as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalCount: 密钥对总数 + * + * @return integer|null + */ + public function getTotalCount(): int + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 密钥对总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/UHost/Apis/DescribeUHostTagsRequest.php b/src/UHost/Apis/DescribeUHostTagsRequest.php new file mode 100644 index 00000000..e5a458b1 --- /dev/null +++ b/src/UHost/Apis/DescribeUHostTagsRequest.php @@ -0,0 +1,90 @@ + "DescribeUHostTags"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } +} diff --git a/src/UHost/Apis/DescribeUHostTagsResponse.php b/src/UHost/Apis/DescribeUHostTagsResponse.php new file mode 100644 index 00000000..9c12df8b --- /dev/null +++ b/src/UHost/Apis/DescribeUHostTagsResponse.php @@ -0,0 +1,74 @@ +get("TotalCount"); + } + + /** + * TotalCount: 已有主机的业务组总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * TagSet: 业务组集合见 UHostTagSet + * + * @return UHostTagSet[]|null + */ + public function getTagSet(): array + { + $items = $this->get("TagSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UHostTagSet($item)); + } + return $result; + } + + /** + * TagSet: 业务组集合见 UHostTagSet + * + * @param UHostTagSet[] $tagSet + */ + public function setTagSet(array $tagSet) + { + $result = []; + foreach ($tagSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UHost/Apis/GetAttachedDiskUpgradePriceRequest.php b/src/UHost/Apis/GetAttachedDiskUpgradePriceRequest.php new file mode 100644 index 00000000..b38b4a66 --- /dev/null +++ b/src/UHost/Apis/GetAttachedDiskUpgradePriceRequest.php @@ -0,0 +1,173 @@ + "GetAttachedDiskUpgradePrice"]); + $this->markRequired("Region"); + $this->markRequired("DiskSpace"); + $this->markRequired("DiskId"); + $this->markRequired("UHostId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * DiskSpace: 磁盘大小,单位GB,步长为10。取值范围需大于当前磁盘大小,最大值请参考[[api:uhost-api:disk_type|磁盘类型]]。 + * + * @return integer|null + */ + public function getDiskSpace(): int + { + return $this->get("DiskSpace"); + } + + /** + * DiskSpace: 磁盘大小,单位GB,步长为10。取值范围需大于当前磁盘大小,最大值请参考[[api:uhost-api:disk_type|磁盘类型]]。 + * + * @param int $diskSpace + */ + public function setDiskSpace(int $diskSpace) + { + $this->set("DiskSpace", $diskSpace); + } + + /** + * DiskId: 磁盘ID。参见 [DescribeUHostInstance](describe_uhost_instance.html)返回值中的DiskSet。 + * + * @return string|null + */ + public function getDiskId(): string + { + return $this->get("DiskId"); + } + + /** + * DiskId: 磁盘ID。参见 [DescribeUHostInstance](describe_uhost_instance.html)返回值中的DiskSet。 + * + * @param string $diskId + */ + public function setDiskId(string $diskId) + { + $this->set("DiskId", $diskId); + } + + /** + * UHostId: UHost实例ID。 参见 [DescribeUHostInstance](describe_uhost_instance.html)。 + * + * @return string|null + */ + public function getUHostId(): string + { + return $this->get("UHostId"); + } + + /** + * UHostId: UHost实例ID。 参见 [DescribeUHostInstance](describe_uhost_instance.html)。 + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } + + /** + * BackupMode: 磁盘备份方案。枚举值:\\ > NONE,无备份 \\ > DATAARK,数据方舟 \\> SNAPSHOT(SNAPSHOT模式目前仅在上海C支持),快照 \\ 当前磁盘支持的备份模式参考 [[api:uhost-api:disk_type|磁盘类型]]。默认值为当前的备份模式。 + * + * @return string|null + */ + public function getBackupMode(): string + { + return $this->get("BackupMode"); + } + + /** + * BackupMode: 磁盘备份方案。枚举值:\\ > NONE,无备份 \\ > DATAARK,数据方舟 \\> SNAPSHOT(SNAPSHOT模式目前仅在上海C支持),快照 \\ 当前磁盘支持的备份模式参考 [[api:uhost-api:disk_type|磁盘类型]]。默认值为当前的备份模式。 + * + * @param string $backupMode + */ + public function setBackupMode(string $backupMode) + { + $this->set("BackupMode", $backupMode); + } +} diff --git a/src/UHost/Apis/GetAttachedDiskUpgradePriceResponse.php b/src/UHost/Apis/GetAttachedDiskUpgradePriceResponse.php new file mode 100644 index 00000000..acf7494a --- /dev/null +++ b/src/UHost/Apis/GetAttachedDiskUpgradePriceResponse.php @@ -0,0 +1,44 @@ +get("Price"); + } + + /** + * Price: 升级差价。精度为小数点后2位。 + * + * @param float $price + */ + public function setPrice(float $price) + { + $this->set("Price", $price); + } +} diff --git a/src/UHost/Apis/GetUHostInstancePriceRequest.php b/src/UHost/Apis/GetUHostInstancePriceRequest.php new file mode 100644 index 00000000..4dc5cf5b --- /dev/null +++ b/src/UHost/Apis/GetUHostInstancePriceRequest.php @@ -0,0 +1,414 @@ + "GetUHostInstancePrice"]); + $this->markRequired("Region"); + $this->markRequired("CPU"); + $this->markRequired("Memory"); + $this->markRequired("Count"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * CPU: CPU核数。可选参数:1-64。可选范围参照控制台。默认值: 4 + * + * @return integer|null + */ + public function getCPU(): int + { + return $this->get("CPU"); + } + + /** + * CPU: CPU核数。可选参数:1-64。可选范围参照控制台。默认值: 4 + * + * @param int $cpu + */ + public function setCPU(int $cpu) + { + $this->set("CPU", $cpu); + } + + /** + * Memory: 内存大小。单位:MB。范围 :[1024, 262144],取值为1024的倍数(可选范围参照好控制台)。默认值:8192 + * + * @return integer|null + */ + public function getMemory(): int + { + return $this->get("Memory"); + } + + /** + * Memory: 内存大小。单位:MB。范围 :[1024, 262144],取值为1024的倍数(可选范围参照好控制台)。默认值:8192 + * + * @param int $memory + */ + public function setMemory(int $memory) + { + $this->set("Memory", $memory); + } + + /** + * Count: 购买台数,范围[1,5] + * + * @return integer|null + */ + public function getCount(): int + { + return $this->get("Count"); + } + + /** + * Count: 购买台数,范围[1,5] + * + * @param int $count + */ + public function setCount(int $count) + { + $this->set("Count", $count); + } + + /** + * Disks: + * + * @return GetUHostInstancePriceParamDisks[]|null + */ + public function getDisks(): array + { + $items = $this->get("Disks") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new GetUHostInstancePriceParamDisks($item)); + } + return $result; + } + + /** + * Disks: + * + * @param GetUHostInstancePriceParamDisks[] $disks + */ + public function setDisks(array $disks) + { + $result = []; + foreach ($disks as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * ImageId: 镜像Id,可通过 [DescribeImage](describe_image.html) 获取镜像ID, 如果镜像ID不传,系统盘大小必传 + * + * @return string|null + */ + public function getImageId(): string + { + return $this->get("ImageId"); + } + + /** + * ImageId: 镜像Id,可通过 [DescribeImage](describe_image.html) 获取镜像ID, 如果镜像ID不传,系统盘大小必传 + * + * @param string $imageId + */ + public function setImageId(string $imageId) + { + $this->set("ImageId", $imageId); + } + + /** + * GPU: GPU卡核心数。仅GPU机型支持此字段。 + * + * @return integer|null + */ + public function getGPU(): int + { + return $this->get("GPU"); + } + + /** + * GPU: GPU卡核心数。仅GPU机型支持此字段。 + * + * @param int $gpu + */ + public function setGPU(int $gpu) + { + $this->set("GPU", $gpu); + } + + /** + * ChargeType: 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时付费 // >Preemptive 抢占式实例 \\ 如果不传某个枚举值,默认返回年付、月付、时付的价格组合集。 + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时付费 // >Preemptive 抢占式实例 \\ 如果不传某个枚举值,默认返回年付、月付、时付的价格组合集。 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * NetCapability: 网络增强。枚举值:Normal,不开启; Super,开启网络增强1.0。 默认值为Normal。 + * + * @return string|null + */ + public function getNetCapability(): string + { + return $this->get("NetCapability"); + } + + /** + * NetCapability: 网络增强。枚举值:Normal,不开启; Super,开启网络增强1.0。 默认值为Normal。 + * + * @param string $netCapability + */ + public function setNetCapability(string $netCapability) + { + $this->set("NetCapability", $netCapability); + } + + /** + * UHostType: 【待废弃】云主机机型(V1版本概念)。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * + * @return string|null + */ + public function getUHostType(): string + { + return $this->get("UHostType"); + } + + /** + * UHostType: 【待废弃】云主机机型(V1版本概念)。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * + * @param string $uHostType + */ + public function setUHostType(string $uHostType) + { + $this->set("UHostType", $uHostType); + } + + /** + * MachineType: 云主机机型(V2版本概念)。枚举值["N", "C", "G", "O", "OS", "OPRO", "OMAX", "O.BM"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * + * @return string|null + */ + public function getMachineType(): string + { + return $this->get("MachineType"); + } + + /** + * MachineType: 云主机机型(V2版本概念)。枚举值["N", "C", "G", "O", "OS", "OPRO", "OMAX", "O.BM"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * + * @param string $machineType + */ + public function setMachineType(string $machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * GpuType: GPU类型,枚举值["K80", "P40", "V100", "T4","T4S","2080Ti","2080Ti-4C","1080Ti"] + * + * @return string|null + */ + public function getGpuType(): string + { + return $this->get("GpuType"); + } + + /** + * GpuType: GPU类型,枚举值["K80", "P40", "V100", "T4","T4S","2080Ti","2080Ti-4C","1080Ti"] + * + * @param string $gpuType + */ + public function setGpuType(string $gpuType) + { + $this->set("GpuType", $gpuType); + } + + /** + * Quantity: 购买时长。默认: 1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长。默认: 1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * CpuPlatform: 取值"Intel" "Amd",默认值“Intel” + * + * @return string|null + */ + public function getCpuPlatform(): string + { + return $this->get("CpuPlatform"); + } + + /** + * CpuPlatform: 取值"Intel" "Amd",默认值“Intel” + * + * @param string $cpuPlatform + */ + public function setCpuPlatform(string $cpuPlatform) + { + $this->set("CpuPlatform", $cpuPlatform); + } + + /** + * Volumes: + * + * @return GetUHostInstancePriceParamVolumes[]|null + */ + public function getVolumes(): array + { + $items = $this->get("Volumes") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new GetUHostInstancePriceParamVolumes($item)); + } + return $result; + } + + /** + * Volumes: + * + * @param GetUHostInstancePriceParamVolumes[] $volumes + */ + public function setVolumes(array $volumes) + { + $result = []; + foreach ($volumes as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * VirtualGpu: + * + * @return GetUHostInstancePriceParamVirtualGpu|null + */ + public function getVirtualGpu(): GetUHostInstancePriceParamVirtualGpu + { + return new GetUHostInstancePriceParamVirtualGpu($this->get("VirtualGpu")); + } + + /** + * VirtualGpu: + * + * @param GetUHostInstancePriceParamVirtualGpu $virtualGpu + */ + public function setVirtualGpu(GetUHostInstancePriceParamVirtualGpu $virtualGpu) + { + $this->set("VirtualGpu", $virtualGpu->getAll()); + } +} diff --git a/src/UHost/Apis/GetUHostInstancePriceResponse.php b/src/UHost/Apis/GetUHostInstancePriceResponse.php new file mode 100644 index 00000000..a7deabce --- /dev/null +++ b/src/UHost/Apis/GetUHostInstancePriceResponse.php @@ -0,0 +1,54 @@ +get("PriceSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UHostPriceSet($item)); + } + return $result; + } + + /** + * PriceSet: 价格列表 UHostPriceSet + * + * @param UHostPriceSet[] $priceSet + */ + public function setPriceSet(array $priceSet) + { + $result = []; + foreach ($priceSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UHost/Apis/GetUHostInstanceVncInfoRequest.php b/src/UHost/Apis/GetUHostInstanceVncInfoRequest.php new file mode 100644 index 00000000..6e9e2572 --- /dev/null +++ b/src/UHost/Apis/GetUHostInstanceVncInfoRequest.php @@ -0,0 +1,111 @@ + "GetUHostInstanceVncInfo"]); + $this->markRequired("Region"); + $this->markRequired("UHostId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UHostId: UHost实例ID 参见 [DescribeUHostInstance](./describe_uhost_instance.html) + * + * @return string|null + */ + public function getUHostId(): string + { + return $this->get("UHostId"); + } + + /** + * UHostId: UHost实例ID 参见 [DescribeUHostInstance](./describe_uhost_instance.html) + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } +} diff --git a/src/UHost/Apis/GetUHostInstanceVncInfoResponse.php b/src/UHost/Apis/GetUHostInstanceVncInfoResponse.php new file mode 100644 index 00000000..dcdcf9e6 --- /dev/null +++ b/src/UHost/Apis/GetUHostInstanceVncInfoResponse.php @@ -0,0 +1,104 @@ +get("UHostId"); + } + + /** + * UHostId: UHost实例ID + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } + + /** + * VncIP: Vnc登录IP + * + * @return string|null + */ + public function getVncIP(): string + { + return $this->get("VncIP"); + } + + /** + * VncIP: Vnc登录IP + * + * @param string $vncIP + */ + public function setVncIP(string $vncIP) + { + $this->set("VncIP", $vncIP); + } + + /** + * VncPort: Vnc登录端口 + * + * @return integer|null + */ + public function getVncPort(): int + { + return $this->get("VncPort"); + } + + /** + * VncPort: Vnc登录端口 + * + * @param int $vncPort + */ + public function setVncPort(int $vncPort) + { + $this->set("VncPort", $vncPort); + } + + /** + * VncPassword: Vnc 登录密码 + * + * @return string|null + */ + public function getVncPassword(): string + { + return $this->get("VncPassword"); + } + + /** + * VncPassword: Vnc 登录密码 + * + * @param string $vncPassword + */ + public function setVncPassword(string $vncPassword) + { + $this->set("VncPassword", $vncPassword); + } +} diff --git a/src/UHost/Apis/GetUHostUpgradePriceRequest.php b/src/UHost/Apis/GetUHostUpgradePriceRequest.php new file mode 100644 index 00000000..ac69a76f --- /dev/null +++ b/src/UHost/Apis/GetUHostUpgradePriceRequest.php @@ -0,0 +1,171 @@ + "GetUHostUpgradePrice"]); + $this->markRequired("Region"); + $this->markRequired("UHostId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UHostId: UHost实例ID。 参见 [DescribeUHostInstance](describe_uhost_instance.html)。 + * + * @return string|null + */ + public function getUHostId(): string + { + return $this->get("UHostId"); + } + + /** + * UHostId: UHost实例ID。 参见 [DescribeUHostInstance](describe_uhost_instance.html)。 + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } + + /** + * CPU: 虚拟CPU核数。可选参数:1-64(可选范围参考控制台)。默认值为当前实例的CPU核数。 + * + * @return integer|null + */ + public function getCPU(): int + { + return $this->get("CPU"); + } + + /** + * CPU: 虚拟CPU核数。可选参数:1-64(可选范围参考控制台)。默认值为当前实例的CPU核数。 + * + * @param int $cpu + */ + public function setCPU(int $cpu) + { + $this->set("CPU", $cpu); + } + + /** + * Memory: 内存大小。单位:MB。范围 :[1024, 262144],取值为1024的倍数(可选范围参考控制台)。默认值为当前实例的内存大小。 + * + * @return integer|null + */ + public function getMemory(): int + { + return $this->get("Memory"); + } + + /** + * Memory: 内存大小。单位:MB。范围 :[1024, 262144],取值为1024的倍数(可选范围参考控制台)。默认值为当前实例的内存大小。 + * + * @param int $memory + */ + public function setMemory(int $memory) + { + $this->set("Memory", $memory); + } + + /** + * NetCapValue: 网卡升降级(1,表示升级,2表示降级,0表示不变) + * + * @return integer|null + */ + public function getNetCapValue(): int + { + return $this->get("NetCapValue"); + } + + /** + * NetCapValue: 网卡升降级(1,表示升级,2表示降级,0表示不变) + * + * @param int $netCapValue + */ + public function setNetCapValue(int $netCapValue) + { + $this->set("NetCapValue", $netCapValue); + } +} diff --git a/src/UHost/Apis/GetUHostUpgradePriceResponse.php b/src/UHost/Apis/GetUHostUpgradePriceResponse.php new file mode 100644 index 00000000..0cbcddfb --- /dev/null +++ b/src/UHost/Apis/GetUHostUpgradePriceResponse.php @@ -0,0 +1,64 @@ +get("Price"); + } + + /** + * Price: 规格调整差价。精确到小数点后2位。 + * + * @param float $price + */ + public function setPrice(float $price) + { + $this->set("Price", $price); + } + + /** + * OriginalPrice: 限时优惠的折前原价 + * + * @return float|null + */ + public function getOriginalPrice(): float + { + return $this->get("OriginalPrice"); + } + + /** + * OriginalPrice: 限时优惠的折前原价 + * + * @param float $originalPrice + */ + public function setOriginalPrice(float $originalPrice) + { + $this->set("OriginalPrice", $originalPrice); + } +} diff --git a/src/UHost/Apis/ImportCustomImageRequest.php b/src/UHost/Apis/ImportCustomImageRequest.php new file mode 100644 index 00000000..79523575 --- /dev/null +++ b/src/UHost/Apis/ImportCustomImageRequest.php @@ -0,0 +1,216 @@ + "ImportCustomImage"]); + $this->markRequired("Region"); + $this->markRequired("ImageName"); + $this->markRequired("UFileUrl"); + $this->markRequired("OsType"); + $this->markRequired("OsName"); + $this->markRequired("Format"); + $this->markRequired("Auth"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ImageName: 镜像名称 + * + * @return string|null + */ + public function getImageName(): string + { + return $this->get("ImageName"); + } + + /** + * ImageName: 镜像名称 + * + * @param string $imageName + */ + public function setImageName(string $imageName) + { + $this->set("ImageName", $imageName); + } + + /** + * UFileUrl: UFile私有空间地址 + * + * @return string|null + */ + public function getUFileUrl(): string + { + return $this->get("UFileUrl"); + } + + /** + * UFileUrl: UFile私有空间地址 + * + * @param string $uFileUrl + */ + public function setUFileUrl(string $uFileUrl) + { + $this->set("UFileUrl", $uFileUrl); + } + + /** + * OsType: 操作系统平台,比如CentOS、Ubuntu、Windows、RedHat等,请参考控制台的镜像版本;若导入控制台上没有的操作系统,参数为Other + * + * @return string|null + */ + public function getOsType(): string + { + return $this->get("OsType"); + } + + /** + * OsType: 操作系统平台,比如CentOS、Ubuntu、Windows、RedHat等,请参考控制台的镜像版本;若导入控制台上没有的操作系统,参数为Other + * + * @param string $osType + */ + public function setOsType(string $osType) + { + $this->set("OsType", $osType); + } + + /** + * OsName: 操作系统详细版本,请参考控制台的镜像版本;OsType为Other时,输入参数为Other + * + * @return string|null + */ + public function getOsName(): string + { + return $this->get("OsName"); + } + + /** + * OsName: 操作系统详细版本,请参考控制台的镜像版本;OsType为Other时,输入参数为Other + * + * @param string $osName + */ + public function setOsName(string $osName) + { + $this->set("OsName", $osName); + } + + /** + * Format: 镜像格式,可选RAW、VHD、VMDK、qcow2 + * + * @return string|null + */ + public function getFormat(): string + { + return $this->get("Format"); + } + + /** + * Format: 镜像格式,可选RAW、VHD、VMDK、qcow2 + * + * @param string $format + */ + public function setFormat(string $format) + { + $this->set("Format", $format); + } + + /** + * Auth: 是否授权。必须填true + * + * @return boolean|null + */ + public function getAuth(): bool + { + return $this->get("Auth"); + } + + /** + * Auth: 是否授权。必须填true + * + * @param boolean $auth + */ + public function setAuth(bool $auth) + { + $this->set("Auth", $auth); + } + + /** + * ImageDescription: 镜像描述 + * + * @return string|null + */ + public function getImageDescription(): string + { + return $this->get("ImageDescription"); + } + + /** + * ImageDescription: 镜像描述 + * + * @param string $imageDescription + */ + public function setImageDescription(string $imageDescription) + { + $this->set("ImageDescription", $imageDescription); + } +} diff --git a/src/UHost/Apis/ImportCustomImageResponse.php b/src/UHost/Apis/ImportCustomImageResponse.php new file mode 100644 index 00000000..2f764fdc --- /dev/null +++ b/src/UHost/Apis/ImportCustomImageResponse.php @@ -0,0 +1,44 @@ +get("ImageId"); + } + + /** + * ImageId: 镜像Id + * + * @param string $imageId + */ + public function setImageId(string $imageId) + { + $this->set("ImageId", $imageId); + } +} diff --git a/src/UHost/Apis/ImportUHostKeyPairsRequest.php b/src/UHost/Apis/ImportUHostKeyPairsRequest.php new file mode 100644 index 00000000..31919cc6 --- /dev/null +++ b/src/UHost/Apis/ImportUHostKeyPairsRequest.php @@ -0,0 +1,131 @@ + "ImportUHostKeyPairs"]); + $this->markRequired("KeyPairName"); + $this->markRequired("PublicKeyBody"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * KeyPairName: 密钥对名称。由字母,数字,符号组成,长度为1-63位。 + * + * @return string|null + */ + public function getKeyPairName(): string + { + return $this->get("KeyPairName"); + } + + /** + * KeyPairName: 密钥对名称。由字母,数字,符号组成,长度为1-63位。 + * + * @param string $keyPairName + */ + public function setKeyPairName(string $keyPairName) + { + $this->set("KeyPairName", $keyPairName); + } + + /** + * PublicKeyBody: 密钥对的公钥内容。 + * + * @return string|null + */ + public function getPublicKeyBody(): string + { + return $this->get("PublicKeyBody"); + } + + /** + * PublicKeyBody: 密钥对的公钥内容。 + * + * @param string $publicKeyBody + */ + public function setPublicKeyBody(string $publicKeyBody) + { + $this->set("PublicKeyBody", $publicKeyBody); + } +} diff --git a/src/UHost/Apis/ImportUHostKeyPairsResponse.php b/src/UHost/Apis/ImportUHostKeyPairsResponse.php new file mode 100644 index 00000000..174deebb --- /dev/null +++ b/src/UHost/Apis/ImportUHostKeyPairsResponse.php @@ -0,0 +1,84 @@ +get("KeyPairName"); + } + + /** + * KeyPairName: 密钥对名称 + * + * @param string $keyPairName + */ + public function setKeyPairName(string $keyPairName) + { + $this->set("KeyPairName", $keyPairName); + } + + /** + * KeyPairId: 密钥对标识 + * + * @return string|null + */ + public function getKeyPairId(): string + { + return $this->get("KeyPairId"); + } + + /** + * KeyPairId: 密钥对标识 + * + * @param string $keyPairId + */ + public function setKeyPairId(string $keyPairId) + { + $this->set("KeyPairId", $keyPairId); + } + + /** + * KeyPairFingerPrint: 密钥对指纹。根据RFC4716定义的公钥指纹格式,采用MD5信息摘要算法。算法处理的具体信息格式:`ProjectIdKeyPairId|PublicKeyBody`。 + * + * @return string|null + */ + public function getKeyPairFingerPrint(): string + { + return $this->get("KeyPairFingerPrint"); + } + + /** + * KeyPairFingerPrint: 密钥对指纹。根据RFC4716定义的公钥指纹格式,采用MD5信息摘要算法。算法处理的具体信息格式:`ProjectIdKeyPairId|PublicKeyBody`。 + * + * @param string $keyPairFingerPrint + */ + public function setKeyPairFingerPrint(string $keyPairFingerPrint) + { + $this->set("KeyPairFingerPrint", $keyPairFingerPrint); + } +} diff --git a/src/UHost/Apis/LeaveIsolationGroupRequest.php b/src/UHost/Apis/LeaveIsolationGroupRequest.php new file mode 100644 index 00000000..f8ed942f --- /dev/null +++ b/src/UHost/Apis/LeaveIsolationGroupRequest.php @@ -0,0 +1,132 @@ + "LeaveIsolationGroup"]); + $this->markRequired("Region"); + $this->markRequired("GroupId"); + $this->markRequired("UHostId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区信息 + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区信息 + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目id + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目id + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * GroupId: 硬件隔离组id + * + * @return string|null + */ + public function getGroupId(): string + { + return $this->get("GroupId"); + } + + /** + * GroupId: 硬件隔离组id + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } + + /** + * UHostId: 主机id + * + * @return string|null + */ + public function getUHostId(): string + { + return $this->get("UHostId"); + } + + /** + * UHostId: 主机id + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } +} diff --git a/src/UHost/Apis/LeaveIsolationGroupResponse.php b/src/UHost/Apis/LeaveIsolationGroupResponse.php new file mode 100644 index 00000000..f5e6dc67 --- /dev/null +++ b/src/UHost/Apis/LeaveIsolationGroupResponse.php @@ -0,0 +1,44 @@ +get("UHostId"); + } + + /** + * UHostId: 主机id + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } +} diff --git a/src/UHost/Apis/ModifyUHostIPRequest.php b/src/UHost/Apis/ModifyUHostIPRequest.php new file mode 100644 index 00000000..b4bb3dd6 --- /dev/null +++ b/src/UHost/Apis/ModifyUHostIPRequest.php @@ -0,0 +1,153 @@ + "ModifyUHostIP"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("PresentIpAddress"); + $this->markRequired("UHostId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写时为默认项目。请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写时为默认项目。请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * PresentIpAddress: 需要修改为的 IP 地址。新的IP地址和旧IP地址必须属于统一子网,且和主机内部的配置文件一致。 + * + * @return string|null + */ + public function getPresentIpAddress(): string + { + return $this->get("PresentIpAddress"); + } + + /** + * PresentIpAddress: 需要修改为的 IP 地址。新的IP地址和旧IP地址必须属于统一子网,且和主机内部的配置文件一致。 + * + * @param string $presentIpAddress + */ + public function setPresentIpAddress(string $presentIpAddress) + { + $this->set("PresentIpAddress", $presentIpAddress); + } + + /** + * UHostId: 指定云主机 ID。 + * + * @return string|null + */ + public function getUHostId(): string + { + return $this->get("UHostId"); + } + + /** + * UHostId: 指定云主机 ID。 + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } + + /** + * PreviousIpAddress: 所需修改的原 IP 地址 ,当云主机只有一个IP地址时,此参数不必填写。 + * + * @return string|null + */ + public function getPreviousIpAddress(): string + { + return $this->get("PreviousIpAddress"); + } + + /** + * PreviousIpAddress: 所需修改的原 IP 地址 ,当云主机只有一个IP地址时,此参数不必填写。 + * + * @param string $previousIpAddress + */ + public function setPreviousIpAddress(string $previousIpAddress) + { + $this->set("PreviousIpAddress", $previousIpAddress); + } +} diff --git a/src/UHost/Apis/ModifyUHostIPResponse.php b/src/UHost/Apis/ModifyUHostIPResponse.php new file mode 100644 index 00000000..60b2744c --- /dev/null +++ b/src/UHost/Apis/ModifyUHostIPResponse.php @@ -0,0 +1,44 @@ +get("UHostId"); + } + + /** + * UHostId: 目标云主机 ID + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } +} diff --git a/src/UHost/Apis/ModifyUHostInstanceNameRequest.php b/src/UHost/Apis/ModifyUHostInstanceNameRequest.php new file mode 100644 index 00000000..0b7d188e --- /dev/null +++ b/src/UHost/Apis/ModifyUHostInstanceNameRequest.php @@ -0,0 +1,131 @@ + "ModifyUHostInstanceName"]); + $this->markRequired("Region"); + $this->markRequired("UHostId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UHostId: UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + * + * @return string|null + */ + public function getUHostId(): string + { + return $this->get("UHostId"); + } + + /** + * UHostId: UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } + + /** + * Name: UHost实例名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: UHost实例名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } +} diff --git a/src/UHost/Apis/ModifyUHostInstanceNameResponse.php b/src/UHost/Apis/ModifyUHostInstanceNameResponse.php new file mode 100644 index 00000000..b4f2dce8 --- /dev/null +++ b/src/UHost/Apis/ModifyUHostInstanceNameResponse.php @@ -0,0 +1,44 @@ +get("UHostId"); + } + + /** + * UHostId: UHost实例ID + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } +} diff --git a/src/UHost/Apis/ModifyUHostInstanceRemarkRequest.php b/src/UHost/Apis/ModifyUHostInstanceRemarkRequest.php new file mode 100644 index 00000000..f431575c --- /dev/null +++ b/src/UHost/Apis/ModifyUHostInstanceRemarkRequest.php @@ -0,0 +1,131 @@ + "ModifyUHostInstanceRemark"]); + $this->markRequired("Region"); + $this->markRequired("UHostId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UHostId: UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + * + * @return string|null + */ + public function getUHostId(): string + { + return $this->get("UHostId"); + } + + /** + * UHostId: UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } +} diff --git a/src/UHost/Apis/ModifyUHostInstanceRemarkResponse.php b/src/UHost/Apis/ModifyUHostInstanceRemarkResponse.php new file mode 100644 index 00000000..dd124188 --- /dev/null +++ b/src/UHost/Apis/ModifyUHostInstanceRemarkResponse.php @@ -0,0 +1,44 @@ +get("UHostId"); + } + + /** + * UHostId: UHost实例ID + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } +} diff --git a/src/UHost/Apis/ModifyUHostInstanceTagRequest.php b/src/UHost/Apis/ModifyUHostInstanceTagRequest.php new file mode 100644 index 00000000..01f8f066 --- /dev/null +++ b/src/UHost/Apis/ModifyUHostInstanceTagRequest.php @@ -0,0 +1,131 @@ + "ModifyUHostInstanceTag"]); + $this->markRequired("Region"); + $this->markRequired("UHostId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UHostId: UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + * + * @return string|null + */ + public function getUHostId(): string + { + return $this->get("UHostId"); + } + + /** + * UHostId: UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } + + /** + * Tag: 业务组名称 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组名称 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } +} diff --git a/src/UHost/Apis/ModifyUHostInstanceTagResponse.php b/src/UHost/Apis/ModifyUHostInstanceTagResponse.php new file mode 100644 index 00000000..488c3ecb --- /dev/null +++ b/src/UHost/Apis/ModifyUHostInstanceTagResponse.php @@ -0,0 +1,44 @@ +get("UHostId"); + } + + /** + * UHostId: UHost实例ID + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } +} diff --git a/src/UHost/Apis/PoweroffUHostInstanceRequest.php b/src/UHost/Apis/PoweroffUHostInstanceRequest.php new file mode 100644 index 00000000..80806d68 --- /dev/null +++ b/src/UHost/Apis/PoweroffUHostInstanceRequest.php @@ -0,0 +1,111 @@ + "PoweroffUHostInstance"]); + $this->markRequired("Region"); + $this->markRequired("UHostId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UHostId: UHost实例ID 参见 [DescribeUHostInstance](./describe_uhost_instance.html) + * + * @return string|null + */ + public function getUHostId(): string + { + return $this->get("UHostId"); + } + + /** + * UHostId: UHost实例ID 参见 [DescribeUHostInstance](./describe_uhost_instance.html) + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } +} diff --git a/src/UHost/Apis/PoweroffUHostInstanceResponse.php b/src/UHost/Apis/PoweroffUHostInstanceResponse.php new file mode 100644 index 00000000..728e128a --- /dev/null +++ b/src/UHost/Apis/PoweroffUHostInstanceResponse.php @@ -0,0 +1,44 @@ +get("UHostId"); + } + + /** + * UHostId: UHost的实例ID + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } +} diff --git a/src/UHost/Apis/RebootUHostInstanceRequest.php b/src/UHost/Apis/RebootUHostInstanceRequest.php new file mode 100644 index 00000000..76d2d627 --- /dev/null +++ b/src/UHost/Apis/RebootUHostInstanceRequest.php @@ -0,0 +1,131 @@ + "RebootUHostInstance"]); + $this->markRequired("Region"); + $this->markRequired("UHostId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UHostId: UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + * + * @return string|null + */ + public function getUHostId(): string + { + return $this->get("UHostId"); + } + + /** + * UHostId: UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } + + /** + * DiskPassword: 加密盘密码 + * + * @return string|null + */ + public function getDiskPassword(): string + { + return $this->get("DiskPassword"); + } + + /** + * DiskPassword: 加密盘密码 + * + * @param string $diskPassword + */ + public function setDiskPassword(string $diskPassword) + { + $this->set("DiskPassword", $diskPassword); + } +} diff --git a/src/UHost/Apis/RebootUHostInstanceResponse.php b/src/UHost/Apis/RebootUHostInstanceResponse.php new file mode 100644 index 00000000..50040145 --- /dev/null +++ b/src/UHost/Apis/RebootUHostInstanceResponse.php @@ -0,0 +1,44 @@ +get("UHostId"); + } + + /** + * UHostId: UHost实例ID + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } +} diff --git a/src/UHost/Apis/ReinstallUHostInstanceRequest.php b/src/UHost/Apis/ReinstallUHostInstanceRequest.php new file mode 100644 index 00000000..b81e96ef --- /dev/null +++ b/src/UHost/Apis/ReinstallUHostInstanceRequest.php @@ -0,0 +1,271 @@ + "ReinstallUHostInstance"]); + $this->markRequired("Region"); + $this->markRequired("UHostId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UHostId: UHost实例资源ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + * + * @return string|null + */ + public function getUHostId(): string + { + return $this->get("UHostId"); + } + + /** + * UHostId: UHost实例资源ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } + + /** + * Password: 如果重装UHost实例时LoginMode为Password,则必须填写,如果LoginMode为KeyPair,不需要填写 (密码格式使用BASE64编码;举例如下:# echo -n Password1 | base64UGFzc3dvcmQx。) + * + * @return string|null + */ + public function getPassword(): string + { + return $this->get("Password"); + } + + /** + * Password: 如果重装UHost实例时LoginMode为Password,则必须填写,如果LoginMode为KeyPair,不需要填写 (密码格式使用BASE64编码;举例如下:# echo -n Password1 | base64UGFzc3dvcmQx。) + * + * @param string $password + */ + public function setPassword(string $password) + { + $this->set("Password", $password); + } + + /** + * ImageId: 镜像Id,默认使用原镜像 参见 [DescribeImage](describe_image.html) + * + * @return string|null + */ + public function getImageId(): string + { + return $this->get("ImageId"); + } + + /** + * ImageId: 镜像Id,默认使用原镜像 参见 [DescribeImage](describe_image.html) + * + * @param string $imageId + */ + public function setImageId(string $imageId) + { + $this->set("ImageId", $imageId); + } + + /** + * ReserveDisk: 是否保留数据盘,保留:Yes,不报留:No, 默认:Yes;如果是从Windows重装为Linux或反之,则无法保留数据盘(该参数目前仅对本地数据盘起作用) + * + * @return string|null + */ + public function getReserveDisk(): string + { + return $this->get("ReserveDisk"); + } + + /** + * ReserveDisk: 是否保留数据盘,保留:Yes,不报留:No, 默认:Yes;如果是从Windows重装为Linux或反之,则无法保留数据盘(该参数目前仅对本地数据盘起作用) + * + * @param string $reserveDisk + */ + public function setReserveDisk(string $reserveDisk) + { + $this->set("ReserveDisk", $reserveDisk); + } + + /** + * BootDiskSpace: 系统盘大小。 单位:GB, 范围[20,100], 步长:10 + * + * @return integer|null + */ + public function getBootDiskSpace(): int + { + return $this->get("BootDiskSpace"); + } + + /** + * BootDiskSpace: 系统盘大小。 单位:GB, 范围[20,100], 步长:10 + * + * @param int $bootDiskSpace + */ + public function setBootDiskSpace(int $bootDiskSpace) + { + $this->set("BootDiskSpace", $bootDiskSpace); + } + + /** + * UserData: cloudinit初始化使用。注意:1、总数据量大小不超多16K 2、使用base64编码 + * + * @return string|null + */ + public function getUserData(): string + { + return $this->get("UserData"); + } + + /** + * UserData: cloudinit初始化使用。注意:1、总数据量大小不超多16K 2、使用base64编码 + * + * @param string $userData + */ + public function setUserData(string $userData) + { + $this->set("UserData", $userData); + } + + /** + * AutoDataDiskInit: 数据盘是否需要自动分区挂载。当镜像支持Cloud-init Feature时可填写此字段。取值“On”(默认值), “Off” + * + * @return string|null + */ + public function getAutoDataDiskInit(): string + { + return $this->get("AutoDataDiskInit"); + } + + /** + * AutoDataDiskInit: 数据盘是否需要自动分区挂载。当镜像支持Cloud-init Feature时可填写此字段。取值“On”(默认值), “Off” + * + * @param string $autoDataDiskInit + */ + public function setAutoDataDiskInit(string $autoDataDiskInit) + { + $this->set("AutoDataDiskInit", $autoDataDiskInit); + } + + /** + * LoginMode: 主机登陆模式。密码(默认选项): Password,密钥 KeyPair。 + * + * @return string|null + */ + public function getLoginMode(): string + { + return $this->get("LoginMode"); + } + + /** + * LoginMode: 主机登陆模式。密码(默认选项): Password,密钥 KeyPair。 + * + * @param string $loginMode + */ + public function setLoginMode(string $loginMode) + { + $this->set("LoginMode", $loginMode); + } + + /** + * KeyPairId: KeypairId 密钥对ID,LoginMode为KeyPair时此项必须。 + * + * @return string|null + */ + public function getKeyPairId(): string + { + return $this->get("KeyPairId"); + } + + /** + * KeyPairId: KeypairId 密钥对ID,LoginMode为KeyPair时此项必须。 + * + * @param string $keyPairId + */ + public function setKeyPairId(string $keyPairId) + { + $this->set("KeyPairId", $keyPairId); + } +} diff --git a/src/UHost/Apis/ReinstallUHostInstanceResponse.php b/src/UHost/Apis/ReinstallUHostInstanceResponse.php new file mode 100644 index 00000000..fe6bcbc0 --- /dev/null +++ b/src/UHost/Apis/ReinstallUHostInstanceResponse.php @@ -0,0 +1,44 @@ +get("UHostId"); + } + + /** + * UHostId: UHost实例资源ID + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } +} diff --git a/src/UHost/Apis/ResetUHostInstancePasswordRequest.php b/src/UHost/Apis/ResetUHostInstancePasswordRequest.php new file mode 100644 index 00000000..00a54600 --- /dev/null +++ b/src/UHost/Apis/ResetUHostInstancePasswordRequest.php @@ -0,0 +1,132 @@ + "ResetUHostInstancePassword"]); + $this->markRequired("Region"); + $this->markRequired("UHostId"); + $this->markRequired("Password"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UHostId: UHost实例ID + * + * @return string|null + */ + public function getUHostId(): string + { + return $this->get("UHostId"); + } + + /** + * UHostId: UHost实例ID + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } + + /** + * Password: UHost新密码(密码格式使用BASE64编码) + * + * @return string|null + */ + public function getPassword(): string + { + return $this->get("Password"); + } + + /** + * Password: UHost新密码(密码格式使用BASE64编码) + * + * @param string $password + */ + public function setPassword(string $password) + { + $this->set("Password", $password); + } +} diff --git a/src/UHost/Apis/ResetUHostInstancePasswordResponse.php b/src/UHost/Apis/ResetUHostInstancePasswordResponse.php new file mode 100644 index 00000000..2652159f --- /dev/null +++ b/src/UHost/Apis/ResetUHostInstancePasswordResponse.php @@ -0,0 +1,44 @@ +get("UHostId"); + } + + /** + * UHostId: UHost实例ID + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } +} diff --git a/src/UHost/Apis/ResizeAttachedDiskRequest.php b/src/UHost/Apis/ResizeAttachedDiskRequest.php new file mode 100644 index 00000000..2c426cf7 --- /dev/null +++ b/src/UHost/Apis/ResizeAttachedDiskRequest.php @@ -0,0 +1,174 @@ + "ResizeAttachedDisk"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("UHostId"); + $this->markRequired("DiskSpace"); + $this->markRequired("DiskId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UHostId: UHost实例ID。 参见 [DescribeUHostInstance](describe_uhost_instance.html)。 + * + * @return string|null + */ + public function getUHostId(): string + { + return $this->get("UHostId"); + } + + /** + * UHostId: UHost实例ID。 参见 [DescribeUHostInstance](describe_uhost_instance.html)。 + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } + + /** + * DiskSpace: 磁盘大小,单位GB,步长为10。取值范围需大于当前磁盘大小,最大值请参考[[api:uhost-api:disk_type|磁盘类型]]。 + * + * @return integer|null + */ + public function getDiskSpace(): int + { + return $this->get("DiskSpace"); + } + + /** + * DiskSpace: 磁盘大小,单位GB,步长为10。取值范围需大于当前磁盘大小,最大值请参考[[api:uhost-api:disk_type|磁盘类型]]。 + * + * @param int $diskSpace + */ + public function setDiskSpace(int $diskSpace) + { + $this->set("DiskSpace", $diskSpace); + } + + /** + * DiskId: 磁盘ID。参见 [DescribeUHostInstance](describe_uhost_instance.html)返回值中的DiskSet。 + * + * @return string|null + */ + public function getDiskId(): string + { + return $this->get("DiskId"); + } + + /** + * DiskId: 磁盘ID。参见 [DescribeUHostInstance](describe_uhost_instance.html)返回值中的DiskSet。 + * + * @param string $diskId + */ + public function setDiskId(string $diskId) + { + $this->set("DiskId", $diskId); + } + + /** + * DryRun: 用于测试磁盘是否支持在线扩容。DryRun=true,不会执行实际操作,只会返回操作的预期结果。DryRun = false ,正常执行扩容操作。 + * + * @return boolean|null + */ + public function getDryRun(): bool + { + return $this->get("DryRun"); + } + + /** + * DryRun: 用于测试磁盘是否支持在线扩容。DryRun=true,不会执行实际操作,只会返回操作的预期结果。DryRun = false ,正常执行扩容操作。 + * + * @param boolean $dryRun + */ + public function setDryRun(bool $dryRun) + { + $this->set("DryRun", $dryRun); + } +} diff --git a/src/UHost/Apis/ResizeAttachedDiskResponse.php b/src/UHost/Apis/ResizeAttachedDiskResponse.php new file mode 100644 index 00000000..e0026976 --- /dev/null +++ b/src/UHost/Apis/ResizeAttachedDiskResponse.php @@ -0,0 +1,64 @@ +get("DiskId"); + } + + /** + * DiskId: 改配成功的磁盘id + * + * @param string $diskId + */ + public function setDiskId(string $diskId) + { + $this->set("DiskId", $diskId); + } + + /** + * NeedRestart: 扩容后的状态。NeedRestart = true,必须关闭后启动实例才能使用扩容的磁盘空间。NeedRestart = false,磁盘扩容后无需重启操作。 + * + * @return boolean|null + */ + public function getNeedRestart(): bool + { + return $this->get("NeedRestart"); + } + + /** + * NeedRestart: 扩容后的状态。NeedRestart = true,必须关闭后启动实例才能使用扩容的磁盘空间。NeedRestart = false,磁盘扩容后无需重启操作。 + * + * @param boolean $needRestart + */ + public function setNeedRestart(bool $needRestart) + { + $this->set("NeedRestart", $needRestart); + } +} diff --git a/src/UHost/Apis/ResizeUHostInstanceRequest.php b/src/UHost/Apis/ResizeUHostInstanceRequest.php new file mode 100644 index 00000000..be2baf5b --- /dev/null +++ b/src/UHost/Apis/ResizeUHostInstanceRequest.php @@ -0,0 +1,171 @@ + "ResizeUHostInstance"]); + $this->markRequired("Region"); + $this->markRequired("UHostId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UHostId: UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + * + * @return string|null + */ + public function getUHostId(): string + { + return $this->get("UHostId"); + } + + /** + * UHostId: UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } + + /** + * CPU: 虚拟CPU核数。可选参数:1-240(可选范围与UHostType相关)。默认值为当前实例的CPU核数 + * + * @return integer|null + */ + public function getCPU(): int + { + return $this->get("CPU"); + } + + /** + * CPU: 虚拟CPU核数。可选参数:1-240(可选范围与UHostType相关)。默认值为当前实例的CPU核数 + * + * @param int $cpu + */ + public function setCPU(int $cpu) + { + $this->set("CPU", $cpu); + } + + /** + * Memory: 内存大小。单位:MB。范围 :[1024, 1966080],取值为1024的倍数(可选范围与UHostType相关)。默认值为当前实例的内存大小。 + * + * @return integer|null + */ + public function getMemory(): int + { + return $this->get("Memory"); + } + + /** + * Memory: 内存大小。单位:MB。范围 :[1024, 1966080],取值为1024的倍数(可选范围与UHostType相关)。默认值为当前实例的内存大小。 + * + * @param int $memory + */ + public function setMemory(int $memory) + { + $this->set("Memory", $memory); + } + + /** + * NetCapValue: 网卡升降级(1,表示升级,2表示降级,0表示不变) + * + * @return integer|null + */ + public function getNetCapValue(): int + { + return $this->get("NetCapValue"); + } + + /** + * NetCapValue: 网卡升降级(1,表示升级,2表示降级,0表示不变) + * + * @param int $netCapValue + */ + public function setNetCapValue(int $netCapValue) + { + $this->set("NetCapValue", $netCapValue); + } +} diff --git a/src/UHost/Apis/ResizeUHostInstanceResponse.php b/src/UHost/Apis/ResizeUHostInstanceResponse.php new file mode 100644 index 00000000..d46df6a6 --- /dev/null +++ b/src/UHost/Apis/ResizeUHostInstanceResponse.php @@ -0,0 +1,44 @@ +get("UHostId"); + } + + /** + * UHostId: UHost实例ID + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } +} diff --git a/src/UHost/Apis/StartUHostInstanceRequest.php b/src/UHost/Apis/StartUHostInstanceRequest.php new file mode 100644 index 00000000..5092774c --- /dev/null +++ b/src/UHost/Apis/StartUHostInstanceRequest.php @@ -0,0 +1,131 @@ + "StartUHostInstance"]); + $this->markRequired("Region"); + $this->markRequired("UHostId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UHostId: UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + * + * @return string|null + */ + public function getUHostId(): string + { + return $this->get("UHostId"); + } + + /** + * UHostId: UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } + + /** + * DiskPassword: 加密盘密码 + * + * @return string|null + */ + public function getDiskPassword(): string + { + return $this->get("DiskPassword"); + } + + /** + * DiskPassword: 加密盘密码 + * + * @param string $diskPassword + */ + public function setDiskPassword(string $diskPassword) + { + $this->set("DiskPassword", $diskPassword); + } +} diff --git a/src/UHost/Apis/StartUHostInstanceResponse.php b/src/UHost/Apis/StartUHostInstanceResponse.php new file mode 100644 index 00000000..954da3b8 --- /dev/null +++ b/src/UHost/Apis/StartUHostInstanceResponse.php @@ -0,0 +1,44 @@ +get("UHostId"); + } + + /** + * UHostId: UHost实例ID + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } +} diff --git a/src/UHost/Apis/StopUHostInstanceRequest.php b/src/UHost/Apis/StopUHostInstanceRequest.php new file mode 100644 index 00000000..dc83c766 --- /dev/null +++ b/src/UHost/Apis/StopUHostInstanceRequest.php @@ -0,0 +1,111 @@ + "StopUHostInstance"]); + $this->markRequired("Region"); + $this->markRequired("UHostId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UHostId: UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + * + * @return string|null + */ + public function getUHostId(): string + { + return $this->get("UHostId"); + } + + /** + * UHostId: UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } +} diff --git a/src/UHost/Apis/StopUHostInstanceResponse.php b/src/UHost/Apis/StopUHostInstanceResponse.php new file mode 100644 index 00000000..d02e1e50 --- /dev/null +++ b/src/UHost/Apis/StopUHostInstanceResponse.php @@ -0,0 +1,44 @@ +get("UHostId"); + } + + /** + * UHostId: UHost实例ID + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } +} diff --git a/src/UHost/Apis/TerminateCustomImageRequest.php b/src/UHost/Apis/TerminateCustomImageRequest.php new file mode 100644 index 00000000..59b1449e --- /dev/null +++ b/src/UHost/Apis/TerminateCustomImageRequest.php @@ -0,0 +1,91 @@ + "TerminateCustomImage"]); + $this->markRequired("Region"); + $this->markRequired("ImageId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ImageId: 自制镜像ID 参见 [DescribeImage](describe_image.html) + * + * @return string|null + */ + public function getImageId(): string + { + return $this->get("ImageId"); + } + + /** + * ImageId: 自制镜像ID 参见 [DescribeImage](describe_image.html) + * + * @param string $imageId + */ + public function setImageId(string $imageId) + { + $this->set("ImageId", $imageId); + } +} diff --git a/src/UHost/Apis/TerminateCustomImageResponse.php b/src/UHost/Apis/TerminateCustomImageResponse.php new file mode 100644 index 00000000..9d79c655 --- /dev/null +++ b/src/UHost/Apis/TerminateCustomImageResponse.php @@ -0,0 +1,44 @@ +get("ImageId"); + } + + /** + * ImageId: 自制镜像Id + * + * @param string $imageId + */ + public function setImageId(string $imageId) + { + $this->set("ImageId", $imageId); + } +} diff --git a/src/UHost/Apis/TerminateUHostInstanceRequest.php b/src/UHost/Apis/TerminateUHostInstanceRequest.php new file mode 100644 index 00000000..89a8765f --- /dev/null +++ b/src/UHost/Apis/TerminateUHostInstanceRequest.php @@ -0,0 +1,151 @@ + "TerminateUHostInstance"]); + $this->markRequired("Region"); + $this->markRequired("UHostId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * UHostId: UHost资源Id 参见 [DescribeUHostInstance](describe_uhost_instance.html) + * + * @return string|null + */ + public function getUHostId(): string + { + return $this->get("UHostId"); + } + + /** + * UHostId: UHost资源Id 参见 [DescribeUHostInstance](describe_uhost_instance.html) + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } + + /** + * ReleaseEIP: 删除主机时是否释放绑定的EIP。默认为false。 + * + * @return boolean|null + */ + public function getReleaseEIP(): bool + { + return $this->get("ReleaseEIP"); + } + + /** + * ReleaseEIP: 删除主机时是否释放绑定的EIP。默认为false。 + * + * @param boolean $releaseEIP + */ + public function setReleaseEIP(bool $releaseEIP) + { + $this->set("ReleaseEIP", $releaseEIP); + } + + /** + * ReleaseUDisk: 删除主机时是否同时删除挂载的数据盘。默认为false。 + * + * @return boolean|null + */ + public function getReleaseUDisk(): bool + { + return $this->get("ReleaseUDisk"); + } + + /** + * ReleaseUDisk: 删除主机时是否同时删除挂载的数据盘。默认为false。 + * + * @param boolean $releaseUDisk + */ + public function setReleaseUDisk(bool $releaseUDisk) + { + $this->set("ReleaseUDisk", $releaseUDisk); + } +} diff --git a/src/UHost/Apis/TerminateUHostInstanceResponse.php b/src/UHost/Apis/TerminateUHostInstanceResponse.php new file mode 100644 index 00000000..245a9e18 --- /dev/null +++ b/src/UHost/Apis/TerminateUHostInstanceResponse.php @@ -0,0 +1,64 @@ +get("InRecycle"); + } + + /** + * InRecycle: 用于判断主机删除时是否进入回收站。放入回收站:"Yes", 彻底删除:“No”。 + * + * @param string $inRecycle + */ + public function setInRecycle(string $inRecycle) + { + $this->set("InRecycle", $inRecycle); + } + + /** + * UHostId: UHost 实例 Id + * + * @return string|null + */ + public function getUHostId(): string + { + return $this->get("UHostId"); + } + + /** + * UHostId: UHost 实例 Id + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } +} diff --git a/src/UHost/Apis/UpgradeToArkUHostInstanceRequest.php b/src/UHost/Apis/UpgradeToArkUHostInstanceRequest.php new file mode 100644 index 00000000..fd1b974e --- /dev/null +++ b/src/UHost/Apis/UpgradeToArkUHostInstanceRequest.php @@ -0,0 +1,112 @@ + "UpgradeToArkUHostInstance"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("UHostIds"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * UHostIds: UHost主机的资源ID,例如UHostIds.0代表希望升级的主机1,UHostIds.1代表主机2。 + * + * @return string[]|null + */ + public function getUHostIds(): array + { + return $this->get("UHostIds"); + } + + /** + * UHostIds: UHost主机的资源ID,例如UHostIds.0代表希望升级的主机1,UHostIds.1代表主机2。 + * + * @param string[] $uHostIds + */ + public function setUHostIds(array $uHostIds) + { + $this->set("UHostIds", $uHostIds); + } + + /** + * CouponId: 代金券ID 请参考DescribeCoupon接口 + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 代金券ID 请参考DescribeCoupon接口 + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UHost/Apis/UpgradeToArkUHostInstanceResponse.php b/src/UHost/Apis/UpgradeToArkUHostInstanceResponse.php new file mode 100644 index 00000000..29e7d043 --- /dev/null +++ b/src/UHost/Apis/UpgradeToArkUHostInstanceResponse.php @@ -0,0 +1,44 @@ +get("UHostSet"); + } + + /** + * UHostSet: UHost主机的资源ID数组 + * + * @param string[] $uHostSet + */ + public function setUHostSet(array $uHostSet) + { + $this->set("UHostSet", $uHostSet); + } +} diff --git a/src/UHost/Models/IsolationGroup.php b/src/UHost/Models/IsolationGroup.php new file mode 100644 index 00000000..b131558a --- /dev/null +++ b/src/UHost/Models/IsolationGroup.php @@ -0,0 +1,113 @@ +get("GroupName"); + } + + /** + * GroupName: 硬件隔离组名称 + * + * @param string $groupName + */ + public function setGroupName(string $groupName) + { + $this->set("GroupName", $groupName); + } + + /** + * GroupId: 硬件隔离组id + * + * @return string|null + */ + public function getGroupId(): string + { + return $this->get("GroupId"); + } + + /** + * GroupId: 硬件隔离组id + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } + + /** + * SpreadInfoSet: 每个可用区中的机器数量。参见数据结构SpreadInfo。 + * + * @return SpreadInfo[]|null + */ + public function getSpreadInfoSet(): array + { + $items = $this->get("SpreadInfoSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new SpreadInfo($item)); + } + return $result; + } + + /** + * SpreadInfoSet: 每个可用区中的机器数量。参见数据结构SpreadInfo。 + * + * @param SpreadInfo[] $spreadInfoSet + */ + public function setSpreadInfoSet(array $spreadInfoSet) + { + $result = []; + foreach ($spreadInfoSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } +} diff --git a/src/UHost/Models/KeyPair.php b/src/UHost/Models/KeyPair.php new file mode 100644 index 00000000..89fcd60f --- /dev/null +++ b/src/UHost/Models/KeyPair.php @@ -0,0 +1,144 @@ +get("ProjectId"); + } + + /** + * ProjectId: 项目ID。 + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * KeyPairId: 密钥对ID。 + * + * @return string|null + */ + public function getKeyPairId(): string + { + return $this->get("KeyPairId"); + } + + /** + * KeyPairId: 密钥对ID。 + * + * @param string $keyPairId + */ + public function setKeyPairId(string $keyPairId) + { + $this->set("KeyPairId", $keyPairId); + } + + /** + * KeyPairName: 密钥对名称。 长度为1~63个英文或中文字符。 + * + * @return string|null + */ + public function getKeyPairName(): string + { + return $this->get("KeyPairName"); + } + + /** + * KeyPairName: 密钥对名称。 长度为1~63个英文或中文字符。 + * + * @param string $keyPairName + */ + public function setKeyPairName(string $keyPairName) + { + $this->set("KeyPairName", $keyPairName); + } + + /** + * KeyPairFingerPrint: 密钥对指纹。md5(ProjectId|KeyPairId|PublicKey) + * + * @return string|null + */ + public function getKeyPairFingerPrint(): string + { + return $this->get("KeyPairFingerPrint"); + } + + /** + * KeyPairFingerPrint: 密钥对指纹。md5(ProjectId|KeyPairId|PublicKey) + * + * @param string $keyPairFingerPrint + */ + public function setKeyPairFingerPrint(string $keyPairFingerPrint) + { + $this->set("KeyPairFingerPrint", $keyPairFingerPrint); + } + + /** + * PrivateKeyBody: 密钥对的私钥内容。只有创建接口才会返回。 + * + * @return string|null + */ + public function getPrivateKeyBody(): string + { + return $this->get("PrivateKeyBody"); + } + + /** + * PrivateKeyBody: 密钥对的私钥内容。只有创建接口才会返回。 + * + * @param string $privateKeyBody + */ + public function setPrivateKeyBody(string $privateKeyBody) + { + $this->set("PrivateKeyBody", $privateKeyBody); + } + + /** + * CreateTime: 密钥对的创建时间,格式为Unix Timestamp。 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 密钥对的创建时间,格式为Unix Timestamp。 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } +} diff --git a/src/UHost/Models/SpreadInfo.php b/src/UHost/Models/SpreadInfo.php new file mode 100644 index 00000000..6a2250ff --- /dev/null +++ b/src/UHost/Models/SpreadInfo.php @@ -0,0 +1,64 @@ +get("Zone"); + } + + /** + * Zone: 可用区信息 + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * UHostCount: 当前地域所有可用区中硬件隔离组中云主机的数量,不超过7。 + * + * @return integer|null + */ + public function getUHostCount(): int + { + return $this->get("UHostCount"); + } + + /** + * UHostCount: 当前地域所有可用区中硬件隔离组中云主机的数量,不超过7。 + * + * @param int $uHostCount + */ + public function setUHostCount(int $uHostCount) + { + $this->set("UHostCount", $uHostCount); + } +} diff --git a/src/UHost/Models/UHostDiskSet.php b/src/UHost/Models/UHostDiskSet.php new file mode 100644 index 00000000..a56e467d --- /dev/null +++ b/src/UHost/Models/UHostDiskSet.php @@ -0,0 +1,204 @@ +get("DiskType"); + } + + /** + * DiskType: 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。 + * + * @param string $diskType + */ + public function setDiskType(string $diskType) + { + $this->set("DiskType", $diskType); + } + + /** + * IsBoot: 是否是系统盘。枚举值:\\ > True,是系统盘 \\ > False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。 + * + * @return string|null + */ + public function getIsBoot(): string + { + return $this->get("IsBoot"); + } + + /** + * IsBoot: 是否是系统盘。枚举值:\\ > True,是系统盘 \\ > False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。 + * + * @param string $isBoot + */ + public function setIsBoot(string $isBoot) + { + $this->set("IsBoot", $isBoot); + } + + /** + * Encrypted: "true": 加密盘 "false":非加密盘 + * + * @return string|null + */ + public function getEncrypted(): string + { + return $this->get("Encrypted"); + } + + /** + * Encrypted: "true": 加密盘 "false":非加密盘 + * + * @param string $encrypted + */ + public function setEncrypted(string $encrypted) + { + $this->set("Encrypted", $encrypted); + } + + /** + * Type: 【建议不再使用】磁盘类型。系统盘: Boot,数据盘: Data,网络盘:Udisk + * + * @return string|null + */ + public function getType(): string + { + return $this->get("Type"); + } + + /** + * Type: 【建议不再使用】磁盘类型。系统盘: Boot,数据盘: Data,网络盘:Udisk + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } + + /** + * DiskId: 磁盘ID + * + * @return string|null + */ + public function getDiskId(): string + { + return $this->get("DiskId"); + } + + /** + * DiskId: 磁盘ID + * + * @param string $diskId + */ + public function setDiskId(string $diskId) + { + $this->set("DiskId", $diskId); + } + + /** + * Name: UDisk名字(仅当磁盘是UDisk时返回) + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: UDisk名字(仅当磁盘是UDisk时返回) + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Drive: 磁盘盘符 + * + * @return string|null + */ + public function getDrive(): string + { + return $this->get("Drive"); + } + + /** + * Drive: 磁盘盘符 + * + * @param string $drive + */ + public function setDrive(string $drive) + { + $this->set("Drive", $drive); + } + + /** + * Size: 磁盘大小,单位: GB + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 磁盘大小,单位: GB + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * BackupType: 备份方案。若开通了数据方舟,则为DATAARK + * + * @return string|null + */ + public function getBackupType(): string + { + return $this->get("BackupType"); + } + + /** + * BackupType: 备份方案。若开通了数据方舟,则为DATAARK + * + * @param string $backupType + */ + public function setBackupType(string $backupType) + { + $this->set("BackupType", $backupType); + } +} diff --git a/src/UHost/Models/UHostIPSet.php b/src/UHost/Models/UHostIPSet.php new file mode 100644 index 00000000..71fdaf2d --- /dev/null +++ b/src/UHost/Models/UHostIPSet.php @@ -0,0 +1,244 @@ +get("IPMode"); + } + + /** + * IPMode: IPv4/IPv6; + * + * @param string $ipMode + */ + public function setIPMode(string $ipMode) + { + $this->set("IPMode", $ipMode); + } + + /** + * Default: 内网 Private 类型下,表示是否为默认网卡。true: 是默认网卡;其他值:不是。 + * + * @return string|null + */ + public function getDefault(): string + { + return $this->get("Default"); + } + + /** + * Default: 内网 Private 类型下,表示是否为默认网卡。true: 是默认网卡;其他值:不是。 + * + * @param string $default + */ + public function setDefault(string $default) + { + $this->set("Default", $default); + } + + /** + * Mac: 内网 Private 类型下,当前网卡的Mac。 + * + * @return string|null + */ + public function getMac(): string + { + return $this->get("Mac"); + } + + /** + * Mac: 内网 Private 类型下,当前网卡的Mac。 + * + * @param string $mac + */ + public function setMac(string $mac) + { + $this->set("Mac", $mac); + } + + /** + * Weight: 当前EIP的权重。权重最大的为当前的出口IP。 + * + * @return integer|null + */ + public function getWeight(): int + { + return $this->get("Weight"); + } + + /** + * Weight: 当前EIP的权重。权重最大的为当前的出口IP。 + * + * @param int $weight + */ + public function setWeight(int $weight) + { + $this->set("Weight", $weight); + } + + /** + * Type: 国际: Internation,BGP: Bgp,内网: Private + * + * @return string|null + */ + public function getType(): string + { + return $this->get("Type"); + } + + /** + * Type: 国际: Internation,BGP: Bgp,内网: Private + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } + + /** + * IPId: 外网IP资源ID 。(内网IP无对应的资源ID) + * + * @return string|null + */ + public function getIPId(): string + { + return $this->get("IPId"); + } + + /** + * IPId: 外网IP资源ID 。(内网IP无对应的资源ID) + * + * @param string $ipId + */ + public function setIPId(string $ipId) + { + $this->set("IPId", $ipId); + } + + /** + * IP: IP地址 + * + * @return string|null + */ + public function getIP(): string + { + return $this->get("IP"); + } + + /** + * IP: IP地址 + * + * @param string $ip + */ + public function setIP(string $ip) + { + $this->set("IP", $ip); + } + + /** + * Bandwidth: IP对应的带宽, 单位: Mb (内网IP不显示带宽信息) + * + * @return integer|null + */ + public function getBandwidth(): int + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: IP对应的带宽, 单位: Mb (内网IP不显示带宽信息) + * + * @param int $bandwidth + */ + public function setBandwidth(int $bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * VPCId: IP地址对应的VPC ID。(北京一不支持,字段返回为空) + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: IP地址对应的VPC ID。(北京一不支持,字段返回为空) + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: IP地址对应的子网 ID。(北京一不支持,字段返回为空) + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: IP地址对应的子网 ID。(北京一不支持,字段返回为空) + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * NetworkInterfaceId: 弹性网卡为默认网卡时,返回对应的 ID 值 + * + * @return string|null + */ + public function getNetworkInterfaceId(): string + { + return $this->get("NetworkInterfaceId"); + } + + /** + * NetworkInterfaceId: 弹性网卡为默认网卡时,返回对应的 ID 值 + * + * @param string $networkInterfaceId + */ + public function setNetworkInterfaceId(string $networkInterfaceId) + { + $this->set("NetworkInterfaceId", $networkInterfaceId); + } +} diff --git a/src/UHost/Models/UHostImageSet.php b/src/UHost/Models/UHostImageSet.php new file mode 100644 index 00000000..9fdecae0 --- /dev/null +++ b/src/UHost/Models/UHostImageSet.php @@ -0,0 +1,344 @@ +get("Zone"); + } + + /** + * Zone: 可用区,参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ImageId: 镜像ID + * + * @return string|null + */ + public function getImageId(): string + { + return $this->get("ImageId"); + } + + /** + * ImageId: 镜像ID + * + * @param string $imageId + */ + public function setImageId(string $imageId) + { + $this->set("ImageId", $imageId); + } + + /** + * ImageName: 镜像名称 + * + * @return string|null + */ + public function getImageName(): string + { + return $this->get("ImageName"); + } + + /** + * ImageName: 镜像名称 + * + * @param string $imageName + */ + public function setImageName(string $imageName) + { + $this->set("ImageName", $imageName); + } + + /** + * OsType: 操作系统类型:Linux,Windows + * + * @return string|null + */ + public function getOsType(): string + { + return $this->get("OsType"); + } + + /** + * OsType: 操作系统类型:Linux,Windows + * + * @param string $osType + */ + public function setOsType(string $osType) + { + $this->set("OsType", $osType); + } + + /** + * OsName: 操作系统名称 + * + * @return string|null + */ + public function getOsName(): string + { + return $this->get("OsName"); + } + + /** + * OsName: 操作系统名称 + * + * @param string $osName + */ + public function setOsName(string $osName) + { + $this->set("OsName", $osName); + } + + /** + * ImageType: 镜像类型 标准镜像:Base, 行业镜像:Business,自定义镜像:Custom + * + * @return string|null + */ + public function getImageType(): string + { + return $this->get("ImageType"); + } + + /** + * ImageType: 镜像类型 标准镜像:Base, 行业镜像:Business,自定义镜像:Custom + * + * @param string $imageType + */ + public function setImageType(string $imageType) + { + $this->set("ImageType", $imageType); + } + + /** + * Features: 特殊状态标识, 目前包含NetEnhnced(网络增强1.0), NetEnhanced_Ultra](网络增强2.0), HotPlug(热升级), CloudInit, IPv6 + * + * @return string[]|null + */ + public function getFeatures(): array + { + return $this->get("Features"); + } + + /** + * Features: 特殊状态标识, 目前包含NetEnhnced(网络增强1.0), NetEnhanced_Ultra](网络增强2.0), HotPlug(热升级), CloudInit, IPv6 + * + * @param string[] $features + */ + public function setFeatures(array $features) + { + $this->set("Features", $features); + } + + /** + * FuncType: 行业镜像类型(仅行业镜像将返回这个值) + * + * @return string|null + */ + public function getFuncType(): string + { + return $this->get("FuncType"); + } + + /** + * FuncType: 行业镜像类型(仅行业镜像将返回这个值) + * + * @param string $funcType + */ + public function setFuncType(string $funcType) + { + $this->set("FuncType", $funcType); + } + + /** + * IntegratedSoftware: 集成软件名称(仅行业镜像将返回这个值) + * + * @return string|null + */ + public function getIntegratedSoftware(): string + { + return $this->get("IntegratedSoftware"); + } + + /** + * IntegratedSoftware: 集成软件名称(仅行业镜像将返回这个值) + * + * @param string $integratedSoftware + */ + public function setIntegratedSoftware(string $integratedSoftware) + { + $this->set("IntegratedSoftware", $integratedSoftware); + } + + /** + * Vendor: 供应商(仅行业镜像将返回这个值) + * + * @return string|null + */ + public function getVendor(): string + { + return $this->get("Vendor"); + } + + /** + * Vendor: 供应商(仅行业镜像将返回这个值) + * + * @param string $vendor + */ + public function setVendor(string $vendor) + { + $this->set("Vendor", $vendor); + } + + /** + * Links: 介绍链接(仅行业镜像将返回这个值) + * + * @return string|null + */ + public function getLinks(): string + { + return $this->get("Links"); + } + + /** + * Links: 介绍链接(仅行业镜像将返回这个值) + * + * @param string $links + */ + public function setLinks(string $links) + { + $this->set("Links", $links); + } + + /** + * State: 镜像状态, 可用:Available,制作中:Making, 不可用:Unavailable + * + * @return string|null + */ + public function getState(): string + { + return $this->get("State"); + } + + /** + * State: 镜像状态, 可用:Available,制作中:Making, 不可用:Unavailable + * + * @param string $state + */ + public function setState(string $state) + { + $this->set("State", $state); + } + + /** + * ImageDescription: 镜像描述 + * + * @return string|null + */ + public function getImageDescription(): string + { + return $this->get("ImageDescription"); + } + + /** + * ImageDescription: 镜像描述 + * + * @param string $imageDescription + */ + public function setImageDescription(string $imageDescription) + { + $this->set("ImageDescription", $imageDescription); + } + + /** + * CreateTime: 创建时间,格式为Unix时间戳 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间,格式为Unix时间戳 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ImageSize: 镜像大小 + * + * @return integer|null + */ + public function getImageSize(): int + { + return $this->get("ImageSize"); + } + + /** + * ImageSize: 镜像大小 + * + * @param int $imageSize + */ + public function setImageSize(int $imageSize) + { + $this->set("ImageSize", $imageSize); + } + + /** + * MinimalCPU: 默认值为空'''。当CentOS 7.3/7.4/7.5等镜像会标记为“Broadwell” + * + * @return string|null + */ + public function getMinimalCPU(): string + { + return $this->get("MinimalCPU"); + } + + /** + * MinimalCPU: 默认值为空'''。当CentOS 7.3/7.4/7.5等镜像会标记为“Broadwell” + * + * @param string $minimalCPU + */ + public function setMinimalCPU(string $minimalCPU) + { + $this->set("MinimalCPU", $minimalCPU); + } +} diff --git a/src/UHost/Models/UHostInstanceSet.php b/src/UHost/Models/UHostInstanceSet.php new file mode 100644 index 00000000..58dfeb22 --- /dev/null +++ b/src/UHost/Models/UHostInstanceSet.php @@ -0,0 +1,842 @@ +get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * IPv6Feature: true:有ipv6特性;false,没有ipv6特性 + * + * @return boolean|null + */ + public function getIPv6Feature(): bool + { + return $this->get("IPv6Feature"); + } + + /** + * IPv6Feature: true:有ipv6特性;false,没有ipv6特性 + * + * @param boolean $iPv6Feature + */ + public function setIPv6Feature(bool $iPv6Feature) + { + $this->set("IPv6Feature", $iPv6Feature); + } + + /** + * UHostId: UHost实例ID + * + * @return string|null + */ + public function getUHostId(): string + { + return $this->get("UHostId"); + } + + /** + * UHostId: UHost实例ID + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } + + /** + * UHostType: 【建议不再使用】云主机机型(旧)。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * + * @return string|null + */ + public function getUHostType(): string + { + return $this->get("UHostType"); + } + + /** + * UHostType: 【建议不再使用】云主机机型(旧)。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * + * @param string $uHostType + */ + public function setUHostType(string $uHostType) + { + $this->set("UHostType", $uHostType); + } + + /** + * MachineType: 云主机机型(新)。参考[[api:uhost-api:uhost_type#主机概念20版本|云主机机型说明]]。 + * + * @return string|null + */ + public function getMachineType(): string + { + return $this->get("MachineType"); + } + + /** + * MachineType: 云主机机型(新)。参考[[api:uhost-api:uhost_type#主机概念20版本|云主机机型说明]]。 + * + * @param string $machineType + */ + public function setMachineType(string $machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * CpuPlatform: 云主机CPU平台。参考[[api:uhost-api:uhost_type#主机概念20版本|云主机机型说明]]。 + * + * @return string|null + */ + public function getCpuPlatform(): string + { + return $this->get("CpuPlatform"); + } + + /** + * CpuPlatform: 云主机CPU平台。参考[[api:uhost-api:uhost_type#主机概念20版本|云主机机型说明]]。 + * + * @param string $cpuPlatform + */ + public function setCpuPlatform(string $cpuPlatform) + { + $this->set("CpuPlatform", $cpuPlatform); + } + + /** + * StorageType: 【建议不再使用】主机磁盘类型。 枚举值为:\\ > LocalDisk,本地磁盘; \\ > UDisk 云盘。\\只要有一块磁盘为本地盘,即返回LocalDisk。 + * + * @return string|null + */ + public function getStorageType(): string + { + return $this->get("StorageType"); + } + + /** + * StorageType: 【建议不再使用】主机磁盘类型。 枚举值为:\\ > LocalDisk,本地磁盘; \\ > UDisk 云盘。\\只要有一块磁盘为本地盘,即返回LocalDisk。 + * + * @param string $storageType + */ + public function setStorageType(string $storageType) + { + $this->set("StorageType", $storageType); + } + + /** + * ImageId: 【建议不再使用】主机的系统盘ID。 + * + * @return string|null + */ + public function getImageId(): string + { + return $this->get("ImageId"); + } + + /** + * ImageId: 【建议不再使用】主机的系统盘ID。 + * + * @param string $imageId + */ + public function setImageId(string $imageId) + { + $this->set("ImageId", $imageId); + } + + /** + * BasicImageId: 基础镜像ID(指当前自定义镜像的来源镜像) + * + * @return string|null + */ + public function getBasicImageId(): string + { + return $this->get("BasicImageId"); + } + + /** + * BasicImageId: 基础镜像ID(指当前自定义镜像的来源镜像) + * + * @param string $basicImageId + */ + public function setBasicImageId(string $basicImageId) + { + $this->set("BasicImageId", $basicImageId); + } + + /** + * BasicImageName: 基础镜像名称(指当前自定义镜像的来源镜像) + * + * @return string|null + */ + public function getBasicImageName(): string + { + return $this->get("BasicImageName"); + } + + /** + * BasicImageName: 基础镜像名称(指当前自定义镜像的来源镜像) + * + * @param string $basicImageName + */ + public function setBasicImageName(string $basicImageName) + { + $this->set("BasicImageName", $basicImageName); + } + + /** + * Tag: 业务组名称 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组名称 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } + + /** + * Name: UHost实例名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: UHost实例名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * State: 实例状态,枚举值:\\ >初始化: Initializing; \\ >启动中: Starting; \\> 运行中: Running; \\> 关机中: Stopping; \\ >关机: Stopped \\ >安装失败: Install Fail; \\ >重启中: Rebooting; \\ > 未知(空字符串,获取状态超时或出错):"" + * + * @return string|null + */ + public function getState(): string + { + return $this->get("State"); + } + + /** + * State: 实例状态,枚举值:\\ >初始化: Initializing; \\ >启动中: Starting; \\> 运行中: Running; \\> 关机中: Stopping; \\ >关机: Stopped \\ >安装失败: Install Fail; \\ >重启中: Rebooting; \\ > 未知(空字符串,获取状态超时或出错):"" + * + * @param string $state + */ + public function setState(string $state) + { + $this->set("State", $state); + } + + /** + * CreateTime: 创建时间,格式为Unix时间戳 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间,格式为Unix时间戳 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ChargeType: 计费模式,枚举值为: Year,按年付费; Month,按月付费; Dynamic,按需付费(需开启权限);Preemptive 为抢占式实例; + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式,枚举值为: Year,按年付费; Month,按月付费; Dynamic,按需付费(需开启权限);Preemptive 为抢占式实例; + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * ExpireTime: 到期时间,格式为Unix时间戳 + * + * @return integer|null + */ + public function getExpireTime(): int + { + return $this->get("ExpireTime"); + } + + /** + * ExpireTime: 到期时间,格式为Unix时间戳 + * + * @param int $expireTime + */ + public function setExpireTime(int $expireTime) + { + $this->set("ExpireTime", $expireTime); + } + + /** + * CPU: 虚拟CPU核数,单位: 个 + * + * @return integer|null + */ + public function getCPU(): int + { + return $this->get("CPU"); + } + + /** + * CPU: 虚拟CPU核数,单位: 个 + * + * @param int $cpu + */ + public function setCPU(int $cpu) + { + $this->set("CPU", $cpu); + } + + /** + * Memory: 内存大小,单位: MB + * + * @return integer|null + */ + public function getMemory(): int + { + return $this->get("Memory"); + } + + /** + * Memory: 内存大小,单位: MB + * + * @param int $memory + */ + public function setMemory(int $memory) + { + $this->set("Memory", $memory); + } + + /** + * AutoRenew: 是否自动续费,自动续费:“Yes”,不自动续费:“No” + * + * @return string|null + */ + public function getAutoRenew(): string + { + return $this->get("AutoRenew"); + } + + /** + * AutoRenew: 是否自动续费,自动续费:“Yes”,不自动续费:“No” + * + * @param string $autoRenew + */ + public function setAutoRenew(string $autoRenew) + { + $this->set("AutoRenew", $autoRenew); + } + + /** + * DiskSet: 磁盘信息见 UHostDiskSet + * + * @return UHostDiskSet[]|null + */ + public function getDiskSet(): array + { + $items = $this->get("DiskSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UHostDiskSet($item)); + } + return $result; + } + + /** + * DiskSet: 磁盘信息见 UHostDiskSet + * + * @param UHostDiskSet[] $diskSet + */ + public function setDiskSet(array $diskSet) + { + $result = []; + foreach ($diskSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * IPSet: 详细信息见 UHostIPSet + * + * @return UHostIPSet[]|null + */ + public function getIPSet(): array + { + $items = $this->get("IPSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UHostIPSet($item)); + } + return $result; + } + + /** + * IPSet: 详细信息见 UHostIPSet + * + * @param UHostIPSet[] $ipSet + */ + public function setIPSet(array $ipSet) + { + $result = []; + foreach ($ipSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * NetCapability: 网络增强。Normal: 无;Super: 网络增强1.0; Ultra: 网络增强2.0 + * + * @return string|null + */ + public function getNetCapability(): string + { + return $this->get("NetCapability"); + } + + /** + * NetCapability: 网络增强。Normal: 无;Super: 网络增强1.0; Ultra: 网络增强2.0 + * + * @param string $netCapability + */ + public function setNetCapability(string $netCapability) + { + $this->set("NetCapability", $netCapability); + } + + /** + * NetworkState: 【建议不再使用】网络状态。 连接:Connected, 断开:NotConnected + * + * @return string|null + */ + public function getNetworkState(): string + { + return $this->get("NetworkState"); + } + + /** + * NetworkState: 【建议不再使用】网络状态。 连接:Connected, 断开:NotConnected + * + * @param string $networkState + */ + public function setNetworkState(string $networkState) + { + $this->set("NetworkState", $networkState); + } + + /** + * TimemachineFeature: 【建议不再使用】数据方舟模式。枚举值:\\ > Yes: 开启方舟; \\ > no,未开启方舟 + * + * @return string|null + */ + public function getTimemachineFeature(): string + { + return $this->get("TimemachineFeature"); + } + + /** + * TimemachineFeature: 【建议不再使用】数据方舟模式。枚举值:\\ > Yes: 开启方舟; \\ > no,未开启方舟 + * + * @param string $timemachineFeature + */ + public function setTimemachineFeature(string $timemachineFeature) + { + $this->set("TimemachineFeature", $timemachineFeature); + } + + /** + * HotplugFeature: true: 开启热升级; false,未开启热升级 + * + * @return boolean|null + */ + public function getHotplugFeature(): bool + { + return $this->get("HotplugFeature"); + } + + /** + * HotplugFeature: true: 开启热升级; false,未开启热升级 + * + * @param boolean $hotplugFeature + */ + public function setHotplugFeature(bool $hotplugFeature) + { + $this->set("HotplugFeature", $hotplugFeature); + } + + /** + * SubnetType: 【建议不再使用】仅北京A的云主机会返回此字段。基础网络模式:Default;子网模式:Private + * + * @return string|null + */ + public function getSubnetType(): string + { + return $this->get("SubnetType"); + } + + /** + * SubnetType: 【建议不再使用】仅北京A的云主机会返回此字段。基础网络模式:Default;子网模式:Private + * + * @param string $subnetType + */ + public function setSubnetType(string $subnetType) + { + $this->set("SubnetType", $subnetType); + } + + /** + * OsName: 创建主机的最初来源镜像的操作系统名称(若直接通过基础镜像创建,此处返回和BasicImageName一致) + * + * @return string|null + */ + public function getOsName(): string + { + return $this->get("OsName"); + } + + /** + * OsName: 创建主机的最初来源镜像的操作系统名称(若直接通过基础镜像创建,此处返回和BasicImageName一致) + * + * @param string $osName + */ + public function setOsName(string $osName) + { + $this->set("OsName", $osName); + } + + /** + * OsType: 操作系统类别。返回"Linux"或者"Windows" + * + * @return string|null + */ + public function getOsType(): string + { + return $this->get("OsType"); + } + + /** + * OsType: 操作系统类别。返回"Linux"或者"Windows" + * + * @param string $osType + */ + public function setOsType(string $osType) + { + $this->set("OsType", $osType); + } + + /** + * HostType: 【建议不再使用】主机系列:N2,表示系列2;N1,表示系列1 + * + * @return string|null + */ + public function getHostType(): string + { + return $this->get("HostType"); + } + + /** + * HostType: 【建议不再使用】主机系列:N2,表示系列2;N1,表示系列1 + * + * @param string $hostType + */ + public function setHostType(string $hostType) + { + $this->set("HostType", $hostType); + } + + /** + * LifeCycle: 主机的生命周期类型。目前仅支持Normal:普通; + * + * @return string|null + */ + public function getLifeCycle(): string + { + return $this->get("LifeCycle"); + } + + /** + * LifeCycle: 主机的生命周期类型。目前仅支持Normal:普通; + * + * @param string $lifeCycle + */ + public function setLifeCycle(string $lifeCycle) + { + $this->set("LifeCycle", $lifeCycle); + } + + /** + * GPU: GPU个数 + * + * @return integer|null + */ + public function getGPU(): int + { + return $this->get("GPU"); + } + + /** + * GPU: GPU个数 + * + * @param int $gpu + */ + public function setGPU(int $gpu) + { + $this->set("GPU", $gpu); + } + + /** + * BootDiskState: 系统盘状态 Normal表示初始化完成;Initializing表示在初始化。仍在初始化的系统盘无法制作镜像。 + * + * @return string|null + */ + public function getBootDiskState(): string + { + return $this->get("BootDiskState"); + } + + /** + * BootDiskState: 系统盘状态 Normal表示初始化完成;Initializing表示在初始化。仍在初始化的系统盘无法制作镜像。 + * + * @param string $bootDiskState + */ + public function setBootDiskState(string $bootDiskState) + { + $this->set("BootDiskState", $bootDiskState); + } + + /** + * TotalDiskSpace: 总的数据盘存储空间。 + * + * @return integer|null + */ + public function getTotalDiskSpace(): int + { + return $this->get("TotalDiskSpace"); + } + + /** + * TotalDiskSpace: 总的数据盘存储空间。 + * + * @param int $totalDiskSpace + */ + public function setTotalDiskSpace(int $totalDiskSpace) + { + $this->set("TotalDiskSpace", $totalDiskSpace); + } + + /** + * IsolationGroup: 隔离组id,不在隔离组则返回"" + * + * @return string|null + */ + public function getIsolationGroup(): string + { + return $this->get("IsolationGroup"); + } + + /** + * IsolationGroup: 隔离组id,不在隔离组则返回"" + * + * @param string $isolationGroup + */ + public function setIsolationGroup(string $isolationGroup) + { + $this->set("IsolationGroup", $isolationGroup); + } + + /** + * CloudInitFeature: true,支持cloutinit方式初始化;false,不支持 + * + * @return boolean|null + */ + public function getCloudInitFeature(): bool + { + return $this->get("CloudInitFeature"); + } + + /** + * CloudInitFeature: true,支持cloutinit方式初始化;false,不支持 + * + * @param boolean $cloudInitFeature + */ + public function setCloudInitFeature(bool $cloudInitFeature) + { + $this->set("CloudInitFeature", $cloudInitFeature); + } + + /** + * RdmaClusterId: RDMA集群id,仅快杰云主机返回该值;其他类型云主机返回""。当云主机的此值与RSSD云盘的RdmaClusterId相同时,RSSD可以挂载到这台云主机。 + * + * @return string|null + */ + public function getRdmaClusterId(): string + { + return $this->get("RdmaClusterId"); + } + + /** + * RdmaClusterId: RDMA集群id,仅快杰云主机返回该值;其他类型云主机返回""。当云主机的此值与RSSD云盘的RdmaClusterId相同时,RSSD可以挂载到这台云主机。 + * + * @param string $rdmaClusterId + */ + public function setRdmaClusterId(string $rdmaClusterId) + { + $this->set("RdmaClusterId", $rdmaClusterId); + } + + /** + * RestrictMode: 仅抢占式实例返回,LowSpeed为低速模式,PowerOff为关机模式 + * + * @return string|null + */ + public function getRestrictMode(): string + { + return $this->get("RestrictMode"); + } + + /** + * RestrictMode: 仅抢占式实例返回,LowSpeed为低速模式,PowerOff为关机模式 + * + * @param string $restrictMode + */ + public function setRestrictMode(string $restrictMode) + { + $this->set("RestrictMode", $restrictMode); + } + + /** + * HpcFeature: true: 开启 hpc 系列功能;false: 未开启 + * + * @return boolean|null + */ + public function getHpcFeature(): bool + { + return $this->get("HpcFeature"); + } + + /** + * HpcFeature: true: 开启 hpc 系列功能;false: 未开启 + * + * @param boolean $hpcFeature + */ + public function setHpcFeature(bool $hpcFeature) + { + $this->set("HpcFeature", $hpcFeature); + } + + /** + * KeyPair: 密钥信息见 UHostKeyPair + * + * @return UHostKeyPair|null + */ + public function getKeyPair(): UHostKeyPair + { + return new UHostKeyPair($this->get("KeyPair")); + } + + /** + * KeyPair: 密钥信息见 UHostKeyPair + * + * @param UHostKeyPair $keyPair + */ + public function setKeyPair(UHostKeyPair $keyPair) + { + $this->set("KeyPair", $keyPair->getAll()); + } +} diff --git a/src/UHost/Models/UHostKeyPair.php b/src/UHost/Models/UHostKeyPair.php new file mode 100644 index 00000000..164168d4 --- /dev/null +++ b/src/UHost/Models/UHostKeyPair.php @@ -0,0 +1,64 @@ +get("KeyPairId"); + } + + /** + * KeyPairId: 密钥对ID + * + * @param string $keyPairId + */ + public function setKeyPairId(string $keyPairId) + { + $this->set("KeyPairId", $keyPairId); + } + + /** + * KeyPairState: 主机密钥对状态,Normal 正常,Deleted 删除 + * + * @return string|null + */ + public function getKeyPairState(): string + { + return $this->get("KeyPairState"); + } + + /** + * KeyPairState: 主机密钥对状态,Normal 正常,Deleted 删除 + * + * @param string $keyPairState + */ + public function setKeyPairState(string $keyPairState) + { + $this->set("KeyPairState", $keyPairState); + } +} diff --git a/src/UHost/Models/UHostPriceSet.php b/src/UHost/Models/UHostPriceSet.php new file mode 100644 index 00000000..cb439782 --- /dev/null +++ b/src/UHost/Models/UHostPriceSet.php @@ -0,0 +1,104 @@ +get("ChargeType"); + } + + /** + * ChargeType: 计费类型。Year,Month,Dynamic + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Price: 价格,单位: 元,保留小数点后两位有效数字 + * + * @return float|null + */ + public function getPrice(): float + { + return $this->get("Price"); + } + + /** + * Price: 价格,单位: 元,保留小数点后两位有效数字 + * + * @param float $price + */ + public function setPrice(float $price) + { + $this->set("Price", $price); + } + + /** + * OriginalPrice: 限时优惠的折前原价(即列表价乘以商务折扣后的单价)。 + * + * @return float|null + */ + public function getOriginalPrice(): float + { + return $this->get("OriginalPrice"); + } + + /** + * OriginalPrice: 限时优惠的折前原价(即列表价乘以商务折扣后的单价)。 + * + * @param float $originalPrice + */ + public function setOriginalPrice(float $originalPrice) + { + $this->set("OriginalPrice", $originalPrice); + } + + /** + * ListPrice: 产品列表价。 + * + * @return float|null + */ + public function getListPrice(): float + { + return $this->get("ListPrice"); + } + + /** + * ListPrice: 产品列表价。 + * + * @param float $listPrice + */ + public function setListPrice(float $listPrice) + { + $this->set("ListPrice", $listPrice); + } +} diff --git a/src/UHost/Models/UHostTagSet.php b/src/UHost/Models/UHostTagSet.php new file mode 100644 index 00000000..ac5ce5dd --- /dev/null +++ b/src/UHost/Models/UHostTagSet.php @@ -0,0 +1,84 @@ +get("Tag"); + } + + /** + * Tag: 业务组名称 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * TotalCount: 该业务组中包含的主机个数 + * + * @return integer|null + */ + public function getTotalCount(): int + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 该业务组中包含的主机个数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * Zone: 可用区 + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区 + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } +} diff --git a/src/UHost/Params/CreateUHostInstanceParamDisks.php b/src/UHost/Params/CreateUHostInstanceParamDisks.php new file mode 100644 index 00000000..b6951287 --- /dev/null +++ b/src/UHost/Params/CreateUHostInstanceParamDisks.php @@ -0,0 +1,164 @@ + True,是系统盘 \\ > False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。 + * + * @return string|null + */ + public function getIsBoot(): string + { + return $this->get("IsBoot"); + } + + /** + * IsBoot: 是否是系统盘。枚举值:\\ > True,是系统盘 \\ > False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。 + * + * @param string $isBoot + */ + public function setIsBoot(string $isBoot) + { + $this->set("IsBoot", $isBoot); + } + + /** + * Type: 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。 + * + * @return string|null + */ + public function getType(): string + { + return $this->get("Type"); + } + + /** + * Type: 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。 + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } + + /** + * Size: 磁盘大小,单位GB,必须是10GB的整数倍。请参考[[api:uhost-api:disk_type|磁盘类型]]。 + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 磁盘大小,单位GB,必须是10GB的整数倍。请参考[[api:uhost-api:disk_type|磁盘类型]]。 + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * BackupType: 磁盘备份方案。枚举值:\\ > NONE,无备份 \\ > DATAARK,数据方舟 \\ > SNAPSHOT(SNAPSHOT模式目前仅在上海C支持),快照 \\当前磁盘支持的备份模式参考 [[api:uhost-api:disk_type|磁盘类型]],默认值:NONE + * + * @return string|null + */ + public function getBackupType(): string + { + return $this->get("BackupType"); + } + + /** + * BackupType: 磁盘备份方案。枚举值:\\ > NONE,无备份 \\ > DATAARK,数据方舟 \\ > SNAPSHOT(SNAPSHOT模式目前仅在上海C支持),快照 \\当前磁盘支持的备份模式参考 [[api:uhost-api:disk_type|磁盘类型]],默认值:NONE + * + * @param string $backupType + */ + public function setBackupType(string $backupType) + { + $this->set("BackupType", $backupType); + } + + /** + * Encrypted: 【功能仅部分可用区开放,详询技术支持】磁盘是否加密。加密:true, 不加密: false加密必须传入对应的的KmsKeyId,默认值false + * + * @return boolean|null + */ + public function getEncrypted(): bool + { + return $this->get("Encrypted"); + } + + /** + * Encrypted: 【功能仅部分可用区开放,详询技术支持】磁盘是否加密。加密:true, 不加密: false加密必须传入对应的的KmsKeyId,默认值false + * + * @param boolean $encrypted + */ + public function setEncrypted(bool $encrypted) + { + $this->set("Encrypted", $encrypted); + } + + /** + * KmsKeyId: 【功能仅部分可用区开放,详询技术支持】kms key id。选择加密盘时必填。 + * + * @return string|null + */ + public function getKmsKeyId(): string + { + return $this->get("KmsKeyId"); + } + + /** + * KmsKeyId: 【功能仅部分可用区开放,详询技术支持】kms key id。选择加密盘时必填。 + * + * @param string $kmsKeyId + */ + public function setKmsKeyId(string $kmsKeyId) + { + $this->set("KmsKeyId", $kmsKeyId); + } + + /** + * CouponId: 云盘代金券id。不适用于系统盘/本地盘。请通过DescribeCoupon接口查询,或登录用户中心查看 + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 云盘代金券id。不适用于系统盘/本地盘。请通过DescribeCoupon接口查询,或登录用户中心查看 + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UHost/Params/CreateUHostInstanceParamNetworkInterface.php b/src/UHost/Params/CreateUHostInstanceParamNetworkInterface.php new file mode 100644 index 00000000..d5aadeb5 --- /dev/null +++ b/src/UHost/Params/CreateUHostInstanceParamNetworkInterface.php @@ -0,0 +1,84 @@ +get("EIP")); + } + + /** + * EIP: + * + * @param CreateUHostInstanceParamNetworkInterfaceEIP $eip + */ + public function setEIP(CreateUHostInstanceParamNetworkInterfaceEIP $eip) + { + $this->set("EIP", $eip->getAll()); + } + + /** + * IPv6: + * + * @return CreateUHostInstanceParamNetworkInterfaceIPv6|null + */ + public function getIPv6(): CreateUHostInstanceParamNetworkInterfaceIPv6 + { + return new CreateUHostInstanceParamNetworkInterfaceIPv6($this->get("IPv6")); + } + + /** + * IPv6: + * + * @param CreateUHostInstanceParamNetworkInterfaceIPv6 $iPv6 + */ + public function setIPv6(CreateUHostInstanceParamNetworkInterfaceIPv6 $iPv6) + { + $this->set("IPv6", $iPv6->getAll()); + } + + /** + * CreateCernetIp: 申请并绑定一个教育网EIP。True为申请并绑定,False为不会申请绑定,默认False。当前只支持具有HPC特性的机型。 + * + * @return boolean|null + */ + public function getCreateCernetIp(): bool + { + return $this->get("CreateCernetIp"); + } + + /** + * CreateCernetIp: 申请并绑定一个教育网EIP。True为申请并绑定,False为不会申请绑定,默认False。当前只支持具有HPC特性的机型。 + * + * @param boolean $createCernetIp + */ + public function setCreateCernetIp(bool $createCernetIp) + { + $this->set("CreateCernetIp", $createCernetIp); + } +} diff --git a/src/UHost/Params/CreateUHostInstanceParamNetworkInterfaceEIP.php b/src/UHost/Params/CreateUHostInstanceParamNetworkInterfaceEIP.php new file mode 100644 index 00000000..3de26b40 --- /dev/null +++ b/src/UHost/Params/CreateUHostInstanceParamNetworkInterfaceEIP.php @@ -0,0 +1,144 @@ +get("Bandwidth"); + } + + /** + * Bandwidth: 【若绑定EIP,此参数必填】弹性IP的外网带宽, 单位为Mbps. 共享带宽模式必须指定0M带宽, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-800] + * + * @param int $bandwidth + */ + public function setBandwidth(int $bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * PayMode: 弹性IP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; "ShareBandwidth",共享带宽模式. "Free":免费带宽模式,默认为 "Bandwidth" + * + * @return string|null + */ + public function getPayMode(): string + { + return $this->get("PayMode"); + } + + /** + * PayMode: 弹性IP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; "ShareBandwidth",共享带宽模式. "Free":免费带宽模式,默认为 "Bandwidth" + * + * @param string $payMode + */ + public function setPayMode(string $payMode) + { + $this->set("PayMode", $payMode); + } + + /** + * ShareBandwidthId: 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效 + * + * @return string|null + */ + public function getShareBandwidthId(): string + { + return $this->get("ShareBandwidthId"); + } + + /** + * ShareBandwidthId: 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效 + * + * @param string $shareBandwidthId + */ + public function setShareBandwidthId(string $shareBandwidthId) + { + $this->set("ShareBandwidthId", $shareBandwidthId); + } + + /** + * GlobalSSH: + * + * @return CreateUHostInstanceParamNetworkInterfaceEIPGlobalSSH|null + */ + public function getGlobalSSH(): CreateUHostInstanceParamNetworkInterfaceEIPGlobalSSH + { + return new CreateUHostInstanceParamNetworkInterfaceEIPGlobalSSH($this->get("GlobalSSH")); + } + + /** + * GlobalSSH: + * + * @param CreateUHostInstanceParamNetworkInterfaceEIPGlobalSSH $globalSSH + */ + public function setGlobalSSH(CreateUHostInstanceParamNetworkInterfaceEIPGlobalSSH $globalSSH) + { + $this->set("GlobalSSH", $globalSSH->getAll()); + } + + /** + * OperatorName: 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International BGP: Bgp 各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International + * + * @return string|null + */ + public function getOperatorName(): string + { + return $this->get("OperatorName"); + } + + /** + * OperatorName: 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International BGP: Bgp 各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International + * + * @param string $operatorName + */ + public function setOperatorName(string $operatorName) + { + $this->set("OperatorName", $operatorName); + } + + /** + * CouponId: 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。 + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。 + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UHost/Params/CreateUHostInstanceParamNetworkInterfaceEIPGlobalSSH.php b/src/UHost/Params/CreateUHostInstanceParamNetworkInterfaceEIPGlobalSSH.php new file mode 100644 index 00000000..7d7ea53a --- /dev/null +++ b/src/UHost/Params/CreateUHostInstanceParamNetworkInterfaceEIPGlobalSSH.php @@ -0,0 +1,84 @@ +get("Area"); + } + + /** + * Area: 填写支持SSH访问IP的地区名称,如“洛杉矶”,“新加坡”,“香港”,“东京”,“华盛顿”,“法兰克福”。Area和AreaCode两者必填其中之一。 + * + * @param string $area + */ + public function setArea(string $area) + { + $this->set("Area", $area); + } + + /** + * Port: SSH端口,1-65535且不能使用80,443端口 + * + * @return integer|null + */ + public function getPort(): int + { + return $this->get("Port"); + } + + /** + * Port: SSH端口,1-65535且不能使用80,443端口 + * + * @param int $port + */ + public function setPort(int $port) + { + $this->set("Port", $port); + } + + /** + * AreaCode: GlobalSSH的地区编码,格式为区域航空港国际通用代码。Area和AreaCode两者必填其中之一。 + * + * @return string|null + */ + public function getAreaCode(): string + { + return $this->get("AreaCode"); + } + + /** + * AreaCode: GlobalSSH的地区编码,格式为区域航空港国际通用代码。Area和AreaCode两者必填其中之一。 + * + * @param string $areaCode + */ + public function setAreaCode(string $areaCode) + { + $this->set("AreaCode", $areaCode); + } +} diff --git a/src/UHost/Params/CreateUHostInstanceParamNetworkInterfaceIPv6.php b/src/UHost/Params/CreateUHostInstanceParamNetworkInterfaceIPv6.php new file mode 100644 index 00000000..d8c3a58c --- /dev/null +++ b/src/UHost/Params/CreateUHostInstanceParamNetworkInterfaceIPv6.php @@ -0,0 +1,26 @@ + True,是系统盘 \\ > False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。 + * + * @return string|null + */ + public function getIsBoot(): string + { + return $this->get("IsBoot"); + } + + /** + * IsBoot: 是否是系统盘。枚举值:\\ > True,是系统盘 \\ > False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。 + * + * @param string $isBoot + */ + public function setIsBoot(string $isBoot) + { + $this->set("IsBoot", $isBoot); + } + + /** + * Size: 磁盘大小,单位GB。请参考[[api:uhost-api:disk_type|磁盘类型]]。 + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 磁盘大小,单位GB。请参考[[api:uhost-api:disk_type|磁盘类型]]。 + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * Type: 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。 + * + * @return string|null + */ + public function getType(): string + { + return $this->get("Type"); + } + + /** + * Type: 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。 + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } + + /** + * BackupType: 磁盘备份方案。枚举值:\\ > NONE,无备份 \\ > DATAARK,数据方舟 \\ > SNAPSHOT,快照\\ 当前磁盘支持的备份模式参考 [[api:uhost-api:disk_type|磁盘类型]] + * + * @return string|null + */ + public function getBackupType(): string + { + return $this->get("BackupType"); + } + + /** + * BackupType: 磁盘备份方案。枚举值:\\ > NONE,无备份 \\ > DATAARK,数据方舟 \\ > SNAPSHOT,快照\\ 当前磁盘支持的备份模式参考 [[api:uhost-api:disk_type|磁盘类型]] + * + * @param string $backupType + */ + public function setBackupType(string $backupType) + { + $this->set("BackupType", $backupType); + } +} diff --git a/src/UHost/Params/GetUHostInstancePriceParamVirtualGpu.php b/src/UHost/Params/GetUHostInstancePriceParamVirtualGpu.php new file mode 100644 index 00000000..a06c3580 --- /dev/null +++ b/src/UHost/Params/GetUHostInstancePriceParamVirtualGpu.php @@ -0,0 +1,26 @@ + (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "SourceImageId" => (string) 源镜像Id, 参见 DescribeImage + * "TargetProjectId" => (string) 目标项目Id, 参见 GetProjectList + * "TargetRegion" => (string) 目标地域,不跨地域不用填 + * "TargetImageName" => (string) 目标镜像名称 + * "TargetImageDescription" => (string) 目标镜像描述 + * ] + * + * Outputs: + * + * $outputs = [ + * "TargetImageId" => (string) 目标镜像Id + * ] + * + * @throws UCloudException + */ + public function copyCustomImage(CopyCustomImageRequest $request = null): CopyCustomImageResponse + { + $resp = $this->invoke($request); + return new CopyCustomImageResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateCustomImage - 从指定UHost实例,生成自定义镜像。 + * + * See also: https://docs.ucloud.cn/api/UHost-api/create_custom_image + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "UHostId" => (string) UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + * "ImageName" => (string) 镜像名称 + * "ImageDescription" => (string) 镜像描述 + * ] + * + * Outputs: + * + * $outputs = [ + * "ImageId" => (string) 镜像Id + * ] + * + * @throws UCloudException + */ + public function createCustomImage(CreateCustomImageRequest $request = null): CreateCustomImageResponse + { + $resp = $this->invoke($request); + return new CreateCustomImageResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateIsolationGroup - 创建硬件隔离组,组内机器严格隔离在不同宿主机上。 + * + * See also: https://docs.ucloud.cn/api/UHost-api/create_isolation_group + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目id + * "GroupName" => (string) 硬件隔离组名称。请遵照[[api:uhost-api:specification|字段规范]]设定隔离组名称。 + * "Remark" => (string) 备注。请遵照[[api:uhost-api:specification|字段规范]]设定隔离组备注。 + * ] + * + * Outputs: + * + * $outputs = [ + * "GroupId" => (string) 硬件隔离组id + * ] + * + * @throws UCloudException + */ + public function createIsolationGroup(CreateIsolationGroupRequest $request = null): CreateIsolationGroupResponse + { + $resp = $this->invoke($request); + return new CreateIsolationGroupResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUHostInstance - 创建UHost实例。 + * + * See also: https://docs.ucloud.cn/api/UHost-api/create_uhost_instance + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ImageId" => (string) 镜像ID。 请通过 [DescribeImage](describe_image.html)获取 + * "Disks" => (array) [ + * [ + * "IsBoot" => (string) 是否是系统盘。枚举值:\\ > True,是系统盘 \\ > False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。 + * "Type" => (string) 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。 + * "Size" => (integer) 磁盘大小,单位GB,必须是10GB的整数倍。请参考[[api:uhost-api:disk_type|磁盘类型]]。 + * "BackupType" => (string) 磁盘备份方案。枚举值:\\ > NONE,无备份 \\ > DATAARK,数据方舟 \\ > SNAPSHOT(SNAPSHOT模式目前仅在上海C支持),快照 \\当前磁盘支持的备份模式参考 [[api:uhost-api:disk_type|磁盘类型]],默认值:NONE + * "Encrypted" => (boolean) 【功能仅部分可用区开放,详询技术支持】磁盘是否加密。加密:true, 不加密: false加密必须传入对应的的KmsKeyId,默认值false + * "KmsKeyId" => (string) 【功能仅部分可用区开放,详询技术支持】kms key id。选择加密盘时必填。 + * "CouponId" => (string) 云盘代金券id。不适用于系统盘/本地盘。请通过DescribeCoupon接口查询,或登录用户中心查看 + * ] + * ] + * "LoginMode" => (string) 主机登陆模式。密码(默认选项): Password,密钥:KeyPair。 + * "Password" => (string) UHost密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,举例如下:# echo -n Password1 | base64UGFzc3dvcmQx。 + * "Name" => (string) UHost实例名称。默认:UHost。请遵照[[api:uhost-api:specification|字段规范]]设定实例名称。 + * "Tag" => (string) 业务组。默认:Default(Default即为未分组)。请遵照[[api:uhost-api:specification|字段规范]]设定业务组。 + * "ChargeType" => (string) 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按小时后付费(支持关机不收费,目前仅部分可用区支持,请联系您的客户经理) \\Preemptive计费为抢占式实例 \\ 默认为月付 + * "Quantity" => (integer) 购买时长。默认:值 1。按小时购买(Dynamic/Postpay)时无需此参数。 月付时,此参数传0,代表购买至月末。 + * "UHostType" => (string) 【建议后续不再使用】云主机机型(V1.0),在本字段和字段MachineType中,仅需要其中1个字段即可。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * "CPU" => (integer) 虚拟CPU核数。可选参数:1-64(具体机型与CPU的对应关系参照控制台)。默认值: 4。 + * "Memory" => (integer) 内存大小。单位:MB。范围 :[1024, 262144],取值为1024的倍数(可选范围参考控制台)。默认值:8192 + * "GpuType" => (string) GPU类型,枚举值["K80", "P40", "V100", "T4", "T4S","2080Ti","2080Ti-4C","1080Ti"],MachineType为G时必填 + * "GPU" => (integer) GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关) + * "VirtualGpu" => (object) + * "NetCapability" => (string) 网络增强特性。枚举值:Normal(默认),不开启; Super,开启网络增强1.0; Ultra,开启网络增强2.0(仅支持部分可用区,请参考控制台) + * "HotplugFeature" => (boolean) 热升级特性。True为开启,False为未开启,默认False。 + * "VPCId" => (string) VPC ID。默认为当前地域的默认VPC。 + * "SubnetId" => (string) 子网 ID。默认为当前地域的默认子网。 + * "PrivateIp" => (array) 【数组】创建云主机时指定内网IP。若不传值,则随机分配当前子网下的IP。调用方式举例:PrivateIp.0=x.x.x.x。当前只支持一个内网IP。 + * "SecurityGroupId" => (string) 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 + * "IsolationGroup" => (string) 硬件隔离组id。可通过DescribeIsolationGroup获取。 + * "AlarmTemplateId" => (integer) 告警模板id,如果传了告警模板id,且告警模板id正确,则绑定告警模板。绑定告警模板失败只会在后台有日志,不会影响创建主机流程,也不会在前端报错。 + * "MachineType" => (string) 云主机机型(V2.0),在本字段和字段UHostType中,仅需要其中1个字段即可。枚举值["N", "C", "G", "O", "OS", "OPRO", "OMAX", "O.BM"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * "MinimalCpuPlatform" => (string) 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake";"Intel/CascadelakeR"; “Amd/Epyc2”,"Amd/Auto"],默认值是"Intel/Auto"。 + * "MaxCount" => (integer) 本次最大创建主机数量,取值范围是[1,100],默认值为1。 + * "NetworkInterface" => (array) [ + * [ + * "EIP" => (object) [ + * "Bandwidth" => (integer) 【若绑定EIP,此参数必填】弹性IP的外网带宽, 单位为Mbps. 共享带宽模式必须指定0M带宽, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-800] + * "PayMode" => (string) 弹性IP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; "ShareBandwidth",共享带宽模式. "Free":免费带宽模式,默认为 "Bandwidth" + * "ShareBandwidthId" => (string) 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效 + * "GlobalSSH" => (object) [ + * "Area" => (string) 填写支持SSH访问IP的地区名称,如“洛杉矶”,“新加坡”,“香港”,“东京”,“华盛顿”,“法兰克福”。Area和AreaCode两者必填其中之一。 + * "Port" => (integer) SSH端口,1-65535且不能使用80,443端口 + * "AreaCode" => (string) GlobalSSH的地区编码,格式为区域航空港国际通用代码。Area和AreaCode两者必填其中之一。 + * ] + * "OperatorName" => (string) 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International BGP: Bgp 各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International + * "CouponId" => (string) 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。 + * ] + * "IPv6" => (object) + * "CreateCernetIp" => (boolean) 申请并绑定一个教育网EIP。True为申请并绑定,False为不会申请绑定,默认False。当前只支持具有HPC特性的机型。 + * ] + * ] + * "UserData" => (string) 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码 + * "AutoDataDiskInit" => (string) 数据盘是否需要自动分区挂载。当镜像支持“Cloud-init”Feature时可填写此字段。取值 >“On” 自动挂载(默认值)> “Off” 不自动挂载。 + * "Volumes" => (array) + * "KeyPairId" => (string) KeypairId 密钥对ID,LoginMode为KeyPair时此项必须 + * "CouponId" => (string) 主机代金券ID。请通过DescribeCoupon接口查询,或登录用户中心查看 + * ] + * + * Outputs: + * + * $outputs = [ + * "UHostIds" => (array) UHost实例Id集合 + * "IPs" => (array) 【批量创建不会返回】IP信息 + * ] + * + * @throws UCloudException + */ + public function createUHostInstance(CreateUHostInstanceRequest $request = null): CreateUHostInstanceResponse + { + $resp = $this->invoke($request); + return new CreateUHostInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUHostKeyPair - 创建主机密钥对信息 + * + * See also: https://docs.ucloud.cn/api/UHost-api/create_uhost_key_pair + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "KeyPairName" => (string) 密钥对名称。 由字母,数字,符号组成,长度为1-63位。 + * ] + * + * Outputs: + * + * $outputs = [ + * "KeyPair" => (object) 密钥信息[ + * "ProjectId" => (string) 项目ID。 + * "KeyPairId" => (string) 密钥对ID。 + * "KeyPairName" => (string) 密钥对名称。 长度为1~63个英文或中文字符。 + * "KeyPairFingerPrint" => (string) 密钥对指纹。md5(ProjectId|KeyPairId|PublicKey) + * "PrivateKeyBody" => (string) 密钥对的私钥内容。只有创建接口才会返回。 + * "CreateTime" => (integer) 密钥对的创建时间,格式为Unix Timestamp。 + * ] + * ] + * + * @throws UCloudException + */ + public function createUHostKeyPair(CreateUHostKeyPairRequest $request = null): CreateUHostKeyPairResponse + { + $resp = $this->invoke($request); + return new CreateUHostKeyPairResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteIsolationGroup - 删除硬件隔离组。 + * + * See also: https://docs.ucloud.cn/api/UHost-api/delete_isolation_group + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目id + * "GroupId" => (string) 硬件隔离组id + * ] + * + * Outputs: + * + * $outputs = [ + * "GroupId" => (string) 硬件隔离组id + * ] + * + * @throws UCloudException + */ + public function deleteIsolationGroup(DeleteIsolationGroupRequest $request = null): DeleteIsolationGroupResponse + { + $resp = $this->invoke($request); + return new DeleteIsolationGroupResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteUHostKeyPairs - 删除一对或者多对密钥对。 + * + * See also: https://docs.ucloud.cn/api/UHost-api/delete_uhost_key_pairs + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "KeyPairIds" => (array) 密钥对ID,最多支持 100 对。 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteUHostKeyPairs(DeleteUHostKeyPairsRequest $request = null): DeleteUHostKeyPairsResponse + { + $resp = $this->invoke($request); + return new DeleteUHostKeyPairsResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeImage - 获取指定数据中心镜像列表,用户可通过指定操作系统类型,镜像Id进行过滤。 + * + * See also: https://docs.ucloud.cn/api/UHost-api/describe_image + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ImageType" => (string) 镜像类型。标准镜像:Base,镜像市场:Business, 自定义镜像:Custom,默认返回所有类型 + * "OsType" => (string) 操作系统类型:Linux, Windows 默认返回所有类型 + * "ImageId" => (string) 镜像Id + * "Offset" => (integer) 列表起始位置偏移量,默认为0 + * "Limit" => (integer) 返回数据长度,默认为20 + * "PriceSet" => (integer) 是否返回价格:1返回,0不返回;默认不返回 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 满足条件的镜像总数 + * "ImageSet" => (array) 镜像列表详见 UHostImageSet[ + * [ + * "Zone" => (string) 可用区,参见 [可用区列表](../summary/regionlist.html) + * "ImageId" => (string) 镜像ID + * "ImageName" => (string) 镜像名称 + * "OsType" => (string) 操作系统类型:Linux,Windows + * "OsName" => (string) 操作系统名称 + * "ImageType" => (string) 镜像类型 标准镜像:Base, 行业镜像:Business,自定义镜像:Custom + * "Features" => (array) 特殊状态标识, 目前包含NetEnhnced(网络增强1.0), NetEnhanced_Ultra](网络增强2.0), HotPlug(热升级), CloudInit, IPv6 + * "FuncType" => (string) 行业镜像类型(仅行业镜像将返回这个值) + * "IntegratedSoftware" => (string) 集成软件名称(仅行业镜像将返回这个值) + * "Vendor" => (string) 供应商(仅行业镜像将返回这个值) + * "Links" => (string) 介绍链接(仅行业镜像将返回这个值) + * "State" => (string) 镜像状态, 可用:Available,制作中:Making, 不可用:Unavailable + * "ImageDescription" => (string) 镜像描述 + * "CreateTime" => (integer) 创建时间,格式为Unix时间戳 + * "ImageSize" => (integer) 镜像大小 + * "MinimalCPU" => (string) 默认值为空'''。当CentOS 7.3/7.4/7.5等镜像会标记为“Broadwell” + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeImage(DescribeImageRequest $request = null): DescribeImageResponse + { + $resp = $this->invoke($request); + return new DescribeImageResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeIsolationGroup - 查询硬件隔离组列表。 + * + * See also: https://docs.ucloud.cn/api/UHost-api/describe_isolation_group + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目id + * "GroupId" => (string) 待查的硬件隔离组id + * "Offset" => (integer) 列表起始位置偏移量,默认为0 + * "Limit" => (integer) 返回数据长度,默认为20,最大100 + * ] + * + * Outputs: + * + * $outputs = [ + * "IsolationGroupSet" => (array) 硬件隔离组集合。参见数据结构IsolationGroup。[ + * [ + * "GroupName" => (string) 硬件隔离组名称 + * "GroupId" => (string) 硬件隔离组id + * "SpreadInfoSet" => (array) 每个可用区中的机器数量。参见数据结构SpreadInfo。[ + * [ + * "Zone" => (string) 可用区信息 + * "UHostCount" => (integer) 当前地域所有可用区中硬件隔离组中云主机的数量,不超过7。 + * ] + * ] + * "Remark" => (string) 备注 + * ] + * ] + * "TotalCount" => (integer) 硬件隔离组总数 + * ] + * + * @throws UCloudException + */ + public function describeIsolationGroup(DescribeIsolationGroupRequest $request = null): DescribeIsolationGroupResponse + { + $resp = $this->invoke($request); + return new DescribeIsolationGroupResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUHostInstance - 获取主机或主机列表信息,并可根据数据中心,主机ID等参数进行过滤。 + * + * See also: https://docs.ucloud.cn/api/UHost-api/describe_uhost_instance + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "UHostIds" => (array) 【数组】UHost主机的资源ID,例如UHostIds.0代表希望获取信息 的主机1,UHostIds.1代表主机2。 如果不传入,则返回当前Region 所有符合条件的UHost实例。 + * "Tag" => (string) 要查询的业务组名称 + * "Offset" => (integer) 列表起始位置偏移量,默认为0 + * "Limit" => (integer) 返回数据长度,默认为20,最大100 + * "IsolationGroup" => (string) 硬件隔离组id。通过硬件隔离组筛选主机。 + * "VPCId" => (string) vpc id。通过VPC筛选主机。北京一地域无效。 + * "SubnetId" => (string) 子网id。通过子网筛选主机。北京一地域无效。 + * "UDiskIdForAttachment" => (string) 要挂载的云盘id,过滤返回能被UDiskId挂载的云主机。目前主要针对rssd云盘使用 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) UHostInstance总数 + * "UHostSet" => (array) 云主机实例列表,每项参数可见下面 UHostInstanceSet[ + * [ + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "IPv6Feature" => (boolean) true:有ipv6特性;false,没有ipv6特性 + * "UHostId" => (string) UHost实例ID + * "UHostType" => (string) 【建议不再使用】云主机机型(旧)。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * "MachineType" => (string) 云主机机型(新)。参考[[api:uhost-api:uhost_type#主机概念20版本|云主机机型说明]]。 + * "CpuPlatform" => (string) 云主机CPU平台。参考[[api:uhost-api:uhost_type#主机概念20版本|云主机机型说明]]。 + * "StorageType" => (string) 【建议不再使用】主机磁盘类型。 枚举值为:\\ > LocalDisk,本地磁盘; \\ > UDisk 云盘。\\只要有一块磁盘为本地盘,即返回LocalDisk。 + * "ImageId" => (string) 【建议不再使用】主机的系统盘ID。 + * "BasicImageId" => (string) 基础镜像ID(指当前自定义镜像的来源镜像) + * "BasicImageName" => (string) 基础镜像名称(指当前自定义镜像的来源镜像) + * "Tag" => (string) 业务组名称 + * "Remark" => (string) 备注 + * "Name" => (string) UHost实例名称 + * "State" => (string) 实例状态,枚举值:\\ >初始化: Initializing; \\ >启动中: Starting; \\> 运行中: Running; \\> 关机中: Stopping; \\ >关机: Stopped \\ >安装失败: Install Fail; \\ >重启中: Rebooting; \\ > 未知(空字符串,获取状态超时或出错):"" + * "CreateTime" => (integer) 创建时间,格式为Unix时间戳 + * "ChargeType" => (string) 计费模式,枚举值为: Year,按年付费; Month,按月付费; Dynamic,按需付费(需开启权限);Preemptive 为抢占式实例; + * "ExpireTime" => (integer) 到期时间,格式为Unix时间戳 + * "CPU" => (integer) 虚拟CPU核数,单位: 个 + * "Memory" => (integer) 内存大小,单位: MB + * "AutoRenew" => (string) 是否自动续费,自动续费:“Yes”,不自动续费:“No” + * "DiskSet" => (array) 磁盘信息见 UHostDiskSet[ + * [ + * "DiskType" => (string) 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。 + * "IsBoot" => (string) 是否是系统盘。枚举值:\\ > True,是系统盘 \\ > False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。 + * "Encrypted" => (string) "true": 加密盘 "false":非加密盘 + * "Type" => (string) 【建议不再使用】磁盘类型。系统盘: Boot,数据盘: Data,网络盘:Udisk + * "DiskId" => (string) 磁盘ID + * "Name" => (string) UDisk名字(仅当磁盘是UDisk时返回) + * "Drive" => (string) 磁盘盘符 + * "Size" => (integer) 磁盘大小,单位: GB + * "BackupType" => (string) 备份方案。若开通了数据方舟,则为DATAARK + * ] + * ] + * "IPSet" => (array) 详细信息见 UHostIPSet[ + * [ + * "IPMode" => (string) IPv4/IPv6; + * "Default" => (string) 内网 Private 类型下,表示是否为默认网卡。true: 是默认网卡;其他值:不是。 + * "Mac" => (string) 内网 Private 类型下,当前网卡的Mac。 + * "Weight" => (integer) 当前EIP的权重。权重最大的为当前的出口IP。 + * "Type" => (string) 国际: Internation,BGP: Bgp,内网: Private + * "IPId" => (string) 外网IP资源ID 。(内网IP无对应的资源ID) + * "IP" => (string) IP地址 + * "Bandwidth" => (integer) IP对应的带宽, 单位: Mb (内网IP不显示带宽信息) + * "VPCId" => (string) IP地址对应的VPC ID。(北京一不支持,字段返回为空) + * "SubnetId" => (string) IP地址对应的子网 ID。(北京一不支持,字段返回为空) + * "NetworkInterfaceId" => (string) 弹性网卡为默认网卡时,返回对应的 ID 值 + * ] + * ] + * "NetCapability" => (string) 网络增强。Normal: 无;Super: 网络增强1.0; Ultra: 网络增强2.0 + * "NetworkState" => (string) 【建议不再使用】网络状态。 连接:Connected, 断开:NotConnected + * "TimemachineFeature" => (string) 【建议不再使用】数据方舟模式。枚举值:\\ > Yes: 开启方舟; \\ > no,未开启方舟 + * "HotplugFeature" => (boolean) true: 开启热升级; false,未开启热升级 + * "SubnetType" => (string) 【建议不再使用】仅北京A的云主机会返回此字段。基础网络模式:Default;子网模式:Private + * "OsName" => (string) 创建主机的最初来源镜像的操作系统名称(若直接通过基础镜像创建,此处返回和BasicImageName一致) + * "OsType" => (string) 操作系统类别。返回"Linux"或者"Windows" + * "HostType" => (string) 【建议不再使用】主机系列:N2,表示系列2;N1,表示系列1 + * "LifeCycle" => (string) 主机的生命周期类型。目前仅支持Normal:普通; + * "GPU" => (integer) GPU个数 + * "BootDiskState" => (string) 系统盘状态 Normal表示初始化完成;Initializing表示在初始化。仍在初始化的系统盘无法制作镜像。 + * "TotalDiskSpace" => (integer) 总的数据盘存储空间。 + * "IsolationGroup" => (string) 隔离组id,不在隔离组则返回"" + * "CloudInitFeature" => (boolean) true,支持cloutinit方式初始化;false,不支持 + * "RdmaClusterId" => (string) RDMA集群id,仅快杰云主机返回该值;其他类型云主机返回""。当云主机的此值与RSSD云盘的RdmaClusterId相同时,RSSD可以挂载到这台云主机。 + * "RestrictMode" => (string) 仅抢占式实例返回,LowSpeed为低速模式,PowerOff为关机模式 + * "HpcFeature" => (boolean) true: 开启 hpc 系列功能;false: 未开启 + * "KeyPair" => (object) 密钥信息见 UHostKeyPair[ + * "KeyPairId" => (string) 密钥对ID + * "KeyPairState" => (string) 主机密钥对状态,Normal 正常,Deleted 删除 + * ] + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeUHostInstance(DescribeUHostInstanceRequest $request = null): DescribeUHostInstanceResponse + { + $resp = $this->invoke($request); + return new DescribeUHostInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUHostKeyPairs - 查询一个或多个密钥对。 + * + * See also: https://docs.ucloud.cn/api/UHost-api/describe_uhost_key_pairs + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "KeyPairName" => (string) 密钥对名称。 + * "KeyPairFingerPrint" => (string) 密钥对的指纹。 + * "Offset" => (integer) 列表起始位置偏移量,默认为0 + * "Limit" => (integer) 返回数据长度,默认为20,最大100 + * ] + * + * Outputs: + * + * $outputs = [ + * "KeyPairs" => (array) 密钥对信息集合[ + * [ + * "ProjectId" => (string) 项目ID。 + * "KeyPairId" => (string) 密钥对ID。 + * "KeyPairName" => (string) 密钥对名称。 长度为1~63个英文或中文字符。 + * "KeyPairFingerPrint" => (string) 密钥对指纹。md5(ProjectId|KeyPairId|PublicKey) + * "PrivateKeyBody" => (string) 密钥对的私钥内容。只有创建接口才会返回。 + * "CreateTime" => (integer) 密钥对的创建时间,格式为Unix Timestamp。 + * ] + * ] + * "TotalCount" => (integer) 密钥对总数 + * ] + * + * @throws UCloudException + */ + public function describeUHostKeyPairs(DescribeUHostKeyPairsRequest $request = null): DescribeUHostKeyPairsResponse + { + $resp = $this->invoke($request); + return new DescribeUHostKeyPairsResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUHostTags - 获取指定数据中心的业务组列表。 + * + * See also: https://docs.ucloud.cn/api/UHost-api/describe_uhost_tags + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 已有主机的业务组总数 + * "TagSet" => (array) 业务组集合见 UHostTagSet[ + * [ + * "Tag" => (string) 业务组名称 + * "TotalCount" => (integer) 该业务组中包含的主机个数 + * "Zone" => (string) 可用区 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeUHostTags(DescribeUHostTagsRequest $request = null): DescribeUHostTagsResponse + { + $resp = $this->invoke($request); + return new DescribeUHostTagsResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetAttachedDiskUpgradePrice - 获取挂载磁盘的升级价格 + * + * See also: https://docs.ucloud.cn/api/UHost-api/get_attached_disk_upgrade_price + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "DiskSpace" => (integer) 磁盘大小,单位GB,步长为10。取值范围需大于当前磁盘大小,最大值请参考[[api:uhost-api:disk_type|磁盘类型]]。 + * "DiskId" => (string) 磁盘ID。参见 [DescribeUHostInstance](describe_uhost_instance.html)返回值中的DiskSet。 + * "UHostId" => (string) UHost实例ID。 参见 [DescribeUHostInstance](describe_uhost_instance.html)。 + * "BackupMode" => (string) 磁盘备份方案。枚举值:\\ > NONE,无备份 \\ > DATAARK,数据方舟 \\> SNAPSHOT(SNAPSHOT模式目前仅在上海C支持),快照 \\ 当前磁盘支持的备份模式参考 [[api:uhost-api:disk_type|磁盘类型]]。默认值为当前的备份模式。 + * ] + * + * Outputs: + * + * $outputs = [ + * "Price" => (number) 升级差价。精度为小数点后2位。 + * ] + * + * @throws UCloudException + */ + public function getAttachedDiskUpgradePrice(GetAttachedDiskUpgradePriceRequest $request = null): GetAttachedDiskUpgradePriceResponse + { + $resp = $this->invoke($request); + return new GetAttachedDiskUpgradePriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUHostInstancePrice - 根据UHost实例配置,获取UHost实例的价格。 + * + * See also: https://docs.ucloud.cn/api/UHost-api/get_uhost_instance_price + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "CPU" => (integer) CPU核数。可选参数:1-64。可选范围参照控制台。默认值: 4 + * "Memory" => (integer) 内存大小。单位:MB。范围 :[1024, 262144],取值为1024的倍数(可选范围参照好控制台)。默认值:8192 + * "Count" => (integer) 购买台数,范围[1,5] + * "Disks" => (array) [ + * [ + * "IsBoot" => (string) 是否是系统盘。枚举值:\\ > True,是系统盘 \\ > False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。 + * "Size" => (integer) 磁盘大小,单位GB。请参考[[api:uhost-api:disk_type|磁盘类型]]。 + * "Type" => (string) 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。 + * "BackupType" => (string) 磁盘备份方案。枚举值:\\ > NONE,无备份 \\ > DATAARK,数据方舟 \\ > SNAPSHOT,快照\\ 当前磁盘支持的备份模式参考 [[api:uhost-api:disk_type|磁盘类型]] + * ] + * ] + * "ImageId" => (string) 镜像Id,可通过 [DescribeImage](describe_image.html) 获取镜像ID, 如果镜像ID不传,系统盘大小必传 + * "GPU" => (integer) GPU卡核心数。仅GPU机型支持此字段。 + * "ChargeType" => (string) 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时付费 // >Preemptive 抢占式实例 \\ 如果不传某个枚举值,默认返回年付、月付、时付的价格组合集。 + * "NetCapability" => (string) 网络增强。枚举值:Normal,不开启; Super,开启网络增强1.0。 默认值为Normal。 + * "UHostType" => (string) 【待废弃】云主机机型(V1版本概念)。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * "MachineType" => (string) 云主机机型(V2版本概念)。枚举值["N", "C", "G", "O", "OS", "OPRO", "OMAX", "O.BM"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * "GpuType" => (string) GPU类型,枚举值["K80", "P40", "V100", "T4","T4S","2080Ti","2080Ti-4C","1080Ti"] + * "Quantity" => (integer) 购买时长。默认: 1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 + * "CpuPlatform" => (string) 取值"Intel" "Amd",默认值“Intel” + * "Volumes" => (array) + * "VirtualGpu" => (object) + * ] + * + * Outputs: + * + * $outputs = [ + * "PriceSet" => (array) 价格列表 UHostPriceSet[ + * [ + * "ChargeType" => (string) 计费类型。Year,Month,Dynamic + * "Price" => (number) 价格,单位: 元,保留小数点后两位有效数字 + * "OriginalPrice" => (number) 限时优惠的折前原价(即列表价乘以商务折扣后的单价)。 + * "ListPrice" => (number) 产品列表价。 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getUHostInstancePrice(GetUHostInstancePriceRequest $request = null): GetUHostInstancePriceResponse + { + $resp = $this->invoke($request); + return new GetUHostInstancePriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUHostInstanceVncInfo - 获取指定UHost实例的管理VNC配置详细信息。 + * + * See also: https://docs.ucloud.cn/api/UHost-api/get_uhost_instance_vnc_info + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "UHostId" => (string) UHost实例ID 参见 [DescribeUHostInstance](./describe_uhost_instance.html) + * ] + * + * Outputs: + * + * $outputs = [ + * "UHostId" => (string) UHost实例ID + * "VncIP" => (string) Vnc登录IP + * "VncPort" => (integer) Vnc登录端口 + * "VncPassword" => (string) Vnc 登录密码 + * ] + * + * @throws UCloudException + */ + public function getUHostInstanceVncInfo(GetUHostInstanceVncInfoRequest $request = null): GetUHostInstanceVncInfoResponse + { + $resp = $this->invoke($request); + return new GetUHostInstanceVncInfoResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUHostUpgradePrice - 获取UHost实例升级配置的价格。可选配置范围请参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * + * See also: https://docs.ucloud.cn/api/UHost-api/get_uhost_upgrade_price + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "UHostId" => (string) UHost实例ID。 参见 [DescribeUHostInstance](describe_uhost_instance.html)。 + * "CPU" => (integer) 虚拟CPU核数。可选参数:1-64(可选范围参考控制台)。默认值为当前实例的CPU核数。 + * "Memory" => (integer) 内存大小。单位:MB。范围 :[1024, 262144],取值为1024的倍数(可选范围参考控制台)。默认值为当前实例的内存大小。 + * "NetCapValue" => (integer) 网卡升降级(1,表示升级,2表示降级,0表示不变) + * ] + * + * Outputs: + * + * $outputs = [ + * "Price" => (number) 规格调整差价。精确到小数点后2位。 + * "OriginalPrice" => (number) 限时优惠的折前原价 + * ] + * + * @throws UCloudException + */ + public function getUHostUpgradePrice(GetUHostUpgradePriceRequest $request = null): GetUHostUpgradePriceResponse + { + $resp = $this->invoke($request); + return new GetUHostUpgradePriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ImportCustomImage - 把UFile的镜像文件导入到UHost,生成自定义镜像 + * + * See also: https://docs.ucloud.cn/api/UHost-api/import_custom_image + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ImageName" => (string) 镜像名称 + * "UFileUrl" => (string) UFile私有空间地址 + * "OsType" => (string) 操作系统平台,比如CentOS、Ubuntu、Windows、RedHat等,请参考控制台的镜像版本;若导入控制台上没有的操作系统,参数为Other + * "OsName" => (string) 操作系统详细版本,请参考控制台的镜像版本;OsType为Other时,输入参数为Other + * "Format" => (string) 镜像格式,可选RAW、VHD、VMDK、qcow2 + * "Auth" => (boolean) 是否授权。必须填true + * "ImageDescription" => (string) 镜像描述 + * ] + * + * Outputs: + * + * $outputs = [ + * "ImageId" => (string) 镜像Id + * ] + * + * @throws UCloudException + */ + public function importCustomImage(ImportCustomImageRequest $request = null): ImportCustomImageResponse + { + $resp = $this->invoke($request); + return new ImportCustomImageResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ImportUHostKeyPairs - 导入密钥对后,仅保管公钥部分,需自行妥善保存密钥对的私钥部分。 + * + * See also: https://docs.ucloud.cn/api/UHost-api/import_uhost_key_pairs + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "KeyPairName" => (string) 密钥对名称。由字母,数字,符号组成,长度为1-63位。 + * "PublicKeyBody" => (string) 密钥对的公钥内容。 + * ] + * + * Outputs: + * + * $outputs = [ + * "KeyPairName" => (string) 密钥对名称 + * "KeyPairId" => (string) 密钥对标识 + * "KeyPairFingerPrint" => (string) 密钥对指纹。根据RFC4716定义的公钥指纹格式,采用MD5信息摘要算法。算法处理的具体信息格式:`ProjectIdKeyPairId|PublicKeyBody`。 + * ] + * + * @throws UCloudException + */ + public function importUHostKeyPairs(ImportUHostKeyPairsRequest $request = null): ImportUHostKeyPairsResponse + { + $resp = $this->invoke($request); + return new ImportUHostKeyPairsResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * LeaveIsolationGroup - 移除硬件隔离组中的主机 + * + * See also: https://docs.ucloud.cn/api/UHost-api/leave_isolation_group + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区信息 + * "ProjectId" => (string) 项目id + * "GroupId" => (string) 硬件隔离组id + * "UHostId" => (string) 主机id + * ] + * + * Outputs: + * + * $outputs = [ + * "UHostId" => (string) 主机id + * ] + * + * @throws UCloudException + */ + public function leaveIsolationGroup(LeaveIsolationGroupRequest $request = null): LeaveIsolationGroupResponse + { + $resp = $this->invoke($request); + return new LeaveIsolationGroupResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyUHostIP - 修改云主机内网 IP 地址 + * + * See also: https://docs.ucloud.cn/api/UHost-api/modify_uhost_ip + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写时为默认项目。请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "PresentIpAddress" => (string) 需要修改为的 IP 地址。新的IP地址和旧IP地址必须属于统一子网,且和主机内部的配置文件一致。 + * "UHostId" => (string) 指定云主机 ID。 + * "PreviousIpAddress" => (string) 所需修改的原 IP 地址 ,当云主机只有一个IP地址时,此参数不必填写。 + * ] + * + * Outputs: + * + * $outputs = [ + * "UHostId" => (string) 目标云主机 ID + * ] + * + * @throws UCloudException + */ + public function modifyUHostIP(ModifyUHostIPRequest $request = null): ModifyUHostIPResponse + { + $resp = $this->invoke($request); + return new ModifyUHostIPResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyUHostInstanceName - 修改指定UHost实例名称,需要给出数据中心,UHostId,及新的实例名称。 + * + * See also: https://docs.ucloud.cn/api/UHost-api/modify_uhost_instance_name + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "UHostId" => (string) UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + * "Name" => (string) UHost实例名称 + * ] + * + * Outputs: + * + * $outputs = [ + * "UHostId" => (string) UHost实例ID + * ] + * + * @throws UCloudException + */ + public function modifyUHostInstanceName(ModifyUHostInstanceNameRequest $request = null): ModifyUHostInstanceNameResponse + { + $resp = $this->invoke($request); + return new ModifyUHostInstanceNameResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyUHostInstanceRemark - 修改指定UHost实例备注信息。 + * + * See also: https://docs.ucloud.cn/api/UHost-api/modify_uhost_instance_remark + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "UHostId" => (string) UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + * "Remark" => (string) 备注 + * ] + * + * Outputs: + * + * $outputs = [ + * "UHostId" => (string) UHost实例ID + * ] + * + * @throws UCloudException + */ + public function modifyUHostInstanceRemark(ModifyUHostInstanceRemarkRequest $request = null): ModifyUHostInstanceRemarkResponse + { + $resp = $this->invoke($request); + return new ModifyUHostInstanceRemarkResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyUHostInstanceTag - 修改指定UHost实例业务组标识。 + * + * See also: https://docs.ucloud.cn/api/UHost-api/modify_uhost_instance_tag + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "UHostId" => (string) UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + * "Tag" => (string) 业务组名称 + * ] + * + * Outputs: + * + * $outputs = [ + * "UHostId" => (string) UHost实例ID + * ] + * + * @throws UCloudException + */ + public function modifyUHostInstanceTag(ModifyUHostInstanceTagRequest $request = null): ModifyUHostInstanceTagResponse + { + $resp = $this->invoke($request); + return new ModifyUHostInstanceTagResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * PoweroffUHostInstance - 直接关闭UHost实例电源,无需等待实例正常关闭。 + * + * See also: https://docs.ucloud.cn/api/UHost-api/poweroff_uhost_instance + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "UHostId" => (string) UHost实例ID 参见 [DescribeUHostInstance](./describe_uhost_instance.html) + * ] + * + * Outputs: + * + * $outputs = [ + * "UHostId" => (string) UHost的实例ID + * ] + * + * @throws UCloudException + */ + public function poweroffUHostInstance(PoweroffUHostInstanceRequest $request = null): PoweroffUHostInstanceResponse + { + $resp = $this->invoke($request); + return new PoweroffUHostInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * RebootUHostInstance - 重新启动UHost实例,需要指定数据中心及UHostID两个参数的值。 + * + * See also: https://docs.ucloud.cn/api/UHost-api/reboot_uhost_instance + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "UHostId" => (string) UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + * "DiskPassword" => (string) 加密盘密码 + * ] + * + * Outputs: + * + * $outputs = [ + * "UHostId" => (string) UHost实例ID + * ] + * + * @throws UCloudException + */ + public function rebootUHostInstance(RebootUHostInstanceRequest $request = null): RebootUHostInstanceResponse + { + $resp = $this->invoke($request); + return new RebootUHostInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ReinstallUHostInstance - 重新安装指定UHost实例的操作系统 + * + * See also: https://docs.ucloud.cn/api/UHost-api/reinstall_uhost_instance + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "UHostId" => (string) UHost实例资源ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + * "Password" => (string) 如果重装UHost实例时LoginMode为Password,则必须填写,如果LoginMode为KeyPair,不需要填写 (密码格式使用BASE64编码;举例如下:# echo -n Password1 | base64UGFzc3dvcmQx。) + * "ImageId" => (string) 镜像Id,默认使用原镜像 参见 [DescribeImage](describe_image.html) + * "ReserveDisk" => (string) 是否保留数据盘,保留:Yes,不报留:No, 默认:Yes;如果是从Windows重装为Linux或反之,则无法保留数据盘(该参数目前仅对本地数据盘起作用) + * "BootDiskSpace" => (integer) 系统盘大小。 单位:GB, 范围[20,100], 步长:10 + * "UserData" => (string) cloudinit初始化使用。注意:1、总数据量大小不超多16K 2、使用base64编码 + * "AutoDataDiskInit" => (string) 数据盘是否需要自动分区挂载。当镜像支持Cloud-init Feature时可填写此字段。取值“On”(默认值), “Off” + * "LoginMode" => (string) 主机登陆模式。密码(默认选项): Password,密钥 KeyPair。 + * "KeyPairId" => (string) KeypairId 密钥对ID,LoginMode为KeyPair时此项必须。 + * ] + * + * Outputs: + * + * $outputs = [ + * "UHostId" => (string) UHost实例资源ID + * ] + * + * @throws UCloudException + */ + public function reinstallUHostInstance(ReinstallUHostInstanceRequest $request = null): ReinstallUHostInstanceResponse + { + $resp = $this->invoke($request); + return new ReinstallUHostInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ResetUHostInstancePassword - 重置UHost实例的管理员密码。 + * + * See also: https://docs.ucloud.cn/api/UHost-api/reset_uhost_instance_password + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "UHostId" => (string) UHost实例ID + * "Password" => (string) UHost新密码(密码格式使用BASE64编码) + * ] + * + * Outputs: + * + * $outputs = [ + * "UHostId" => (string) UHost实例ID + * ] + * + * @throws UCloudException + */ + public function resetUHostInstancePassword(ResetUHostInstancePasswordRequest $request = null): ResetUHostInstancePasswordResponse + { + $resp = $this->invoke($request); + return new ResetUHostInstancePasswordResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ResizeAttachedDisk - 修改挂载的磁盘大小,包含系统盘和数据盘 + * + * See also: https://docs.ucloud.cn/api/UHost-api/resize_attached_disk + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "UHostId" => (string) UHost实例ID。 参见 [DescribeUHostInstance](describe_uhost_instance.html)。 + * "DiskSpace" => (integer) 磁盘大小,单位GB,步长为10。取值范围需大于当前磁盘大小,最大值请参考[[api:uhost-api:disk_type|磁盘类型]]。 + * "DiskId" => (string) 磁盘ID。参见 [DescribeUHostInstance](describe_uhost_instance.html)返回值中的DiskSet。 + * "DryRun" => (boolean) 用于测试磁盘是否支持在线扩容。DryRun=true,不会执行实际操作,只会返回操作的预期结果。DryRun = false ,正常执行扩容操作。 + * ] + * + * Outputs: + * + * $outputs = [ + * "DiskId" => (string) 改配成功的磁盘id + * "NeedRestart" => (boolean) 扩容后的状态。NeedRestart = true,必须关闭后启动实例才能使用扩容的磁盘空间。NeedRestart = false,磁盘扩容后无需重启操作。 + * ] + * + * @throws UCloudException + */ + public function resizeAttachedDisk(ResizeAttachedDiskRequest $request = null): ResizeAttachedDiskResponse + { + $resp = $this->invoke($request); + return new ResizeAttachedDiskResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ResizeUHostInstance - 修改指定UHost实例的资源配置,如CPU核心数,内存容量大小,网络增强等。可选配置范围请参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * + * See also: https://docs.ucloud.cn/api/UHost-api/resize_uhost_instance + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "UHostId" => (string) UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + * "CPU" => (integer) 虚拟CPU核数。可选参数:1-240(可选范围与UHostType相关)。默认值为当前实例的CPU核数 + * "Memory" => (integer) 内存大小。单位:MB。范围 :[1024, 1966080],取值为1024的倍数(可选范围与UHostType相关)。默认值为当前实例的内存大小。 + * "NetCapValue" => (integer) 网卡升降级(1,表示升级,2表示降级,0表示不变) + * ] + * + * Outputs: + * + * $outputs = [ + * "UHostId" => (string) UHost实例ID + * ] + * + * @throws UCloudException + */ + public function resizeUHostInstance(ResizeUHostInstanceRequest $request = null): ResizeUHostInstanceResponse + { + $resp = $this->invoke($request); + return new ResizeUHostInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * StartUHostInstance - 启动处于关闭状态的UHost实例,需要指定数据中心及UHostID两个参数的值。 + * + * See also: https://docs.ucloud.cn/api/UHost-api/start_uhost_instance + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "UHostId" => (string) UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + * "DiskPassword" => (string) 加密盘密码 + * ] + * + * Outputs: + * + * $outputs = [ + * "UHostId" => (string) UHost实例ID + * ] + * + * @throws UCloudException + */ + public function startUHostInstance(StartUHostInstanceRequest $request = null): StartUHostInstanceResponse + { + $resp = $this->invoke($request); + return new StartUHostInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * StopUHostInstance - 指停止处于运行状态的UHost实例,需指定数据中心及UhostID。 + * + * See also: https://docs.ucloud.cn/api/UHost-api/stop_uhost_instance + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "UHostId" => (string) UHost实例ID 参见 [DescribeUHostInstance](describe_uhost_instance.html) + * ] + * + * Outputs: + * + * $outputs = [ + * "UHostId" => (string) UHost实例ID + * ] + * + * @throws UCloudException + */ + public function stopUHostInstance(StopUHostInstanceRequest $request = null): StopUHostInstanceResponse + { + $resp = $this->invoke($request); + return new StopUHostInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * TerminateCustomImage - 删除用户自定义镜像 + * + * See also: https://docs.ucloud.cn/api/UHost-api/terminate_custom_image + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ImageId" => (string) 自制镜像ID 参见 [DescribeImage](describe_image.html) + * ] + * + * Outputs: + * + * $outputs = [ + * "ImageId" => (string) 自制镜像Id + * ] + * + * @throws UCloudException + */ + public function terminateCustomImage(TerminateCustomImageRequest $request = null): TerminateCustomImageResponse + { + $resp = $this->invoke($request); + return new TerminateCustomImageResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * TerminateUHostInstance - 删除指定数据中心的UHost实例。 + * + * See also: https://docs.ucloud.cn/api/UHost-api/terminate_uhost_instance + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "UHostId" => (string) UHost资源Id 参见 [DescribeUHostInstance](describe_uhost_instance.html) + * "ReleaseEIP" => (boolean) 删除主机时是否释放绑定的EIP。默认为false。 + * "ReleaseUDisk" => (boolean) 删除主机时是否同时删除挂载的数据盘。默认为false。 + * ] + * + * Outputs: + * + * $outputs = [ + * "InRecycle" => (string) 用于判断主机删除时是否进入回收站。放入回收站:"Yes", 彻底删除:“No”。 + * "UHostId" => (string) UHost 实例 Id + * ] + * + * @throws UCloudException + */ + public function terminateUHostInstance(TerminateUHostInstanceRequest $request = null): TerminateUHostInstanceResponse + { + $resp = $this->invoke($request); + return new TerminateUHostInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpgradeToArkUHostInstance - 普通升级为方舟机型 + * + * See also: https://docs.ucloud.cn/api/UHost-api/upgrade_to_ark_uhost_instance + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "UHostIds" => (array) UHost主机的资源ID,例如UHostIds.0代表希望升级的主机1,UHostIds.1代表主机2。 + * "CouponId" => (string) 代金券ID 请参考DescribeCoupon接口 + * ] + * + * Outputs: + * + * $outputs = [ + * "UHostSet" => (array) UHost主机的资源ID数组 + * ] + * + * @throws UCloudException + */ + public function upgradeToArkUHostInstance(UpgradeToArkUHostInstanceRequest $request = null): UpgradeToArkUHostInstanceResponse + { + $resp = $this->invoke($request); + return new UpgradeToArkUHostInstanceResponse($resp->toArray(), $resp->getRequestId()); + } +} diff --git a/src/UK8S/Apis/AddUK8SExistingUHostRequest.php b/src/UK8S/Apis/AddUK8SExistingUHostRequest.php new file mode 100644 index 00000000..a3fa5013 --- /dev/null +++ b/src/UK8S/Apis/AddUK8SExistingUHostRequest.php @@ -0,0 +1,293 @@ + "AddUK8SExistingUHost"]); + $this->markRequired("Region"); + $this->markRequired("Password"); + $this->markRequired("ClusterId"); + $this->markRequired("UHostId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Password: Node节点密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,如下:# echo -n Password1 | base64 + * + * @return string|null + */ + public function getPassword(): string + { + return $this->get("Password"); + } + + /** + * Password: Node节点密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,如下:# echo -n Password1 | base64 + * + * @param string $password + */ + public function setPassword(string $password) + { + $this->set("Password", $password); + } + + /** + * ClusterId: UK8S集群ID。 可从UK8S控制台获取。 + * + * @return string|null + */ + public function getClusterId(): string + { + return $this->get("ClusterId"); + } + + /** + * ClusterId: UK8S集群ID。 可从UK8S控制台获取。 + * + * @param string $clusterId + */ + public function setClusterId(string $clusterId) + { + $this->set("ClusterId", $clusterId); + } + + /** + * UHostId: 云主机Id,为了保证节点正常运行,该主机配置不得低于2C4G。 + * + * @return string|null + */ + public function getUHostId(): string + { + return $this->get("UHostId"); + } + + /** + * UHostId: 云主机Id,为了保证节点正常运行,该主机配置不得低于2C4G。 + * + * @param string $uHostId + */ + public function setUHostId(string $uHostId) + { + $this->set("UHostId", $uHostId); + } + + /** + * MaxPods: 默认110,生产环境建议小于等于110。 + * + * @return integer|null + */ + public function getMaxPods(): int + { + return $this->get("MaxPods"); + } + + /** + * MaxPods: 默认110,生产环境建议小于等于110。 + * + * @param int $maxPods + */ + public function setMaxPods(int $maxPods) + { + $this->set("MaxPods", $maxPods); + } + + /** + * Labels: Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + * + * @return string|null + */ + public function getLabels(): string + { + return $this->get("Labels"); + } + + /** + * Labels: Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + * + * @param string $labels + */ + public function setLabels(string $labels) + { + $this->set("Labels", $labels); + } + + /** + * SubnetId: 该云主机所属子网Id。 + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 该云主机所属子网Id。 + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * ImageId: 镜像 Id,不填时后台程序会自动选用一个可用的镜像 Id,支持用户自定义镜像,自定义镜像必须基于基础镜像制作。 + * + * @return string|null + */ + public function getImageId(): string + { + return $this->get("ImageId"); + } + + /** + * ImageId: 镜像 Id,不填时后台程序会自动选用一个可用的镜像 Id,支持用户自定义镜像,自定义镜像必须基于基础镜像制作。 + * + * @param string $imageId + */ + public function setImageId(string $imageId) + { + $this->set("ImageId", $imageId); + } + + /** + * DisableSchedule: 用于标示添加完节点后是否将节点临时禁用. 传入 "true" 表示禁用,传入其它或不传表示不禁用 + * + * @return boolean|null + */ + public function getDisableSchedule(): bool + { + return $this->get("DisableSchedule"); + } + + /** + * DisableSchedule: 用于标示添加完节点后是否将节点临时禁用. 传入 "true" 表示禁用,传入其它或不传表示不禁用 + * + * @param boolean $disableSchedule + */ + public function setDisableSchedule(bool $disableSchedule) + { + $this->set("DisableSchedule", $disableSchedule); + } + + /** + * UserData: 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码。 + * + * @return string|null + */ + public function getUserData(): string + { + return $this->get("UserData"); + } + + /** + * UserData: 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码。 + * + * @param string $userData + */ + public function setUserData(string $userData) + { + $this->set("UserData", $userData); + } + + /** + * InitScript: 用户自定义Shell脚本。与UserData的区别在于InitScript在节点初始化完毕后才执行,UserData则是云主机初始化时执行。 + * + * @return string|null + */ + public function getInitScript(): string + { + return $this->get("InitScript"); + } + + /** + * InitScript: 用户自定义Shell脚本。与UserData的区别在于InitScript在节点初始化完毕后才执行,UserData则是云主机初始化时执行。 + * + * @param string $initScript + */ + public function setInitScript(string $initScript) + { + $this->set("InitScript", $initScript); + } +} diff --git a/src/UK8S/Apis/AddUK8SExistingUHostResponse.php b/src/UK8S/Apis/AddUK8SExistingUHostResponse.php new file mode 100644 index 00000000..80b2f757 --- /dev/null +++ b/src/UK8S/Apis/AddUK8SExistingUHostResponse.php @@ -0,0 +1,26 @@ + "AddUK8SPHostNode"]); + $this->markRequired("Zone"); + $this->markRequired("Region"); + $this->markRequired("ClusterId"); + $this->markRequired("Count"); + $this->markRequired("Password"); + $this->markRequired("ChargeType"); + } + + + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ClusterId: UK8S集群ID。 可从UK8S控制台获取。 + * + * @return string|null + */ + public function getClusterId(): string + { + return $this->get("ClusterId"); + } + + /** + * ClusterId: UK8S集群ID。 可从UK8S控制台获取。 + * + * @param string $clusterId + */ + public function setClusterId(string $clusterId) + { + $this->set("ClusterId", $clusterId); + } + + /** + * Count: 最大创建Node节点数量,取值范围是[1,10]。 + * + * @return integer|null + */ + public function getCount(): int + { + return $this->get("Count"); + } + + /** + * Count: 最大创建Node节点数量,取值范围是[1,10]。 + * + * @param int $count + */ + public function setCount(int $count) + { + $this->set("Count", $count); + } + + /** + * Password: Node节点密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,如下:# echo -n Password1 | base64 + * + * @return string|null + */ + public function getPassword(): string + { + return $this->get("Password"); + } + + /** + * Password: Node节点密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,如下:# echo -n Password1 | base64 + * + * @param string $password + */ + public function setPassword(string $password) + { + $this->set("Password", $password); + } + + /** + * ChargeType: 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ 默认为月付 + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ 默认为月付 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时长。默认: 1。月付时,此参数传0,代表了购买至月末。 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长。默认: 1。月付时,此参数传0,代表了购买至月末。 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * Labels: Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + * + * @return string|null + */ + public function getLabels(): string + { + return $this->get("Labels"); + } + + /** + * Labels: Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + * + * @param string $labels + */ + public function setLabels(string $labels) + { + $this->set("Labels", $labels); + } + + /** + * MaxPods: 默认110,生产环境建议小于等于110。 + * + * @return integer|null + */ + public function getMaxPods(): int + { + return $this->get("MaxPods"); + } + + /** + * MaxPods: 默认110,生产环境建议小于等于110。 + * + * @param int $maxPods + */ + public function setMaxPods(int $maxPods) + { + $this->set("MaxPods", $maxPods); + } + + /** + * Type: 物理机类型,默认为:db-2(基础型-SAS-V3) + * + * @return string|null + */ + public function getType(): string + { + return $this->get("Type"); + } + + /** + * Type: 物理机类型,默认为:db-2(基础型-SAS-V3) + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } + + /** + * Raid: Raid配置,默认Raid10 支持:Raid0、Raid1、Raid5、Raid10,NoRaid + * + * @return string|null + */ + public function getRaid(): string + { + return $this->get("Raid"); + } + + /** + * Raid: Raid配置,默认Raid10 支持:Raid0、Raid1、Raid5、Raid10,NoRaid + * + * @param string $raid + */ + public function setRaid(string $raid) + { + $this->set("Raid", $raid); + } + + /** + * NIC: 网络环境,可选千兆:1G ,万兆:10G, 默认1G。 + * + * @return string|null + */ + public function getNIC(): string + { + return $this->get("NIC"); + } + + /** + * NIC: 网络环境,可选千兆:1G ,万兆:10G, 默认1G。 + * + * @param string $nic + */ + public function setNIC(string $nic) + { + $this->set("NIC", $nic); + } + + /** + * SubnetId: 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。 + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。 + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * ImageId: 镜像 Id,不填时后台程序会自动选用一个可用的镜像 Id,支持用户自定义镜像,自定义镜像必须基于基础镜像制作。 + * + * @return string|null + */ + public function getImageId(): string + { + return $this->get("ImageId"); + } + + /** + * ImageId: 镜像 Id,不填时后台程序会自动选用一个可用的镜像 Id,支持用户自定义镜像,自定义镜像必须基于基础镜像制作。 + * + * @param string $imageId + */ + public function setImageId(string $imageId) + { + $this->set("ImageId", $imageId); + } + + /** + * DisableSchedule: 用于标示添加完节点后是否将节点临时禁用. 传入 "true" 表示禁用,传入其它或不传表示不禁用 + * + * @return boolean|null + */ + public function getDisableSchedule(): bool + { + return $this->get("DisableSchedule"); + } + + /** + * DisableSchedule: 用于标示添加完节点后是否将节点临时禁用. 传入 "true" 表示禁用,传入其它或不传表示不禁用 + * + * @param boolean $disableSchedule + */ + public function setDisableSchedule(bool $disableSchedule) + { + $this->set("DisableSchedule", $disableSchedule); + } + + /** + * InitScript: 用户自定义Shell脚本。与UserData的区别在于InitScript在节点初始化完毕后才执行。 + * + * @return string|null + */ + public function getInitScript(): string + { + return $this->get("InitScript"); + } + + /** + * InitScript: 用户自定义Shell脚本。与UserData的区别在于InitScript在节点初始化完毕后才执行。 + * + * @param string $initScript + */ + public function setInitScript(string $initScript) + { + $this->set("InitScript", $initScript); + } +} diff --git a/src/UK8S/Apis/AddUK8SPHostNodeResponse.php b/src/UK8S/Apis/AddUK8SPHostNodeResponse.php new file mode 100644 index 00000000..6bcf55b1 --- /dev/null +++ b/src/UK8S/Apis/AddUK8SPHostNodeResponse.php @@ -0,0 +1,26 @@ + "AddUK8SUHostNode"]); + $this->markRequired("Zone"); + $this->markRequired("Region"); + $this->markRequired("ClusterId"); + $this->markRequired("CPU"); + $this->markRequired("Count"); + $this->markRequired("Password"); + $this->markRequired("Mem"); + $this->markRequired("ChargeType"); + } + + + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ClusterId: UK8S集群ID。 可从UK8S控制台获取。 + * + * @return string|null + */ + public function getClusterId(): string + { + return $this->get("ClusterId"); + } + + /** + * ClusterId: UK8S集群ID。 可从UK8S控制台获取。 + * + * @param string $clusterId + */ + public function setClusterId(string $clusterId) + { + $this->set("ClusterId", $clusterId); + } + + /** + * CPU: 虚拟CPU核数。可选参数:2-64(具体机型与CPU的对应关系参照控制台)。默认值: 4。 + * + * @return integer|null + */ + public function getCPU(): int + { + return $this->get("CPU"); + } + + /** + * CPU: 虚拟CPU核数。可选参数:2-64(具体机型与CPU的对应关系参照控制台)。默认值: 4。 + * + * @param int $cpu + */ + public function setCPU(int $cpu) + { + $this->set("CPU", $cpu); + } + + /** + * Count: 创建Node节点数量,取值范围是[1,50]。 + * + * @return integer|null + */ + public function getCount(): int + { + return $this->get("Count"); + } + + /** + * Count: 创建Node节点数量,取值范围是[1,50]。 + * + * @param int $count + */ + public function setCount(int $count) + { + $this->set("Count", $count); + } + + /** + * Password: Node节点密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,如下:# echo -n Password1 | base64 + * + * @return string|null + */ + public function getPassword(): string + { + return $this->get("Password"); + } + + /** + * Password: Node节点密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,如下:# echo -n Password1 | base64 + * + * @param string $password + */ + public function setPassword(string $password) + { + $this->set("Password", $password); + } + + /** + * Mem: 内存大小。单位:MB。范围 :[4096, 262144],取值为1024的倍数(可选范围参考控制台)。默认值:8192 + * + * @return integer|null + */ + public function getMem(): int + { + return $this->get("Mem"); + } + + /** + * Mem: 内存大小。单位:MB。范围 :[4096, 262144],取值为1024的倍数(可选范围参考控制台)。默认值:8192 + * + * @param int $mem + */ + public function setMem(int $mem) + { + $this->set("Mem", $mem); + } + + /** + * ChargeType: 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按小时后付费(支持关机不收费,目前仅部分可用区支持,请联系您的客户经理) \\ 默认为月付 + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按小时后付费(支持关机不收费,目前仅部分可用区支持,请联系您的客户经理) \\ 默认为月付 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * BootDiskType: 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * + * @return string|null + */ + public function getBootDiskType(): string + { + return $this->get("BootDiskType"); + } + + /** + * BootDiskType: 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * + * @param string $bootDiskType + */ + public function setBootDiskType(string $bootDiskType) + { + $this->set("BootDiskType", $bootDiskType); + } + + /** + * DataDiskType: 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * + * @return string|null + */ + public function getDataDiskType(): string + { + return $this->get("DataDiskType"); + } + + /** + * DataDiskType: 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * + * @param string $dataDiskType + */ + public function setDataDiskType(string $dataDiskType) + { + $this->set("DataDiskType", $dataDiskType); + } + + /** + * DataDiskSize: 数据磁盘大小,单位GB。默认0。范围 :[20, 1000] + * + * @return integer|null + */ + public function getDataDiskSize(): int + { + return $this->get("DataDiskSize"); + } + + /** + * DataDiskSize: 数据磁盘大小,单位GB。默认0。范围 :[20, 1000] + * + * @param int $dataDiskSize + */ + public function setDataDiskSize(int $dataDiskSize) + { + $this->set("DataDiskSize", $dataDiskSize); + } + + /** + * Quantity: 购买时长。默认: 1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长。默认: 1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * MachineType: 云主机机型。枚举值["N", "C", "G", "O", "OS"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * + * @return string|null + */ + public function getMachineType(): string + { + return $this->get("MachineType"); + } + + /** + * MachineType: 云主机机型。枚举值["N", "C", "G", "O", "OS"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * + * @param string $machineType + */ + public function setMachineType(string $machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * MinmalCpuPlatform: 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake";"Intel/CascadelakeR"; “Amd/Epyc2”,"Amd/Auto"],默认值是"Intel/Auto" + * + * @return string|null + */ + public function getMinmalCpuPlatform(): string + { + return $this->get("MinmalCpuPlatform"); + } + + /** + * MinmalCpuPlatform: 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake";"Intel/CascadelakeR"; “Amd/Epyc2”,"Amd/Auto"],默认值是"Intel/Auto" + * + * @param string $minmalCpuPlatform + */ + public function setMinmalCpuPlatform(string $minmalCpuPlatform) + { + $this->set("MinmalCpuPlatform", $minmalCpuPlatform); + } + + /** + * GpuType: GPU类型,枚举值["K80", "P40", "V100",],MachineType为G时必填 + * + * @return string|null + */ + public function getGpuType(): string + { + return $this->get("GpuType"); + } + + /** + * GpuType: GPU类型,枚举值["K80", "P40", "V100",],MachineType为G时必填 + * + * @param string $gpuType + */ + public function setGpuType(string $gpuType) + { + $this->set("GpuType", $gpuType); + } + + /** + * GPU: GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关) + * + * @return integer|null + */ + public function getGPU(): int + { + return $this->get("GPU"); + } + + /** + * GPU: GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关) + * + * @param int $gpu + */ + public function setGPU(int $gpu) + { + $this->set("GPU", $gpu); + } + + /** + * Labels: Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + * + * @return string|null + */ + public function getLabels(): string + { + return $this->get("Labels"); + } + + /** + * Labels: Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + * + * @param string $labels + */ + public function setLabels(string $labels) + { + $this->set("Labels", $labels); + } + + /** + * MaxPods: 默认110,生产环境建议小于等于110。 + * + * @return integer|null + */ + public function getMaxPods(): int + { + return $this->get("MaxPods"); + } + + /** + * MaxPods: 默认110,生产环境建议小于等于110。 + * + * @param int $maxPods + */ + public function setMaxPods(int $maxPods) + { + $this->set("MaxPods", $maxPods); + } + + /** + * IsolationGroup: 硬件隔离组id。可通过DescribeIsolationGroup获取。 + * + * @return string|null + */ + public function getIsolationGroup(): string + { + return $this->get("IsolationGroup"); + } + + /** + * IsolationGroup: 硬件隔离组id。可通过DescribeIsolationGroup获取。 + * + * @param string $isolationGroup + */ + public function setIsolationGroup(string $isolationGroup) + { + $this->set("IsolationGroup", $isolationGroup); + } + + /** + * ImageId: 镜像 Id,不填时后台程序会自动选用一个可用的镜像 Id,支持用户自定义镜像,自定义镜像必须基于基础镜像制作。 + * + * @return string|null + */ + public function getImageId(): string + { + return $this->get("ImageId"); + } + + /** + * ImageId: 镜像 Id,不填时后台程序会自动选用一个可用的镜像 Id,支持用户自定义镜像,自定义镜像必须基于基础镜像制作。 + * + * @param string $imageId + */ + public function setImageId(string $imageId) + { + $this->set("ImageId", $imageId); + } + + /** + * SubnetId: 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。 + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。 + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * DisableSchedule: 用于标示添加完节点后是否将节点临时禁用. 传入 "true" 表示禁用,传入其它或不传表示不禁用 + * + * @return boolean|null + */ + public function getDisableSchedule(): bool + { + return $this->get("DisableSchedule"); + } + + /** + * DisableSchedule: 用于标示添加完节点后是否将节点临时禁用. 传入 "true" 表示禁用,传入其它或不传表示不禁用 + * + * @param boolean $disableSchedule + */ + public function setDisableSchedule(bool $disableSchedule) + { + $this->set("DisableSchedule", $disableSchedule); + } + + /** + * UserData: 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码。 + * + * @return string|null + */ + public function getUserData(): string + { + return $this->get("UserData"); + } + + /** + * UserData: 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码。 + * + * @param string $userData + */ + public function setUserData(string $userData) + { + $this->set("UserData", $userData); + } + + /** + * InitScript: 用户自定义Shell脚本。与UserData的区别在于InitScript在节点初始化完毕后才执行,UserData则是云主机初始化时执行。 + * + * @return string|null + */ + public function getInitScript(): string + { + return $this->get("InitScript"); + } + + /** + * InitScript: 用户自定义Shell脚本。与UserData的区别在于InitScript在节点初始化完毕后才执行,UserData则是云主机初始化时执行。 + * + * @param string $initScript + */ + public function setInitScript(string $initScript) + { + $this->set("InitScript", $initScript); + } +} diff --git a/src/UK8S/Apis/AddUK8SUHostNodeResponse.php b/src/UK8S/Apis/AddUK8SUHostNodeResponse.php new file mode 100644 index 00000000..4a831dba --- /dev/null +++ b/src/UK8S/Apis/AddUK8SUHostNodeResponse.php @@ -0,0 +1,44 @@ +get("NodeIds"); + } + + /** + * NodeIds: Node实例Id集合 + * + * @param string[] $nodeIds + */ + public function setNodeIds(array $nodeIds) + { + $this->set("NodeIds", $nodeIds); + } +} diff --git a/src/UK8S/Apis/CreateUK8SClusterV2Request.php b/src/UK8S/Apis/CreateUK8SClusterV2Request.php new file mode 100644 index 00000000..2d2da5a2 --- /dev/null +++ b/src/UK8S/Apis/CreateUK8SClusterV2Request.php @@ -0,0 +1,560 @@ + "CreateUK8SClusterV2"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("VPCId"); + $this->markRequired("SubnetId"); + $this->markRequired("ServiceCIDR"); + $this->markRequired("ClusterName"); + $this->markRequired("Password"); + $this->markRequired("MasterMachineType"); + $this->markRequired("MasterCPU"); + $this->markRequired("MasterMem"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VPCId: 集群Node及Pod所属VPC + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: 集群Node及Pod所属VPC + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: 集群Node及Pod所属子网 + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 集群Node及Pod所属子网 + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * ServiceCIDR: Service 网段,用于分配ClusterIP,如172.17.0.0/16。该网段不能与集群所属VPC网段重叠。 + * + * @return string|null + */ + public function getServiceCIDR(): string + { + return $this->get("ServiceCIDR"); + } + + /** + * ServiceCIDR: Service 网段,用于分配ClusterIP,如172.17.0.0/16。该网段不能与集群所属VPC网段重叠。 + * + * @param string $serviceCIDR + */ + public function setServiceCIDR(string $serviceCIDR) + { + $this->set("ServiceCIDR", $serviceCIDR); + } + + /** + * ClusterName: 集群名称 + * + * @return string|null + */ + public function getClusterName(): string + { + return $this->get("ClusterName"); + } + + /** + * ClusterName: 集群名称 + * + * @param string $clusterName + */ + public function setClusterName(string $clusterName) + { + $this->set("ClusterName", $clusterName); + } + + /** + * Password: 集群节点密码,包括Master和Node。密码需包含最少一个大写字母,请使用base64进行编码,举例如下:# echo -n Password1 | base64 + * + * @return string|null + */ + public function getPassword(): string + { + return $this->get("Password"); + } + + /** + * Password: 集群节点密码,包括Master和Node。密码需包含最少一个大写字母,请使用base64进行编码,举例如下:# echo -n Password1 | base64 + * + * @param string $password + */ + public function setPassword(string $password) + { + $this->set("Password", $password); + } + + /** + * Master: + * + * @return CreateUK8SClusterV2ParamMaster[]|null + */ + public function getMaster(): array + { + $items = $this->get("Master") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateUK8SClusterV2ParamMaster($item)); + } + return $result; + } + + /** + * Master: + * + * @param CreateUK8SClusterV2ParamMaster[] $master + */ + public function setMaster(array $master) + { + $result = []; + foreach ($master as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * MasterMachineType: Master节点的云主机机型(V2.0),如["N", "C", "O", "OS"],具体请参照云主机机型。 + * + * @return string|null + */ + public function getMasterMachineType(): string + { + return $this->get("MasterMachineType"); + } + + /** + * MasterMachineType: Master节点的云主机机型(V2.0),如["N", "C", "O", "OS"],具体请参照云主机机型。 + * + * @param string $masterMachineType + */ + public function setMasterMachineType(string $masterMachineType) + { + $this->set("MasterMachineType", $masterMachineType); + } + + /** + * MasterCPU: Master节点的虚拟CPU核数。可选参数:2-64(具体机型与CPU的对应关系参照控制台)。 + * + * @return integer|null + */ + public function getMasterCPU(): int + { + return $this->get("MasterCPU"); + } + + /** + * MasterCPU: Master节点的虚拟CPU核数。可选参数:2-64(具体机型与CPU的对应关系参照控制台)。 + * + * @param int $masterCPU + */ + public function setMasterCPU(int $masterCPU) + { + $this->set("MasterCPU", $masterCPU); + } + + /** + * MasterMem: Master节点的内存大小。单位:MB。范围 :[4096, 262144],取值为1024的倍数(可选范围参考控制台)。 + * + * @return integer|null + */ + public function getMasterMem(): int + { + return $this->get("MasterMem"); + } + + /** + * MasterMem: Master节点的内存大小。单位:MB。范围 :[4096, 262144],取值为1024的倍数(可选范围参考控制台)。 + * + * @param int $masterMem + */ + public function setMasterMem(int $masterMem) + { + $this->set("MasterMem", $masterMem); + } + + /** + * Nodes: + * + * @return CreateUK8SClusterV2ParamNodes[]|null + */ + public function getNodes(): array + { + $items = $this->get("Nodes") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateUK8SClusterV2ParamNodes($item)); + } + return $result; + } + + /** + * Nodes: + * + * @param CreateUK8SClusterV2ParamNodes[] $nodes + */ + public function setNodes(array $nodes) + { + $result = []; + foreach ($nodes as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * MasterBootDiskType: Master节点系统盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * + * @return string|null + */ + public function getMasterBootDiskType(): string + { + return $this->get("MasterBootDiskType"); + } + + /** + * MasterBootDiskType: Master节点系统盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * + * @param string $masterBootDiskType + */ + public function setMasterBootDiskType(string $masterBootDiskType) + { + $this->set("MasterBootDiskType", $masterBootDiskType); + } + + /** + * MasterDataDiskType: Master节点数据盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * + * @return string|null + */ + public function getMasterDataDiskType(): string + { + return $this->get("MasterDataDiskType"); + } + + /** + * MasterDataDiskType: Master节点数据盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * + * @param string $masterDataDiskType + */ + public function setMasterDataDiskType(string $masterDataDiskType) + { + $this->set("MasterDataDiskType", $masterDataDiskType); + } + + /** + * MasterMinmalCpuPlatform: Master节点的最低cpu平台,不选则随机。枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake"。 + * + * @return string|null + */ + public function getMasterMinmalCpuPlatform(): string + { + return $this->get("MasterMinmalCpuPlatform"); + } + + /** + * MasterMinmalCpuPlatform: Master节点的最低cpu平台,不选则随机。枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake"。 + * + * @param string $masterMinmalCpuPlatform + */ + public function setMasterMinmalCpuPlatform(string $masterMinmalCpuPlatform) + { + $this->set("MasterMinmalCpuPlatform", $masterMinmalCpuPlatform); + } + + /** + * MasterDataDiskSize: Master节点的数据盘大小,单位GB,默认为0。范围 :[20, 1000] + * + * @return integer|null + */ + public function getMasterDataDiskSize(): int + { + return $this->get("MasterDataDiskSize"); + } + + /** + * MasterDataDiskSize: Master节点的数据盘大小,单位GB,默认为0。范围 :[20, 1000] + * + * @param int $masterDataDiskSize + */ + public function setMasterDataDiskSize(int $masterDataDiskSize) + { + $this->set("MasterDataDiskSize", $masterDataDiskSize); + } + + /** + * ChargeType: 集群所有节点的付费模式。枚举值为: Year,按年付费; Month,按月付费; Dynamic,按小时付费(需开启权限),默认按月。 + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 集群所有节点的付费模式。枚举值为: Year,按年付费; Month,按月付费; Dynamic,按小时付费(需开启权限),默认按月。 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * K8sVersion: k8s集群的版本,版本信息请参考UK8S集群创建页,不指定的话默认为当前支持的最高版本。 + * + * @return string|null + */ + public function getK8sVersion(): string + { + return $this->get("K8sVersion"); + } + + /** + * K8sVersion: k8s集群的版本,版本信息请参考UK8S集群创建页,不指定的话默认为当前支持的最高版本。 + * + * @param string $k8sVersion + */ + public function setK8sVersion(string $k8sVersion) + { + $this->set("K8sVersion", $k8sVersion); + } + + /** + * Quantity: 购买时长。默认为1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长。默认为1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * ExternalApiServer: 是否允许外网访问apiserver,开启:Yes 不开启:No。默认为No。 + * + * @return string|null + */ + public function getExternalApiServer(): string + { + return $this->get("ExternalApiServer"); + } + + /** + * ExternalApiServer: 是否允许外网访问apiserver,开启:Yes 不开启:No。默认为No。 + * + * @param string $externalApiServer + */ + public function setExternalApiServer(string $externalApiServer) + { + $this->set("ExternalApiServer", $externalApiServer); + } + + /** + * MasterIsolationGroup: 【无效,已删除】当前将自动为Master节点创建隔离组,确保Master节点归属于不同物理机。 + * + * @return string|null + */ + public function getMasterIsolationGroup(): string + { + return $this->get("MasterIsolationGroup"); + } + + /** + * MasterIsolationGroup: 【无效,已删除】当前将自动为Master节点创建隔离组,确保Master节点归属于不同物理机。 + * + * @param string $masterIsolationGroup + */ + public function setMasterIsolationGroup(string $masterIsolationGroup) + { + $this->set("MasterIsolationGroup", $masterIsolationGroup); + } + + /** + * KubeProxy: + * + * @return CreateUK8SClusterV2ParamKubeProxy|null + */ + public function getKubeProxy(): CreateUK8SClusterV2ParamKubeProxy + { + return new CreateUK8SClusterV2ParamKubeProxy($this->get("KubeProxy")); + } + + /** + * KubeProxy: + * + * @param CreateUK8SClusterV2ParamKubeProxy $kubeProxy + */ + public function setKubeProxy(CreateUK8SClusterV2ParamKubeProxy $kubeProxy) + { + $this->set("KubeProxy", $kubeProxy->getAll()); + } + + /** + * ImageId: Master节点和Node节点的镜像 ID,不填则随机选择可用的基础镜像。支持用户自定义镜像。 + * + * @return string|null + */ + public function getImageId(): string + { + return $this->get("ImageId"); + } + + /** + * ImageId: Master节点和Node节点的镜像 ID,不填则随机选择可用的基础镜像。支持用户自定义镜像。 + * + * @param string $imageId + */ + public function setImageId(string $imageId) + { + $this->set("ImageId", $imageId); + } + + /** + * UserData: 用户自定义数据。注意:1、总数据量大小不超多16K;2、使用base64编码。 + * + * @return string|null + */ + public function getUserData(): string + { + return $this->get("UserData"); + } + + /** + * UserData: 用户自定义数据。注意:1、总数据量大小不超多16K;2、使用base64编码。 + * + * @param string $userData + */ + public function setUserData(string $userData) + { + $this->set("UserData", $userData); + } + + /** + * InitScript: 用户自定义脚本,与UserData不同,自定义脚本将在集群安装完毕后执行。注意:1、总数据量大小不超多16K;2、使用base64编码。 + * + * @return string|null + */ + public function getInitScript(): string + { + return $this->get("InitScript"); + } + + /** + * InitScript: 用户自定义脚本,与UserData不同,自定义脚本将在集群安装完毕后执行。注意:1、总数据量大小不超多16K;2、使用base64编码。 + * + * @param string $initScript + */ + public function setInitScript(string $initScript) + { + $this->set("InitScript", $initScript); + } +} diff --git a/src/UK8S/Apis/CreateUK8SClusterV2Response.php b/src/UK8S/Apis/CreateUK8SClusterV2Response.php new file mode 100644 index 00000000..2d333e7e --- /dev/null +++ b/src/UK8S/Apis/CreateUK8SClusterV2Response.php @@ -0,0 +1,44 @@ +get("ClusterId"); + } + + /** + * ClusterId: 集群ID + * + * @param string $clusterId + */ + public function setClusterId(string $clusterId) + { + $this->set("ClusterId", $clusterId); + } +} diff --git a/src/UK8S/Apis/DelUK8SClusterNodeV2Request.php b/src/UK8S/Apis/DelUK8SClusterNodeV2Request.php new file mode 100644 index 00000000..59790134 --- /dev/null +++ b/src/UK8S/Apis/DelUK8SClusterNodeV2Request.php @@ -0,0 +1,132 @@ + "DelUK8SClusterNodeV2"]); + $this->markRequired("Region"); + $this->markRequired("ClusterId"); + $this->markRequired("NodeId"); + } + + + + /** + * ProjectId: 项目ID项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ClusterId: UK8S集群ID。 可从UK8S控制台获取。 + * + * @return string|null + */ + public function getClusterId(): string + { + return $this->get("ClusterId"); + } + + /** + * ClusterId: UK8S集群ID。 可从UK8S控制台获取。 + * + * @param string $clusterId + */ + public function setClusterId(string $clusterId) + { + $this->set("ClusterId", $clusterId); + } + + /** + * NodeId: Node在UK8S处的唯一标示,如uk8s-reewqe5-sdasadsda。**非云主机或物理云主机资源Id** + * + * @return string|null + */ + public function getNodeId(): string + { + return $this->get("NodeId"); + } + + /** + * NodeId: Node在UK8S处的唯一标示,如uk8s-reewqe5-sdasadsda。**非云主机或物理云主机资源Id** + * + * @param string $nodeId + */ + public function setNodeId(string $nodeId) + { + $this->set("NodeId", $nodeId); + } + + /** + * ReleaseDataUDisk: 删除节点时是否释放数据盘。 枚举值[true:释放,false: 不释放],默认为true。 + * + * @return boolean|null + */ + public function getReleaseDataUDisk(): bool + { + return $this->get("ReleaseDataUDisk"); + } + + /** + * ReleaseDataUDisk: 删除节点时是否释放数据盘。 枚举值[true:释放,false: 不释放],默认为true。 + * + * @param boolean $releaseDataUDisk + */ + public function setReleaseDataUDisk(bool $releaseDataUDisk) + { + $this->set("ReleaseDataUDisk", $releaseDataUDisk); + } +} diff --git a/src/UK8S/Apis/DelUK8SClusterNodeV2Response.php b/src/UK8S/Apis/DelUK8SClusterNodeV2Response.php new file mode 100644 index 00000000..12e67e60 --- /dev/null +++ b/src/UK8S/Apis/DelUK8SClusterNodeV2Response.php @@ -0,0 +1,26 @@ + "DelUK8SCluster"]); + $this->markRequired("Region"); + $this->markRequired("ClusterId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ClusterId: 集群id + * + * @return string|null + */ + public function getClusterId(): string + { + return $this->get("ClusterId"); + } + + /** + * ClusterId: 集群id + * + * @param string $clusterId + */ + public function setClusterId(string $clusterId) + { + $this->set("ClusterId", $clusterId); + } + + /** + * ReleaseUDisk: 是否删除节点挂载的数据盘。枚举值[true:删除,false: 不删除],默认不删除 + * + * @return boolean|null + */ + public function getReleaseUDisk(): bool + { + return $this->get("ReleaseUDisk"); + } + + /** + * ReleaseUDisk: 是否删除节点挂载的数据盘。枚举值[true:删除,false: 不删除],默认不删除 + * + * @param boolean $releaseUDisk + */ + public function setReleaseUDisk(bool $releaseUDisk) + { + $this->set("ReleaseUDisk", $releaseUDisk); + } +} diff --git a/src/UK8S/Apis/DelUK8SClusterResponse.php b/src/UK8S/Apis/DelUK8SClusterResponse.php new file mode 100644 index 00000000..3496462b --- /dev/null +++ b/src/UK8S/Apis/DelUK8SClusterResponse.php @@ -0,0 +1,26 @@ + "DescribeUK8SImage"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } +} diff --git a/src/UK8S/Apis/DescribeUK8SImageResponse.php b/src/UK8S/Apis/DescribeUK8SImageResponse.php new file mode 100644 index 00000000..72a18552 --- /dev/null +++ b/src/UK8S/Apis/DescribeUK8SImageResponse.php @@ -0,0 +1,84 @@ +get("ImageSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ImageInfo($item)); + } + return $result; + } + + /** + * ImageSet: 虚拟机可用镜像集合, 详见ImageInfo 数组 + * + * @param ImageInfo[] $imageSet + */ + public function setImageSet(array $imageSet) + { + $result = []; + foreach ($imageSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * PHostImageSet: 物理机可用镜像集合, 详见ImageInfo 数组 + * + * @return ImageInfo[]|null + */ + public function getPHostImageSet(): array + { + $items = $this->get("PHostImageSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ImageInfo($item)); + } + return $result; + } + + /** + * PHostImageSet: 物理机可用镜像集合, 详见ImageInfo 数组 + * + * @param ImageInfo[] $pHostImageSet + */ + public function setPHostImageSet(array $pHostImageSet) + { + $result = []; + foreach ($pHostImageSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UK8S/Apis/DescribeUK8SNodeRequest.php b/src/UK8S/Apis/DescribeUK8SNodeRequest.php new file mode 100644 index 00000000..a8a0f473 --- /dev/null +++ b/src/UK8S/Apis/DescribeUK8SNodeRequest.php @@ -0,0 +1,112 @@ + "DescribeUK8SNode"]); + $this->markRequired("Region"); + $this->markRequired("ClusterId"); + $this->markRequired("Name"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ClusterId: UK8S 集群 Id + * + * @return string|null + */ + public function getClusterId(): string + { + return $this->get("ClusterId"); + } + + /** + * ClusterId: UK8S 集群 Id + * + * @param string $clusterId + */ + public function setClusterId(string $clusterId) + { + $this->set("ClusterId", $clusterId); + } + + /** + * Name: K8S 节点IP或者节点ID + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: K8S 节点IP或者节点ID + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } +} diff --git a/src/UK8S/Apis/DescribeUK8SNodeResponse.php b/src/UK8S/Apis/DescribeUK8SNodeResponse.php new file mode 100644 index 00000000..af4fe514 --- /dev/null +++ b/src/UK8S/Apis/DescribeUK8SNodeResponse.php @@ -0,0 +1,594 @@ +get("Name"); + } + + /** + * Name: 节点名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Labels: 字符串数组,每一项是类似 "kubernetes.io/arch=amd64" 的标签 + * + * @return string[]|null + */ + public function getLabels(): array + { + return $this->get("Labels"); + } + + /** + * Labels: 字符串数组,每一项是类似 "kubernetes.io/arch=amd64" 的标签 + * + * @param string[] $labels + */ + public function setLabels(array $labels) + { + $this->set("Labels", $labels); + } + + /** + * Annotations: 字符串数组,每一项是类似 "node.alpha.kubernetes.io/ttl=0" 的注解 + * + * @return string[]|null + */ + public function getAnnotations(): array + { + return $this->get("Annotations"); + } + + /** + * Annotations: 字符串数组,每一项是类似 "node.alpha.kubernetes.io/ttl=0" 的注解 + * + * @param string[] $annotations + */ + public function setAnnotations(array $annotations) + { + $this->set("Annotations", $annotations); + } + + /** + * CreationTimestamp: 时间戳,单位是 秒 + * + * @return integer|null + */ + public function getCreationTimestamp(): int + { + return $this->get("CreationTimestamp"); + } + + /** + * CreationTimestamp: 时间戳,单位是 秒 + * + * @param int $creationTimestamp + */ + public function setCreationTimestamp(int $creationTimestamp) + { + $this->set("CreationTimestamp", $creationTimestamp); + } + + /** + * ProviderID: 字符串,如:"UCloud://cn-sh2-02//uk8s-vsc0vgob-n-mpzxc" + * + * @return string|null + */ + public function getProviderID(): string + { + return $this->get("ProviderID"); + } + + /** + * ProviderID: 字符串,如:"UCloud://cn-sh2-02//uk8s-vsc0vgob-n-mpzxc" + * + * @param string $providerID + */ + public function setProviderID(string $providerID) + { + $this->set("ProviderID", $providerID); + } + + /** + * KernelVersion: 内核版本,如:"4.19.0-6.el7.ucloud.x86_64" + * + * @return string|null + */ + public function getKernelVersion(): string + { + return $this->get("KernelVersion"); + } + + /** + * KernelVersion: 内核版本,如:"4.19.0-6.el7.ucloud.x86_64" + * + * @param string $kernelVersion + */ + public function setKernelVersion(string $kernelVersion) + { + $this->set("KernelVersion", $kernelVersion); + } + + /** + * OSImage: 操作系统类型,如:"CentOS Linux 7 (Core)" + * + * @return string|null + */ + public function getOSImage(): string + { + return $this->get("OSImage"); + } + + /** + * OSImage: 操作系统类型,如:"CentOS Linux 7 (Core)" + * + * @param string $osImage + */ + public function setOSImage(string $osImage) + { + $this->set("OSImage", $osImage); + } + + /** + * ContainerRuntimeVersion: 容器运行时版本,如:"docker://18.9.9" + * + * @return string|null + */ + public function getContainerRuntimeVersion(): string + { + return $this->get("ContainerRuntimeVersion"); + } + + /** + * ContainerRuntimeVersion: 容器运行时版本,如:"docker://18.9.9" + * + * @param string $containerRuntimeVersion + */ + public function setContainerRuntimeVersion(string $containerRuntimeVersion) + { + $this->set("ContainerRuntimeVersion", $containerRuntimeVersion); + } + + /** + * KubeletVersion: kubelet 版本 + * + * @return string|null + */ + public function getKubeletVersion(): string + { + return $this->get("KubeletVersion"); + } + + /** + * KubeletVersion: kubelet 版本 + * + * @param string $kubeletVersion + */ + public function setKubeletVersion(string $kubeletVersion) + { + $this->set("KubeletVersion", $kubeletVersion); + } + + /** + * KubeProxyVersion: kubeproxy 版本 + * + * @return string|null + */ + public function getKubeProxyVersion(): string + { + return $this->get("KubeProxyVersion"); + } + + /** + * KubeProxyVersion: kubeproxy 版本 + * + * @param string $kubeProxyVersion + */ + public function setKubeProxyVersion(string $kubeProxyVersion) + { + $this->set("KubeProxyVersion", $kubeProxyVersion); + } + + /** + * InternalIP: 内部 IP 地址 + * + * @return string|null + */ + public function getInternalIP(): string + { + return $this->get("InternalIP"); + } + + /** + * InternalIP: 内部 IP 地址 + * + * @param string $internalIP + */ + public function setInternalIP(string $internalIP) + { + $this->set("InternalIP", $internalIP); + } + + /** + * Hostname: 主机名 + * + * @return string|null + */ + public function getHostname(): string + { + return $this->get("Hostname"); + } + + /** + * Hostname: 主机名 + * + * @param string $hostname + */ + public function setHostname(string $hostname) + { + $this->set("Hostname", $hostname); + } + + /** + * AllocatedPodCount: 已分配到当前节点的 Pod 数量 + * + * @return integer|null + */ + public function getAllocatedPodCount(): int + { + return $this->get("AllocatedPodCount"); + } + + /** + * AllocatedPodCount: 已分配到当前节点的 Pod 数量 + * + * @param int $allocatedPodCount + */ + public function setAllocatedPodCount(int $allocatedPodCount) + { + $this->set("AllocatedPodCount", $allocatedPodCount); + } + + /** + * PodCapacity: 节点允许的可分配 Pod 最大数量 + * + * @return integer|null + */ + public function getPodCapacity(): int + { + return $this->get("PodCapacity"); + } + + /** + * PodCapacity: 节点允许的可分配 Pod 最大数量 + * + * @param int $podCapacity + */ + public function setPodCapacity(int $podCapacity) + { + $this->set("PodCapacity", $podCapacity); + } + + /** + * Unschedulable: 是否禁止调度 + * + * @return boolean|null + */ + public function getUnschedulable(): bool + { + return $this->get("Unschedulable"); + } + + /** + * Unschedulable: 是否禁止调度 + * + * @param boolean $unschedulable + */ + public function setUnschedulable(bool $unschedulable) + { + $this->set("Unschedulable", $unschedulable); + } + + /** + * CPUCapacity: 节点 CPU 总量 + * + * @return string|null + */ + public function getCPUCapacity(): string + { + return $this->get("CPUCapacity"); + } + + /** + * CPUCapacity: 节点 CPU 总量 + * + * @param string $cpuCapacity + */ + public function setCPUCapacity(string $cpuCapacity) + { + $this->set("CPUCapacity", $cpuCapacity); + } + + /** + * MemoryCapacity: 节点内存总量 + * + * @return string|null + */ + public function getMemoryCapacity(): string + { + return $this->get("MemoryCapacity"); + } + + /** + * MemoryCapacity: 节点内存总量 + * + * @param string $memoryCapacity + */ + public function setMemoryCapacity(string $memoryCapacity) + { + $this->set("MemoryCapacity", $memoryCapacity); + } + + /** + * MemoryRequests: 节点上已分配 Pod 的内存请求量 + * + * @return string|null + */ + public function getMemoryRequests(): string + { + return $this->get("MemoryRequests"); + } + + /** + * MemoryRequests: 节点上已分配 Pod 的内存请求量 + * + * @param string $memoryRequests + */ + public function setMemoryRequests(string $memoryRequests) + { + $this->set("MemoryRequests", $memoryRequests); + } + + /** + * MemoryRequestsFraction: 节点上已分配 Pod 的内存请求量占内存总量的比例,如返回值为 "4.5",则意味着请求量占总量的 4.5% + * + * @return string|null + */ + public function getMemoryRequestsFraction(): string + { + return $this->get("MemoryRequestsFraction"); + } + + /** + * MemoryRequestsFraction: 节点上已分配 Pod 的内存请求量占内存总量的比例,如返回值为 "4.5",则意味着请求量占总量的 4.5% + * + * @param string $memoryRequestsFraction + */ + public function setMemoryRequestsFraction(string $memoryRequestsFraction) + { + $this->set("MemoryRequestsFraction", $memoryRequestsFraction); + } + + /** + * MemoryLimits: 节点上已分配 Pod 的内存限制量 + * + * @return string|null + */ + public function getMemoryLimits(): string + { + return $this->get("MemoryLimits"); + } + + /** + * MemoryLimits: 节点上已分配 Pod 的内存限制量 + * + * @param string $memoryLimits + */ + public function setMemoryLimits(string $memoryLimits) + { + $this->set("MemoryLimits", $memoryLimits); + } + + /** + * MemoryLimitsFraction: 节点上已分配 Pod 的内存限制量占内存总量的比例,如返回值为 "18",则意味着限制量占总量的 18% + * + * @return string|null + */ + public function getMemoryLimitsFraction(): string + { + return $this->get("MemoryLimitsFraction"); + } + + /** + * MemoryLimitsFraction: 节点上已分配 Pod 的内存限制量占内存总量的比例,如返回值为 "18",则意味着限制量占总量的 18% + * + * @param string $memoryLimitsFraction + */ + public function setMemoryLimitsFraction(string $memoryLimitsFraction) + { + $this->set("MemoryLimitsFraction", $memoryLimitsFraction); + } + + /** + * CPURequests: 节点上已分配 Pod 的 CPU 请求量 + * + * @return string|null + */ + public function getCPURequests(): string + { + return $this->get("CPURequests"); + } + + /** + * CPURequests: 节点上已分配 Pod 的 CPU 请求量 + * + * @param string $cpuRequests + */ + public function setCPURequests(string $cpuRequests) + { + $this->set("CPURequests", $cpuRequests); + } + + /** + * CPURequestsFraction: 节点上已分配 Pod 的 CPU 请求量占 CPU 总量的比例 + * + * @return string|null + */ + public function getCPURequestsFraction(): string + { + return $this->get("CPURequestsFraction"); + } + + /** + * CPURequestsFraction: 节点上已分配 Pod 的 CPU 请求量占 CPU 总量的比例 + * + * @param string $cpuRequestsFraction + */ + public function setCPURequestsFraction(string $cpuRequestsFraction) + { + $this->set("CPURequestsFraction", $cpuRequestsFraction); + } + + /** + * CPULimits: 节点上已分配 Pod 的 CPU 限制值 + * + * @return string|null + */ + public function getCPULimits(): string + { + return $this->get("CPULimits"); + } + + /** + * CPULimits: 节点上已分配 Pod 的 CPU 限制值 + * + * @param string $cpuLimits + */ + public function setCPULimits(string $cpuLimits) + { + $this->set("CPULimits", $cpuLimits); + } + + /** + * CPULimitsFraction: 节点上已分配 Pod 的 CPU 限制值占 CPU 总量的比例 + * + * @return string|null + */ + public function getCPULimitsFraction(): string + { + return $this->get("CPULimitsFraction"); + } + + /** + * CPULimitsFraction: 节点上已分配 Pod 的 CPU 限制值占 CPU 总量的比例 + * + * @param string $cpuLimitsFraction + */ + public function setCPULimitsFraction(string $cpuLimitsFraction) + { + $this->set("CPULimitsFraction", $cpuLimitsFraction); + } + + /** + * Conditions: 节点状态数组 + * + * @return K8SNodeCondition[]|null + */ + public function getConditions(): array + { + $items = $this->get("Conditions") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new K8SNodeCondition($item)); + } + return $result; + } + + /** + * Conditions: 节点状态数组 + * + * @param K8SNodeCondition[] $conditions + */ + public function setConditions(array $conditions) + { + $result = []; + foreach ($conditions as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * ContainerImages: 节点上镜像名称数组 + * + * @return string[]|null + */ + public function getContainerImages(): array + { + return $this->get("ContainerImages"); + } + + /** + * ContainerImages: 节点上镜像名称数组 + * + * @param string[] $containerImages + */ + public function setContainerImages(array $containerImages) + { + $this->set("ContainerImages", $containerImages); + } + + /** + * Taints: 字符串数组,每一项是类似 "node-role.kubernetes.io/master:NoSchedule" 的污点 + * + * @return string[]|null + */ + public function getTaints(): array + { + return $this->get("Taints"); + } + + /** + * Taints: 字符串数组,每一项是类似 "node-role.kubernetes.io/master:NoSchedule" 的污点 + * + * @param string[] $taints + */ + public function setTaints(array $taints) + { + $this->set("Taints", $taints); + } +} diff --git a/src/UK8S/Apis/ListUK8SClusterNodeV2Request.php b/src/UK8S/Apis/ListUK8SClusterNodeV2Request.php new file mode 100644 index 00000000..b6844fe1 --- /dev/null +++ b/src/UK8S/Apis/ListUK8SClusterNodeV2Request.php @@ -0,0 +1,91 @@ + "ListUK8SClusterNodeV2"]); + $this->markRequired("Region"); + $this->markRequired("ClusterId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ClusterId: UK8S集群ID + * + * @return string|null + */ + public function getClusterId(): string + { + return $this->get("ClusterId"); + } + + /** + * ClusterId: UK8S集群ID + * + * @param string $clusterId + */ + public function setClusterId(string $clusterId) + { + $this->set("ClusterId", $clusterId); + } +} diff --git a/src/UK8S/Apis/ListUK8SClusterNodeV2Response.php b/src/UK8S/Apis/ListUK8SClusterNodeV2Response.php new file mode 100644 index 00000000..eea67188 --- /dev/null +++ b/src/UK8S/Apis/ListUK8SClusterNodeV2Response.php @@ -0,0 +1,76 @@ +get("NodeSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new NodeInfoV2($item)); + } + return $result; + } + + /** + * NodeSet: 节点详细信息,见NodeInfoV2。 + * + * @param NodeInfoV2[] $nodeSet + */ + public function setNodeSet(array $nodeSet) + { + $result = []; + foreach ($nodeSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalCount: 满足条件的节点数量,包括Master。 + * + * @return integer|null + */ + public function getTotalCount(): int + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 满足条件的节点数量,包括Master。 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/UK8S/Apis/ListUK8SClusterV2Request.php b/src/UK8S/Apis/ListUK8SClusterV2Request.php new file mode 100644 index 00000000..e038ffd5 --- /dev/null +++ b/src/UK8S/Apis/ListUK8SClusterV2Request.php @@ -0,0 +1,130 @@ + "ListUK8SClusterV2"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Offset: 列表起始位置偏移量,默认为0。 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 列表起始位置偏移量,默认为0。 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 返回数据长度,默认为20。 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数据长度,默认为20。 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * ClusterId: UK8S集群ID + * + * @return string|null + */ + public function getClusterId(): string + { + return $this->get("ClusterId"); + } + + /** + * ClusterId: UK8S集群ID + * + * @param string $clusterId + */ + public function setClusterId(string $clusterId) + { + $this->set("ClusterId", $clusterId); + } +} diff --git a/src/UK8S/Apis/ListUK8SClusterV2Response.php b/src/UK8S/Apis/ListUK8SClusterV2Response.php new file mode 100644 index 00000000..4b8fc408 --- /dev/null +++ b/src/UK8S/Apis/ListUK8SClusterV2Response.php @@ -0,0 +1,74 @@ +get("ClusterCount"); + } + + /** + * ClusterCount: 满足条件的集群数量 + * + * @param int $clusterCount + */ + public function setClusterCount(int $clusterCount) + { + $this->set("ClusterCount", $clusterCount); + } + + /** + * ClusterSet: 集群信息,具体参考ClusterSet + * + * @return ClusterSet[]|null + */ + public function getClusterSet(): array + { + $items = $this->get("ClusterSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ClusterSet($item)); + } + return $result; + } + + /** + * ClusterSet: 集群信息,具体参考ClusterSet + * + * @param ClusterSet[] $clusterSet + */ + public function setClusterSet(array $clusterSet) + { + $result = []; + foreach ($clusterSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UK8S/Models/ClusterSet.php b/src/UK8S/Models/ClusterSet.php new file mode 100644 index 00000000..d60c825a --- /dev/null +++ b/src/UK8S/Models/ClusterSet.php @@ -0,0 +1,304 @@ +get("ClusterName"); + } + + /** + * ClusterName: 资源名字 + * + * @param string $clusterName + */ + public function setClusterName(string $clusterName) + { + $this->set("ClusterName", $clusterName); + } + + /** + * ClusterId: 集群ID + * + * @return string|null + */ + public function getClusterId(): string + { + return $this->get("ClusterId"); + } + + /** + * ClusterId: 集群ID + * + * @param string $clusterId + */ + public function setClusterId(string $clusterId) + { + $this->set("ClusterId", $clusterId); + } + + /** + * VPCId: 所属VPC + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: 所属VPC + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: 所属子网 + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 所属子网 + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * PodCIDR: Pod网段 + * + * @return string|null + */ + public function getPodCIDR(): string + { + return $this->get("PodCIDR"); + } + + /** + * PodCIDR: Pod网段 + * + * @param string $podCIDR + */ + public function setPodCIDR(string $podCIDR) + { + $this->set("PodCIDR", $podCIDR); + } + + /** + * ServiceCIDR: 服务网段 + * + * @return string|null + */ + public function getServiceCIDR(): string + { + return $this->get("ServiceCIDR"); + } + + /** + * ServiceCIDR: 服务网段 + * + * @param string $serviceCIDR + */ + public function setServiceCIDR(string $serviceCIDR) + { + $this->set("ServiceCIDR", $serviceCIDR); + } + + /** + * MasterCount: Master 节点数量 + * + * @return integer|null + */ + public function getMasterCount(): int + { + return $this->get("MasterCount"); + } + + /** + * MasterCount: Master 节点数量 + * + * @param int $masterCount + */ + public function setMasterCount(int $masterCount) + { + $this->set("MasterCount", $masterCount); + } + + /** + * ApiServer: 集群apiserver地址 + * + * @return string|null + */ + public function getApiServer(): string + { + return $this->get("ApiServer"); + } + + /** + * ApiServer: 集群apiserver地址 + * + * @param string $apiServer + */ + public function setApiServer(string $apiServer) + { + $this->set("ApiServer", $apiServer); + } + + /** + * K8sVersion: 集群版本 + * + * @return string|null + */ + public function getK8sVersion(): string + { + return $this->get("K8sVersion"); + } + + /** + * K8sVersion: 集群版本 + * + * @param string $k8sVersion + */ + public function setK8sVersion(string $k8sVersion) + { + $this->set("K8sVersion", $k8sVersion); + } + + /** + * ClusterLogInfo: 创建集群时判断如果为NORESOURCE则为没资源,否则为空 + * + * @return string|null + */ + public function getClusterLogInfo(): string + { + return $this->get("ClusterLogInfo"); + } + + /** + * ClusterLogInfo: 创建集群时判断如果为NORESOURCE则为没资源,否则为空 + * + * @param string $clusterLogInfo + */ + public function setClusterLogInfo(string $clusterLogInfo) + { + $this->set("ClusterLogInfo", $clusterLogInfo); + } + + /** + * CreateTime: 创建时间 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * NodeCount: Node节点数量 + * + * @return integer|null + */ + public function getNodeCount(): int + { + return $this->get("NodeCount"); + } + + /** + * NodeCount: Node节点数量 + * + * @param int $nodeCount + */ + public function setNodeCount(int $nodeCount) + { + $this->set("NodeCount", $nodeCount); + } + + /** + * ExternalApiServer: 集群外部apiserver地址 + * + * @return string|null + */ + public function getExternalApiServer(): string + { + return $this->get("ExternalApiServer"); + } + + /** + * ExternalApiServer: 集群外部apiserver地址 + * + * @param string $externalApiServer + */ + public function setExternalApiServer(string $externalApiServer) + { + $this->set("ExternalApiServer", $externalApiServer); + } + + /** + * Status: 集群状态,枚举值:初始化:"INITIALIZING";启动中:"STARTING";创建失败:"CREATEFAILED";正常运行:"RUNNING";添加节点:"ADDNODE";删除节点:"DELNODE";删除中:"DELETING";删除失败:"DELETEFAILED";错误:"ERROR";升级插件:"UPDATE_PLUGIN";更新插件信息:"UPDATE_PLUGIN_INFO";异常:"ABNORMAL";升级集群中:"UPGRADING";容器运行时切换:"CONVERTING" + * + * @return string|null + */ + public function getStatus(): string + { + return $this->get("Status"); + } + + /** + * Status: 集群状态,枚举值:初始化:"INITIALIZING";启动中:"STARTING";创建失败:"CREATEFAILED";正常运行:"RUNNING";添加节点:"ADDNODE";删除节点:"DELNODE";删除中:"DELETING";删除失败:"DELETEFAILED";错误:"ERROR";升级插件:"UPDATE_PLUGIN";更新插件信息:"UPDATE_PLUGIN_INFO";异常:"ABNORMAL";升级集群中:"UPGRADING";容器运行时切换:"CONVERTING" + * + * @param string $status + */ + public function setStatus(string $status) + { + $this->set("Status", $status); + } +} diff --git a/src/UK8S/Models/ImageInfo.php b/src/UK8S/Models/ImageInfo.php new file mode 100644 index 00000000..0d4f0ddc --- /dev/null +++ b/src/UK8S/Models/ImageInfo.php @@ -0,0 +1,104 @@ +get("ZoneId"); + } + + /** + * ZoneId: 可用区 Id + * + * @param int $zoneId + */ + public function setZoneId(int $zoneId) + { + $this->set("ZoneId", $zoneId); + } + + /** + * ImageId: 镜像 Id + * + * @return string|null + */ + public function getImageId(): string + { + return $this->get("ImageId"); + } + + /** + * ImageId: 镜像 Id + * + * @param string $imageId + */ + public function setImageId(string $imageId) + { + $this->set("ImageId", $imageId); + } + + /** + * ImageName: 镜像名称 + * + * @return string|null + */ + public function getImageName(): string + { + return $this->get("ImageName"); + } + + /** + * ImageName: 镜像名称 + * + * @param string $imageName + */ + public function setImageName(string $imageName) + { + $this->set("ImageName", $imageName); + } + + /** + * NotSupportGPU: 该镜像是否支持GPU机型,枚举值[true:不支持,false:支持]。 + * + * @return boolean|null + */ + public function getNotSupportGPU(): bool + { + return $this->get("NotSupportGPU"); + } + + /** + * NotSupportGPU: 该镜像是否支持GPU机型,枚举值[true:不支持,false:支持]。 + * + * @param boolean $notSupportGPU + */ + public function setNotSupportGPU(bool $notSupportGPU) + { + $this->set("NotSupportGPU", $notSupportGPU); + } +} diff --git a/src/UK8S/Models/K8SNodeCondition.php b/src/UK8S/Models/K8SNodeCondition.php new file mode 100644 index 00000000..8f50b27e --- /dev/null +++ b/src/UK8S/Models/K8SNodeCondition.php @@ -0,0 +1,144 @@ +get("Type"); + } + + /** + * Type: Condition 类型,如 MemoryPressure、DiskPressure、PIDPressure、Ready + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } + + /** + * Status: 状态,False、True + * + * @return string|null + */ + public function getStatus(): string + { + return $this->get("Status"); + } + + /** + * Status: 状态,False、True + * + * @param string $status + */ + public function setStatus(string $status) + { + $this->set("Status", $status); + } + + /** + * LastProbeTime: 最后一次上报状态的时间 + * + * @return string|null + */ + public function getLastProbeTime(): string + { + return $this->get("LastProbeTime"); + } + + /** + * LastProbeTime: 最后一次上报状态的时间 + * + * @param string $lastProbeTime + */ + public function setLastProbeTime(string $lastProbeTime) + { + $this->set("LastProbeTime", $lastProbeTime); + } + + /** + * LastTransitionTime: 最后一次状态转变时间 + * + * @return string|null + */ + public function getLastTransitionTime(): string + { + return $this->get("LastTransitionTime"); + } + + /** + * LastTransitionTime: 最后一次状态转变时间 + * + * @param string $lastTransitionTime + */ + public function setLastTransitionTime(string $lastTransitionTime) + { + $this->set("LastTransitionTime", $lastTransitionTime); + } + + /** + * Reason: 状态变化的原因 + * + * @return string|null + */ + public function getReason(): string + { + return $this->get("Reason"); + } + + /** + * Reason: 状态变化的原因 + * + * @param string $reason + */ + public function setReason(string $reason) + { + $this->set("Reason", $reason); + } + + /** + * Message: 状态变化的描述信息 + * + * @return string|null + */ + public function getMessage(): string + { + return $this->get("Message"); + } + + /** + * Message: 状态变化的描述信息 + * + * @param string $message + */ + public function setMessage(string $message) + { + $this->set("Message", $message); + } +} diff --git a/src/UK8S/Models/KubeProxy.php b/src/UK8S/Models/KubeProxy.php new file mode 100644 index 00000000..097925d9 --- /dev/null +++ b/src/UK8S/Models/KubeProxy.php @@ -0,0 +1,44 @@ +get("Mode"); + } + + /** + * Mode: KubeProxy模式,枚举值为[ipvs,iptables] + * + * @param string $mode + */ + public function setMode(string $mode) + { + $this->set("Mode", $mode); + } +} diff --git a/src/UK8S/Models/NodeInfoV2.php b/src/UK8S/Models/NodeInfoV2.php new file mode 100644 index 00000000..acf7011e --- /dev/null +++ b/src/UK8S/Models/NodeInfoV2.php @@ -0,0 +1,433 @@ +get("Zone"); + } + + /** + * Zone: Node所在可用区 + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * NodeId: NodeId,Node在UK8S处的唯一标示,如uk8s-reewqe5-sdasadsda + * + * @return string|null + */ + public function getNodeId(): string + { + return $this->get("NodeId"); + } + + /** + * NodeId: NodeId,Node在UK8S处的唯一标示,如uk8s-reewqe5-sdasadsda + * + * @param string $nodeId + */ + public function setNodeId(string $nodeId) + { + $this->set("NodeId", $nodeId); + } + + /** + * NodeRole: node角色,枚举值为master、node + * + * @return string|null + */ + public function getNodeRole(): string + { + return $this->get("NodeRole"); + } + + /** + * NodeRole: node角色,枚举值为master、node + * + * @param string $nodeRole + */ + public function setNodeRole(string $nodeRole) + { + $this->set("NodeRole", $nodeRole); + } + + /** + * NodeStatus: Node的状态:枚举值:初始化:"Initializing";启动中:"Starting";运行:"Running";停止中:"Stopping";停止:"Stopped";待删除:"ToBeDeleted";删除中:"Deleting";异常:"Error";安装失败:"Install Fail"; + * + * @return string|null + */ + public function getNodeStatus(): string + { + return $this->get("NodeStatus"); + } + + /** + * NodeStatus: Node的状态:枚举值:初始化:"Initializing";启动中:"Starting";运行:"Running";停止中:"Stopping";停止:"Stopped";待删除:"ToBeDeleted";删除中:"Deleting";异常:"Error";安装失败:"Install Fail"; + * + * @param string $nodeStatus + */ + public function setNodeStatus(string $nodeStatus) + { + $this->set("NodeStatus", $nodeStatus); + } + + /** + * InstanceType: Node节点的资源类型,枚举值为UHost或UPHost。 + * + * @return string|null + */ + public function getInstanceType(): string + { + return $this->get("InstanceType"); + } + + /** + * InstanceType: Node节点的资源类型,枚举值为UHost或UPHost。 + * + * @param string $instanceType + */ + public function setInstanceType(string $instanceType) + { + $this->set("InstanceType", $instanceType); + } + + /** + * InstanceName: 资源名称,初始值等于NodeId,用户可在UHost或UPHost处修改。 + * + * @return string|null + */ + public function getInstanceName(): string + { + return $this->get("InstanceName"); + } + + /** + * InstanceName: 资源名称,初始值等于NodeId,用户可在UHost或UPHost处修改。 + * + * @param string $instanceName + */ + public function setInstanceName(string $instanceName) + { + $this->set("InstanceName", $instanceName); + } + + /** + * InstanceId: 资源ID,如uhost-xxxx,或uphost-xxxxx。 + * + * @return string|null + */ + public function getInstanceId(): string + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 资源ID,如uhost-xxxx,或uphost-xxxxx。 + * + * @param string $instanceId + */ + public function setInstanceId(string $instanceId) + { + $this->set("InstanceId", $instanceId); + } + + /** + * MachineType: 机型类别,分别对应Uhost的MachineType或PHost的PHostType。 + * + * @return string|null + */ + public function getMachineType(): string + { + return $this->get("MachineType"); + } + + /** + * MachineType: 机型类别,分别对应Uhost的MachineType或PHost的PHostType。 + * + * @param string $machineType + */ + public function setMachineType(string $machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * OsType: Node节点的操作系统类别,如Linux或Windows。 + * + * @return string|null + */ + public function getOsType(): string + { + return $this->get("OsType"); + } + + /** + * OsType: Node节点的操作系统类别,如Linux或Windows。 + * + * @param string $osType + */ + public function setOsType(string $osType) + { + $this->set("OsType", $osType); + } + + /** + * OsName: Node节点的镜像名称。 + * + * @return string|null + */ + public function getOsName(): string + { + return $this->get("OsName"); + } + + /** + * OsName: Node节点的镜像名称。 + * + * @param string $osName + */ + public function setOsName(string $osName) + { + $this->set("OsName", $osName); + } + + /** + * CPU: Node节点CPU核数,单位: 个。 + * + * @return integer|null + */ + public function getCPU(): int + { + return $this->get("CPU"); + } + + /** + * CPU: Node节点CPU核数,单位: 个。 + * + * @param int $cpu + */ + public function setCPU(int $cpu) + { + $this->set("CPU", $cpu); + } + + /** + * Memory: 内存大小,单位: MB。 + * + * @return integer|null + */ + public function getMemory(): int + { + return $this->get("Memory"); + } + + /** + * Memory: 内存大小,单位: MB。 + * + * @param int $memory + */ + public function setMemory(int $memory) + { + $this->set("Memory", $memory); + } + + /** + * IPSet: 节点IP信息,详细信息见 UHostIPSet。 + * + * @return UHostIPSet[]|null + */ + public function getIPSet(): array + { + $items = $this->get("IPSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UHostIPSet($item)); + } + return $result; + } + + /** + * IPSet: 节点IP信息,详细信息见 UHostIPSet。 + * + * @param UHostIPSet[] $ipSet + */ + public function setIPSet(array $ipSet) + { + $result = []; + foreach ($ipSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * CreateTime: 节点创建时间 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 节点创建时间 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ExpireTime: 节点计费到期时间 + * + * @return integer|null + */ + public function getExpireTime(): int + { + return $this->get("ExpireTime"); + } + + /** + * ExpireTime: 节点计费到期时间 + * + * @param int $expireTime + */ + public function setExpireTime(int $expireTime) + { + $this->set("ExpireTime", $expireTime); + } + + /** + * AsgId: 节点所属伸缩组ID,非伸缩组创建出来的节点,伸缩组ID为Default。 + * + * @return string|null + */ + public function getAsgId(): string + { + return $this->get("AsgId"); + } + + /** + * AsgId: 节点所属伸缩组ID,非伸缩组创建出来的节点,伸缩组ID为Default。 + * + * @param string $asgId + */ + public function setAsgId(string $asgId) + { + $this->set("AsgId", $asgId); + } + + /** + * Unschedulable: 是否允许Pod调度到该节点,枚举值为true或false。 + * + * @return boolean|null + */ + public function getUnschedulable(): bool + { + return $this->get("Unschedulable"); + } + + /** + * Unschedulable: 是否允许Pod调度到该节点,枚举值为true或false。 + * + * @param boolean $unschedulable + */ + public function setUnschedulable(bool $unschedulable) + { + $this->set("Unschedulable", $unschedulable); + } + + /** + * KubeProxy: kubeproxy信息,详细信息见KubeProxy。 + * + * @return KubeProxy|null + */ + public function getKubeProxy(): KubeProxy + { + return new KubeProxy($this->get("KubeProxy")); + } + + /** + * KubeProxy: kubeproxy信息,详细信息见KubeProxy。 + * + * @param KubeProxy $kubeProxy + */ + public function setKubeProxy(KubeProxy $kubeProxy) + { + $this->set("KubeProxy", $kubeProxy->getAll()); + } + + /** + * NodeLogInfo: 加节点时判断是否没有资源,如果返回NORESOURCE则代表没有资源了 + * + * @return string|null + */ + public function getNodeLogInfo(): string + { + return $this->get("NodeLogInfo"); + } + + /** + * NodeLogInfo: 加节点时判断是否没有资源,如果返回NORESOURCE则代表没有资源了 + * + * @param string $nodeLogInfo + */ + public function setNodeLogInfo(string $nodeLogInfo) + { + $this->set("NodeLogInfo", $nodeLogInfo); + } + + /** + * GPU: 节点的GPU颗数。 + * + * @return integer|null + */ + public function getGPU(): int + { + return $this->get("GPU"); + } + + /** + * GPU: 节点的GPU颗数。 + * + * @param int $gpu + */ + public function setGPU(int $gpu) + { + $this->set("GPU", $gpu); + } +} diff --git a/src/UK8S/Models/UHostIPSet.php b/src/UK8S/Models/UHostIPSet.php new file mode 100644 index 00000000..cbf1d2a5 --- /dev/null +++ b/src/UK8S/Models/UHostIPSet.php @@ -0,0 +1,164 @@ +get("Type"); + } + + /** + * Type: 国际: Internation,BGP: Bgp,内网: Private + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } + + /** + * IPId: IP资源ID (内网IP无对应的资源ID) + * + * @return string|null + */ + public function getIPId(): string + { + return $this->get("IPId"); + } + + /** + * IPId: IP资源ID (内网IP无对应的资源ID) + * + * @param string $ipId + */ + public function setIPId(string $ipId) + { + $this->set("IPId", $ipId); + } + + /** + * IP: IP地址 + * + * @return string|null + */ + public function getIP(): string + { + return $this->get("IP"); + } + + /** + * IP: IP地址 + * + * @param string $ip + */ + public function setIP(string $ip) + { + $this->set("IP", $ip); + } + + /** + * Bandwidth: IP对应的带宽, 单位: Mb (内网IP不显示带宽信息) + * + * @return integer|null + */ + public function getBandwidth(): int + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: IP对应的带宽, 单位: Mb (内网IP不显示带宽信息) + * + * @param int $bandwidth + */ + public function setBandwidth(int $bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * VPCId: IP地址对应的VPC ID + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: IP地址对应的VPC ID + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: IP地址对应的子网 ID + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: IP地址对应的子网 ID + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * Mac: Mac地址 + * + * @return string|null + */ + public function getMac(): string + { + return $this->get("Mac"); + } + + /** + * Mac: Mac地址 + * + * @param string $mac + */ + public function setMac(string $mac) + { + $this->set("Mac", $mac); + } +} diff --git a/src/UK8S/Params/CreateUK8SClusterV2ParamKubeProxy.php b/src/UK8S/Params/CreateUK8SClusterV2ParamKubeProxy.php new file mode 100644 index 00000000..ed5b0744 --- /dev/null +++ b/src/UK8S/Params/CreateUK8SClusterV2ParamKubeProxy.php @@ -0,0 +1,44 @@ +get("Mode"); + } + + /** + * Mode: 集群kube-proxy模式。支持iptables和ipvs,默认为iptables。 + * + * @param string $mode + */ + public function setMode(string $mode) + { + $this->set("Mode", $mode); + } +} diff --git a/src/UK8S/Params/CreateUK8SClusterV2ParamMaster.php b/src/UK8S/Params/CreateUK8SClusterV2ParamMaster.php new file mode 100644 index 00000000..71206b34 --- /dev/null +++ b/src/UK8S/Params/CreateUK8SClusterV2ParamMaster.php @@ -0,0 +1,44 @@ +get("Zone"); + } + + /** + * Zone: Master节点所属可用区,需要设置 Master.0.Zone、 Master.1.Zone、Master.2.Zone 三个 Master 节点的可用区。 三个节点可部署在不同可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } +} diff --git a/src/UK8S/Params/CreateUK8SClusterV2ParamNodes.php b/src/UK8S/Params/CreateUK8SClusterV2ParamNodes.php new file mode 100644 index 00000000..97097961 --- /dev/null +++ b/src/UK8S/Params/CreateUK8SClusterV2ParamNodes.php @@ -0,0 +1,304 @@ +get("Zone"); + } + + /** + * Zone: 一组Nodes节点所属可用区,可创建多组Nodes节点,如一组是CPU Nodes节点,另一组是GPU Nodes节点。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * MachineType: 一组Nodes节点云主机机型,如["N", "C", "O", "OS"],具体请参照云主机机型。 + * + * @return string|null + */ + public function getMachineType(): string + { + return $this->get("MachineType"); + } + + /** + * MachineType: 一组Nodes节点云主机机型,如["N", "C", "O", "OS"],具体请参照云主机机型。 + * + * @param string $machineType + */ + public function setMachineType(string $machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * CPU: 一组Node节点的虚拟CPU核数。单位:核,范围:[2, 64],可选范围参考控制台。 + * + * @return integer|null + */ + public function getCPU(): int + { + return $this->get("CPU"); + } + + /** + * CPU: 一组Node节点的虚拟CPU核数。单位:核,范围:[2, 64],可选范围参考控制台。 + * + * @param int $cpu + */ + public function setCPU(int $cpu) + { + $this->set("CPU", $cpu); + } + + /** + * Mem: 一组Node节点的内存大小。单位:MB,范围 :[4096, 262144],取值为1024的倍数,可选范围参考控制台。 + * + * @return integer|null + */ + public function getMem(): int + { + return $this->get("Mem"); + } + + /** + * Mem: 一组Node节点的内存大小。单位:MB,范围 :[4096, 262144],取值为1024的倍数,可选范围参考控制台。 + * + * @param int $mem + */ + public function setMem(int $mem) + { + $this->set("Mem", $mem); + } + + /** + * Count: 一组Node节点的数量,范围:[1,10]。 + * + * @return integer|null + */ + public function getCount(): int + { + return $this->get("Count"); + } + + /** + * Count: 一组Node节点的数量,范围:[1,10]。 + * + * @param int $count + */ + public function setCount(int $count) + { + $this->set("Count", $count); + } + + /** + * IsolationGroup: 一组Node节点的隔离组Id,归属于同一隔离组的虚拟机节点将落在不同的物理机上,单个隔离组最多只能容纳8个节点。参见DescribeIsolationGroup。 + * + * @return string|null + */ + public function getIsolationGroup(): string + { + return $this->get("IsolationGroup"); + } + + /** + * IsolationGroup: 一组Node节点的隔离组Id,归属于同一隔离组的虚拟机节点将落在不同的物理机上,单个隔离组最多只能容纳8个节点。参见DescribeIsolationGroup。 + * + * @param string $isolationGroup + */ + public function setIsolationGroup(string $isolationGroup) + { + $this->set("IsolationGroup", $isolationGroup); + } + + /** + * MaxPods: Node节点上可运行最大节点数,默认为110。 + * + * @return integer|null + */ + public function getMaxPods(): int + { + return $this->get("MaxPods"); + } + + /** + * MaxPods: Node节点上可运行最大节点数,默认为110。 + * + * @param int $maxPods + */ + public function setMaxPods(int $maxPods) + { + $this->set("MaxPods", $maxPods); + } + + /** + * Labels: Node节点标签,形式为key=value,多组Labels用”,“隔开,最多支持五组。 + * + * @return string|null + */ + public function getLabels(): string + { + return $this->get("Labels"); + } + + /** + * Labels: Node节点标签,形式为key=value,多组Labels用”,“隔开,最多支持五组。 + * + * @param string $labels + */ + public function setLabels(string $labels) + { + $this->set("Labels", $labels); + } + + /** + * BootDiskType: 一组Node节点的系统盘类型,请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * + * @return string|null + */ + public function getBootDiskType(): string + { + return $this->get("BootDiskType"); + } + + /** + * BootDiskType: 一组Node节点的系统盘类型,请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * + * @param string $bootDiskType + */ + public function setBootDiskType(string $bootDiskType) + { + $this->set("BootDiskType", $bootDiskType); + } + + /** + * DataDiskType: 一组Node节点的数据盘类型,请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * + * @return string|null + */ + public function getDataDiskType(): string + { + return $this->get("DataDiskType"); + } + + /** + * DataDiskType: 一组Node节点的数据盘类型,请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * + * @param string $dataDiskType + */ + public function setDataDiskType(string $dataDiskType) + { + $this->set("DataDiskType", $dataDiskType); + } + + /** + * MinmalCpuPlatform: Node节点的最低cpu平台,不选则随机。枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake"。 + * + * @return string|null + */ + public function getMinmalCpuPlatform(): string + { + return $this->get("MinmalCpuPlatform"); + } + + /** + * MinmalCpuPlatform: Node节点的最低cpu平台,不选则随机。枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake"。 + * + * @param string $minmalCpuPlatform + */ + public function setMinmalCpuPlatform(string $minmalCpuPlatform) + { + $this->set("MinmalCpuPlatform", $minmalCpuPlatform); + } + + /** + * GpuType: 一组Node节点的GPU类型,枚举值["K80", "P40", "V100"],最新值参考Console。 + * + * @return string|null + */ + public function getGpuType(): string + { + return $this->get("GpuType"); + } + + /** + * GpuType: 一组Node节点的GPU类型,枚举值["K80", "P40", "V100"],最新值参考Console。 + * + * @param string $gpuType + */ + public function setGpuType(string $gpuType) + { + $this->set("GpuType", $gpuType); + } + + /** + * GPU: 一组Node节点的GPU卡核心数,仅GPU机型支持此字段。 + * + * @return integer|null + */ + public function getGPU(): int + { + return $this->get("GPU"); + } + + /** + * GPU: 一组Node节点的GPU卡核心数,仅GPU机型支持此字段。 + * + * @param int $gpu + */ + public function setGPU(int $gpu) + { + $this->set("GPU", $gpu); + } + + /** + * DataDiskSize: 数据磁盘大小,单位GB。默认0。范围 :[20, 1000] + * + * @return integer|null + */ + public function getDataDiskSize(): int + { + return $this->get("DataDiskSize"); + } + + /** + * DataDiskSize: 数据磁盘大小,单位GB。默认0。范围 :[20, 1000] + * + * @param int $dataDiskSize + */ + public function setDataDiskSize(int $dataDiskSize) + { + $this->set("DataDiskSize", $dataDiskSize); + } +} diff --git a/src/UK8S/UK8SClient.php b/src/UK8S/UK8SClient.php new file mode 100644 index 00000000..857d42d3 --- /dev/null +++ b/src/UK8S/UK8SClient.php @@ -0,0 +1,515 @@ + (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Password" => (string) Node节点密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,如下:# echo -n Password1 | base64 + * "ClusterId" => (string) UK8S集群ID。 可从UK8S控制台获取。 + * "UHostId" => (string) 云主机Id,为了保证节点正常运行,该主机配置不得低于2C4G。 + * "MaxPods" => (integer) 默认110,生产环境建议小于等于110。 + * "Labels" => (string) Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + * "SubnetId" => (string) 该云主机所属子网Id。 + * "ImageId" => (string) 镜像 Id,不填时后台程序会自动选用一个可用的镜像 Id,支持用户自定义镜像,自定义镜像必须基于基础镜像制作。 + * "DisableSchedule" => (boolean) 用于标示添加完节点后是否将节点临时禁用. 传入 "true" 表示禁用,传入其它或不传表示不禁用 + * "UserData" => (string) 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码。 + * "InitScript" => (string) 用户自定义Shell脚本。与UserData的区别在于InitScript在节点初始化完毕后才执行,UserData则是云主机初始化时执行。 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function addUK8SExistingUHost(AddUK8SExistingUHostRequest $request = null): AddUK8SExistingUHostResponse + { + $resp = $this->invoke($request); + return new AddUK8SExistingUHostResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * AddUK8SPHostNode - 为UK8S集群添加一台或多台物理云主机类型的节点。 + * + * See also: https://docs.ucloud.cn/api/UK8S-api/add_uk8s_phost_node + * + * Arguments: + * + * $args = [ + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ClusterId" => (string) UK8S集群ID。 可从UK8S控制台获取。 + * "Count" => (integer) 最大创建Node节点数量,取值范围是[1,10]。 + * "Password" => (string) Node节点密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,如下:# echo -n Password1 | base64 + * "ChargeType" => (string) 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ 默认为月付 + * "Quantity" => (integer) 购买时长。默认: 1。月付时,此参数传0,代表了购买至月末。 + * "Labels" => (string) Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + * "MaxPods" => (integer) 默认110,生产环境建议小于等于110。 + * "Type" => (string) 物理机类型,默认为:db-2(基础型-SAS-V3) + * "Raid" => (string) Raid配置,默认Raid10 支持:Raid0、Raid1、Raid5、Raid10,NoRaid + * "NIC" => (string) 网络环境,可选千兆:1G ,万兆:10G, 默认1G。 + * "SubnetId" => (string) 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。 + * "ImageId" => (string) 镜像 Id,不填时后台程序会自动选用一个可用的镜像 Id,支持用户自定义镜像,自定义镜像必须基于基础镜像制作。 + * "DisableSchedule" => (boolean) 用于标示添加完节点后是否将节点临时禁用. 传入 "true" 表示禁用,传入其它或不传表示不禁用 + * "InitScript" => (string) 用户自定义Shell脚本。与UserData的区别在于InitScript在节点初始化完毕后才执行。 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function addUK8SPHostNode(AddUK8SPHostNodeRequest $request = null): AddUK8SPHostNodeResponse + { + $resp = $this->invoke($request); + return new AddUK8SPHostNodeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * AddUK8SUHostNode - 为UK8S集群添加一台Node节点,机型类型为云主机 + * + * See also: https://docs.ucloud.cn/api/UK8S-api/add_uk8s_uhost_node + * + * Arguments: + * + * $args = [ + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ClusterId" => (string) UK8S集群ID。 可从UK8S控制台获取。 + * "CPU" => (integer) 虚拟CPU核数。可选参数:2-64(具体机型与CPU的对应关系参照控制台)。默认值: 4。 + * "Count" => (integer) 创建Node节点数量,取值范围是[1,50]。 + * "Password" => (string) Node节点密码。请遵照[[api:uhost-api:specification|字段规范]]设定密码。密码需使用base64进行编码,如下:# echo -n Password1 | base64 + * "Mem" => (integer) 内存大小。单位:MB。范围 :[4096, 262144],取值为1024的倍数(可选范围参考控制台)。默认值:8192 + * "ChargeType" => (string) 计费模式。枚举值为: \\ > Year,按年付费; \\ > Month,按月付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按小时后付费(支持关机不收费,目前仅部分可用区支持,请联系您的客户经理) \\ 默认为月付 + * "BootDiskType" => (string) 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * "DataDiskType" => (string) 磁盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * "DataDiskSize" => (integer) 数据磁盘大小,单位GB。默认0。范围 :[20, 1000] + * "Quantity" => (integer) 购买时长。默认: 1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 + * "MachineType" => (string) 云主机机型。枚举值["N", "C", "G", "O", "OS"]。参考[[api:uhost-api:uhost_type|云主机机型说明]]。 + * "MinmalCpuPlatform" => (string) 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake";"Intel/CascadelakeR"; “Amd/Epyc2”,"Amd/Auto"],默认值是"Intel/Auto" + * "GpuType" => (string) GPU类型,枚举值["K80", "P40", "V100",],MachineType为G时必填 + * "GPU" => (integer) GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关) + * "Labels" => (string) Node节点标签。key=value形式,多组用”,“隔开,最多5组。 如env=pro,type=game + * "MaxPods" => (integer) 默认110,生产环境建议小于等于110。 + * "IsolationGroup" => (string) 硬件隔离组id。可通过DescribeIsolationGroup获取。 + * "ImageId" => (string) 镜像 Id,不填时后台程序会自动选用一个可用的镜像 Id,支持用户自定义镜像,自定义镜像必须基于基础镜像制作。 + * "SubnetId" => (string) 子网 ID。默认为集群创建时填写的子网ID,也可以填写集群同VPC内的子网ID。 + * "DisableSchedule" => (boolean) 用于标示添加完节点后是否将节点临时禁用. 传入 "true" 表示禁用,传入其它或不传表示不禁用 + * "UserData" => (string) 用户自定义数据。当镜像支持Cloud-init Feature时可填写此字段。注意:1、总数据量大小不超过 16K;2、使用base64编码。 + * "InitScript" => (string) 用户自定义Shell脚本。与UserData的区别在于InitScript在节点初始化完毕后才执行,UserData则是云主机初始化时执行。 + * ] + * + * Outputs: + * + * $outputs = [ + * "NodeIds" => (array) Node实例Id集合 + * ] + * + * @throws UCloudException + */ + public function addUK8SUHostNode(AddUK8SUHostNodeRequest $request = null): AddUK8SUHostNodeResponse + { + $resp = $this->invoke($request); + return new AddUK8SUHostNodeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUK8SClusterV2 - 创建UK8S集群 + * + * See also: https://docs.ucloud.cn/api/UK8S-api/create_uk8s_cluster_v2 + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "VPCId" => (string) 集群Node及Pod所属VPC + * "SubnetId" => (string) 集群Node及Pod所属子网 + * "ServiceCIDR" => (string) Service 网段,用于分配ClusterIP,如172.17.0.0/16。该网段不能与集群所属VPC网段重叠。 + * "ClusterName" => (string) 集群名称 + * "Password" => (string) 集群节点密码,包括Master和Node。密码需包含最少一个大写字母,请使用base64进行编码,举例如下:# echo -n Password1 | base64 + * "Master" => (array) [ + * [ + * "Zone" => (string) Master节点所属可用区,需要设置 Master.0.Zone、 Master.1.Zone、Master.2.Zone 三个 Master 节点的可用区。 三个节点可部署在不同可用区。参见 [可用区列表](../summary/regionlist.html) + * ] + * ] + * "MasterMachineType" => (string) Master节点的云主机机型(V2.0),如["N", "C", "O", "OS"],具体请参照云主机机型。 + * "MasterCPU" => (integer) Master节点的虚拟CPU核数。可选参数:2-64(具体机型与CPU的对应关系参照控制台)。 + * "MasterMem" => (integer) Master节点的内存大小。单位:MB。范围 :[4096, 262144],取值为1024的倍数(可选范围参考控制台)。 + * "Nodes" => (array) [ + * [ + * "Zone" => (string) 一组Nodes节点所属可用区,可创建多组Nodes节点,如一组是CPU Nodes节点,另一组是GPU Nodes节点。参见 [可用区列表](../summary/regionlist.html) + * "MachineType" => (string) 一组Nodes节点云主机机型,如["N", "C", "O", "OS"],具体请参照云主机机型。 + * "CPU" => (integer) 一组Node节点的虚拟CPU核数。单位:核,范围:[2, 64],可选范围参考控制台。 + * "Mem" => (integer) 一组Node节点的内存大小。单位:MB,范围 :[4096, 262144],取值为1024的倍数,可选范围参考控制台。 + * "Count" => (integer) 一组Node节点的数量,范围:[1,10]。 + * "IsolationGroup" => (string) 一组Node节点的隔离组Id,归属于同一隔离组的虚拟机节点将落在不同的物理机上,单个隔离组最多只能容纳8个节点。参见DescribeIsolationGroup。 + * "MaxPods" => (integer) Node节点上可运行最大节点数,默认为110。 + * "Labels" => (string) Node节点标签,形式为key=value,多组Labels用”,“隔开,最多支持五组。 + * "BootDiskType" => (string) 一组Node节点的系统盘类型,请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * "DataDiskType" => (string) 一组Node节点的数据盘类型,请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * "MinmalCpuPlatform" => (string) Node节点的最低cpu平台,不选则随机。枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake"。 + * "GpuType" => (string) 一组Node节点的GPU类型,枚举值["K80", "P40", "V100"],最新值参考Console。 + * "GPU" => (integer) 一组Node节点的GPU卡核心数,仅GPU机型支持此字段。 + * "DataDiskSize" => (integer) 数据磁盘大小,单位GB。默认0。范围 :[20, 1000] + * ] + * ] + * "MasterBootDiskType" => (string) Master节点系统盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * "MasterDataDiskType" => (string) Master节点数据盘类型。请参考[[api:uhost-api:disk_type|磁盘类型]]。默认为SSD云盘 + * "MasterMinmalCpuPlatform" => (string) Master节点的最低cpu平台,不选则随机。枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake"。 + * "MasterDataDiskSize" => (integer) Master节点的数据盘大小,单位GB,默认为0。范围 :[20, 1000] + * "ChargeType" => (string) 集群所有节点的付费模式。枚举值为: Year,按年付费; Month,按月付费; Dynamic,按小时付费(需开启权限),默认按月。 + * "K8sVersion" => (string) k8s集群的版本,版本信息请参考UK8S集群创建页,不指定的话默认为当前支持的最高版本。 + * "Quantity" => (integer) 购买时长。默认为1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 + * "ExternalApiServer" => (string) 是否允许外网访问apiserver,开启:Yes 不开启:No。默认为No。 + * "MasterIsolationGroup" => (string) 【无效,已删除】当前将自动为Master节点创建隔离组,确保Master节点归属于不同物理机。 + * "KubeProxy" => (object) [ + * "Mode" => (string) 集群kube-proxy模式。支持iptables和ipvs,默认为iptables。 + * ] + * "ImageId" => (string) Master节点和Node节点的镜像 ID,不填则随机选择可用的基础镜像。支持用户自定义镜像。 + * "UserData" => (string) 用户自定义数据。注意:1、总数据量大小不超多16K;2、使用base64编码。 + * "InitScript" => (string) 用户自定义脚本,与UserData不同,自定义脚本将在集群安装完毕后执行。注意:1、总数据量大小不超多16K;2、使用base64编码。 + * ] + * + * Outputs: + * + * $outputs = [ + * "ClusterId" => (string) 集群ID + * ] + * + * @throws UCloudException + */ + public function createUK8SClusterV2(CreateUK8SClusterV2Request $request = null): CreateUK8SClusterV2Response + { + $resp = $this->invoke($request); + return new CreateUK8SClusterV2Response($resp->toArray(), $resp->getRequestId()); + } + + /** + * DelUK8SCluster - 删除UK8S集群 + * + * See also: https://docs.ucloud.cn/api/UK8S-api/del_uk8s_cluster + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "ClusterId" => (string) 集群id + * "ReleaseUDisk" => (boolean) 是否删除节点挂载的数据盘。枚举值[true:删除,false: 不删除],默认不删除 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function delUK8SCluster(DelUK8SClusterRequest $request = null): DelUK8SClusterResponse + { + $resp = $this->invoke($request); + return new DelUK8SClusterResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DelUK8SClusterNodeV2 - 删除集群中的Node节点,删除前务必先将其中的Pod驱逐。 + * + * See also: https://docs.ucloud.cn/api/UK8S-api/del_uk8s_cluster_node_v2 + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ClusterId" => (string) UK8S集群ID。 可从UK8S控制台获取。 + * "NodeId" => (string) Node在UK8S处的唯一标示,如uk8s-reewqe5-sdasadsda。**非云主机或物理云主机资源Id** + * "ReleaseDataUDisk" => (boolean) 删除节点时是否释放数据盘。 枚举值[true:释放,false: 不释放],默认为true。 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function delUK8SClusterNodeV2(DelUK8SClusterNodeV2Request $request = null): DelUK8SClusterNodeV2Response + { + $resp = $this->invoke($request); + return new DelUK8SClusterNodeV2Response($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUK8SImage - 获取UK8S支持的Node节点操作系统,可基于该操作系统制定自定义镜像 + * + * See also: https://docs.ucloud.cn/api/UK8S-api/describe_uk8s_image + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * ] + * + * Outputs: + * + * $outputs = [ + * "ImageSet" => (array) 虚拟机可用镜像集合, 详见ImageInfo 数组[ + * [ + * "ZoneId" => (integer) 可用区 Id + * "ImageId" => (string) 镜像 Id + * "ImageName" => (string) 镜像名称 + * "NotSupportGPU" => (boolean) 该镜像是否支持GPU机型,枚举值[true:不支持,false:支持]。 + * ] + * ] + * "PHostImageSet" => (array) 物理机可用镜像集合, 详见ImageInfo 数组[ + * [ + * "ZoneId" => (integer) 可用区 Id + * "ImageId" => (string) 镜像 Id + * "ImageName" => (string) 镜像名称 + * "NotSupportGPU" => (boolean) 该镜像是否支持GPU机型,枚举值[true:不支持,false:支持]。 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeUK8SImage(DescribeUK8SImageRequest $request = null): DescribeUK8SImageResponse + { + $resp = $this->invoke($request); + return new DescribeUK8SImageResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUK8SNode - 用于获取 UK8S 节点详情 + * + * See also: https://docs.ucloud.cn/api/UK8S-api/describe_uk8s_node + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ClusterId" => (string) UK8S 集群 Id + * "Name" => (string) K8S 节点IP或者节点ID + * ] + * + * Outputs: + * + * $outputs = [ + * "Name" => (string) 节点名称 + * "Labels" => (array) 字符串数组,每一项是类似 "kubernetes.io/arch=amd64" 的标签 + * "Annotations" => (array) 字符串数组,每一项是类似 "node.alpha.kubernetes.io/ttl=0" 的注解 + * "CreationTimestamp" => (integer) 时间戳,单位是 秒 + * "ProviderID" => (string) 字符串,如:"UCloud://cn-sh2-02//uk8s-vsc0vgob-n-mpzxc" + * "KernelVersion" => (string) 内核版本,如:"4.19.0-6.el7.ucloud.x86_64" + * "OSImage" => (string) 操作系统类型,如:"CentOS Linux 7 (Core)" + * "ContainerRuntimeVersion" => (string) 容器运行时版本,如:"docker://18.9.9" + * "KubeletVersion" => (string) kubelet 版本 + * "KubeProxyVersion" => (string) kubeproxy 版本 + * "InternalIP" => (string) 内部 IP 地址 + * "Hostname" => (string) 主机名 + * "AllocatedPodCount" => (integer) 已分配到当前节点的 Pod 数量 + * "PodCapacity" => (integer) 节点允许的可分配 Pod 最大数量 + * "Unschedulable" => (boolean) 是否禁止调度 + * "CPUCapacity" => (string) 节点 CPU 总量 + * "MemoryCapacity" => (string) 节点内存总量 + * "MemoryRequests" => (string) 节点上已分配 Pod 的内存请求量 + * "MemoryRequestsFraction" => (string) 节点上已分配 Pod 的内存请求量占内存总量的比例,如返回值为 "4.5",则意味着请求量占总量的 4.5% + * "MemoryLimits" => (string) 节点上已分配 Pod 的内存限制量 + * "MemoryLimitsFraction" => (string) 节点上已分配 Pod 的内存限制量占内存总量的比例,如返回值为 "18",则意味着限制量占总量的 18% + * "CPURequests" => (string) 节点上已分配 Pod 的 CPU 请求量 + * "CPURequestsFraction" => (string) 节点上已分配 Pod 的 CPU 请求量占 CPU 总量的比例 + * "CPULimits" => (string) 节点上已分配 Pod 的 CPU 限制值 + * "CPULimitsFraction" => (string) 节点上已分配 Pod 的 CPU 限制值占 CPU 总量的比例 + * "Conditions" => (array) 节点状态数组[ + * [ + * "Type" => (string) Condition 类型,如 MemoryPressure、DiskPressure、PIDPressure、Ready + * "Status" => (string) 状态,False、True + * "LastProbeTime" => (string) 最后一次上报状态的时间 + * "LastTransitionTime" => (string) 最后一次状态转变时间 + * "Reason" => (string) 状态变化的原因 + * "Message" => (string) 状态变化的描述信息 + * ] + * ] + * "ContainerImages" => (array) 节点上镜像名称数组 + * "Taints" => (array) 字符串数组,每一项是类似 "node-role.kubernetes.io/master:NoSchedule" 的污点 + * ] + * + * @throws UCloudException + */ + public function describeUK8SNode(DescribeUK8SNodeRequest $request = null): DescribeUK8SNodeResponse + { + $resp = $this->invoke($request); + return new DescribeUK8SNodeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListUK8SClusterNodeV2 - 获取UK8S集群节点信息 + * + * See also: https://docs.ucloud.cn/api/UK8S-api/list_uk8s_cluster_node_v2 + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ClusterId" => (string) UK8S集群ID + * ] + * + * Outputs: + * + * $outputs = [ + * "NodeSet" => (array) 节点详细信息,见NodeInfoV2。[ + * [ + * "Zone" => (string) Node所在可用区 + * "NodeId" => (string) NodeId,Node在UK8S处的唯一标示,如uk8s-reewqe5-sdasadsda + * "NodeRole" => (string) node角色,枚举值为master、node + * "NodeStatus" => (string) Node的状态:枚举值:初始化:"Initializing";启动中:"Starting";运行:"Running";停止中:"Stopping";停止:"Stopped";待删除:"ToBeDeleted";删除中:"Deleting";异常:"Error";安装失败:"Install Fail"; + * "InstanceType" => (string) Node节点的资源类型,枚举值为UHost或UPHost。 + * "InstanceName" => (string) 资源名称,初始值等于NodeId,用户可在UHost或UPHost处修改。 + * "InstanceId" => (string) 资源ID,如uhost-xxxx,或uphost-xxxxx。 + * "MachineType" => (string) 机型类别,分别对应Uhost的MachineType或PHost的PHostType。 + * "OsType" => (string) Node节点的操作系统类别,如Linux或Windows。 + * "OsName" => (string) Node节点的镜像名称。 + * "CPU" => (integer) Node节点CPU核数,单位: 个。 + * "Memory" => (integer) 内存大小,单位: MB。 + * "IPSet" => (array) 节点IP信息,详细信息见 UHostIPSet。[ + * [ + * "Type" => (string) 国际: Internation,BGP: Bgp,内网: Private + * "IPId" => (string) IP资源ID (内网IP无对应的资源ID) + * "IP" => (string) IP地址 + * "Bandwidth" => (integer) IP对应的带宽, 单位: Mb (内网IP不显示带宽信息) + * "VPCId" => (string) IP地址对应的VPC ID + * "SubnetId" => (string) IP地址对应的子网 ID + * "Mac" => (string) Mac地址 + * ] + * ] + * "CreateTime" => (integer) 节点创建时间 + * "ExpireTime" => (integer) 节点计费到期时间 + * "AsgId" => (string) 节点所属伸缩组ID,非伸缩组创建出来的节点,伸缩组ID为Default。 + * "Unschedulable" => (boolean) 是否允许Pod调度到该节点,枚举值为true或false。 + * "KubeProxy" => (object) kubeproxy信息,详细信息见KubeProxy。[ + * "Mode" => (string) KubeProxy模式,枚举值为[ipvs,iptables] + * ] + * "NodeLogInfo" => (string) 加节点时判断是否没有资源,如果返回NORESOURCE则代表没有资源了 + * "GPU" => (integer) 节点的GPU颗数。 + * ] + * ] + * "TotalCount" => (integer) 满足条件的节点数量,包括Master。 + * ] + * + * @throws UCloudException + */ + public function listUK8SClusterNodeV2(ListUK8SClusterNodeV2Request $request = null): ListUK8SClusterNodeV2Response + { + $resp = $this->invoke($request); + return new ListUK8SClusterNodeV2Response($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListUK8SClusterV2 - 获取UK8S集群列表信息 + * + * See also: https://docs.ucloud.cn/api/UK8S-api/list_uk8s_cluster_v2 + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Offset" => (integer) 列表起始位置偏移量,默认为0。 + * "Limit" => (integer) 返回数据长度,默认为20。 + * "ClusterId" => (string) UK8S集群ID + * ] + * + * Outputs: + * + * $outputs = [ + * "ClusterCount" => (integer) 满足条件的集群数量 + * "ClusterSet" => (array) 集群信息,具体参考ClusterSet[ + * [ + * "ClusterName" => (string) 资源名字 + * "ClusterId" => (string) 集群ID + * "VPCId" => (string) 所属VPC + * "SubnetId" => (string) 所属子网 + * "PodCIDR" => (string) Pod网段 + * "ServiceCIDR" => (string) 服务网段 + * "MasterCount" => (integer) Master 节点数量 + * "ApiServer" => (string) 集群apiserver地址 + * "K8sVersion" => (string) 集群版本 + * "ClusterLogInfo" => (string) 创建集群时判断如果为NORESOURCE则为没资源,否则为空 + * "CreateTime" => (integer) 创建时间 + * "NodeCount" => (integer) Node节点数量 + * "ExternalApiServer" => (string) 集群外部apiserver地址 + * "Status" => (string) 集群状态,枚举值:初始化:"INITIALIZING";启动中:"STARTING";创建失败:"CREATEFAILED";正常运行:"RUNNING";添加节点:"ADDNODE";删除节点:"DELNODE";删除中:"DELETING";删除失败:"DELETEFAILED";错误:"ERROR";升级插件:"UPDATE_PLUGIN";更新插件信息:"UPDATE_PLUGIN_INFO";异常:"ABNORMAL";升级集群中:"UPGRADING";容器运行时切换:"CONVERTING" + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function listUK8SClusterV2(ListUK8SClusterV2Request $request = null): ListUK8SClusterV2Response + { + $resp = $this->invoke($request); + return new ListUK8SClusterV2Response($resp->toArray(), $resp->getRequestId()); + } +} diff --git a/src/ULB/Apis/AllocateBackendRequest.php b/src/ULB/Apis/AllocateBackendRequest.php new file mode 100644 index 00000000..bfb185e6 --- /dev/null +++ b/src/ULB/Apis/AllocateBackendRequest.php @@ -0,0 +1,295 @@ + "AllocateBackend"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("ULBId"); + $this->markRequired("VServerId"); + $this->markRequired("ResourceType"); + $this->markRequired("ResourceId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ULBId: 负载均衡实例的ID + * + * @return string|null + */ + public function getULBId(): string + { + return $this->get("ULBId"); + } + + /** + * ULBId: 负载均衡实例的ID + * + * @param string $ulbId + */ + public function setULBId(string $ulbId) + { + $this->set("ULBId", $ulbId); + } + + /** + * VServerId: VServer实例的ID + * + * @return string|null + */ + public function getVServerId(): string + { + return $this->get("VServerId"); + } + + /** + * VServerId: VServer实例的ID + * + * @param string $vServerId + */ + public function setVServerId(string $vServerId) + { + $this->set("VServerId", $vServerId); + } + + /** + * ResourceType: 所添加的后端资源的类型,枚举值:UHost -> 云主机;UNI -> 虚拟网卡;UPM -> 物理云主机; UDHost -> 私有专区主机;UDocker -> 容器;UHybrid->混合云主机;CUBE->Cube;默认值为UHost。报文转发模式不支持UDocker、UHybrid、CUBE + * + * @return string|null + */ + public function getResourceType(): string + { + return $this->get("ResourceType"); + } + + /** + * ResourceType: 所添加的后端资源的类型,枚举值:UHost -> 云主机;UNI -> 虚拟网卡;UPM -> 物理云主机; UDHost -> 私有专区主机;UDocker -> 容器;UHybrid->混合云主机;CUBE->Cube;默认值为UHost。报文转发模式不支持UDocker、UHybrid、CUBE + * + * @param string $resourceType + */ + public function setResourceType(string $resourceType) + { + $this->set("ResourceType", $resourceType); + } + + /** + * ResourceId: 所添加的后端资源的资源ID + * + * @return string|null + */ + public function getResourceId(): string + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: 所添加的后端资源的资源ID + * + * @param string $resourceId + */ + public function setResourceId(string $resourceId) + { + $this->set("ResourceId", $resourceId); + } + + /** + * ResourceIP: 所添加的后端服务器的资源实例IP,当ResourceType 为 UHybrid 时有效,且必填 + * + * @return string|null + */ + public function getResourceIP(): string + { + return $this->get("ResourceIP"); + } + + /** + * ResourceIP: 所添加的后端服务器的资源实例IP,当ResourceType 为 UHybrid 时有效,且必填 + * + * @param string $resourceIP + */ + public function setResourceIP(string $resourceIP) + { + $this->set("ResourceIP", $resourceIP); + } + + /** + * VPCId: 所添加的后端服务器所在的vpc,当ResourceType 为 UHybrid 时有效,且必填 + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: 所添加的后端服务器所在的vpc,当ResourceType 为 UHybrid 时有效,且必填 + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: 所添加的后端服务器所在的子网,当ResourceType 为 UHybrid 时有效,且必填 + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 所添加的后端服务器所在的子网,当ResourceType 为 UHybrid 时有效,且必填 + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * Port: 所添加的后端资源服务端口,取值范围[1-65535],默认80 + * + * @return integer|null + */ + public function getPort(): int + { + return $this->get("Port"); + } + + /** + * Port: 所添加的后端资源服务端口,取值范围[1-65535],默认80 + * + * @param int $port + */ + public function setPort(int $port) + { + $this->set("Port", $port); + } + + /** + * Weight: 所添加的后端RS权重(在加权轮询算法下有效),取值范围[0-100],默认为1 + * + * @return integer|null + */ + public function getWeight(): int + { + return $this->get("Weight"); + } + + /** + * Weight: 所添加的后端RS权重(在加权轮询算法下有效),取值范围[0-100],默认为1 + * + * @param int $weight + */ + public function setWeight(int $weight) + { + $this->set("Weight", $weight); + } + + /** + * Enabled: 后端实例状态开关,枚举值: 1:启用; 0:禁用 默认为启用 + * + * @return integer|null + */ + public function getEnabled(): int + { + return $this->get("Enabled"); + } + + /** + * Enabled: 后端实例状态开关,枚举值: 1:启用; 0:禁用 默认为启用 + * + * @param int $enabled + */ + public function setEnabled(int $enabled) + { + $this->set("Enabled", $enabled); + } + + /** + * IsBackup: rs是否为backup,默认为00:普通rs1:backup的rs + * + * @return integer|null + */ + public function getIsBackup(): int + { + return $this->get("IsBackup"); + } + + /** + * IsBackup: rs是否为backup,默认为00:普通rs1:backup的rs + * + * @param int $isBackup + */ + public function setIsBackup(int $isBackup) + { + $this->set("IsBackup", $isBackup); + } +} diff --git a/src/ULB/Apis/AllocateBackendResponse.php b/src/ULB/Apis/AllocateBackendResponse.php new file mode 100644 index 00000000..ced8c86c --- /dev/null +++ b/src/ULB/Apis/AllocateBackendResponse.php @@ -0,0 +1,44 @@ +get("BackendId"); + } + + /** + * BackendId: 所添加的后端资源在ULB中的对象ID,(为ULB系统中使用,与资源自身ID无关),可用于 UpdateBackendAttribute/UpdateBackendAttributeBatch/ReleaseBackend + * + * @param string $backendId + */ + public function setBackendId(string $backendId) + { + $this->set("BackendId", $backendId); + } +} diff --git a/src/ULB/Apis/BindSSLRequest.php b/src/ULB/Apis/BindSSLRequest.php new file mode 100644 index 00000000..3c3f6836 --- /dev/null +++ b/src/ULB/Apis/BindSSLRequest.php @@ -0,0 +1,134 @@ + "BindSSL"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("ULBId"); + $this->markRequired("VServerId"); + $this->markRequired("SSLId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ULBId: 所绑定ULB实例ID + * + * @return string|null + */ + public function getULBId(): string + { + return $this->get("ULBId"); + } + + /** + * ULBId: 所绑定ULB实例ID + * + * @param string $ulbId + */ + public function setULBId(string $ulbId) + { + $this->set("ULBId", $ulbId); + } + + /** + * VServerId: 所绑定VServer实例ID + * + * @return string|null + */ + public function getVServerId(): string + { + return $this->get("VServerId"); + } + + /** + * VServerId: 所绑定VServer实例ID + * + * @param string $vServerId + */ + public function setVServerId(string $vServerId) + { + $this->set("VServerId", $vServerId); + } + + /** + * SSLId: SSL证书的Id + * + * @return string|null + */ + public function getSSLId(): string + { + return $this->get("SSLId"); + } + + /** + * SSLId: SSL证书的Id + * + * @param string $sslId + */ + public function setSSLId(string $sslId) + { + $this->set("SSLId", $sslId); + } +} diff --git a/src/ULB/Apis/BindSSLResponse.php b/src/ULB/Apis/BindSSLResponse.php new file mode 100644 index 00000000..f7aa4f99 --- /dev/null +++ b/src/ULB/Apis/BindSSLResponse.php @@ -0,0 +1,26 @@ + "CreatePolicy"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("ULBId"); + $this->markRequired("VServerId"); + $this->markRequired("BackendId"); + $this->markRequired("Match"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ULBId: 需要添加内容转发策略的负载均衡实例ID + * + * @return string|null + */ + public function getULBId(): string + { + return $this->get("ULBId"); + } + + /** + * ULBId: 需要添加内容转发策略的负载均衡实例ID + * + * @param string $ulbId + */ + public function setULBId(string $ulbId) + { + $this->set("ULBId", $ulbId); + } + + /** + * VServerId: 需要添加内容转发策略的VServer实例ID + * + * @return string|null + */ + public function getVServerId(): string + { + return $this->get("VServerId"); + } + + /** + * VServerId: 需要添加内容转发策略的VServer实例ID + * + * @param string $vServerId + */ + public function setVServerId(string $vServerId) + { + $this->set("VServerId", $vServerId); + } + + /** + * BackendId: 内容转发策略应用的后端资源实例的ID,来源于 AllocateBackend 返回的 BackendId + * + * @return string[]|null + */ + public function getBackendId(): array + { + return $this->get("BackendId"); + } + + /** + * BackendId: 内容转发策略应用的后端资源实例的ID,来源于 AllocateBackend 返回的 BackendId + * + * @param string[] $backendId + */ + public function setBackendId(array $backendId) + { + $this->set("BackendId", $backendId); + } + + /** + * Match: 内容转发匹配字段 + * + * @return string|null + */ + public function getMatch(): string + { + return $this->get("Match"); + } + + /** + * Match: 内容转发匹配字段 + * + * @param string $match + */ + public function setMatch(string $match) + { + $this->set("Match", $match); + } + + /** + * Type: 内容转发匹配字段的类型 + * + * @return string|null + */ + public function getType(): string + { + return $this->get("Type"); + } + + /** + * Type: 内容转发匹配字段的类型 + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } + + /** + * PolicyPriority: 策略优先级,1-9999 + * + * @return integer|null + */ + public function getPolicyPriority(): int + { + return $this->get("PolicyPriority"); + } + + /** + * PolicyPriority: 策略优先级,1-9999 + * + * @param int $policyPriority + */ + public function setPolicyPriority(int $policyPriority) + { + $this->set("PolicyPriority", $policyPriority); + } +} diff --git a/src/ULB/Apis/CreatePolicyResponse.php b/src/ULB/Apis/CreatePolicyResponse.php new file mode 100644 index 00000000..a9a4fd2d --- /dev/null +++ b/src/ULB/Apis/CreatePolicyResponse.php @@ -0,0 +1,44 @@ +get("PolicyId"); + } + + /** + * PolicyId: 内容转发策略ID + * + * @param string $policyId + */ + public function setPolicyId(string $policyId) + { + $this->set("PolicyId", $policyId); + } +} diff --git a/src/ULB/Apis/CreateSSLRequest.php b/src/ULB/Apis/CreateSSLRequest.php new file mode 100644 index 00000000..1ce7ff21 --- /dev/null +++ b/src/ULB/Apis/CreateSSLRequest.php @@ -0,0 +1,192 @@ + "CreateSSL"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("SSLName"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SSLName: SSL证书的名字,默认值为空 + * + * @return string|null + */ + public function getSSLName(): string + { + return $this->get("SSLName"); + } + + /** + * SSLName: SSL证书的名字,默认值为空 + * + * @param string $sslName + */ + public function setSSLName(string $sslName) + { + $this->set("SSLName", $sslName); + } + + /** + * SSLType: 所添加的SSL证书类型,目前只支持Pem格式 + * + * @return string|null + */ + public function getSSLType(): string + { + return $this->get("SSLType"); + } + + /** + * SSLType: 所添加的SSL证书类型,目前只支持Pem格式 + * + * @param string $sslType + */ + public function setSSLType(string $sslType) + { + $this->set("SSLType", $sslType); + } + + /** + * SSLContent: SSL证书的完整内容,包括用户证书、加密证书的私钥、CA证书 + * + * @return string|null + */ + public function getSSLContent(): string + { + return $this->get("SSLContent"); + } + + /** + * SSLContent: SSL证书的完整内容,包括用户证书、加密证书的私钥、CA证书 + * + * @param string $sslContent + */ + public function setSSLContent(string $sslContent) + { + $this->set("SSLContent", $sslContent); + } + + /** + * UserCert: 用户的证书 + * + * @return string|null + */ + public function getUserCert(): string + { + return $this->get("UserCert"); + } + + /** + * UserCert: 用户的证书 + * + * @param string $userCert + */ + public function setUserCert(string $userCert) + { + $this->set("UserCert", $userCert); + } + + /** + * PrivateKey: 加密证书的私钥 + * + * @return string|null + */ + public function getPrivateKey(): string + { + return $this->get("PrivateKey"); + } + + /** + * PrivateKey: 加密证书的私钥 + * + * @param string $privateKey + */ + public function setPrivateKey(string $privateKey) + { + $this->set("PrivateKey", $privateKey); + } + + /** + * CaCert: CA证书 + * + * @return string|null + */ + public function getCaCert(): string + { + return $this->get("CaCert"); + } + + /** + * CaCert: CA证书 + * + * @param string $caCert + */ + public function setCaCert(string $caCert) + { + $this->set("CaCert", $caCert); + } +} diff --git a/src/ULB/Apis/CreateSSLResponse.php b/src/ULB/Apis/CreateSSLResponse.php new file mode 100644 index 00000000..f405727d --- /dev/null +++ b/src/ULB/Apis/CreateSSLResponse.php @@ -0,0 +1,44 @@ +get("SSLId"); + } + + /** + * SSLId: SSL证书的Id + * + * @param string $sslId + */ + public function setSSLId(string $sslId) + { + $this->set("SSLId", $sslId); + } +} diff --git a/src/ULB/Apis/CreateULBRequest.php b/src/ULB/Apis/CreateULBRequest.php new file mode 100644 index 00000000..4642d12e --- /dev/null +++ b/src/ULB/Apis/CreateULBRequest.php @@ -0,0 +1,290 @@ + "CreateULB"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ULBName: 负载均衡的名字,默认值为“ULB” + * + * @return string|null + */ + public function getULBName(): string + { + return $this->get("ULBName"); + } + + /** + * ULBName: 负载均衡的名字,默认值为“ULB” + * + * @param string $ulbName + */ + public function setULBName(string $ulbName) + { + $this->set("ULBName", $ulbName); + } + + /** + * Tag: 业务组 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } + + /** + * OuterMode: 创建的ULB是否为外网模式,默认即为外网模式 + * + * @return string|null + */ + public function getOuterMode(): string + { + return $this->get("OuterMode"); + } + + /** + * OuterMode: 创建的ULB是否为外网模式,默认即为外网模式 + * + * @param string $outerMode + */ + public function setOuterMode(string $outerMode) + { + $this->set("OuterMode", $outerMode); + } + + /** + * InnerMode: 创建的ULB是否为内网模式 + * + * @return string|null + */ + public function getInnerMode(): string + { + return $this->get("InnerMode"); + } + + /** + * InnerMode: 创建的ULB是否为内网模式 + * + * @param string $innerMode + */ + public function setInnerMode(string $innerMode) + { + $this->set("InnerMode", $innerMode); + } + + /** + * ChargeType: 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按时付费 + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按时付费 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * VPCId: ULB所在的VPC的ID, 如果不传则使用默认的VPC + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: ULB所在的VPC的ID, 如果不传则使用默认的VPC + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: 内网ULB 所属的子网ID,如果不传则使用默认的子网 + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 内网ULB 所属的子网ID,如果不传则使用默认的子网 + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * BusinessId: ULB 所属的业务组ID,如果不传则使用默认的业务组 + * + * @return string|null + */ + public function getBusinessId(): string + { + return $this->get("BusinessId"); + } + + /** + * BusinessId: ULB 所属的业务组ID,如果不传则使用默认的业务组 + * + * @param string $businessId + */ + public function setBusinessId(string $businessId) + { + $this->set("BusinessId", $businessId); + } + + /** + * FirewallId: 防火墙ID,如果不传,则默认不绑定防火墙 + * + * @return string|null + */ + public function getFirewallId(): string + { + return $this->get("FirewallId"); + } + + /** + * FirewallId: 防火墙ID,如果不传,则默认不绑定防火墙 + * + * @param string $firewallId + */ + public function setFirewallId(string $firewallId) + { + $this->set("FirewallId", $firewallId); + } + + /** + * ListenType: ULB 监听器类型,枚举值:RequestProxy,请求代理; PacketsTransmit ,报文转发。默认为RequestProxy + * + * @return string|null + */ + public function getListenType(): string + { + return $this->get("ListenType"); + } + + /** + * ListenType: ULB 监听器类型,枚举值:RequestProxy,请求代理; PacketsTransmit ,报文转发。默认为RequestProxy + * + * @param string $listenType + */ + public function setListenType(string $listenType) + { + $this->set("ListenType", $listenType); + } +} diff --git a/src/ULB/Apis/CreateULBResponse.php b/src/ULB/Apis/CreateULBResponse.php new file mode 100644 index 00000000..2352e67e --- /dev/null +++ b/src/ULB/Apis/CreateULBResponse.php @@ -0,0 +1,64 @@ +get("ULBId"); + } + + /** + * ULBId: 负载均衡实例的Id + * + * @param string $ulbId + */ + public function setULBId(string $ulbId) + { + $this->set("ULBId", $ulbId); + } + + /** + * IPv6AddressId: IPv6地址Id + * + * @return string|null + */ + public function getIPv6AddressId(): string + { + return $this->get("IPv6AddressId"); + } + + /** + * IPv6AddressId: IPv6地址Id + * + * @param string $iPv6AddressId + */ + public function setIPv6AddressId(string $iPv6AddressId) + { + $this->set("IPv6AddressId", $iPv6AddressId); + } +} diff --git a/src/ULB/Apis/CreateVServerRequest.php b/src/ULB/Apis/CreateVServerRequest.php new file mode 100644 index 00000000..8c750b67 --- /dev/null +++ b/src/ULB/Apis/CreateVServerRequest.php @@ -0,0 +1,351 @@ + "CreateVServer"]); + $this->markRequired("Region"); + $this->markRequired("ULBId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ULBId: 负载均衡实例ID + * + * @return string|null + */ + public function getULBId(): string + { + return $this->get("ULBId"); + } + + /** + * ULBId: 负载均衡实例ID + * + * @param string $ulbId + */ + public function setULBId(string $ulbId) + { + $this->set("ULBId", $ulbId); + } + + /** + * VServerName: VServer实例名称,默认为"VServer" + * + * @return string|null + */ + public function getVServerName(): string + { + return $this->get("VServerName"); + } + + /** + * VServerName: VServer实例名称,默认为"VServer" + * + * @param string $vServerName + */ + public function setVServerName(string $vServerName) + { + $this->set("VServerName", $vServerName); + } + + /** + * ListenType: 监听器类型,枚举值,RequestProxy ,请求代理;PacketsTransmit ,报文转发。默认为RequestProxy + * + * @return string|null + */ + public function getListenType(): string + { + return $this->get("ListenType"); + } + + /** + * ListenType: 监听器类型,枚举值,RequestProxy ,请求代理;PacketsTransmit ,报文转发。默认为RequestProxy + * + * @param string $listenType + */ + public function setListenType(string $listenType) + { + $this->set("ListenType", $listenType); + } + + /** + * Protocol: VServer实例的协议,请求代理模式下有 HTTP、HTTPS、TCP,报文转发下有 TCP,UDP。默认为“HTTP" + * + * @return string|null + */ + public function getProtocol(): string + { + return $this->get("Protocol"); + } + + /** + * Protocol: VServer实例的协议,请求代理模式下有 HTTP、HTTPS、TCP,报文转发下有 TCP,UDP。默认为“HTTP" + * + * @param string $protocol + */ + public function setProtocol(string $protocol) + { + $this->set("Protocol", $protocol); + } + + /** + * FrontendPort: VServer后端端口,取值范围[1-65535];默认值为80 + * + * @return integer|null + */ + public function getFrontendPort(): int + { + return $this->get("FrontendPort"); + } + + /** + * FrontendPort: VServer后端端口,取值范围[1-65535];默认值为80 + * + * @param int $frontendPort + */ + public function setFrontendPort(int $frontendPort) + { + $this->set("FrontendPort", $frontendPort); + } + + /** + * Method: VServer负载均衡模式,枚举值:Roundrobin -> 轮询;Source -> 源地址;ConsistentHash -> 一致性哈希;SourcePort -> 源地址(计算端口);ConsistentHashPort -> 一致性哈希(计算端口); WeightRoundrobin -> 加权轮询; Leastconn -> 最小连接数;Backup ->主备模式。ConsistentHash,SourcePort,ConsistentHashPort 只在报文转发中使用;Leastconn只在请求代理中使用;Roundrobin、Source和WeightRoundrobin,Backup在请求代理和报文转发中使用。默认为:"Roundrobin" + * + * @return string|null + */ + public function getMethod(): string + { + return $this->get("Method"); + } + + /** + * Method: VServer负载均衡模式,枚举值:Roundrobin -> 轮询;Source -> 源地址;ConsistentHash -> 一致性哈希;SourcePort -> 源地址(计算端口);ConsistentHashPort -> 一致性哈希(计算端口); WeightRoundrobin -> 加权轮询; Leastconn -> 最小连接数;Backup ->主备模式。ConsistentHash,SourcePort,ConsistentHashPort 只在报文转发中使用;Leastconn只在请求代理中使用;Roundrobin、Source和WeightRoundrobin,Backup在请求代理和报文转发中使用。默认为:"Roundrobin" + * + * @param string $method + */ + public function setMethod(string $method) + { + $this->set("Method", $method); + } + + /** + * PersistenceType: VServer会话保持方式,默认关闭会话保持。枚举值:None -> 关闭;ServerInsert -> 自动生成KEY;UserDefined -> 用户自定义KEY。 + * + * @return string|null + */ + public function getPersistenceType(): string + { + return $this->get("PersistenceType"); + } + + /** + * PersistenceType: VServer会话保持方式,默认关闭会话保持。枚举值:None -> 关闭;ServerInsert -> 自动生成KEY;UserDefined -> 用户自定义KEY。 + * + * @param string $persistenceType + */ + public function setPersistenceType(string $persistenceType) + { + $this->set("PersistenceType", $persistenceType); + } + + /** + * PersistenceInfo: 根据PersistenceType确认; None和ServerInsert: 此字段无意义; UserDefined:此字段传入自定义会话保持String + * + * @return string|null + */ + public function getPersistenceInfo(): string + { + return $this->get("PersistenceInfo"); + } + + /** + * PersistenceInfo: 根据PersistenceType确认; None和ServerInsert: 此字段无意义; UserDefined:此字段传入自定义会话保持String + * + * @param string $persistenceInfo + */ + public function setPersistenceInfo(string $persistenceInfo) + { + $this->set("PersistenceInfo", $persistenceInfo); + } + + /** + * ClientTimeout: ListenType为RequestProxy时表示空闲连接的回收时间,单位:秒,取值范围:时(0,86400],默认值为60;ListenType为PacketsTransmit时表示连接保持的时间,单位:秒,取值范围:[60,900],0 表示禁用连接保持 + * + * @return integer|null + */ + public function getClientTimeout(): int + { + return $this->get("ClientTimeout"); + } + + /** + * ClientTimeout: ListenType为RequestProxy时表示空闲连接的回收时间,单位:秒,取值范围:时(0,86400],默认值为60;ListenType为PacketsTransmit时表示连接保持的时间,单位:秒,取值范围:[60,900],0 表示禁用连接保持 + * + * @param int $clientTimeout + */ + public function setClientTimeout(int $clientTimeout) + { + $this->set("ClientTimeout", $clientTimeout); + } + + /** + * MonitorType: 健康检查类型,枚举值:Port -> 端口检查;Path -> 路径检查;Ping -> Ping探测;Customize -> UDP检查请求代理型默认值为Port,其中TCP协议仅支持Port,其他协议支持Port和Path;报文转发型TCP协议仅支持Port,UDP协议支持Ping、Port和Customize,默认值为Ping + * + * @return string|null + */ + public function getMonitorType(): string + { + return $this->get("MonitorType"); + } + + /** + * MonitorType: 健康检查类型,枚举值:Port -> 端口检查;Path -> 路径检查;Ping -> Ping探测;Customize -> UDP检查请求代理型默认值为Port,其中TCP协议仅支持Port,其他协议支持Port和Path;报文转发型TCP协议仅支持Port,UDP协议支持Ping、Port和Customize,默认值为Ping + * + * @param string $monitorType + */ + public function setMonitorType(string $monitorType) + { + $this->set("MonitorType", $monitorType); + } + + /** + * Domain: 根据MonitorType确认; 当MonitorType为Path时,此字段有意义,代表HTTP检查域名 + * + * @return string|null + */ + public function getDomain(): string + { + return $this->get("Domain"); + } + + /** + * Domain: 根据MonitorType确认; 当MonitorType为Path时,此字段有意义,代表HTTP检查域名 + * + * @param string $domain + */ + public function setDomain(string $domain) + { + $this->set("Domain", $domain); + } + + /** + * Path: 根据MonitorType确认; 当MonitorType为Path时,此字段有意义,代表HTTP检查路径 + * + * @return string|null + */ + public function getPath(): string + { + return $this->get("Path"); + } + + /** + * Path: 根据MonitorType确认; 当MonitorType为Path时,此字段有意义,代表HTTP检查路径 + * + * @param string $path + */ + public function setPath(string $path) + { + $this->set("Path", $path); + } + + /** + * RequestMsg: 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查发出的请求报文 + * + * @return string|null + */ + public function getRequestMsg(): string + { + return $this->get("RequestMsg"); + } + + /** + * RequestMsg: 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查发出的请求报文 + * + * @param string $requestMsg + */ + public function setRequestMsg(string $requestMsg) + { + $this->set("RequestMsg", $requestMsg); + } + + /** + * ResponseMsg: 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查请求应收到的响应报文 + * + * @return string|null + */ + public function getResponseMsg(): string + { + return $this->get("ResponseMsg"); + } + + /** + * ResponseMsg: 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查请求应收到的响应报文 + * + * @param string $responseMsg + */ + public function setResponseMsg(string $responseMsg) + { + $this->set("ResponseMsg", $responseMsg); + } +} diff --git a/src/ULB/Apis/CreateVServerResponse.php b/src/ULB/Apis/CreateVServerResponse.php new file mode 100644 index 00000000..e8a225d7 --- /dev/null +++ b/src/ULB/Apis/CreateVServerResponse.php @@ -0,0 +1,44 @@ +get("VServerId"); + } + + /** + * VServerId: VServer实例的Id + * + * @param string $vServerId + */ + public function setVServerId(string $vServerId) + { + $this->set("VServerId", $vServerId); + } +} diff --git a/src/ULB/Apis/DeletePolicyRequest.php b/src/ULB/Apis/DeletePolicyRequest.php new file mode 100644 index 00000000..bf1bfd86 --- /dev/null +++ b/src/ULB/Apis/DeletePolicyRequest.php @@ -0,0 +1,112 @@ + "DeletePolicy"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("PolicyId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * PolicyId: 内容转发策略ID + * + * @return string|null + */ + public function getPolicyId(): string + { + return $this->get("PolicyId"); + } + + /** + * PolicyId: 内容转发策略ID + * + * @param string $policyId + */ + public function setPolicyId(string $policyId) + { + $this->set("PolicyId", $policyId); + } + + /** + * VServerId: VServer 资源ID + * + * @return string|null + */ + public function getVServerId(): string + { + return $this->get("VServerId"); + } + + /** + * VServerId: VServer 资源ID + * + * @param string $vServerId + */ + public function setVServerId(string $vServerId) + { + $this->set("VServerId", $vServerId); + } +} diff --git a/src/ULB/Apis/DeletePolicyResponse.php b/src/ULB/Apis/DeletePolicyResponse.php new file mode 100644 index 00000000..e3fe7b12 --- /dev/null +++ b/src/ULB/Apis/DeletePolicyResponse.php @@ -0,0 +1,26 @@ + "DeleteSSL"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("SSLId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SSLId: SSL证书的ID + * + * @return string|null + */ + public function getSSLId(): string + { + return $this->get("SSLId"); + } + + /** + * SSLId: SSL证书的ID + * + * @param string $sslId + */ + public function setSSLId(string $sslId) + { + $this->set("SSLId", $sslId); + } +} diff --git a/src/ULB/Apis/DeleteSSLResponse.php b/src/ULB/Apis/DeleteSSLResponse.php new file mode 100644 index 00000000..25af2e3a --- /dev/null +++ b/src/ULB/Apis/DeleteSSLResponse.php @@ -0,0 +1,26 @@ + "DeleteULB"]); + $this->markRequired("Region"); + $this->markRequired("ULBId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ULBId: 负载均衡实例的ID + * + * @return string|null + */ + public function getULBId(): string + { + return $this->get("ULBId"); + } + + /** + * ULBId: 负载均衡实例的ID + * + * @param string $ulbId + */ + public function setULBId(string $ulbId) + { + $this->set("ULBId", $ulbId); + } + + /** + * ReleaseEip: 删除ulb时是否释放绑定的EIP,false标识只解绑EIP,true表示会释放绑定的EIP,默认是false。Anycast IP 此参数无效 + * + * @return boolean|null + */ + public function getReleaseEip(): bool + { + return $this->get("ReleaseEip"); + } + + /** + * ReleaseEip: 删除ulb时是否释放绑定的EIP,false标识只解绑EIP,true表示会释放绑定的EIP,默认是false。Anycast IP 此参数无效 + * + * @param boolean $releaseEip + */ + public function setReleaseEip(bool $releaseEip) + { + $this->set("ReleaseEip", $releaseEip); + } +} diff --git a/src/ULB/Apis/DeleteULBResponse.php b/src/ULB/Apis/DeleteULBResponse.php new file mode 100644 index 00000000..64bdb5e2 --- /dev/null +++ b/src/ULB/Apis/DeleteULBResponse.php @@ -0,0 +1,26 @@ + "DeleteVServer"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("ULBId"); + $this->markRequired("VServerId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ULBId: 负载均衡实例的ID + * + * @return string|null + */ + public function getULBId(): string + { + return $this->get("ULBId"); + } + + /** + * ULBId: 负载均衡实例的ID + * + * @param string $ulbId + */ + public function setULBId(string $ulbId) + { + $this->set("ULBId", $ulbId); + } + + /** + * VServerId: VServer实例的ID + * + * @return string|null + */ + public function getVServerId(): string + { + return $this->get("VServerId"); + } + + /** + * VServerId: VServer实例的ID + * + * @param string $vServerId + */ + public function setVServerId(string $vServerId) + { + $this->set("VServerId", $vServerId); + } +} diff --git a/src/ULB/Apis/DeleteVServerResponse.php b/src/ULB/Apis/DeleteVServerResponse.php new file mode 100644 index 00000000..f8712c7d --- /dev/null +++ b/src/ULB/Apis/DeleteVServerResponse.php @@ -0,0 +1,26 @@ + "DescribeSSL"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SSLId: SSL证书的Id + * + * @return string|null + */ + public function getSSLId(): string + { + return $this->get("SSLId"); + } + + /** + * SSLId: SSL证书的Id + * + * @param string $sslId + */ + public function setSSLId(string $sslId) + { + $this->set("SSLId", $sslId); + } + + /** + * Limit: 数据分页值,默认为20 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 数据分页值,默认为20 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * Offset: 数据偏移量,默认值为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 数据偏移量,默认值为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } +} diff --git a/src/ULB/Apis/DescribeSSLResponse.php b/src/ULB/Apis/DescribeSSLResponse.php new file mode 100644 index 00000000..ac33d33b --- /dev/null +++ b/src/ULB/Apis/DescribeSSLResponse.php @@ -0,0 +1,75 @@ +get("TotalCount"); + } + + /** + * TotalCount: 满足条件的SSL证书总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * DataSet: SSL证书详细信息,具体结构见 ULBSSLSet + * + * @return ULBSSLSet[]|null + */ + public function getDataSet(): array + { + $items = $this->get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ULBSSLSet($item)); + } + return $result; + } + + /** + * DataSet: SSL证书详细信息,具体结构见 ULBSSLSet + * + * @param ULBSSLSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/ULB/Apis/DescribeULBRequest.php b/src/ULB/Apis/DescribeULBRequest.php new file mode 100644 index 00000000..0444b142 --- /dev/null +++ b/src/ULB/Apis/DescribeULBRequest.php @@ -0,0 +1,190 @@ + "DescribeULB"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Offset: 数据偏移量,默认为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 数据偏移量,默认为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 数据分页值,默认为20 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 数据分页值,默认为20 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * ULBId: 负载均衡实例的Id。 若指定则返回指定的负载均衡实例的信息; 若不指定则返回当前数据中心中所有的负载均衡实例的信息 + * + * @return string|null + */ + public function getULBId(): string + { + return $this->get("ULBId"); + } + + /** + * ULBId: 负载均衡实例的Id。 若指定则返回指定的负载均衡实例的信息; 若不指定则返回当前数据中心中所有的负载均衡实例的信息 + * + * @param string $ulbId + */ + public function setULBId(string $ulbId) + { + $this->set("ULBId", $ulbId); + } + + /** + * VPCId: ULB所属的VPC + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: ULB所属的VPC + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: ULB所属的子网ID + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: ULB所属的子网ID + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * BusinessId: ULB所属的业务组ID + * + * @return string|null + */ + public function getBusinessId(): string + { + return $this->get("BusinessId"); + } + + /** + * BusinessId: ULB所属的业务组ID + * + * @param string $businessId + */ + public function setBusinessId(string $businessId) + { + $this->set("BusinessId", $businessId); + } +} diff --git a/src/ULB/Apis/DescribeULBResponse.php b/src/ULB/Apis/DescribeULBResponse.php new file mode 100644 index 00000000..73693055 --- /dev/null +++ b/src/ULB/Apis/DescribeULBResponse.php @@ -0,0 +1,83 @@ +get("TotalCount"); + } + + /** + * TotalCount: 满足条件的ULB总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * DataSet: ULB列表,每项参数详见 ULBSet + * + * @return ULBSet[]|null + */ + public function getDataSet(): array + { + $items = $this->get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ULBSet($item)); + } + return $result; + } + + /** + * DataSet: ULB列表,每项参数详见 ULBSet + * + * @param ULBSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/ULB/Apis/DescribeULBSimpleRequest.php b/src/ULB/Apis/DescribeULBSimpleRequest.php new file mode 100644 index 00000000..018bedba --- /dev/null +++ b/src/ULB/Apis/DescribeULBSimpleRequest.php @@ -0,0 +1,190 @@ + "DescribeULBSimple"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Offset: 数据偏移量,默认为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 数据偏移量,默认为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 数据分页值,默认为10000 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 数据分页值,默认为10000 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * ULBId: 负载均衡实例的Id。 若指定则返回指定的负载均衡实例的信息; 若不指定则返回当前数据中心中所有的负载均衡实例的信息 + * + * @return string|null + */ + public function getULBId(): string + { + return $this->get("ULBId"); + } + + /** + * ULBId: 负载均衡实例的Id。 若指定则返回指定的负载均衡实例的信息; 若不指定则返回当前数据中心中所有的负载均衡实例的信息 + * + * @param string $ulbId + */ + public function setULBId(string $ulbId) + { + $this->set("ULBId", $ulbId); + } + + /** + * VPCId: ULB所属的VPC + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: ULB所属的VPC + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: ULB所属的子网ID + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: ULB所属的子网ID + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * BusinessId: ULB所属的业务组ID + * + * @return string|null + */ + public function getBusinessId(): string + { + return $this->get("BusinessId"); + } + + /** + * BusinessId: ULB所属的业务组ID + * + * @param string $businessId + */ + public function setBusinessId(string $businessId) + { + $this->set("BusinessId", $businessId); + } +} diff --git a/src/ULB/Apis/DescribeULBSimpleResponse.php b/src/ULB/Apis/DescribeULBSimpleResponse.php new file mode 100644 index 00000000..e6f8efdd --- /dev/null +++ b/src/ULB/Apis/DescribeULBSimpleResponse.php @@ -0,0 +1,77 @@ +get("TotalCount"); + } + + /** + * TotalCount: 满足条件的ULB总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * DataSet: ULB列表,每项参数详见 ULBSimpleSet + * + * @return ULBSimpleSet[]|null + */ + public function getDataSet(): array + { + $items = $this->get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ULBSimpleSet($item)); + } + return $result; + } + + /** + * DataSet: ULB列表,每项参数详见 ULBSimpleSet + * + * @param ULBSimpleSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/ULB/Apis/DescribeVServerRequest.php b/src/ULB/Apis/DescribeVServerRequest.php new file mode 100644 index 00000000..0bb22f4c --- /dev/null +++ b/src/ULB/Apis/DescribeVServerRequest.php @@ -0,0 +1,152 @@ + "DescribeVServer"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("ULBId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ULBId: 负载均衡实例的Id + * + * @return string|null + */ + public function getULBId(): string + { + return $this->get("ULBId"); + } + + /** + * ULBId: 负载均衡实例的Id + * + * @param string $ulbId + */ + public function setULBId(string $ulbId) + { + $this->set("ULBId", $ulbId); + } + + /** + * VServerId: VServer实例的Id;若指定则返回指定的VServer实例的信息; 若不指定则返回当前负载均衡实例下所有VServer的信息 + * + * @return string|null + */ + public function getVServerId(): string + { + return $this->get("VServerId"); + } + + /** + * VServerId: VServer实例的Id;若指定则返回指定的VServer实例的信息; 若不指定则返回当前负载均衡实例下所有VServer的信息 + * + * @param string $vServerId + */ + public function setVServerId(string $vServerId) + { + $this->set("VServerId", $vServerId); + } + + /** + * Limit: 数据分页值 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 数据分页值 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * Offset: 数据偏移量 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 数据偏移量 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } +} diff --git a/src/ULB/Apis/DescribeVServerResponse.php b/src/ULB/Apis/DescribeVServerResponse.php new file mode 100644 index 00000000..85649b07 --- /dev/null +++ b/src/ULB/Apis/DescribeVServerResponse.php @@ -0,0 +1,79 @@ +get("TotalCount"); + } + + /** + * TotalCount: 满足条件的VServer总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * DataSet: VServer列表,每项参数详见 ULBVServerSet + * + * @return ULBVServerSet[]|null + */ + public function getDataSet(): array + { + $items = $this->get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ULBVServerSet($item)); + } + return $result; + } + + /** + * DataSet: VServer列表,每项参数详见 ULBVServerSet + * + * @param ULBVServerSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/ULB/Apis/ReleaseBackendRequest.php b/src/ULB/Apis/ReleaseBackendRequest.php new file mode 100644 index 00000000..15d11f19 --- /dev/null +++ b/src/ULB/Apis/ReleaseBackendRequest.php @@ -0,0 +1,113 @@ + "ReleaseBackend"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("ULBId"); + $this->markRequired("BackendId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ULBId: 负载均衡实例的ID + * + * @return string|null + */ + public function getULBId(): string + { + return $this->get("ULBId"); + } + + /** + * ULBId: 负载均衡实例的ID + * + * @param string $ulbId + */ + public function setULBId(string $ulbId) + { + $this->set("ULBId", $ulbId); + } + + /** + * BackendId: 后端资源实例的ID(ULB后端ID,非资源自身ID) + * + * @return string|null + */ + public function getBackendId(): string + { + return $this->get("BackendId"); + } + + /** + * BackendId: 后端资源实例的ID(ULB后端ID,非资源自身ID) + * + * @param string $backendId + */ + public function setBackendId(string $backendId) + { + $this->set("BackendId", $backendId); + } +} diff --git a/src/ULB/Apis/ReleaseBackendResponse.php b/src/ULB/Apis/ReleaseBackendResponse.php new file mode 100644 index 00000000..412a54e1 --- /dev/null +++ b/src/ULB/Apis/ReleaseBackendResponse.php @@ -0,0 +1,26 @@ + "UnbindSSL"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("ULBId"); + $this->markRequired("VServerId"); + $this->markRequired("SSLId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ULBId: 所绑定ULB实例ID + * + * @return string|null + */ + public function getULBId(): string + { + return $this->get("ULBId"); + } + + /** + * ULBId: 所绑定ULB实例ID + * + * @param string $ulbId + */ + public function setULBId(string $ulbId) + { + $this->set("ULBId", $ulbId); + } + + /** + * VServerId: 所绑定VServer实例ID + * + * @return string|null + */ + public function getVServerId(): string + { + return $this->get("VServerId"); + } + + /** + * VServerId: 所绑定VServer实例ID + * + * @param string $vServerId + */ + public function setVServerId(string $vServerId) + { + $this->set("VServerId", $vServerId); + } + + /** + * SSLId: SSL证书的Id + * + * @return string|null + */ + public function getSSLId(): string + { + return $this->get("SSLId"); + } + + /** + * SSLId: SSL证书的Id + * + * @param string $sslId + */ + public function setSSLId(string $sslId) + { + $this->set("SSLId", $sslId); + } +} diff --git a/src/ULB/Apis/UnbindSSLResponse.php b/src/ULB/Apis/UnbindSSLResponse.php new file mode 100644 index 00000000..f507f0c4 --- /dev/null +++ b/src/ULB/Apis/UnbindSSLResponse.php @@ -0,0 +1,26 @@ + "UpdateBackendAttribute"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("ULBId"); + $this->markRequired("BackendId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ULBId: 负载均衡资源ID + * + * @return string|null + */ + public function getULBId(): string + { + return $this->get("ULBId"); + } + + /** + * ULBId: 负载均衡资源ID + * + * @param string $ulbId + */ + public function setULBId(string $ulbId) + { + $this->set("ULBId", $ulbId); + } + + /** + * BackendId: 后端资源实例的ID(ULB后端ID,非资源自身ID) + * + * @return string|null + */ + public function getBackendId(): string + { + return $this->get("BackendId"); + } + + /** + * BackendId: 后端资源实例的ID(ULB后端ID,非资源自身ID) + * + * @param string $backendId + */ + public function setBackendId(string $backendId) + { + $this->set("BackendId", $backendId); + } + + /** + * Port: 后端资源服务端口,取值范围[1-65535] + * + * @return integer|null + */ + public function getPort(): int + { + return $this->get("Port"); + } + + /** + * Port: 后端资源服务端口,取值范围[1-65535] + * + * @param int $port + */ + public function setPort(int $port) + { + $this->set("Port", $port); + } + + /** + * Weight: 所添加的后端RS权重(在加权轮询算法下有效),取值范围[0-100],默认为1 + * + * @return integer|null + */ + public function getWeight(): int + { + return $this->get("Weight"); + } + + /** + * Weight: 所添加的后端RS权重(在加权轮询算法下有效),取值范围[0-100],默认为1 + * + * @param int $weight + */ + public function setWeight(int $weight) + { + $this->set("Weight", $weight); + } + + /** + * Enabled: 后端实例状态开关 + * + * @return integer|null + */ + public function getEnabled(): int + { + return $this->get("Enabled"); + } + + /** + * Enabled: 后端实例状态开关 + * + * @param int $enabled + */ + public function setEnabled(int $enabled) + { + $this->set("Enabled", $enabled); + } + + /** + * IsBackup: 是否为backup0:主rs1:备rs默认为0 + * + * @return integer|null + */ + public function getIsBackup(): int + { + return $this->get("IsBackup"); + } + + /** + * IsBackup: 是否为backup0:主rs1:备rs默认为0 + * + * @param int $isBackup + */ + public function setIsBackup(int $isBackup) + { + $this->set("IsBackup", $isBackup); + } +} diff --git a/src/ULB/Apis/UpdateBackendAttributeResponse.php b/src/ULB/Apis/UpdateBackendAttributeResponse.php new file mode 100644 index 00000000..3818b4b8 --- /dev/null +++ b/src/ULB/Apis/UpdateBackendAttributeResponse.php @@ -0,0 +1,26 @@ + "UpdatePolicy"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("ULBId"); + $this->markRequired("VServerId"); + $this->markRequired("Match"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ULBId: 需要添加内容转发策略的负载均衡实例ID + * + * @return string|null + */ + public function getULBId(): string + { + return $this->get("ULBId"); + } + + /** + * ULBId: 需要添加内容转发策略的负载均衡实例ID + * + * @param string $ulbId + */ + public function setULBId(string $ulbId) + { + $this->set("ULBId", $ulbId); + } + + /** + * VServerId: 需要添加内容转发策略的VServer实例ID,只支持请求代理模式下,HTTP或HTTPS协议的VServer + * + * @return string|null + */ + public function getVServerId(): string + { + return $this->get("VServerId"); + } + + /** + * VServerId: 需要添加内容转发策略的VServer实例ID,只支持请求代理模式下,HTTP或HTTPS协议的VServer + * + * @param string $vServerId + */ + public function setVServerId(string $vServerId) + { + $this->set("VServerId", $vServerId); + } + + /** + * Match: 内容转发匹配字段 + * + * @return string|null + */ + public function getMatch(): string + { + return $this->get("Match"); + } + + /** + * Match: 内容转发匹配字段 + * + * @param string $match + */ + public function setMatch(string $match) + { + $this->set("Match", $match); + } + + /** + * PolicyId: 转发规则的ID,当Type为Default时,可以不传或为空 + * + * @return string|null + */ + public function getPolicyId(): string + { + return $this->get("PolicyId"); + } + + /** + * PolicyId: 转发规则的ID,当Type为Default时,可以不传或为空 + * + * @param string $policyId + */ + public function setPolicyId(string $policyId) + { + $this->set("PolicyId", $policyId); + } + + /** + * BackendId: 内容转发策略应用的后端资源实例的ID,来源于 AllocateBackend 返回的 BackendId,不传表示更新转发节点为空 + * + * @return string[]|null + */ + public function getBackendId(): array + { + return $this->get("BackendId"); + } + + /** + * BackendId: 内容转发策略应用的后端资源实例的ID,来源于 AllocateBackend 返回的 BackendId,不传表示更新转发节点为空 + * + * @param string[] $backendId + */ + public function setBackendId(array $backendId) + { + $this->set("BackendId", $backendId); + } + + /** + * Type: 内容转发匹配字段的类型,枚举值:Domain -> 域名转发规则;Path -> 路径转发规则;Default -> 默认转发规则,不传默认值Domain + * + * @return string|null + */ + public function getType(): string + { + return $this->get("Type"); + } + + /** + * Type: 内容转发匹配字段的类型,枚举值:Domain -> 域名转发规则;Path -> 路径转发规则;Default -> 默认转发规则,不传默认值Domain + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } +} diff --git a/src/ULB/Apis/UpdatePolicyResponse.php b/src/ULB/Apis/UpdatePolicyResponse.php new file mode 100644 index 00000000..ea64c446 --- /dev/null +++ b/src/ULB/Apis/UpdatePolicyResponse.php @@ -0,0 +1,26 @@ + "UpdateULBAttribute"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("ULBId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ULBId: ULB资源ID + * + * @return string|null + */ + public function getULBId(): string + { + return $this->get("ULBId"); + } + + /** + * ULBId: ULB资源ID + * + * @param string $ulbId + */ + public function setULBId(string $ulbId) + { + $this->set("ULBId", $ulbId); + } + + /** + * Name: 名字 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 名字 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Tag: 业务 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } +} diff --git a/src/ULB/Apis/UpdateULBAttributeResponse.php b/src/ULB/Apis/UpdateULBAttributeResponse.php new file mode 100644 index 00000000..3db1e8fb --- /dev/null +++ b/src/ULB/Apis/UpdateULBAttributeResponse.php @@ -0,0 +1,26 @@ + "UpdateVServerAttribute"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("ULBId"); + $this->markRequired("VServerId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ULBId: 负载均衡实例ID + * + * @return string|null + */ + public function getULBId(): string + { + return $this->get("ULBId"); + } + + /** + * ULBId: 负载均衡实例ID + * + * @param string $ulbId + */ + public function setULBId(string $ulbId) + { + $this->set("ULBId", $ulbId); + } + + /** + * VServerId: VServer实例ID + * + * @return string|null + */ + public function getVServerId(): string + { + return $this->get("VServerId"); + } + + /** + * VServerId: VServer实例ID + * + * @param string $vServerId + */ + public function setVServerId(string $vServerId) + { + $this->set("VServerId", $vServerId); + } + + /** + * VServerName: VServer实例名称,若无此字段则不做修改 + * + * @return string|null + */ + public function getVServerName(): string + { + return $this->get("VServerName"); + } + + /** + * VServerName: VServer实例名称,若无此字段则不做修改 + * + * @param string $vServerName + */ + public function setVServerName(string $vServerName) + { + $this->set("VServerName", $vServerName); + } + + /** + * Method: VServer负载均衡模式,枚举值:Roundrobin -> 轮询;Source -> 源地址;ConsistentHash -> 一致性哈希;SourcePort -> 源地址(计算端口);ConsistentHashPort -> 一致性哈希(计算端口); WeightRoundrobin -> 加权轮询; Leastconn -> 最小连接数;Backup -> 主备模式。ConsistentHash,SourcePort,ConsistentHashPort 只在报文转发中使用;Leastconn只在请求代理中使用;Roundrobin、Source和WeightRoundrobin,Backup在请求代理和报文转发中使用。默认为:"Roundrobin" + * + * @return string|null + */ + public function getMethod(): string + { + return $this->get("Method"); + } + + /** + * Method: VServer负载均衡模式,枚举值:Roundrobin -> 轮询;Source -> 源地址;ConsistentHash -> 一致性哈希;SourcePort -> 源地址(计算端口);ConsistentHashPort -> 一致性哈希(计算端口); WeightRoundrobin -> 加权轮询; Leastconn -> 最小连接数;Backup -> 主备模式。ConsistentHash,SourcePort,ConsistentHashPort 只在报文转发中使用;Leastconn只在请求代理中使用;Roundrobin、Source和WeightRoundrobin,Backup在请求代理和报文转发中使用。默认为:"Roundrobin" + * + * @param string $method + */ + public function setMethod(string $method) + { + $this->set("Method", $method); + } + + /** + * PersistenceType: VServer会话保持模式,若无此字段则不做修改。枚举值:None:关闭;ServerInsert:自动生成KEY;UserDefined:用户自定义KEY。 + * + * @return string|null + */ + public function getPersistenceType(): string + { + return $this->get("PersistenceType"); + } + + /** + * PersistenceType: VServer会话保持模式,若无此字段则不做修改。枚举值:None:关闭;ServerInsert:自动生成KEY;UserDefined:用户自定义KEY。 + * + * @param string $persistenceType + */ + public function setPersistenceType(string $persistenceType) + { + $this->set("PersistenceType", $persistenceType); + } + + /** + * PersistenceInfo: 根据PersistenceType确定: None或ServerInsert, 此字段无意义; UserDefined, 则此字段传入用户自定义会话保持String. 若无此字段则不做修改 + * + * @return string|null + */ + public function getPersistenceInfo(): string + { + return $this->get("PersistenceInfo"); + } + + /** + * PersistenceInfo: 根据PersistenceType确定: None或ServerInsert, 此字段无意义; UserDefined, 则此字段传入用户自定义会话保持String. 若无此字段则不做修改 + * + * @param string $persistenceInfo + */ + public function setPersistenceInfo(string $persistenceInfo) + { + $this->set("PersistenceInfo", $persistenceInfo); + } + + /** + * ClientTimeout: 请求代理的VServer下表示空闲连接的回收时间,单位:秒,取值范围:时(0,86400],默认值为60;报文转发的VServer下表示回话保持的时间,单位:秒,取值范围:[60,900],0 表示禁用连接保持 + * + * @return integer|null + */ + public function getClientTimeout(): int + { + return $this->get("ClientTimeout"); + } + + /** + * ClientTimeout: 请求代理的VServer下表示空闲连接的回收时间,单位:秒,取值范围:时(0,86400],默认值为60;报文转发的VServer下表示回话保持的时间,单位:秒,取值范围:[60,900],0 表示禁用连接保持 + * + * @param int $clientTimeout + */ + public function setClientTimeout(int $clientTimeout) + { + $this->set("ClientTimeout", $clientTimeout); + } + + /** + * MonitorType: 健康检查类型,枚举值:Port -> 端口检查;Path -> 路径检查;Ping -> Ping探测,Customize -> UDP检查请求代理型默认值为Port,其中TCP协议仅支持Port,其他协议支持Port和Path;报文转发型TCP协议仅支持Port,UDP协议支持Ping、Port和Customize,默认值为Ping + * + * @return string|null + */ + public function getMonitorType(): string + { + return $this->get("MonitorType"); + } + + /** + * MonitorType: 健康检查类型,枚举值:Port -> 端口检查;Path -> 路径检查;Ping -> Ping探测,Customize -> UDP检查请求代理型默认值为Port,其中TCP协议仅支持Port,其他协议支持Port和Path;报文转发型TCP协议仅支持Port,UDP协议支持Ping、Port和Customize,默认值为Ping + * + * @param string $monitorType + */ + public function setMonitorType(string $monitorType) + { + $this->set("MonitorType", $monitorType); + } + + /** + * Domain: MonitorType 为 Path 时指定健康检查发送请求时HTTP HEADER 里的域名 + * + * @return string|null + */ + public function getDomain(): string + { + return $this->get("Domain"); + } + + /** + * Domain: MonitorType 为 Path 时指定健康检查发送请求时HTTP HEADER 里的域名 + * + * @param string $domain + */ + public function setDomain(string $domain) + { + $this->set("Domain", $domain); + } + + /** + * Path: MonitorType 为 Path 时指定健康检查发送请求时的路径,默认为 / + * + * @return string|null + */ + public function getPath(): string + { + return $this->get("Path"); + } + + /** + * Path: MonitorType 为 Path 时指定健康检查发送请求时的路径,默认为 / + * + * @param string $path + */ + public function setPath(string $path) + { + $this->set("Path", $path); + } + + /** + * RequestMsg: 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查发出的请求报文 + * + * @return string|null + */ + public function getRequestMsg(): string + { + return $this->get("RequestMsg"); + } + + /** + * RequestMsg: 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查发出的请求报文 + * + * @param string $requestMsg + */ + public function setRequestMsg(string $requestMsg) + { + $this->set("RequestMsg", $requestMsg); + } + + /** + * ResponseMsg: 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查请求应收到的响应报文 + * + * @return string|null + */ + public function getResponseMsg(): string + { + return $this->get("ResponseMsg"); + } + + /** + * ResponseMsg: 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查请求应收到的响应报文 + * + * @param string $responseMsg + */ + public function setResponseMsg(string $responseMsg) + { + $this->set("ResponseMsg", $responseMsg); + } +} diff --git a/src/ULB/Apis/UpdateVServerAttributeResponse.php b/src/ULB/Apis/UpdateVServerAttributeResponse.php new file mode 100644 index 00000000..a70b7969 --- /dev/null +++ b/src/ULB/Apis/UpdateVServerAttributeResponse.php @@ -0,0 +1,26 @@ +get("FirewallName"); + } + + /** + * FirewallName: 防火墙名称 + * + * @param string $firewallName + */ + public function setFirewallName(string $firewallName) + { + $this->set("FirewallName", $firewallName); + } + + /** + * FirewallId: 防火墙ID + * + * @return string|null + */ + public function getFirewallId(): string + { + return $this->get("FirewallId"); + } + + /** + * FirewallId: 防火墙ID + * + * @param string $firewallId + */ + public function setFirewallId(string $firewallId) + { + $this->set("FirewallId", $firewallId); + } +} diff --git a/src/ULB/Models/LoggerSet.php b/src/ULB/Models/LoggerSet.php new file mode 100644 index 00000000..4174199b --- /dev/null +++ b/src/ULB/Models/LoggerSet.php @@ -0,0 +1,84 @@ +get("BucketName"); + } + + /** + * BucketName: ulb日志上传的bucket + * + * @param string $bucketName + */ + public function setBucketName(string $bucketName) + { + $this->set("BucketName", $bucketName); + } + + /** + * TokenID: 上传到bucket使用的token的tokenid + * + * @return string|null + */ + public function getTokenID(): string + { + return $this->get("TokenID"); + } + + /** + * TokenID: 上传到bucket使用的token的tokenid + * + * @param string $tokenID + */ + public function setTokenID(string $tokenID) + { + $this->set("TokenID", $tokenID); + } + + /** + * TokenName: bucket的token名称 + * + * @return string|null + */ + public function getTokenName(): string + { + return $this->get("TokenName"); + } + + /** + * TokenName: bucket的token名称 + * + * @param string $tokenName + */ + public function setTokenName(string $tokenName) + { + $this->set("TokenName", $tokenName); + } +} diff --git a/src/ULB/Models/PolicyBackendSet.php b/src/ULB/Models/PolicyBackendSet.php new file mode 100644 index 00000000..25c8a5e9 --- /dev/null +++ b/src/ULB/Models/PolicyBackendSet.php @@ -0,0 +1,204 @@ +get("BackendId"); + } + + /** + * BackendId: 所添加的后端资源在ULB中的对象ID,(为ULB系统中使用,与资源自身ID无关 + * + * @param string $backendId + */ + public function setBackendId(string $backendId) + { + $this->set("BackendId", $backendId); + } + + /** + * ResourceType: 所添加的后端资源的类型,枚举值:UHost -> 云主机;UPM -> 物理云主机; UDHost -> 私有专区主机;UDocker -> 容器;UHybrid->混合云主机;CUBE->Cube;UNI -> 虚拟网卡 + * + * @return string|null + */ + public function getResourceType(): string + { + return $this->get("ResourceType"); + } + + /** + * ResourceType: 所添加的后端资源的类型,枚举值:UHost -> 云主机;UPM -> 物理云主机; UDHost -> 私有专区主机;UDocker -> 容器;UHybrid->混合云主机;CUBE->Cube;UNI -> 虚拟网卡 + * + * @param string $resourceType + */ + public function setResourceType(string $resourceType) + { + $this->set("ResourceType", $resourceType); + } + + /** + * ResourceName: 后端资源的实例名称 + * + * @return string|null + */ + public function getResourceName(): string + { + return $this->get("ResourceName"); + } + + /** + * ResourceName: 后端资源的实例名称 + * + * @param string $resourceName + */ + public function setResourceName(string $resourceName) + { + $this->set("ResourceName", $resourceName); + } + + /** + * SubResourceId: 如果资源绑定了弹性网卡,则展示弹性网卡的资源ID + * + * @return string|null + */ + public function getSubResourceId(): string + { + return $this->get("SubResourceId"); + } + + /** + * SubResourceId: 如果资源绑定了弹性网卡,则展示弹性网卡的资源ID + * + * @param string $subResourceId + */ + public function setSubResourceId(string $subResourceId) + { + $this->set("SubResourceId", $subResourceId); + } + + /** + * SubResourceName: 如果资源绑定了弹性网卡,则展示弹性网卡的资源名称 + * + * @return string|null + */ + public function getSubResourceName(): string + { + return $this->get("SubResourceName"); + } + + /** + * SubResourceName: 如果资源绑定了弹性网卡,则展示弹性网卡的资源名称 + * + * @param string $subResourceName + */ + public function setSubResourceName(string $subResourceName) + { + $this->set("SubResourceName", $subResourceName); + } + + /** + * SubResourceType: "UNI"或者为空 + * + * @return string|null + */ + public function getSubResourceType(): string + { + return $this->get("SubResourceType"); + } + + /** + * SubResourceType: "UNI"或者为空 + * + * @param string $subResourceType + */ + public function setSubResourceType(string $subResourceType) + { + $this->set("SubResourceType", $subResourceType); + } + + /** + * ObjectId: 后端资源的对象ID + * + * @return string|null + */ + public function getObjectId(): string + { + return $this->get("ObjectId"); + } + + /** + * ObjectId: 后端资源的对象ID + * + * @param string $objectId + */ + public function setObjectId(string $objectId) + { + $this->set("ObjectId", $objectId); + } + + /** + * Port: 所添加的后端资源服务端口 + * + * @return integer|null + */ + public function getPort(): int + { + return $this->get("Port"); + } + + /** + * Port: 所添加的后端资源服务端口 + * + * @param int $port + */ + public function setPort(int $port) + { + $this->set("Port", $port); + } + + /** + * PrivateIP: 后端资源的内网IP + * + * @return string|null + */ + public function getPrivateIP(): string + { + return $this->get("PrivateIP"); + } + + /** + * PrivateIP: 后端资源的内网IP + * + * @param string $privateIP + */ + public function setPrivateIP(string $privateIP) + { + $this->set("PrivateIP", $privateIP); + } +} diff --git a/src/ULB/Models/SSLBindedTargetSet.php b/src/ULB/Models/SSLBindedTargetSet.php new file mode 100644 index 00000000..9407aa59 --- /dev/null +++ b/src/ULB/Models/SSLBindedTargetSet.php @@ -0,0 +1,104 @@ +get("VServerId"); + } + + /** + * VServerId: SSL证书绑定到的VServer的资源ID + * + * @param string $vServerId + */ + public function setVServerId(string $vServerId) + { + $this->set("VServerId", $vServerId); + } + + /** + * VServerName: 对应的VServer的名字 + * + * @return string|null + */ + public function getVServerName(): string + { + return $this->get("VServerName"); + } + + /** + * VServerName: 对应的VServer的名字 + * + * @param string $vServerName + */ + public function setVServerName(string $vServerName) + { + $this->set("VServerName", $vServerName); + } + + /** + * ULBId: VServer 所属的ULB实例的资源ID + * + * @return string|null + */ + public function getULBId(): string + { + return $this->get("ULBId"); + } + + /** + * ULBId: VServer 所属的ULB实例的资源ID + * + * @param string $ulbId + */ + public function setULBId(string $ulbId) + { + $this->set("ULBId", $ulbId); + } + + /** + * ULBName: ULB实例的名称 + * + * @return string|null + */ + public function getULBName(): string + { + return $this->get("ULBName"); + } + + /** + * ULBName: ULB实例的名称 + * + * @param string $ulbName + */ + public function setULBName(string $ulbName) + { + $this->set("ULBName", $ulbName); + } +} diff --git a/src/ULB/Models/ULBBackendSet.php b/src/ULB/Models/ULBBackendSet.php new file mode 100644 index 00000000..0eb99711 --- /dev/null +++ b/src/ULB/Models/ULBBackendSet.php @@ -0,0 +1,284 @@ +get("BackendId"); + } + + /** + * BackendId: 后端资源实例的Id + * + * @param string $backendId + */ + public function setBackendId(string $backendId) + { + $this->set("BackendId", $backendId); + } + + /** + * ResourceType: 资源实例的类型 + * + * @return string|null + */ + public function getResourceType(): string + { + return $this->get("ResourceType"); + } + + /** + * ResourceType: 资源实例的类型 + * + * @param string $resourceType + */ + public function setResourceType(string $resourceType) + { + $this->set("ResourceType", $resourceType); + } + + /** + * ResourceId: 资源实例的资源Id + * + * @return string|null + */ + public function getResourceId(): string + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: 资源实例的资源Id + * + * @param string $resourceId + */ + public function setResourceId(string $resourceId) + { + $this->set("ResourceId", $resourceId); + } + + /** + * ResourceName: 资源实例的资源名称 + * + * @return string|null + */ + public function getResourceName(): string + { + return $this->get("ResourceName"); + } + + /** + * ResourceName: 资源实例的资源名称 + * + * @param string $resourceName + */ + public function setResourceName(string $resourceName) + { + $this->set("ResourceName", $resourceName); + } + + /** + * SubResourceType: 资源绑定的虚拟网卡实例的类型 + * + * @return string|null + */ + public function getSubResourceType(): string + { + return $this->get("SubResourceType"); + } + + /** + * SubResourceType: 资源绑定的虚拟网卡实例的类型 + * + * @param string $subResourceType + */ + public function setSubResourceType(string $subResourceType) + { + $this->set("SubResourceType", $subResourceType); + } + + /** + * SubResourceId: 资源绑定的虚拟网卡实例的资源Id + * + * @return string|null + */ + public function getSubResourceId(): string + { + return $this->get("SubResourceId"); + } + + /** + * SubResourceId: 资源绑定的虚拟网卡实例的资源Id + * + * @param string $subResourceId + */ + public function setSubResourceId(string $subResourceId) + { + $this->set("SubResourceId", $subResourceId); + } + + /** + * SubResourceName: 资源绑定的虚拟网卡实例的资源名称 + * + * @return string|null + */ + public function getSubResourceName(): string + { + return $this->get("SubResourceName"); + } + + /** + * SubResourceName: 资源绑定的虚拟网卡实例的资源名称 + * + * @param string $subResourceName + */ + public function setSubResourceName(string $subResourceName) + { + $this->set("SubResourceName", $subResourceName); + } + + /** + * PrivateIP: 后端提供服务的内网IP + * + * @return string|null + */ + public function getPrivateIP(): string + { + return $this->get("PrivateIP"); + } + + /** + * PrivateIP: 后端提供服务的内网IP + * + * @param string $privateIP + */ + public function setPrivateIP(string $privateIP) + { + $this->set("PrivateIP", $privateIP); + } + + /** + * Port: 后端提供服务的端口 + * + * @return integer|null + */ + public function getPort(): int + { + return $this->get("Port"); + } + + /** + * Port: 后端提供服务的端口 + * + * @param int $port + */ + public function setPort(int $port) + { + $this->set("Port", $port); + } + + /** + * Enabled: 后端提供服务的实例启用与否,枚举值:0 禁用 1 启用 + * + * @return integer|null + */ + public function getEnabled(): int + { + return $this->get("Enabled"); + } + + /** + * Enabled: 后端提供服务的实例启用与否,枚举值:0 禁用 1 启用 + * + * @param int $enabled + */ + public function setEnabled(int $enabled) + { + $this->set("Enabled", $enabled); + } + + /** + * Status: 后端提供服务的实例运行状态,枚举值:0健康检查健康状态 1 健康检查异常 + * + * @return integer|null + */ + public function getStatus(): int + { + return $this->get("Status"); + } + + /** + * Status: 后端提供服务的实例运行状态,枚举值:0健康检查健康状态 1 健康检查异常 + * + * @param int $status + */ + public function setStatus(int $status) + { + $this->set("Status", $status); + } + + /** + * SubnetId: 后端提供服务的资源所在的子网的ID + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 后端提供服务的资源所在的子网的ID + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * IsBackup: 是否为backup,只有当vserver的Backup属性为1时才会有此字段,说明:0:主rs1:备rs + * + * @return integer|null + */ + public function getIsBackup(): int + { + return $this->get("IsBackup"); + } + + /** + * IsBackup: 是否为backup,只有当vserver的Backup属性为1时才会有此字段,说明:0:主rs1:备rs + * + * @param int $isBackup + */ + public function setIsBackup(int $isBackup) + { + $this->set("IsBackup", $isBackup); + } +} diff --git a/src/ULB/Models/ULBIPSet.php b/src/ULB/Models/ULBIPSet.php new file mode 100644 index 00000000..2f7f9c4a --- /dev/null +++ b/src/ULB/Models/ULBIPSet.php @@ -0,0 +1,124 @@ +get("OperatorName"); + } + + /** + * OperatorName: 弹性IP的运营商信息,枚举值为: Bgp:BGP IP International:国际IP + * + * @param string $operatorName + */ + public function setOperatorName(string $operatorName) + { + $this->set("OperatorName", $operatorName); + } + + /** + * EIP: 弹性IP地址 + * + * @return string|null + */ + public function getEIP(): string + { + return $this->get("EIP"); + } + + /** + * EIP: 弹性IP地址 + * + * @param string $eip + */ + public function setEIP(string $eip) + { + $this->set("EIP", $eip); + } + + /** + * EIPId: 弹性IP的ID + * + * @return string|null + */ + public function getEIPId(): string + { + return $this->get("EIPId"); + } + + /** + * EIPId: 弹性IP的ID + * + * @param string $eipId + */ + public function setEIPId(string $eipId) + { + $this->set("EIPId", $eipId); + } + + /** + * BandwidthType: 弹性IP的带宽类型,枚举值:1 表示是共享带宽,0 普通带宽类型(暂未对外开放) + * + * @return integer|null + */ + public function getBandwidthType(): int + { + return $this->get("BandwidthType"); + } + + /** + * BandwidthType: 弹性IP的带宽类型,枚举值:1 表示是共享带宽,0 普通带宽类型(暂未对外开放) + * + * @param int $bandwidthType + */ + public function setBandwidthType(int $bandwidthType) + { + $this->set("BandwidthType", $bandwidthType); + } + + /** + * Bandwidth: 弹性IP的带宽值(暂未对外开放) + * + * @return integer|null + */ + public function getBandwidth(): int + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: 弹性IP的带宽值(暂未对外开放) + * + * @param int $bandwidth + */ + public function setBandwidth(int $bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } +} diff --git a/src/ULB/Models/ULBPolicySet.php b/src/ULB/Models/ULBPolicySet.php new file mode 100644 index 00000000..7425b3d2 --- /dev/null +++ b/src/ULB/Models/ULBPolicySet.php @@ -0,0 +1,193 @@ +get("PolicyId"); + } + + /** + * PolicyId: 内容转发Id,默认内容转发类型下为空。 + * + * @param string $policyId + */ + public function setPolicyId(string $policyId) + { + $this->set("PolicyId", $policyId); + } + + /** + * PolicyType: 内容类型,枚举值:Custom -> 客户自定义;Default -> 默认内容转发 + * + * @return string|null + */ + public function getPolicyType(): string + { + return $this->get("PolicyType"); + } + + /** + * PolicyType: 内容类型,枚举值:Custom -> 客户自定义;Default -> 默认内容转发 + * + * @param string $policyType + */ + public function setPolicyType(string $policyType) + { + $this->set("PolicyType", $policyType); + } + + /** + * Type: 内容转发匹配字段的类型,枚举值:Domain -> 域名;Path -> 路径; 默认内容转发类型下为空 + * + * @return string|null + */ + public function getType(): string + { + return $this->get("Type"); + } + + /** + * Type: 内容转发匹配字段的类型,枚举值:Domain -> 域名;Path -> 路径; 默认内容转发类型下为空 + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } + + /** + * Match: 内容转发匹配字段;默认内容转发类型下为空。 + * + * @return string|null + */ + public function getMatch(): string + { + return $this->get("Match"); + } + + /** + * Match: 内容转发匹配字段;默认内容转发类型下为空。 + * + * @param string $match + */ + public function setMatch(string $match) + { + $this->set("Match", $match); + } + + /** + * PolicyPriority: 内容转发优先级,范围[1,9999],数字越大优先级越高。默认内容转发规则下为0。 + * + * @return integer|null + */ + public function getPolicyPriority(): int + { + return $this->get("PolicyPriority"); + } + + /** + * PolicyPriority: 内容转发优先级,范围[1,9999],数字越大优先级越高。默认内容转发规则下为0。 + * + * @param int $policyPriority + */ + public function setPolicyPriority(int $policyPriority) + { + $this->set("PolicyPriority", $policyPriority); + } + + /** + * VServerId: 所属VServerId + * + * @return string|null + */ + public function getVServerId(): string + { + return $this->get("VServerId"); + } + + /** + * VServerId: 所属VServerId + * + * @param string $vServerId + */ + public function setVServerId(string $vServerId) + { + $this->set("VServerId", $vServerId); + } + + /** + * TotalCount: 默认内容转发类型下返回当前rs总数 + * + * @return integer|null + */ + public function getTotalCount(): int + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 默认内容转发类型下返回当前rs总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * BackendSet: 内容转发下rs的详细信息,参考PolicyBackendSet + * + * @return PolicyBackendSet[]|null + */ + public function getBackendSet(): array + { + $items = $this->get("BackendSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new PolicyBackendSet($item)); + } + return $result; + } + + /** + * BackendSet: 内容转发下rs的详细信息,参考PolicyBackendSet + * + * @param PolicyBackendSet[] $backendSet + */ + public function setBackendSet(array $backendSet) + { + $result = []; + foreach ($backendSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/ULB/Models/ULBSSLSet.php b/src/ULB/Models/ULBSSLSet.php new file mode 100644 index 00000000..ec4783ad --- /dev/null +++ b/src/ULB/Models/ULBSSLSet.php @@ -0,0 +1,173 @@ +get("SSLId"); + } + + /** + * SSLId: SSL证书的Id + * + * @param string $sslId + */ + public function setSSLId(string $sslId) + { + $this->set("SSLId", $sslId); + } + + /** + * SSLName: SSL证书的名字 + * + * @return string|null + */ + public function getSSLName(): string + { + return $this->get("SSLName"); + } + + /** + * SSLName: SSL证书的名字 + * + * @param string $sslName + */ + public function setSSLName(string $sslName) + { + $this->set("SSLName", $sslName); + } + + /** + * SSLType: SSL证书类型,暂时只有 Pem 一种类型 + * + * @return string|null + */ + public function getSSLType(): string + { + return $this->get("SSLType"); + } + + /** + * SSLType: SSL证书类型,暂时只有 Pem 一种类型 + * + * @param string $sslType + */ + public function setSSLType(string $sslType) + { + $this->set("SSLType", $sslType); + } + + /** + * SSLContent: SSL证书的内容 + * + * @return string|null + */ + public function getSSLContent(): string + { + return $this->get("SSLContent"); + } + + /** + * SSLContent: SSL证书的内容 + * + * @param string $sslContent + */ + public function setSSLContent(string $sslContent) + { + $this->set("SSLContent", $sslContent); + } + + /** + * CreateTime: SSL证书的创建时间 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: SSL证书的创建时间 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * HashValue: SSL证书的HASH值 + * + * @return string|null + */ + public function getHashValue(): string + { + return $this->get("HashValue"); + } + + /** + * HashValue: SSL证书的HASH值 + * + * @param string $hashValue + */ + public function setHashValue(string $hashValue) + { + $this->set("HashValue", $hashValue); + } + + /** + * BindedTargetSet: SSL证书绑定到的对象 + * + * @return SSLBindedTargetSet[]|null + */ + public function getBindedTargetSet(): array + { + $items = $this->get("BindedTargetSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new SSLBindedTargetSet($item)); + } + return $result; + } + + /** + * BindedTargetSet: SSL证书绑定到的对象 + * + * @param SSLBindedTargetSet[] $bindedTargetSet + */ + public function setBindedTargetSet(array $bindedTargetSet) + { + $result = []; + foreach ($bindedTargetSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/ULB/Models/ULBSet.php b/src/ULB/Models/ULBSet.php new file mode 100644 index 00000000..7a57a165 --- /dev/null +++ b/src/ULB/Models/ULBSet.php @@ -0,0 +1,431 @@ +get("ULBId"); + } + + /** + * ULBId: 负载均衡的资源ID + * + * @param string $ulbId + */ + public function setULBId(string $ulbId) + { + $this->set("ULBId", $ulbId); + } + + /** + * Name: 负载均衡的资源名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 负载均衡的资源名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Tag: 负载均衡的业务组名称 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 负载均衡的业务组名称 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Remark: 负载均衡的备注 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 负载均衡的备注 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } + + /** + * BandwidthType: 带宽类型,枚举值为: 0,非共享带宽; 1,共享带宽 + * + * @return integer|null + */ + public function getBandwidthType(): int + { + return $this->get("BandwidthType"); + } + + /** + * BandwidthType: 带宽类型,枚举值为: 0,非共享带宽; 1,共享带宽 + * + * @param int $bandwidthType + */ + public function setBandwidthType(int $bandwidthType) + { + $this->set("BandwidthType", $bandwidthType); + } + + /** + * Bandwidth: 带宽 + * + * @return integer|null + */ + public function getBandwidth(): int + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: 带宽 + * + * @param int $bandwidth + */ + public function setBandwidth(int $bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * CreateTime: ULB的创建时间,格式为Unix Timestamp + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: ULB的创建时间,格式为Unix Timestamp + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * IPSet: ULB的详细信息列表,具体结构见下方 ULBIPSet + * + * @return ULBIPSet[]|null + */ + public function getIPSet(): array + { + $items = $this->get("IPSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ULBIPSet($item)); + } + return $result; + } + + /** + * IPSet: ULB的详细信息列表,具体结构见下方 ULBIPSet + * + * @param ULBIPSet[] $ipSet + */ + public function setIPSet(array $ipSet) + { + $result = []; + foreach ($ipSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * VServerSet: 负载均衡实例中存在的VServer实例列表,具体结构见下方 ULBVServerSet + * + * @return ULBVServerSet[]|null + */ + public function getVServerSet(): array + { + $items = $this->get("VServerSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ULBVServerSet($item)); + } + return $result; + } + + /** + * VServerSet: 负载均衡实例中存在的VServer实例列表,具体结构见下方 ULBVServerSet + * + * @param ULBVServerSet[] $vServerSet + */ + public function setVServerSet(array $vServerSet) + { + $result = []; + foreach ($vServerSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * ULBType: ULB 的类型 + * + * @return string|null + */ + public function getULBType(): string + { + return $this->get("ULBType"); + } + + /** + * ULBType: ULB 的类型 + * + * @param string $ulbType + */ + public function setULBType(string $ulbType) + { + $this->set("ULBType", $ulbType); + } + + /** + * IPVersion: ULB ip类型,枚举值:IPv6 / IPv4 (内部测试,暂未对外开放) + * + * @return string|null + */ + public function getIPVersion(): string + { + return $this->get("IPVersion"); + } + + /** + * IPVersion: ULB ip类型,枚举值:IPv6 / IPv4 (内部测试,暂未对外开放) + * + * @param string $ipVersion + */ + public function setIPVersion(string $ipVersion) + { + $this->set("IPVersion", $ipVersion); + } + + /** + * ListenType: ULB 监听器类型,枚举值:RequestProxy,请求代理; PacketsTransmit ,报文转发;Comprehensive,兼容型;Pending,未定型 + * + * @return string|null + */ + public function getListenType(): string + { + return $this->get("ListenType"); + } + + /** + * ListenType: ULB 监听器类型,枚举值:RequestProxy,请求代理; PacketsTransmit ,报文转发;Comprehensive,兼容型;Pending,未定型 + * + * @param string $listenType + */ + public function setListenType(string $listenType) + { + $this->set("ListenType", $listenType); + } + + /** + * VPCId: ULB所在的VPC的ID + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: ULB所在的VPC的ID + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: ULB 为 InnerMode 时,ULB 所属的子网ID,默认为空 + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: ULB 为 InnerMode 时,ULB 所属的子网ID,默认为空 + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * BusinessId: ULB 所属的业务组ID + * + * @return string|null + */ + public function getBusinessId(): string + { + return $this->get("BusinessId"); + } + + /** + * BusinessId: ULB 所属的业务组ID + * + * @param string $businessId + */ + public function setBusinessId(string $businessId) + { + $this->set("BusinessId", $businessId); + } + + /** + * PrivateIP: ULB的内网IP,当ULBType为OuterMode时,该值为空 + * + * @return string|null + */ + public function getPrivateIP(): string + { + return $this->get("PrivateIP"); + } + + /** + * PrivateIP: ULB的内网IP,当ULBType为OuterMode时,该值为空 + * + * @param string $privateIP + */ + public function setPrivateIP(string $privateIP) + { + $this->set("PrivateIP", $privateIP); + } + + /** + * FirewallSet: 防火墙信息,具体结构见下方 FirewallSet + * + * @return FirewallSet[]|null + */ + public function getFirewallSet(): array + { + $items = $this->get("FirewallSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new FirewallSet($item)); + } + return $result; + } + + /** + * FirewallSet: 防火墙信息,具体结构见下方 FirewallSet + * + * @param FirewallSet[] $firewallSet + */ + public function setFirewallSet(array $firewallSet) + { + $result = []; + foreach ($firewallSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * EnableLog: ULB是否开启日志功能。0,关闭;1,开启 + * + * @return integer|null + */ + public function getEnableLog(): int + { + return $this->get("EnableLog"); + } + + /** + * EnableLog: ULB是否开启日志功能。0,关闭;1,开启 + * + * @param int $enableLog + */ + public function setEnableLog(int $enableLog) + { + $this->set("EnableLog", $enableLog); + } + + /** + * LogSet: 日志功能相关信息,仅当EnableLog为true时会返回,具体结构见下方 LoggerSet + * + * @return LoggerSet|null + */ + public function getLogSet(): LoggerSet + { + return new LoggerSet($this->get("LogSet")); + } + + /** + * LogSet: 日志功能相关信息,仅当EnableLog为true时会返回,具体结构见下方 LoggerSet + * + * @param LoggerSet $logSet + */ + public function setLogSet(LoggerSet $logSet) + { + $this->set("LogSet", $logSet->getAll()); + } +} diff --git a/src/ULB/Models/ULBSimpleSet.php b/src/ULB/Models/ULBSimpleSet.php new file mode 100644 index 00000000..e1387e08 --- /dev/null +++ b/src/ULB/Models/ULBSimpleSet.php @@ -0,0 +1,422 @@ +get("ListenType"); + } + + /** + * ListenType: ULB 监听器类型,枚举值:RequestProxy,请求代理; PacketsTransmit ,报文转发;Comprehensive,兼容型;Pending,未定型 + * + * @param string $listenType + */ + public function setListenType(string $listenType) + { + $this->set("ListenType", $listenType); + } + + /** + * IPVersion: ULB提供服务的IP类型。枚举值,“IPv4”,"IPv6"。默认为“IPv4” + * + * @return string|null + */ + public function getIPVersion(): string + { + return $this->get("IPVersion"); + } + + /** + * IPVersion: ULB提供服务的IP类型。枚举值,“IPv4”,"IPv6"。默认为“IPv4” + * + * @param string $ipVersion + */ + public function setIPVersion(string $ipVersion) + { + $this->set("IPVersion", $ipVersion); + } + + /** + * ULBId: 负载均衡的资源ID + * + * @return string|null + */ + public function getULBId(): string + { + return $this->get("ULBId"); + } + + /** + * ULBId: 负载均衡的资源ID + * + * @param string $ulbId + */ + public function setULBId(string $ulbId) + { + $this->set("ULBId", $ulbId); + } + + /** + * Name: 负载均衡的资源名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 负载均衡的资源名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Tag: 负载均衡的业务组名称 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 负载均衡的业务组名称 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Remark: 负载均衡的备注 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 负载均衡的备注 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } + + /** + * CreateTime: ULB的创建时间,格式为Unix Timestamp + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: ULB的创建时间,格式为Unix Timestamp + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * VPCId: ULB所在的VPC的ID + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: ULB所在的VPC的ID + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: ULB 为 InnerMode 时,ULB 所属的子网ID + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: ULB 为 InnerMode 时,ULB 所属的子网ID + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * BusinessId: ULB 所属的业务组ID + * + * @return string|null + */ + public function getBusinessId(): string + { + return $this->get("BusinessId"); + } + + /** + * BusinessId: ULB 所属的业务组ID + * + * @param string $businessId + */ + public function setBusinessId(string $businessId) + { + $this->set("BusinessId", $businessId); + } + + /** + * PrivateIP: ULB的内网IP,当ULBType为OuterMode时,该值为空 + * + * @return string|null + */ + public function getPrivateIP(): string + { + return $this->get("PrivateIP"); + } + + /** + * PrivateIP: ULB的内网IP,当ULBType为OuterMode时,该值为空 + * + * @param string $privateIP + */ + public function setPrivateIP(string $privateIP) + { + $this->set("PrivateIP", $privateIP); + } + + /** + * BandwidthType: 带宽类型,枚举值为: 0,非共享带宽; 1,共享带宽 + * + * @return integer|null + */ + public function getBandwidthType(): int + { + return $this->get("BandwidthType"); + } + + /** + * BandwidthType: 带宽类型,枚举值为: 0,非共享带宽; 1,共享带宽 + * + * @param int $bandwidthType + */ + public function setBandwidthType(int $bandwidthType) + { + $this->set("BandwidthType", $bandwidthType); + } + + /** + * Bandwidth: 带宽 + * + * @return integer|null + */ + public function getBandwidth(): int + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: 带宽 + * + * @param int $bandwidth + */ + public function setBandwidth(int $bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * IPSet: ULB的详细信息列表,具体结构见下方 ULBIPSet + * + * @return ULBIPSet[]|null + */ + public function getIPSet(): array + { + $items = $this->get("IPSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ULBIPSet($item)); + } + return $result; + } + + /** + * IPSet: ULB的详细信息列表,具体结构见下方 ULBIPSet + * + * @param ULBIPSet[] $ipSet + */ + public function setIPSet(array $ipSet) + { + $result = []; + foreach ($ipSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * VServerCount: ulb下vserver数量 + * + * @return integer|null + */ + public function getVServerCount(): int + { + return $this->get("VServerCount"); + } + + /** + * VServerCount: ulb下vserver数量 + * + * @param int $vServerCount + */ + public function setVServerCount(int $vServerCount) + { + $this->set("VServerCount", $vServerCount); + } + + /** + * ULBType: ULB 的类型(InnerMode or OuterMode) + * + * @return string|null + */ + public function getULBType(): string + { + return $this->get("ULBType"); + } + + /** + * ULBType: ULB 的类型(InnerMode or OuterMode) + * + * @param string $ulbType + */ + public function setULBType(string $ulbType) + { + $this->set("ULBType", $ulbType); + } + + /** + * FirewallSet: 防火墙信息,具体结构见下方 FirewallSet + * + * @return FirewallSet[]|null + */ + public function getFirewallSet(): array + { + $items = $this->get("FirewallSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new FirewallSet($item)); + } + return $result; + } + + /** + * FirewallSet: 防火墙信息,具体结构见下方 FirewallSet + * + * @param FirewallSet[] $firewallSet + */ + public function setFirewallSet(array $firewallSet) + { + $result = []; + foreach ($firewallSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * EnableLog: ULB是否开启日志功能。0,关闭;1,开启 + * + * @return integer|null + */ + public function getEnableLog(): int + { + return $this->get("EnableLog"); + } + + /** + * EnableLog: ULB是否开启日志功能。0,关闭;1,开启 + * + * @param int $enableLog + */ + public function setEnableLog(int $enableLog) + { + $this->set("EnableLog", $enableLog); + } + + /** + * LogSet: 日志功能相关信息,仅当EnableLog为true时会返回,具体结构见下方 LoggerSet + * + * @return LoggerSet|null + */ + public function getLogSet(): LoggerSet + { + return new LoggerSet($this->get("LogSet")); + } + + /** + * LogSet: 日志功能相关信息,仅当EnableLog为true时会返回,具体结构见下方 LoggerSet + * + * @param LoggerSet $logSet + */ + public function setLogSet(LoggerSet $logSet) + { + $this->set("LogSet", $logSet->getAll()); + } +} diff --git a/src/ULB/Models/ULBVServerSet.php b/src/ULB/Models/ULBVServerSet.php new file mode 100644 index 00000000..1cf49b51 --- /dev/null +++ b/src/ULB/Models/ULBVServerSet.php @@ -0,0 +1,411 @@ + 端口检查;Path -> 路径检查;Ping -> Ping探测, Customize -> UDP检查请求代理型默认值为Port,其中TCP协议仅支持Port,其他协议支持Port和Path; 报文转发型TCP协议仅支持Port,UDP协议支持Ping、Port和Customize + * + * @return string|null + */ + public function getMonitorType(): string + { + return $this->get("MonitorType"); + } + + /** + * MonitorType: 健康检查类型,枚举值:Port -> 端口检查;Path -> 路径检查;Ping -> Ping探测, Customize -> UDP检查请求代理型默认值为Port,其中TCP协议仅支持Port,其他协议支持Port和Path; 报文转发型TCP协议仅支持Port,UDP协议支持Ping、Port和Customize + * + * @param string $monitorType + */ + public function setMonitorType(string $monitorType) + { + $this->set("MonitorType", $monitorType); + } + + /** + * Domain: 根据MonitorType确认; 当MonitorType为Port时,此字段无意义。当MonitorType为Path时,代表HTTP检查域名 + * + * @return string|null + */ + public function getDomain(): string + { + return $this->get("Domain"); + } + + /** + * Domain: 根据MonitorType确认; 当MonitorType为Port时,此字段无意义。当MonitorType为Path时,代表HTTP检查域名 + * + * @param string $domain + */ + public function setDomain(string $domain) + { + $this->set("Domain", $domain); + } + + /** + * Path: 根据MonitorType确认; 当MonitorType为Port时,此字段无意义。当MonitorType为Path时,代表HTTP检查路径 + * + * @return string|null + */ + public function getPath(): string + { + return $this->get("Path"); + } + + /** + * Path: 根据MonitorType确认; 当MonitorType为Port时,此字段无意义。当MonitorType为Path时,代表HTTP检查路径 + * + * @param string $path + */ + public function setPath(string $path) + { + $this->set("Path", $path); + } + + /** + * RequestMsg: 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查发出的请求报文 + * + * @return string|null + */ + public function getRequestMsg(): string + { + return $this->get("RequestMsg"); + } + + /** + * RequestMsg: 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查发出的请求报文 + * + * @param string $requestMsg + */ + public function setRequestMsg(string $requestMsg) + { + $this->set("RequestMsg", $requestMsg); + } + + /** + * ResponseMsg: 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查请求应收到的响应报文 + * + * @return string|null + */ + public function getResponseMsg(): string + { + return $this->get("ResponseMsg"); + } + + /** + * ResponseMsg: 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查请求应收到的响应报文 + * + * @param string $responseMsg + */ + public function setResponseMsg(string $responseMsg) + { + $this->set("ResponseMsg", $responseMsg); + } + + /** + * VServerId: VServer实例的Id + * + * @return string|null + */ + public function getVServerId(): string + { + return $this->get("VServerId"); + } + + /** + * VServerId: VServer实例的Id + * + * @param string $vServerId + */ + public function setVServerId(string $vServerId) + { + $this->set("VServerId", $vServerId); + } + + /** + * VServerName: VServer实例的名字 + * + * @return string|null + */ + public function getVServerName(): string + { + return $this->get("VServerName"); + } + + /** + * VServerName: VServer实例的名字 + * + * @param string $vServerName + */ + public function setVServerName(string $vServerName) + { + $this->set("VServerName", $vServerName); + } + + /** + * Protocol: VServer实例的协议。 枚举值为:HTTP,TCP,UDP,HTTPS。 + * + * @return string|null + */ + public function getProtocol(): string + { + return $this->get("Protocol"); + } + + /** + * Protocol: VServer实例的协议。 枚举值为:HTTP,TCP,UDP,HTTPS。 + * + * @param string $protocol + */ + public function setProtocol(string $protocol) + { + $this->set("Protocol", $protocol); + } + + /** + * FrontendPort: VServer服务端口 + * + * @return integer|null + */ + public function getFrontendPort(): int + { + return $this->get("FrontendPort"); + } + + /** + * FrontendPort: VServer服务端口 + * + * @param int $frontendPort + */ + public function setFrontendPort(int $frontendPort) + { + $this->set("FrontendPort", $frontendPort); + } + + /** + * Method: VServer负载均衡的模式,枚举值:Roundrobin -> 轮询;Source -> 源地址;ConsistentHash -> 一致性哈希;SourcePort -> 源地址(计算端口);ConsistentHashPort -> 一致性哈希(计算端口)。 + * + * @return string|null + */ + public function getMethod(): string + { + return $this->get("Method"); + } + + /** + * Method: VServer负载均衡的模式,枚举值:Roundrobin -> 轮询;Source -> 源地址;ConsistentHash -> 一致性哈希;SourcePort -> 源地址(计算端口);ConsistentHashPort -> 一致性哈希(计算端口)。 + * + * @param string $method + */ + public function setMethod(string $method) + { + $this->set("Method", $method); + } + + /** + * PersistenceType: VServer会话保持方式。枚举值为: None -> 关闭会话保持; ServerInsert -> 自动生成; UserDefined -> 用户自定义。 + * + * @return string|null + */ + public function getPersistenceType(): string + { + return $this->get("PersistenceType"); + } + + /** + * PersistenceType: VServer会话保持方式。枚举值为: None -> 关闭会话保持; ServerInsert -> 自动生成; UserDefined -> 用户自定义。 + * + * @param string $persistenceType + */ + public function setPersistenceType(string $persistenceType) + { + $this->set("PersistenceType", $persistenceType); + } + + /** + * PersistenceInfo: 根据PersistenceType确定: None或ServerInsert,此字段为空; UserDefined,此字段展示用户自定义会话string。 + * + * @return string|null + */ + public function getPersistenceInfo(): string + { + return $this->get("PersistenceInfo"); + } + + /** + * PersistenceInfo: 根据PersistenceType确定: None或ServerInsert,此字段为空; UserDefined,此字段展示用户自定义会话string。 + * + * @param string $persistenceInfo + */ + public function setPersistenceInfo(string $persistenceInfo) + { + $this->set("PersistenceInfo", $persistenceInfo); + } + + /** + * ClientTimeout: 空闲连接的回收时间,单位:秒。 + * + * @return integer|null + */ + public function getClientTimeout(): int + { + return $this->get("ClientTimeout"); + } + + /** + * ClientTimeout: 空闲连接的回收时间,单位:秒。 + * + * @param int $clientTimeout + */ + public function setClientTimeout(int $clientTimeout) + { + $this->set("ClientTimeout", $clientTimeout); + } + + /** + * Status: VServer的运行状态。枚举值: 0 -> rs全部运行正常;1 -> rs全部运行异常;2 -> rs部分运行异常。 + * + * @return integer|null + */ + public function getStatus(): int + { + return $this->get("Status"); + } + + /** + * Status: VServer的运行状态。枚举值: 0 -> rs全部运行正常;1 -> rs全部运行异常;2 -> rs部分运行异常。 + * + * @param int $status + */ + public function setStatus(int $status) + { + $this->set("Status", $status); + } + + /** + * SSLSet: VServer绑定的SSL证书信息,具体结构见下方 ULBSSLSet。 + * + * @return ULBSSLSet[]|null + */ + public function getSSLSet(): array + { + $items = $this->get("SSLSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ULBSSLSet($item)); + } + return $result; + } + + /** + * SSLSet: VServer绑定的SSL证书信息,具体结构见下方 ULBSSLSet。 + * + * @param ULBSSLSet[] $sslSet + */ + public function setSSLSet(array $sslSet) + { + $result = []; + foreach ($sslSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * BackendSet: 后端资源信息列表,具体结构见下方 ULBBackendSet + * + * @return ULBBackendSet[]|null + */ + public function getBackendSet(): array + { + $items = $this->get("BackendSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ULBBackendSet($item)); + } + return $result; + } + + /** + * BackendSet: 后端资源信息列表,具体结构见下方 ULBBackendSet + * + * @param ULBBackendSet[] $backendSet + */ + public function setBackendSet(array $backendSet) + { + $result = []; + foreach ($backendSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * ListenType: 监听器类型,枚举值为: RequestProxy -> 请求代理;PacketsTransmit -> 报文转发 + * + * @return string|null + */ + public function getListenType(): string + { + return $this->get("ListenType"); + } + + /** + * ListenType: 监听器类型,枚举值为: RequestProxy -> 请求代理;PacketsTransmit -> 报文转发 + * + * @param string $listenType + */ + public function setListenType(string $listenType) + { + $this->set("ListenType", $listenType); + } + + /** + * PolicySet: 内容转发信息列表,具体结构见下方 ULBPolicySet + * + * @return ULBPolicySet[]|null + */ + public function getPolicySet(): array + { + $items = $this->get("PolicySet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ULBPolicySet($item)); + } + return $result; + } + + /** + * PolicySet: 内容转发信息列表,具体结构见下方 ULBPolicySet + * + * @param ULBPolicySet[] $policySet + */ + public function setPolicySet(array $policySet) + { + $result = []; + foreach ($policySet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/ULB/ULBClient.php b/src/ULB/ULBClient.php new file mode 100644 index 00000000..ebfa3ce2 --- /dev/null +++ b/src/ULB/ULBClient.php @@ -0,0 +1,940 @@ + (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "ULBId" => (string) 负载均衡实例的ID + * "VServerId" => (string) VServer实例的ID + * "ResourceType" => (string) 所添加的后端资源的类型,枚举值:UHost -> 云主机;UNI -> 虚拟网卡;UPM -> 物理云主机; UDHost -> 私有专区主机;UDocker -> 容器;UHybrid->混合云主机;CUBE->Cube;默认值为UHost。报文转发模式不支持UDocker、UHybrid、CUBE + * "ResourceId" => (string) 所添加的后端资源的资源ID + * "ResourceIP" => (string) 所添加的后端服务器的资源实例IP,当ResourceType 为 UHybrid 时有效,且必填 + * "VPCId" => (string) 所添加的后端服务器所在的vpc,当ResourceType 为 UHybrid 时有效,且必填 + * "SubnetId" => (string) 所添加的后端服务器所在的子网,当ResourceType 为 UHybrid 时有效,且必填 + * "Port" => (integer) 所添加的后端资源服务端口,取值范围[1-65535],默认80 + * "Weight" => (integer) 所添加的后端RS权重(在加权轮询算法下有效),取值范围[0-100],默认为1 + * "Enabled" => (integer) 后端实例状态开关,枚举值: 1:启用; 0:禁用 默认为启用 + * "IsBackup" => (integer) rs是否为backup,默认为00:普通rs1:backup的rs + * ] + * + * Outputs: + * + * $outputs = [ + * "BackendId" => (string) 所添加的后端资源在ULB中的对象ID,(为ULB系统中使用,与资源自身ID无关),可用于 UpdateBackendAttribute/UpdateBackendAttributeBatch/ReleaseBackend + * ] + * + * @throws UCloudException + */ + public function allocateBackend(AllocateBackendRequest $request = null): AllocateBackendResponse + { + $resp = $this->invoke($request); + return new AllocateBackendResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * BindSSL - 将SSL证书绑定到VServer + * + * See also: https://docs.ucloud.cn/api/ULB-api/bind_ssl + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "ULBId" => (string) 所绑定ULB实例ID + * "VServerId" => (string) 所绑定VServer实例ID + * "SSLId" => (string) SSL证书的Id + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function bindSSL(BindSSLRequest $request = null): BindSSLResponse + { + $resp = $this->invoke($request); + return new BindSSLResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreatePolicy - 创建VServer内容转发策略 + * + * See also: https://docs.ucloud.cn/api/ULB-api/create_policy + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "ULBId" => (string) 需要添加内容转发策略的负载均衡实例ID + * "VServerId" => (string) 需要添加内容转发策略的VServer实例ID + * "BackendId" => (array) 内容转发策略应用的后端资源实例的ID,来源于 AllocateBackend 返回的 BackendId + * "Match" => (string) 内容转发匹配字段 + * "Type" => (string) 内容转发匹配字段的类型 + * "PolicyPriority" => (integer) 策略优先级,1-9999 + * ] + * + * Outputs: + * + * $outputs = [ + * "PolicyId" => (string) 内容转发策略ID + * ] + * + * @throws UCloudException + */ + public function createPolicy(CreatePolicyRequest $request = null): CreatePolicyResponse + { + $resp = $this->invoke($request); + return new CreatePolicyResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateSSL - 创建SSL证书,可以把整个 Pem 证书内容传过来,或者把证书、私钥、CA证书分别传过来 + * + * See also: https://docs.ucloud.cn/api/ULB-api/create_ssl + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "SSLName" => (string) SSL证书的名字,默认值为空 + * "SSLType" => (string) 所添加的SSL证书类型,目前只支持Pem格式 + * "SSLContent" => (string) SSL证书的完整内容,包括用户证书、加密证书的私钥、CA证书 + * "UserCert" => (string) 用户的证书 + * "PrivateKey" => (string) 加密证书的私钥 + * "CaCert" => (string) CA证书 + * ] + * + * Outputs: + * + * $outputs = [ + * "SSLId" => (string) SSL证书的Id + * ] + * + * @throws UCloudException + */ + public function createSSL(CreateSSLRequest $request = null): CreateSSLResponse + { + $resp = $this->invoke($request); + return new CreateSSLResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateULB - 创建负载均衡实例,可以选择内网或者外网 + * + * See also: https://docs.ucloud.cn/api/ULB-api/create_ulb + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "ULBName" => (string) 负载均衡的名字,默认值为“ULB” + * "Tag" => (string) 业务组 + * "Remark" => (string) 备注 + * "OuterMode" => (string) 创建的ULB是否为外网模式,默认即为外网模式 + * "InnerMode" => (string) 创建的ULB是否为内网模式 + * "ChargeType" => (string) 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按时付费 + * "VPCId" => (string) ULB所在的VPC的ID, 如果不传则使用默认的VPC + * "SubnetId" => (string) 内网ULB 所属的子网ID,如果不传则使用默认的子网 + * "BusinessId" => (string) ULB 所属的业务组ID,如果不传则使用默认的业务组 + * "FirewallId" => (string) 防火墙ID,如果不传,则默认不绑定防火墙 + * "ListenType" => (string) ULB 监听器类型,枚举值:RequestProxy,请求代理; PacketsTransmit ,报文转发。默认为RequestProxy + * ] + * + * Outputs: + * + * $outputs = [ + * "ULBId" => (string) 负载均衡实例的Id + * "IPv6AddressId" => (string) IPv6地址Id + * ] + * + * @throws UCloudException + */ + public function createULB(CreateULBRequest $request = null): CreateULBResponse + { + $resp = $this->invoke($request); + return new CreateULBResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateVServer - 创建VServer实例,定义监听的协议和端口以及负载均衡算法 + * + * See also: https://docs.ucloud.cn/api/ULB-api/create_vserver + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ULBId" => (string) 负载均衡实例ID + * "VServerName" => (string) VServer实例名称,默认为"VServer" + * "ListenType" => (string) 监听器类型,枚举值,RequestProxy ,请求代理;PacketsTransmit ,报文转发。默认为RequestProxy + * "Protocol" => (string) VServer实例的协议,请求代理模式下有 HTTP、HTTPS、TCP,报文转发下有 TCP,UDP。默认为“HTTP" + * "FrontendPort" => (integer) VServer后端端口,取值范围[1-65535];默认值为80 + * "Method" => (string) VServer负载均衡模式,枚举值:Roundrobin -> 轮询;Source -> 源地址;ConsistentHash -> 一致性哈希;SourcePort -> 源地址(计算端口);ConsistentHashPort -> 一致性哈希(计算端口); WeightRoundrobin -> 加权轮询; Leastconn -> 最小连接数;Backup ->主备模式。ConsistentHash,SourcePort,ConsistentHashPort 只在报文转发中使用;Leastconn只在请求代理中使用;Roundrobin、Source和WeightRoundrobin,Backup在请求代理和报文转发中使用。默认为:"Roundrobin" + * "PersistenceType" => (string) VServer会话保持方式,默认关闭会话保持。枚举值:None -> 关闭;ServerInsert -> 自动生成KEY;UserDefined -> 用户自定义KEY。 + * "PersistenceInfo" => (string) 根据PersistenceType确认; None和ServerInsert: 此字段无意义; UserDefined:此字段传入自定义会话保持String + * "ClientTimeout" => (integer) ListenType为RequestProxy时表示空闲连接的回收时间,单位:秒,取值范围:时(0,86400],默认值为60;ListenType为PacketsTransmit时表示连接保持的时间,单位:秒,取值范围:[60,900],0 表示禁用连接保持 + * "MonitorType" => (string) 健康检查类型,枚举值:Port -> 端口检查;Path -> 路径检查;Ping -> Ping探测;Customize -> UDP检查请求代理型默认值为Port,其中TCP协议仅支持Port,其他协议支持Port和Path;报文转发型TCP协议仅支持Port,UDP协议支持Ping、Port和Customize,默认值为Ping + * "Domain" => (string) 根据MonitorType确认; 当MonitorType为Path时,此字段有意义,代表HTTP检查域名 + * "Path" => (string) 根据MonitorType确认; 当MonitorType为Path时,此字段有意义,代表HTTP检查路径 + * "RequestMsg" => (string) 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查发出的请求报文 + * "ResponseMsg" => (string) 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查请求应收到的响应报文 + * ] + * + * Outputs: + * + * $outputs = [ + * "VServerId" => (string) VServer实例的Id + * ] + * + * @throws UCloudException + */ + public function createVServer(CreateVServerRequest $request = null): CreateVServerResponse + { + $resp = $this->invoke($request); + return new CreateVServerResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeletePolicy - 删除内容转发策略 + * + * See also: https://docs.ucloud.cn/api/ULB-api/delete_policy + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "PolicyId" => (string) 内容转发策略ID + * "VServerId" => (string) VServer 资源ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deletePolicy(DeletePolicyRequest $request = null): DeletePolicyResponse + { + $resp = $this->invoke($request); + return new DeletePolicyResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteSSL - 删除SSL证书 + * + * See also: https://docs.ucloud.cn/api/ULB-api/delete_ssl + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "SSLId" => (string) SSL证书的ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteSSL(DeleteSSLRequest $request = null): DeleteSSLResponse + { + $resp = $this->invoke($request); + return new DeleteSSLResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteULB - 删除负载均衡实例 + * + * See also: https://docs.ucloud.cn/api/ULB-api/delete_ulb + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "ULBId" => (string) 负载均衡实例的ID + * "ReleaseEip" => (boolean) 删除ulb时是否释放绑定的EIP,false标识只解绑EIP,true表示会释放绑定的EIP,默认是false。Anycast IP 此参数无效 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteULB(DeleteULBRequest $request = null): DeleteULBResponse + { + $resp = $this->invoke($request); + return new DeleteULBResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteVServer - 删除VServer实例 + * + * See also: https://docs.ucloud.cn/api/ULB-api/delete_vserver + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "ULBId" => (string) 负载均衡实例的ID + * "VServerId" => (string) VServer实例的ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteVServer(DeleteVServerRequest $request = null): DeleteVServerResponse + { + $resp = $this->invoke($request); + return new DeleteVServerResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeSSL - 获取SSL证书信息 + * + * See also: https://docs.ucloud.cn/api/ULB-api/describe_ssl + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "SSLId" => (string) SSL证书的Id + * "Limit" => (integer) 数据分页值,默认为20 + * "Offset" => (integer) 数据偏移量,默认值为0 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 满足条件的SSL证书总数 + * "DataSet" => (array) SSL证书详细信息,具体结构见 ULBSSLSet[ + * [ + * "SSLId" => (string) SSL证书的Id + * "SSLName" => (string) SSL证书的名字 + * "SSLType" => (string) SSL证书类型,暂时只有 Pem 一种类型 + * "SSLContent" => (string) SSL证书的内容 + * "CreateTime" => (integer) SSL证书的创建时间 + * "HashValue" => (string) SSL证书的HASH值 + * "BindedTargetSet" => (array) SSL证书绑定到的对象[ + * [ + * "VServerId" => (string) SSL证书绑定到的VServer的资源ID + * "VServerName" => (string) 对应的VServer的名字 + * "ULBId" => (string) VServer 所属的ULB实例的资源ID + * "ULBName" => (string) ULB实例的名称 + * ] + * ] + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeSSL(DescribeSSLRequest $request = null): DescribeSSLResponse + { + $resp = $this->invoke($request); + return new DescribeSSLResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeULB - 获取ULB详细信息 + * + * See also: https://docs.ucloud.cn/api/ULB-api/describe_ulb + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Offset" => (integer) 数据偏移量,默认为0 + * "Limit" => (integer) 数据分页值,默认为20 + * "ULBId" => (string) 负载均衡实例的Id。 若指定则返回指定的负载均衡实例的信息; 若不指定则返回当前数据中心中所有的负载均衡实例的信息 + * "VPCId" => (string) ULB所属的VPC + * "SubnetId" => (string) ULB所属的子网ID + * "BusinessId" => (string) ULB所属的业务组ID + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 满足条件的ULB总数 + * "DataSet" => (array) ULB列表,每项参数详见 ULBSet[ + * [ + * "ULBId" => (string) 负载均衡的资源ID + * "Name" => (string) 负载均衡的资源名称 + * "Tag" => (string) 负载均衡的业务组名称 + * "Remark" => (string) 负载均衡的备注 + * "BandwidthType" => (integer) 带宽类型,枚举值为: 0,非共享带宽; 1,共享带宽 + * "Bandwidth" => (integer) 带宽 + * "CreateTime" => (integer) ULB的创建时间,格式为Unix Timestamp + * "IPSet" => (array) ULB的详细信息列表,具体结构见下方 ULBIPSet[ + * [ + * "OperatorName" => (string) 弹性IP的运营商信息,枚举值为: Bgp:BGP IP International:国际IP + * "EIP" => (string) 弹性IP地址 + * "EIPId" => (string) 弹性IP的ID + * "BandwidthType" => (integer) 弹性IP的带宽类型,枚举值:1 表示是共享带宽,0 普通带宽类型(暂未对外开放) + * "Bandwidth" => (integer) 弹性IP的带宽值(暂未对外开放) + * ] + * ] + * "VServerSet" => (array) 负载均衡实例中存在的VServer实例列表,具体结构见下方 ULBVServerSet[ + * [ + * "MonitorType" => (string) 健康检查类型,枚举值:Port -> 端口检查;Path -> 路径检查;Ping -> Ping探测, Customize -> UDP检查请求代理型默认值为Port,其中TCP协议仅支持Port,其他协议支持Port和Path; 报文转发型TCP协议仅支持Port,UDP协议支持Ping、Port和Customize + * "Domain" => (string) 根据MonitorType确认; 当MonitorType为Port时,此字段无意义。当MonitorType为Path时,代表HTTP检查域名 + * "Path" => (string) 根据MonitorType确认; 当MonitorType为Port时,此字段无意义。当MonitorType为Path时,代表HTTP检查路径 + * "RequestMsg" => (string) 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查发出的请求报文 + * "ResponseMsg" => (string) 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查请求应收到的响应报文 + * "VServerId" => (string) VServer实例的Id + * "VServerName" => (string) VServer实例的名字 + * "Protocol" => (string) VServer实例的协议。 枚举值为:HTTP,TCP,UDP,HTTPS。 + * "FrontendPort" => (integer) VServer服务端口 + * "Method" => (string) VServer负载均衡的模式,枚举值:Roundrobin -> 轮询;Source -> 源地址;ConsistentHash -> 一致性哈希;SourcePort -> 源地址(计算端口);ConsistentHashPort -> 一致性哈希(计算端口)。 + * "PersistenceType" => (string) VServer会话保持方式。枚举值为: None -> 关闭会话保持; ServerInsert -> 自动生成; UserDefined -> 用户自定义。 + * "PersistenceInfo" => (string) 根据PersistenceType确定: None或ServerInsert,此字段为空; UserDefined,此字段展示用户自定义会话string。 + * "ClientTimeout" => (integer) 空闲连接的回收时间,单位:秒。 + * "Status" => (integer) VServer的运行状态。枚举值: 0 -> rs全部运行正常;1 -> rs全部运行异常;2 -> rs部分运行异常。 + * "SSLSet" => (array) VServer绑定的SSL证书信息,具体结构见下方 ULBSSLSet。[ + * [ + * "SSLId" => (string) SSL证书的Id + * "SSLName" => (string) SSL证书的名字 + * "SSLType" => (string) SSL证书类型,暂时只有 Pem 一种类型 + * "SSLContent" => (string) SSL证书的内容 + * "CreateTime" => (integer) SSL证书的创建时间 + * "HashValue" => (string) SSL证书的HASH值 + * "BindedTargetSet" => (array) SSL证书绑定到的对象[ + * [ + * "VServerId" => (string) SSL证书绑定到的VServer的资源ID + * "VServerName" => (string) 对应的VServer的名字 + * "ULBId" => (string) VServer 所属的ULB实例的资源ID + * "ULBName" => (string) ULB实例的名称 + * ] + * ] + * ] + * ] + * "BackendSet" => (array) 后端资源信息列表,具体结构见下方 ULBBackendSet[ + * [ + * "BackendId" => (string) 后端资源实例的Id + * "ResourceType" => (string) 资源实例的类型 + * "ResourceId" => (string) 资源实例的资源Id + * "ResourceName" => (string) 资源实例的资源名称 + * "SubResourceType" => (string) 资源绑定的虚拟网卡实例的类型 + * "SubResourceId" => (string) 资源绑定的虚拟网卡实例的资源Id + * "SubResourceName" => (string) 资源绑定的虚拟网卡实例的资源名称 + * "PrivateIP" => (string) 后端提供服务的内网IP + * "Port" => (integer) 后端提供服务的端口 + * "Enabled" => (integer) 后端提供服务的实例启用与否,枚举值:0 禁用 1 启用 + * "Status" => (integer) 后端提供服务的实例运行状态,枚举值:0健康检查健康状态 1 健康检查异常 + * "SubnetId" => (string) 后端提供服务的资源所在的子网的ID + * "IsBackup" => (integer) 是否为backup,只有当vserver的Backup属性为1时才会有此字段,说明:0:主rs1:备rs + * ] + * ] + * "ListenType" => (string) 监听器类型,枚举值为: RequestProxy -> 请求代理;PacketsTransmit -> 报文转发 + * "PolicySet" => (array) 内容转发信息列表,具体结构见下方 ULBPolicySet[ + * [ + * "PolicyId" => (string) 内容转发Id,默认内容转发类型下为空。 + * "PolicyType" => (string) 内容类型,枚举值:Custom -> 客户自定义;Default -> 默认内容转发 + * "Type" => (string) 内容转发匹配字段的类型,枚举值:Domain -> 域名;Path -> 路径; 默认内容转发类型下为空 + * "Match" => (string) 内容转发匹配字段;默认内容转发类型下为空。 + * "PolicyPriority" => (integer) 内容转发优先级,范围[1,9999],数字越大优先级越高。默认内容转发规则下为0。 + * "VServerId" => (string) 所属VServerId + * "TotalCount" => (integer) 默认内容转发类型下返回当前rs总数 + * "BackendSet" => (array) 内容转发下rs的详细信息,参考PolicyBackendSet[ + * [ + * "BackendId" => (string) 所添加的后端资源在ULB中的对象ID,(为ULB系统中使用,与资源自身ID无关 + * "ResourceType" => (string) 所添加的后端资源的类型,枚举值:UHost -> 云主机;UPM -> 物理云主机; UDHost -> 私有专区主机;UDocker -> 容器;UHybrid->混合云主机;CUBE->Cube;UNI -> 虚拟网卡 + * "ResourceName" => (string) 后端资源的实例名称 + * "SubResourceId" => (string) 如果资源绑定了弹性网卡,则展示弹性网卡的资源ID + * "SubResourceName" => (string) 如果资源绑定了弹性网卡,则展示弹性网卡的资源名称 + * "SubResourceType" => (string) "UNI"或者为空 + * "ObjectId" => (string) 后端资源的对象ID + * "Port" => (integer) 所添加的后端资源服务端口 + * "PrivateIP" => (string) 后端资源的内网IP + * ] + * ] + * ] + * ] + * ] + * ] + * "ULBType" => (string) ULB 的类型 + * "IPVersion" => (string) ULB ip类型,枚举值:IPv6 / IPv4 (内部测试,暂未对外开放) + * "ListenType" => (string) ULB 监听器类型,枚举值:RequestProxy,请求代理; PacketsTransmit ,报文转发;Comprehensive,兼容型;Pending,未定型 + * "VPCId" => (string) ULB所在的VPC的ID + * "SubnetId" => (string) ULB 为 InnerMode 时,ULB 所属的子网ID,默认为空 + * "BusinessId" => (string) ULB 所属的业务组ID + * "PrivateIP" => (string) ULB的内网IP,当ULBType为OuterMode时,该值为空 + * "FirewallSet" => (array) 防火墙信息,具体结构见下方 FirewallSet[ + * [ + * "FirewallName" => (string) 防火墙名称 + * "FirewallId" => (string) 防火墙ID + * ] + * ] + * "EnableLog" => (integer) ULB是否开启日志功能。0,关闭;1,开启 + * "LogSet" => (object) 日志功能相关信息,仅当EnableLog为true时会返回,具体结构见下方 LoggerSet[ + * "BucketName" => (string) ulb日志上传的bucket + * "TokenID" => (string) 上传到bucket使用的token的tokenid + * "TokenName" => (string) bucket的token名称 + * ] + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeULB(DescribeULBRequest $request = null): DescribeULBResponse + { + $resp = $this->invoke($request); + return new DescribeULBResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeULBSimple - 获取ULB信息 + * + * See also: https://docs.ucloud.cn/api/ULB-api/describe_ulb_simple + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Offset" => (integer) 数据偏移量,默认为0 + * "Limit" => (integer) 数据分页值,默认为10000 + * "ULBId" => (string) 负载均衡实例的Id。 若指定则返回指定的负载均衡实例的信息; 若不指定则返回当前数据中心中所有的负载均衡实例的信息 + * "VPCId" => (string) ULB所属的VPC + * "SubnetId" => (string) ULB所属的子网ID + * "BusinessId" => (string) ULB所属的业务组ID + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 满足条件的ULB总数 + * "DataSet" => (array) ULB列表,每项参数详见 ULBSimpleSet[ + * [ + * "ListenType" => (string) ULB 监听器类型,枚举值:RequestProxy,请求代理; PacketsTransmit ,报文转发;Comprehensive,兼容型;Pending,未定型 + * "IPVersion" => (string) ULB提供服务的IP类型。枚举值,“IPv4”,"IPv6"。默认为“IPv4” + * "ULBId" => (string) 负载均衡的资源ID + * "Name" => (string) 负载均衡的资源名称 + * "Tag" => (string) 负载均衡的业务组名称 + * "Remark" => (string) 负载均衡的备注 + * "CreateTime" => (integer) ULB的创建时间,格式为Unix Timestamp + * "VPCId" => (string) ULB所在的VPC的ID + * "SubnetId" => (string) ULB 为 InnerMode 时,ULB 所属的子网ID + * "BusinessId" => (string) ULB 所属的业务组ID + * "PrivateIP" => (string) ULB的内网IP,当ULBType为OuterMode时,该值为空 + * "BandwidthType" => (integer) 带宽类型,枚举值为: 0,非共享带宽; 1,共享带宽 + * "Bandwidth" => (integer) 带宽 + * "IPSet" => (array) ULB的详细信息列表,具体结构见下方 ULBIPSet[ + * [ + * "OperatorName" => (string) 弹性IP的运营商信息,枚举值为: Bgp:BGP IP International:国际IP + * "EIP" => (string) 弹性IP地址 + * "EIPId" => (string) 弹性IP的ID + * "BandwidthType" => (integer) 弹性IP的带宽类型,枚举值:1 表示是共享带宽,0 普通带宽类型(暂未对外开放) + * "Bandwidth" => (integer) 弹性IP的带宽值(暂未对外开放) + * ] + * ] + * "VServerCount" => (integer) ulb下vserver数量 + * "ULBType" => (string) ULB 的类型(InnerMode or OuterMode) + * "FirewallSet" => (array) 防火墙信息,具体结构见下方 FirewallSet[ + * [ + * "FirewallName" => (string) 防火墙名称 + * "FirewallId" => (string) 防火墙ID + * ] + * ] + * "EnableLog" => (integer) ULB是否开启日志功能。0,关闭;1,开启 + * "LogSet" => (object) 日志功能相关信息,仅当EnableLog为true时会返回,具体结构见下方 LoggerSet[ + * "BucketName" => (string) ulb日志上传的bucket + * "TokenID" => (string) 上传到bucket使用的token的tokenid + * "TokenName" => (string) bucket的token名称 + * ] + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeULBSimple(DescribeULBSimpleRequest $request = null): DescribeULBSimpleResponse + { + $resp = $this->invoke($request); + return new DescribeULBSimpleResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeVServer - 获取ULB下的VServer的详细信息 + * + * See also: https://docs.ucloud.cn/api/ULB-api/describe_vserver + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ULBId" => (string) 负载均衡实例的Id + * "VServerId" => (string) VServer实例的Id;若指定则返回指定的VServer实例的信息; 若不指定则返回当前负载均衡实例下所有VServer的信息 + * "Limit" => (integer) 数据分页值 + * "Offset" => (integer) 数据偏移量 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 满足条件的VServer总数 + * "DataSet" => (array) VServer列表,每项参数详见 ULBVServerSet[ + * [ + * "MonitorType" => (string) 健康检查类型,枚举值:Port -> 端口检查;Path -> 路径检查;Ping -> Ping探测, Customize -> UDP检查请求代理型默认值为Port,其中TCP协议仅支持Port,其他协议支持Port和Path; 报文转发型TCP协议仅支持Port,UDP协议支持Ping、Port和Customize + * "Domain" => (string) 根据MonitorType确认; 当MonitorType为Port时,此字段无意义。当MonitorType为Path时,代表HTTP检查域名 + * "Path" => (string) 根据MonitorType确认; 当MonitorType为Port时,此字段无意义。当MonitorType为Path时,代表HTTP检查路径 + * "RequestMsg" => (string) 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查发出的请求报文 + * "ResponseMsg" => (string) 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查请求应收到的响应报文 + * "VServerId" => (string) VServer实例的Id + * "VServerName" => (string) VServer实例的名字 + * "Protocol" => (string) VServer实例的协议。 枚举值为:HTTP,TCP,UDP,HTTPS。 + * "FrontendPort" => (integer) VServer服务端口 + * "Method" => (string) VServer负载均衡的模式,枚举值:Roundrobin -> 轮询;Source -> 源地址;ConsistentHash -> 一致性哈希;SourcePort -> 源地址(计算端口);ConsistentHashPort -> 一致性哈希(计算端口)。 + * "PersistenceType" => (string) VServer会话保持方式。枚举值为: None -> 关闭会话保持; ServerInsert -> 自动生成; UserDefined -> 用户自定义。 + * "PersistenceInfo" => (string) 根据PersistenceType确定: None或ServerInsert,此字段为空; UserDefined,此字段展示用户自定义会话string。 + * "ClientTimeout" => (integer) 空闲连接的回收时间,单位:秒。 + * "Status" => (integer) VServer的运行状态。枚举值: 0 -> rs全部运行正常;1 -> rs全部运行异常;2 -> rs部分运行异常。 + * "SSLSet" => (array) VServer绑定的SSL证书信息,具体结构见下方 ULBSSLSet。[ + * [ + * "SSLId" => (string) SSL证书的Id + * "SSLName" => (string) SSL证书的名字 + * "SSLType" => (string) SSL证书类型,暂时只有 Pem 一种类型 + * "SSLContent" => (string) SSL证书的内容 + * "CreateTime" => (integer) SSL证书的创建时间 + * "HashValue" => (string) SSL证书的HASH值 + * "BindedTargetSet" => (array) SSL证书绑定到的对象[ + * [ + * "VServerId" => (string) SSL证书绑定到的VServer的资源ID + * "VServerName" => (string) 对应的VServer的名字 + * "ULBId" => (string) VServer 所属的ULB实例的资源ID + * "ULBName" => (string) ULB实例的名称 + * ] + * ] + * ] + * ] + * "BackendSet" => (array) 后端资源信息列表,具体结构见下方 ULBBackendSet[ + * [ + * "BackendId" => (string) 后端资源实例的Id + * "ResourceType" => (string) 资源实例的类型 + * "ResourceId" => (string) 资源实例的资源Id + * "ResourceName" => (string) 资源实例的资源名称 + * "SubResourceType" => (string) 资源绑定的虚拟网卡实例的类型 + * "SubResourceId" => (string) 资源绑定的虚拟网卡实例的资源Id + * "SubResourceName" => (string) 资源绑定的虚拟网卡实例的资源名称 + * "PrivateIP" => (string) 后端提供服务的内网IP + * "Port" => (integer) 后端提供服务的端口 + * "Enabled" => (integer) 后端提供服务的实例启用与否,枚举值:0 禁用 1 启用 + * "Status" => (integer) 后端提供服务的实例运行状态,枚举值:0健康检查健康状态 1 健康检查异常 + * "SubnetId" => (string) 后端提供服务的资源所在的子网的ID + * "IsBackup" => (integer) 是否为backup,只有当vserver的Backup属性为1时才会有此字段,说明:0:主rs1:备rs + * ] + * ] + * "ListenType" => (string) 监听器类型,枚举值为: RequestProxy -> 请求代理;PacketsTransmit -> 报文转发 + * "PolicySet" => (array) 内容转发信息列表,具体结构见下方 ULBPolicySet[ + * [ + * "PolicyId" => (string) 内容转发Id,默认内容转发类型下为空。 + * "PolicyType" => (string) 内容类型,枚举值:Custom -> 客户自定义;Default -> 默认内容转发 + * "Type" => (string) 内容转发匹配字段的类型,枚举值:Domain -> 域名;Path -> 路径; 默认内容转发类型下为空 + * "Match" => (string) 内容转发匹配字段;默认内容转发类型下为空。 + * "PolicyPriority" => (integer) 内容转发优先级,范围[1,9999],数字越大优先级越高。默认内容转发规则下为0。 + * "VServerId" => (string) 所属VServerId + * "TotalCount" => (integer) 默认内容转发类型下返回当前rs总数 + * "BackendSet" => (array) 内容转发下rs的详细信息,参考PolicyBackendSet[ + * [ + * "BackendId" => (string) 所添加的后端资源在ULB中的对象ID,(为ULB系统中使用,与资源自身ID无关 + * "ResourceType" => (string) 所添加的后端资源的类型,枚举值:UHost -> 云主机;UPM -> 物理云主机; UDHost -> 私有专区主机;UDocker -> 容器;UHybrid->混合云主机;CUBE->Cube;UNI -> 虚拟网卡 + * "ResourceName" => (string) 后端资源的实例名称 + * "SubResourceId" => (string) 如果资源绑定了弹性网卡,则展示弹性网卡的资源ID + * "SubResourceName" => (string) 如果资源绑定了弹性网卡,则展示弹性网卡的资源名称 + * "SubResourceType" => (string) "UNI"或者为空 + * "ObjectId" => (string) 后端资源的对象ID + * "Port" => (integer) 所添加的后端资源服务端口 + * "PrivateIP" => (string) 后端资源的内网IP + * ] + * ] + * ] + * ] + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeVServer(DescribeVServerRequest $request = null): DescribeVServerResponse + { + $resp = $this->invoke($request); + return new DescribeVServerResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ReleaseBackend - 从VServer释放后端资源实例 + * + * See also: https://docs.ucloud.cn/api/ULB-api/release_backend + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "ULBId" => (string) 负载均衡实例的ID + * "BackendId" => (string) 后端资源实例的ID(ULB后端ID,非资源自身ID) + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function releaseBackend(ReleaseBackendRequest $request = null): ReleaseBackendResponse + { + $resp = $this->invoke($request); + return new ReleaseBackendResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UnbindSSL - 从VServer解绑SSL证书 + * + * See also: https://docs.ucloud.cn/api/ULB-api/unbind_ssl + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "ULBId" => (string) 所绑定ULB实例ID + * "VServerId" => (string) 所绑定VServer实例ID + * "SSLId" => (string) SSL证书的Id + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function unbindSSL(UnbindSSLRequest $request = null): UnbindSSLResponse + { + $resp = $this->invoke($request); + return new UnbindSSLResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateBackendAttribute - 更新ULB后端资源实例(服务节点)属性 + * + * See also: https://docs.ucloud.cn/api/ULB-api/update_backend_attribute + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ULBId" => (string) 负载均衡资源ID + * "BackendId" => (string) 后端资源实例的ID(ULB后端ID,非资源自身ID) + * "Port" => (integer) 后端资源服务端口,取值范围[1-65535] + * "Weight" => (integer) 所添加的后端RS权重(在加权轮询算法下有效),取值范围[0-100],默认为1 + * "Enabled" => (integer) 后端实例状态开关 + * "IsBackup" => (integer) 是否为backup0:主rs1:备rs默认为0 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function updateBackendAttribute(UpdateBackendAttributeRequest $request = null): UpdateBackendAttributeResponse + { + $resp = $this->invoke($request); + return new UpdateBackendAttributeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdatePolicy - 更新内容转发规则,包括转发规则后的服务节点 + * + * See also: https://docs.ucloud.cn/api/ULB-api/update_policy + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "ULBId" => (string) 需要添加内容转发策略的负载均衡实例ID + * "VServerId" => (string) 需要添加内容转发策略的VServer实例ID,只支持请求代理模式下,HTTP或HTTPS协议的VServer + * "Match" => (string) 内容转发匹配字段 + * "PolicyId" => (string) 转发规则的ID,当Type为Default时,可以不传或为空 + * "BackendId" => (array) 内容转发策略应用的后端资源实例的ID,来源于 AllocateBackend 返回的 BackendId,不传表示更新转发节点为空 + * "Type" => (string) 内容转发匹配字段的类型,枚举值:Domain -> 域名转发规则;Path -> 路径转发规则;Default -> 默认转发规则,不传默认值Domain + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function updatePolicy(UpdatePolicyRequest $request = null): UpdatePolicyResponse + { + $resp = $this->invoke($request); + return new UpdatePolicyResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateULBAttribute - 更新ULB名字业务组备注等属性字段 + * + * See also: https://docs.ucloud.cn/api/ULB-api/update_ulb_attribute + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "ULBId" => (string) ULB资源ID + * "Name" => (string) 名字 + * "Tag" => (string) 业务 + * "Remark" => (string) 备注 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function updateULBAttribute(UpdateULBAttributeRequest $request = null): UpdateULBAttributeResponse + { + $resp = $this->invoke($request); + return new UpdateULBAttributeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateVServerAttribute - 更新VServer实例属性 + * + * See also: https://docs.ucloud.cn/api/ULB-api/update_vserver_attribute + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ULBId" => (string) 负载均衡实例ID + * "VServerId" => (string) VServer实例ID + * "VServerName" => (string) VServer实例名称,若无此字段则不做修改 + * "Method" => (string) VServer负载均衡模式,枚举值:Roundrobin -> 轮询;Source -> 源地址;ConsistentHash -> 一致性哈希;SourcePort -> 源地址(计算端口);ConsistentHashPort -> 一致性哈希(计算端口); WeightRoundrobin -> 加权轮询; Leastconn -> 最小连接数;Backup -> 主备模式。ConsistentHash,SourcePort,ConsistentHashPort 只在报文转发中使用;Leastconn只在请求代理中使用;Roundrobin、Source和WeightRoundrobin,Backup在请求代理和报文转发中使用。默认为:"Roundrobin" + * "PersistenceType" => (string) VServer会话保持模式,若无此字段则不做修改。枚举值:None:关闭;ServerInsert:自动生成KEY;UserDefined:用户自定义KEY。 + * "PersistenceInfo" => (string) 根据PersistenceType确定: None或ServerInsert, 此字段无意义; UserDefined, 则此字段传入用户自定义会话保持String. 若无此字段则不做修改 + * "ClientTimeout" => (integer) 请求代理的VServer下表示空闲连接的回收时间,单位:秒,取值范围:时(0,86400],默认值为60;报文转发的VServer下表示回话保持的时间,单位:秒,取值范围:[60,900],0 表示禁用连接保持 + * "MonitorType" => (string) 健康检查类型,枚举值:Port -> 端口检查;Path -> 路径检查;Ping -> Ping探测,Customize -> UDP检查请求代理型默认值为Port,其中TCP协议仅支持Port,其他协议支持Port和Path;报文转发型TCP协议仅支持Port,UDP协议支持Ping、Port和Customize,默认值为Ping + * "Domain" => (string) MonitorType 为 Path 时指定健康检查发送请求时HTTP HEADER 里的域名 + * "Path" => (string) MonitorType 为 Path 时指定健康检查发送请求时的路径,默认为 / + * "RequestMsg" => (string) 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查发出的请求报文 + * "ResponseMsg" => (string) 根据MonitorType确认; 当MonitorType为Customize时,此字段有意义,代表UDP检查请求应收到的响应报文 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function updateVServerAttribute(UpdateVServerAttributeRequest $request = null): UpdateVServerAttributeResponse + { + $resp = $this->invoke($request); + return new UpdateVServerAttributeResponse($resp->toArray(), $resp->getRequestId()); + } +} diff --git a/src/UMem/Apis/CheckUDredisSpaceAllowanceRequest.php b/src/UMem/Apis/CheckUDredisSpaceAllowanceRequest.php new file mode 100644 index 00000000..b22410bd --- /dev/null +++ b/src/UMem/Apis/CheckUDredisSpaceAllowanceRequest.php @@ -0,0 +1,133 @@ + "CheckUDredisSpaceAllowance"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("Size"); + $this->markRequired("Count"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * Size: 创建实例的容量大小,,扩容时的分片目标容量大小 + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 创建实例的容量大小,,扩容时的分片目标容量大小 + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * Count: 创建实例的数量,[1-10] + * + * @return string|null + */ + public function getCount(): string + { + return $this->get("Count"); + } + + /** + * Count: 创建实例的数量,[1-10] + * + * @param string $count + */ + public function setCount(string $count) + { + $this->set("Count", $count); + } + + /** + * GroupId: 资源ID,扩缩容时的必传参数 + * + * @return string|null + */ + public function getGroupId(): string + { + return $this->get("GroupId"); + } + + /** + * GroupId: 资源ID,扩缩容时的必传参数 + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } +} diff --git a/src/UMem/Apis/CheckUDredisSpaceAllowanceResponse.php b/src/UMem/Apis/CheckUDredisSpaceAllowanceResponse.php new file mode 100644 index 00000000..ea43cfd2 --- /dev/null +++ b/src/UMem/Apis/CheckUDredisSpaceAllowanceResponse.php @@ -0,0 +1,44 @@ +get("Count"); + } + + /** + * Count: 创建实例资源时,表示可创建的数量;扩容资源时,返回1表示可以扩容,0表示可用区资源不足不能扩容 + * + * @param int $count + */ + public function setCount(int $count) + { + $this->set("Count", $count); + } +} diff --git a/src/UMem/Apis/CheckURedisAllowanceRequest.php b/src/UMem/Apis/CheckURedisAllowanceRequest.php new file mode 100644 index 00000000..b77239b1 --- /dev/null +++ b/src/UMem/Apis/CheckURedisAllowanceRequest.php @@ -0,0 +1,193 @@ + "CheckURedisAllowance"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("Size"); + $this->markRequired("Count"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Size: 创建实例的容量大小, 单位:GB 目前仅支持1/2/4/8/16/32六种规格;扩缩容时,表示实例的目标资源大小 + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 创建实例的容量大小, 单位:GB 目前仅支持1/2/4/8/16/32六种规格;扩缩容时,表示实例的目标资源大小 + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * Count: 创建实例的数量,[1-10] + * + * @return integer|null + */ + public function getCount(): int + { + return $this->get("Count"); + } + + /** + * Count: 创建实例的数量,[1-10] + * + * @param int $count + */ + public function setCount(int $count) + { + $this->set("Count", $count); + } + + /** + * Protocol: + * + * @return string|null + */ + public function getProtocol(): string + { + return $this->get("Protocol"); + } + + /** + * Protocol: + * + * @param string $protocol + */ + public function setProtocol(string $protocol) + { + $this->set("Protocol", $protocol); + } + + /** + * RegionFlag: 是否是跨机房URedis(默认false) + * + * @return boolean|null + */ + public function getRegionFlag(): bool + { + return $this->get("RegionFlag"); + } + + /** + * RegionFlag: 是否是跨机房URedis(默认false) + * + * @param boolean $regionFlag + */ + public function setRegionFlag(bool $regionFlag) + { + $this->set("RegionFlag", $regionFlag); + } + + /** + * GroupId: 资源ID,扩容实例资源时的必传参数 + * + * @return string|null + */ + public function getGroupId(): string + { + return $this->get("GroupId"); + } + + /** + * GroupId: 资源ID,扩容实例资源时的必传参数 + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } +} diff --git a/src/UMem/Apis/CheckURedisAllowanceResponse.php b/src/UMem/Apis/CheckURedisAllowanceResponse.php new file mode 100644 index 00000000..c49ce541 --- /dev/null +++ b/src/UMem/Apis/CheckURedisAllowanceResponse.php @@ -0,0 +1,44 @@ +get("Count"); + } + + /** + * Count: 创建实例资源时,表示可创建的数量;扩容资源时,返回1表示可以扩容,0表示可用区资源不足不能扩容 + * + * @param int $count + */ + public function setCount(int $count) + { + $this->set("Count", $count); + } +} diff --git a/src/UMem/Apis/CreateUMemBackupRequest.php b/src/UMem/Apis/CreateUMemBackupRequest.php new file mode 100644 index 00000000..6e9124d3 --- /dev/null +++ b/src/UMem/Apis/CreateUMemBackupRequest.php @@ -0,0 +1,133 @@ + "CreateUMemBackup"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("SpaceId"); + $this->markRequired("BackupName"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SpaceId: 资源id + * + * @return string|null + */ + public function getSpaceId(): string + { + return $this->get("SpaceId"); + } + + /** + * SpaceId: 资源id + * + * @param string $spaceId + */ + public function setSpaceId(string $spaceId) + { + $this->set("SpaceId", $spaceId); + } + + /** + * BackupName: 请求创建备份的名称 (范围[6-63],只能包含英文、数字以及符号-和_) + * + * @return string|null + */ + public function getBackupName(): string + { + return $this->get("BackupName"); + } + + /** + * BackupName: 请求创建备份的名称 (范围[6-63],只能包含英文、数字以及符号-和_) + * + * @param string $backupName + */ + public function setBackupName(string $backupName) + { + $this->set("BackupName", $backupName); + } +} diff --git a/src/UMem/Apis/CreateUMemBackupResponse.php b/src/UMem/Apis/CreateUMemBackupResponse.php new file mode 100644 index 00000000..4f0ff18e --- /dev/null +++ b/src/UMem/Apis/CreateUMemBackupResponse.php @@ -0,0 +1,44 @@ +get("BackupId"); + } + + /** + * BackupId: 备份Id + * + * @param string $backupId + */ + public function setBackupId(string $backupId) + { + $this->set("BackupId", $backupId); + } +} diff --git a/src/UMem/Apis/CreateUMemSpaceRequest.php b/src/UMem/Apis/CreateUMemSpaceRequest.php new file mode 100644 index 00000000..55835b53 --- /dev/null +++ b/src/UMem/Apis/CreateUMemSpaceRequest.php @@ -0,0 +1,233 @@ + "CreateUMemSpace"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("Size"); + $this->markRequired("Name"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Size: 内存大小, 单位:GB, 范围[1~1024] + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 内存大小, 单位:GB, 范围[1~1024] + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * Name: 空间名称,长度(6<=size<=63) + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 空间名称,长度(6<=size<=63) + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Protocol: 协议:memcache, redis (默认redis).注意:redis无single类型 + * + * @return string|null + */ + public function getProtocol(): string + { + return $this->get("Protocol"); + } + + /** + * Protocol: 协议:memcache, redis (默认redis).注意:redis无single类型 + * + * @param string $protocol + */ + public function setProtocol(string $protocol) + { + $this->set("Protocol", $protocol); + } + + /** + * Type: 空间类型:single(无热备),double(热备)(默认: double) + * + * @return string|null + */ + public function getType(): string + { + return $this->get("Type"); + } + + /** + * Type: 空间类型:single(无热备),double(热备)(默认: double) + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } + + /** + * ChargeType: Year , Month, Dynamic, Trial 默认: Month + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: Year , Month, Dynamic, Trial 默认: Month + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时长 默认: 1 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长 默认: 1 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * CouponId: 使用的代金券id + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 使用的代金券id + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UMem/Apis/CreateUMemSpaceResponse.php b/src/UMem/Apis/CreateUMemSpaceResponse.php new file mode 100644 index 00000000..4b0b932a --- /dev/null +++ b/src/UMem/Apis/CreateUMemSpaceResponse.php @@ -0,0 +1,44 @@ +get("SpaceId"); + } + + /** + * SpaceId: 创建内存空间ID列表 + * + * @param string $spaceId + */ + public function setSpaceId(string $spaceId) + { + $this->set("SpaceId", $spaceId); + } +} diff --git a/src/UMem/Apis/CreateUMemcacheGroupRequest.php b/src/UMem/Apis/CreateUMemcacheGroupRequest.php new file mode 100644 index 00000000..3d731993 --- /dev/null +++ b/src/UMem/Apis/CreateUMemcacheGroupRequest.php @@ -0,0 +1,271 @@ + "CreateUMemcacheGroup"]); + $this->markRequired("Region"); + $this->markRequired("Name"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Name: 请求创建组的名称 范围[6-60] + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 请求创建组的名称 范围[6-60] + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Size: 每个节点的内存大小,单位GB,默认1GB 目前仅支持1/2/4/8/16/32这几档 + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 每个节点的内存大小,单位GB,默认1GB 目前仅支持1/2/4/8/16/32这几档 + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * ConfigId: 配置ID,目前仅支持默认配置id 默认配置id:"9a891891-c245-4b66-bce8-67e59430d67c" + * + * @return string|null + */ + public function getConfigId(): string + { + return $this->get("ConfigId"); + } + + /** + * ConfigId: 配置ID,目前仅支持默认配置id 默认配置id:"9a891891-c245-4b66-bce8-67e59430d67c" + * + * @param string $configId + */ + public function setConfigId(string $configId) + { + $this->set("ConfigId", $configId); + } + + /** + * Version: Memcache版本信息,默认为1.4.31 + * + * @return string|null + */ + public function getVersion(): string + { + return $this->get("Version"); + } + + /** + * Version: Memcache版本信息,默认为1.4.31 + * + * @param string $version + */ + public function setVersion(string $version) + { + $this->set("Version", $version); + } + + /** + * ChargeType: 计费模式,Year , Month, Dynamic 默认: Month + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式,Year , Month, Dynamic 默认: Month + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时长,默认为1 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长,默认为1 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * Tag: 业务组 默认:Default + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组 默认:Default + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Protocol: + * + * @return string|null + */ + public function getProtocol(): string + { + return $this->get("Protocol"); + } + + /** + * Protocol: + * + * @param string $protocol + */ + public function setProtocol(string $protocol) + { + $this->set("Protocol", $protocol); + } + + /** + * CouponId: 代金券ID + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 代金券ID + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UMem/Apis/CreateUMemcacheGroupResponse.php b/src/UMem/Apis/CreateUMemcacheGroupResponse.php new file mode 100644 index 00000000..e5aa0168 --- /dev/null +++ b/src/UMem/Apis/CreateUMemcacheGroupResponse.php @@ -0,0 +1,44 @@ +get("GroupId"); + } + + /** + * GroupId: 创建的组ID + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } +} diff --git a/src/UMem/Apis/CreateURedisBackupRequest.php b/src/UMem/Apis/CreateURedisBackupRequest.php new file mode 100644 index 00000000..7fe94fec --- /dev/null +++ b/src/UMem/Apis/CreateURedisBackupRequest.php @@ -0,0 +1,152 @@ + "CreateURedisBackup"]); + $this->markRequired("Region"); + $this->markRequired("GroupId"); + $this->markRequired("BackupName"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * GroupId: 资源id + * + * @return string|null + */ + public function getGroupId(): string + { + return $this->get("GroupId"); + } + + /** + * GroupId: 资源id + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } + + /** + * BackupName: 请求创建组的名称 (范围[6-63],只能包含英文、数字以及符号-和_) + * + * @return string|null + */ + public function getBackupName(): string + { + return $this->get("BackupName"); + } + + /** + * BackupName: 请求创建组的名称 (范围[6-63],只能包含英文、数字以及符号-和_) + * + * @param string $backupName + */ + public function setBackupName(string $backupName) + { + $this->set("BackupName", $backupName); + } + + /** + * SlaveZone: 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) + * + * @return string|null + */ + public function getSlaveZone(): string + { + return $this->get("SlaveZone"); + } + + /** + * SlaveZone: 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) + * + * @param string $slaveZone + */ + public function setSlaveZone(string $slaveZone) + { + $this->set("SlaveZone", $slaveZone); + } +} diff --git a/src/UMem/Apis/CreateURedisBackupResponse.php b/src/UMem/Apis/CreateURedisBackupResponse.php new file mode 100644 index 00000000..d4410920 --- /dev/null +++ b/src/UMem/Apis/CreateURedisBackupResponse.php @@ -0,0 +1,44 @@ +get("BackupId"); + } + + /** + * BackupId: 备份id + * + * @param string $backupId + */ + public function setBackupId(string $backupId) + { + $this->set("BackupId", $backupId); + } +} diff --git a/src/UMem/Apis/CreateURedisGroupRequest.php b/src/UMem/Apis/CreateURedisGroupRequest.php new file mode 100644 index 00000000..962cb4a2 --- /dev/null +++ b/src/UMem/Apis/CreateURedisGroupRequest.php @@ -0,0 +1,453 @@ + "CreateURedisGroup"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("Name"); + $this->markRequired("HighAvailability"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Name: 请求创建组的名称 (范围[6-63],只能包含英文、数字以及符号-和_) + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 请求创建组的名称 (范围[6-63],只能包含英文、数字以及符号-和_) + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * HighAvailability: 是否开启高可用,enable或disable + * + * @return string|null + */ + public function getHighAvailability(): string + { + return $this->get("HighAvailability"); + } + + /** + * HighAvailability: 是否开启高可用,enable或disable + * + * @param string $highAvailability + */ + public function setHighAvailability(string $highAvailability) + { + $this->set("HighAvailability", $highAvailability); + } + + /** + * Size: 每个节点的内存大小,单位GB,默认1GB,目前仅支持1/2/4/8/16/32,六种 + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 每个节点的内存大小,单位GB,默认1GB,目前仅支持1/2/4/8/16/32,六种 + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * AutoBackup: 是否自动备份,enable或disable,默认disable + * + * @return string|null + */ + public function getAutoBackup(): string + { + return $this->get("AutoBackup"); + } + + /** + * AutoBackup: 是否自动备份,enable或disable,默认disable + * + * @param string $autoBackup + */ + public function setAutoBackup(string $autoBackup) + { + $this->set("AutoBackup", $autoBackup); + } + + /** + * BackupTime: 自动备份开始时间,范围[0-23],默认3点 + * + * @return integer|null + */ + public function getBackupTime(): int + { + return $this->get("BackupTime"); + } + + /** + * BackupTime: 自动备份开始时间,范围[0-23],默认3点 + * + * @param int $backupTime + */ + public function setBackupTime(int $backupTime) + { + $this->set("BackupTime", $backupTime); + } + + /** + * ConfigId: 配置ID,目前支持 3.0版本配置ID:"03f58ca9-b64d-4bdd-abc7-c6b9a46fd801",3.2版本配置ID:"3e45ac48-f8a2-a9q2-261d-l342dab130gf", 4.0版本配置ID:"6c9298a3-9d7f-428c-b1d0-e87ab3b8a1ea",默认版本3.0,从备份创建为必传项 + * + * @return string|null + */ + public function getConfigId(): string + { + return $this->get("ConfigId"); + } + + /** + * ConfigId: 配置ID,目前支持 3.0版本配置ID:"03f58ca9-b64d-4bdd-abc7-c6b9a46fd801",3.2版本配置ID:"3e45ac48-f8a2-a9q2-261d-l342dab130gf", 4.0版本配置ID:"6c9298a3-9d7f-428c-b1d0-e87ab3b8a1ea",默认版本3.0,从备份创建为必传项 + * + * @param string $configId + */ + public function setConfigId(string $configId) + { + $this->set("ConfigId", $configId); + } + + /** + * Version: Redis版本信息(详见DescribeURedisVersion返回结果),默认版本3.0 + * + * @return string|null + */ + public function getVersion(): string + { + return $this->get("Version"); + } + + /** + * Version: Redis版本信息(详见DescribeURedisVersion返回结果),默认版本3.0 + * + * @param string $version + */ + public function setVersion(string $version) + { + $this->set("Version", $version); + } + + /** + * ChargeType: 计费模式,Year , Month, Dynamic 默认: Month + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式,Year , Month, Dynamic 默认: Month + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时长,默认为1 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长,默认为1 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * Tag: 业务组名称 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组名称 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Password: 初始化密码,需要 base64 编码 + * + * @return string|null + */ + public function getPassword(): string + { + return $this->get("Password"); + } + + /** + * Password: 初始化密码,需要 base64 编码 + * + * @param string $password + */ + public function setPassword(string $password) + { + $this->set("Password", $password); + } + + /** + * BackupId: 有此项代表从备份中创建,无代表正常创建 + * + * @return string|null + */ + public function getBackupId(): string + { + return $this->get("BackupId"); + } + + /** + * BackupId: 有此项代表从备份中创建,无代表正常创建 + * + * @param string $backupId + */ + public function setBackupId(string $backupId) + { + $this->set("BackupId", $backupId); + } + + /** + * SlaveZone: 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) + * + * @return string|null + */ + public function getSlaveZone(): string + { + return $this->get("SlaveZone"); + } + + /** + * SlaveZone: 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) + * + * @param string $slaveZone + */ + public function setSlaveZone(string $slaveZone) + { + $this->set("SlaveZone", $slaveZone); + } + + /** + * MasterGroupId: Master Redis Group的ID,创建只读Slave时,必须填写 + * + * @return string|null + */ + public function getMasterGroupId(): string + { + return $this->get("MasterGroupId"); + } + + /** + * MasterGroupId: Master Redis Group的ID,创建只读Slave时,必须填写 + * + * @param string $masterGroupId + */ + public function setMasterGroupId(string $masterGroupId) + { + $this->set("MasterGroupId", $masterGroupId); + } + + /** + * EnableIpV6: 是否创建使用ipv6 资源, 默认为false, 或者不填, 创建ipv6为true + * + * @return boolean|null + */ + public function getEnableIpV6(): bool + { + return $this->get("EnableIpV6"); + } + + /** + * EnableIpV6: 是否创建使用ipv6 资源, 默认为false, 或者不填, 创建ipv6为true + * + * @param boolean $enableIpV6 + */ + public function setEnableIpV6(bool $enableIpV6) + { + $this->set("EnableIpV6", $enableIpV6); + } + + /** + * SubnetId: 子网ID + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网ID + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * VPCId: VPC的ID + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPC的ID + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * CouponId: 代金券ID + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 代金券ID + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UMem/Apis/CreateURedisGroupResponse.php b/src/UMem/Apis/CreateURedisGroupResponse.php new file mode 100644 index 00000000..3234c7ba --- /dev/null +++ b/src/UMem/Apis/CreateURedisGroupResponse.php @@ -0,0 +1,44 @@ +get("GroupId"); + } + + /** + * GroupId: 创建的组ID + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } +} diff --git a/src/UMem/Apis/DeleteUMemSpaceRequest.php b/src/UMem/Apis/DeleteUMemSpaceRequest.php new file mode 100644 index 00000000..d1de0f78 --- /dev/null +++ b/src/UMem/Apis/DeleteUMemSpaceRequest.php @@ -0,0 +1,111 @@ + "DeleteUMemSpace"]); + $this->markRequired("Region"); + $this->markRequired("SpaceId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SpaceId: UMem内存空间ID + * + * @return string|null + */ + public function getSpaceId(): string + { + return $this->get("SpaceId"); + } + + /** + * SpaceId: UMem内存空间ID + * + * @param string $spaceId + */ + public function setSpaceId(string $spaceId) + { + $this->set("SpaceId", $spaceId); + } +} diff --git a/src/UMem/Apis/DeleteUMemSpaceResponse.php b/src/UMem/Apis/DeleteUMemSpaceResponse.php new file mode 100644 index 00000000..7064fffb --- /dev/null +++ b/src/UMem/Apis/DeleteUMemSpaceResponse.php @@ -0,0 +1,26 @@ + "DeleteUMemcacheGroup"]); + $this->markRequired("Region"); + $this->markRequired("GroupId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * GroupId: 组ID + * + * @return string|null + */ + public function getGroupId(): string + { + return $this->get("GroupId"); + } + + /** + * GroupId: 组ID + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } +} diff --git a/src/UMem/Apis/DeleteUMemcacheGroupResponse.php b/src/UMem/Apis/DeleteUMemcacheGroupResponse.php new file mode 100644 index 00000000..b22c5478 --- /dev/null +++ b/src/UMem/Apis/DeleteUMemcacheGroupResponse.php @@ -0,0 +1,26 @@ + "DeleteURedisGroup"]); + $this->markRequired("Region"); + $this->markRequired("GroupId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * GroupId: 组ID + * + * @return string|null + */ + public function getGroupId(): string + { + return $this->get("GroupId"); + } + + /** + * GroupId: 组ID + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } +} diff --git a/src/UMem/Apis/DeleteURedisGroupResponse.php b/src/UMem/Apis/DeleteURedisGroupResponse.php new file mode 100644 index 00000000..8693d130 --- /dev/null +++ b/src/UMem/Apis/DeleteURedisGroupResponse.php @@ -0,0 +1,26 @@ + "DescribeUDRedisSlowlog"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("InstanceId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * InstanceId: 实例id + * + * @return string|null + */ + public function getInstanceId(): string + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 实例id + * + * @param string $instanceId + */ + public function setInstanceId(string $instanceId) + { + $this->set("InstanceId", $instanceId); + } + + /** + * Limit: 分页显示的条目数,默认为10 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 分页显示的条目数,默认为10 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/UMem/Apis/DescribeUDRedisSlowlogResponse.php b/src/UMem/Apis/DescribeUDRedisSlowlogResponse.php new file mode 100644 index 00000000..155c53ce --- /dev/null +++ b/src/UMem/Apis/DescribeUDRedisSlowlogResponse.php @@ -0,0 +1,74 @@ +get("TotalCount"); + } + + /** + * TotalCount: 总条目数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * DataSet: 条目数据 + * + * @return UDRedisSlowlogSet[]|null + */ + public function getDataSet(): array + { + $items = $this->get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UDRedisSlowlogSet($item)); + } + return $result; + } + + /** + * DataSet: 条目数据 + * + * @param UDRedisSlowlogSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UMem/Apis/DescribeUMemBackupRequest.php b/src/UMem/Apis/DescribeUMemBackupRequest.php new file mode 100644 index 00000000..ce1cf5cd --- /dev/null +++ b/src/UMem/Apis/DescribeUMemBackupRequest.php @@ -0,0 +1,152 @@ + "DescribeUMemBackup"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("SpaceId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SpaceId: 资源id + * + * @return string|null + */ + public function getSpaceId(): string + { + return $this->get("SpaceId"); + } + + /** + * SpaceId: 资源id + * + * @param string $spaceId + */ + public function setSpaceId(string $spaceId) + { + $this->set("SpaceId", $spaceId); + } + + /** + * Offset: 分页显示的起始偏移, 默认值为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 分页显示的起始偏移, 默认值为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 分页显示的条目数, 默认值为10 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 分页显示的条目数, 默认值为10 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/UMem/Apis/DescribeUMemBackupResponse.php b/src/UMem/Apis/DescribeUMemBackupResponse.php new file mode 100644 index 00000000..29d0835c --- /dev/null +++ b/src/UMem/Apis/DescribeUMemBackupResponse.php @@ -0,0 +1,54 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UMemBackupSet($item)); + } + return $result; + } + + /** + * DataSet: 分布式redis 备份,数组的每个元素为每个分片的备份 + * + * @param UMemBackupSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UMem/Apis/DescribeUMemBackupURLRequest.php b/src/UMem/Apis/DescribeUMemBackupURLRequest.php new file mode 100644 index 00000000..0a92ad9e --- /dev/null +++ b/src/UMem/Apis/DescribeUMemBackupURLRequest.php @@ -0,0 +1,153 @@ + "DescribeUMemBackupURL"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("SpaceId"); + $this->markRequired("BackupId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SpaceId: 资源id + * + * @return string|null + */ + public function getSpaceId(): string + { + return $this->get("SpaceId"); + } + + /** + * SpaceId: 资源id + * + * @param string $spaceId + */ + public function setSpaceId(string $spaceId) + { + $this->set("SpaceId", $spaceId); + } + + /** + * BackupId: 备份Id + * + * @return string|null + */ + public function getBackupId(): string + { + return $this->get("BackupId"); + } + + /** + * BackupId: 备份Id + * + * @param string $backupId + */ + public function setBackupId(string $backupId) + { + $this->set("BackupId", $backupId); + } + + /** + * BlockId: 分片id + * + * @return string|null + */ + public function getBlockId(): string + { + return $this->get("BlockId"); + } + + /** + * BlockId: 分片id + * + * @param string $blockId + */ + public function setBlockId(string $blockId) + { + $this->set("BlockId", $blockId); + } +} diff --git a/src/UMem/Apis/DescribeUMemBackupURLResponse.php b/src/UMem/Apis/DescribeUMemBackupURLResponse.php new file mode 100644 index 00000000..ff899bd1 --- /dev/null +++ b/src/UMem/Apis/DescribeUMemBackupURLResponse.php @@ -0,0 +1,44 @@ +get("BackupURL"); + } + + /** + * BackupURL: 备份url,每个分片一个下载URL + * + * @param string[] $backupURL + */ + public function setBackupURL(array $backupURL) + { + $this->set("BackupURL", $backupURL); + } +} diff --git a/src/UMem/Apis/DescribeUMemBlockInfoRequest.php b/src/UMem/Apis/DescribeUMemBlockInfoRequest.php new file mode 100644 index 00000000..dd4af32b --- /dev/null +++ b/src/UMem/Apis/DescribeUMemBlockInfoRequest.php @@ -0,0 +1,154 @@ + "DescribeUMemBlockInfo"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("SpaceId"); + $this->markRequired("Offset"); + $this->markRequired("Limit"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SpaceId: UMem内存资源ID + * + * @return string|null + */ + public function getSpaceId(): string + { + return $this->get("SpaceId"); + } + + /** + * SpaceId: UMem内存资源ID + * + * @param string $spaceId + */ + public function setSpaceId(string $spaceId) + { + $this->set("SpaceId", $spaceId); + } + + /** + * Offset: 分页显示的起始偏移, 默认值为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 分页显示的起始偏移, 默认值为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 分页显示的条目数, 默认值为10 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 分页显示的条目数, 默认值为10 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/UMem/Apis/DescribeUMemBlockInfoResponse.php b/src/UMem/Apis/DescribeUMemBlockInfoResponse.php new file mode 100644 index 00000000..d3c8eea6 --- /dev/null +++ b/src/UMem/Apis/DescribeUMemBlockInfoResponse.php @@ -0,0 +1,54 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UMemBlockInfo($item)); + } + return $result; + } + + /** + * DataSet: 分布式redis 分片信息 + * + * @param UMemBlockInfo[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UMem/Apis/DescribeUMemPriceRequest.php b/src/UMem/Apis/DescribeUMemPriceRequest.php new file mode 100644 index 00000000..9b6f9e12 --- /dev/null +++ b/src/UMem/Apis/DescribeUMemPriceRequest.php @@ -0,0 +1,174 @@ + "DescribeUMemPrice"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ProjectId"); + $this->markRequired("Size"); + $this->markRequired("Type"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Size: 购买umem大小,单位:GB,范围[1~1024] + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 购买umem大小,单位:GB,范围[1~1024] + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * Type: 空间类型:single(无热备),double(热备)(默认: double) + * + * @return string|null + */ + public function getType(): string + { + return $this->get("Type"); + } + + /** + * Type: 空间类型:single(无热备),double(热备)(默认: double) + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } + + /** + * ChargeType: Year, Month, Dynamic 如果不指定,则一次性获取三种计费 + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: Year, Month, Dynamic 如果不指定,则一次性获取三种计费 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买UMem的时长,默认值为1 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买UMem的时长,默认值为1 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } +} diff --git a/src/UMem/Apis/DescribeUMemPriceResponse.php b/src/UMem/Apis/DescribeUMemPriceResponse.php new file mode 100644 index 00000000..bc7fd40e --- /dev/null +++ b/src/UMem/Apis/DescribeUMemPriceResponse.php @@ -0,0 +1,54 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UMemPriceSet($item)); + } + return $result; + } + + /** + * DataSet: 价格 参数见 UMemPriceSet + * + * @param UMemPriceSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UMem/Apis/DescribeUMemRequest.php b/src/UMem/Apis/DescribeUMemRequest.php new file mode 100644 index 00000000..3e333662 --- /dev/null +++ b/src/UMem/Apis/DescribeUMemRequest.php @@ -0,0 +1,170 @@ + "DescribeUMem"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Protocol: 协议类型: memcache, redis + * + * @return string|null + */ + public function getProtocol(): string + { + return $this->get("Protocol"); + } + + /** + * Protocol: 协议类型: memcache, redis + * + * @param string $protocol + */ + public function setProtocol(string $protocol) + { + $this->set("Protocol", $protocol); + } + + /** + * Offset: 分页显示的起始偏移, 默认值为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 分页显示的起始偏移, 默认值为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 分页显示的条目数, 默认值为20 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 分页显示的条目数, 默认值为20 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * ResourceId: 资源ID + * + * @return string|null + */ + public function getResourceId(): string + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: 资源ID + * + * @param string $resourceId + */ + public function setResourceId(string $resourceId) + { + $this->set("ResourceId", $resourceId); + } +} diff --git a/src/UMem/Apis/DescribeUMemResponse.php b/src/UMem/Apis/DescribeUMemResponse.php new file mode 100644 index 00000000..851bfa75 --- /dev/null +++ b/src/UMem/Apis/DescribeUMemResponse.php @@ -0,0 +1,76 @@ +get("TotalCount"); + } + + /** + * TotalCount: 根据过滤条件得到的总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * DataSet: UMem实例列表, 详细参见UMemDataSet + * + * @return UMemDataSet[]|null + */ + public function getDataSet(): array + { + $items = $this->get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UMemDataSet($item)); + } + return $result; + } + + /** + * DataSet: UMem实例列表, 详细参见UMemDataSet + * + * @param UMemDataSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UMem/Apis/DescribeUMemSpaceRequest.php b/src/UMem/Apis/DescribeUMemSpaceRequest.php new file mode 100644 index 00000000..55b2c8da --- /dev/null +++ b/src/UMem/Apis/DescribeUMemSpaceRequest.php @@ -0,0 +1,170 @@ + "DescribeUMemSpace"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Offset: 数据偏移量, 默认为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 数据偏移量, 默认为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 返回数据长度, 默认为20 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数据长度, 默认为20 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * SpaceId: 内存空间ID (无ID,则获取所有) + * + * @return string|null + */ + public function getSpaceId(): string + { + return $this->get("SpaceId"); + } + + /** + * SpaceId: 内存空间ID (无ID,则获取所有) + * + * @param string $spaceId + */ + public function setSpaceId(string $spaceId) + { + $this->set("SpaceId", $spaceId); + } + + /** + * Protocol: 协议类型: memcache, redis + * + * @return string|null + */ + public function getProtocol(): string + { + return $this->get("Protocol"); + } + + /** + * Protocol: 协议类型: memcache, redis + * + * @param string $protocol + */ + public function setProtocol(string $protocol) + { + $this->set("Protocol", $protocol); + } +} diff --git a/src/UMem/Apis/DescribeUMemSpaceResponse.php b/src/UMem/Apis/DescribeUMemSpaceResponse.php new file mode 100644 index 00000000..e9b38120 --- /dev/null +++ b/src/UMem/Apis/DescribeUMemSpaceResponse.php @@ -0,0 +1,75 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UMemSpaceSet($item)); + } + return $result; + } + + /** + * DataSet: JSON 格式的UMem内存空间实例列表, 详细参见 UMemSpaceSet + * + * @param UMemSpaceSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalCount: 根据过滤条件得到的总数 + * + * @return integer|null + */ + public function getTotalCount(): int + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 根据过滤条件得到的总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/UMem/Apis/DescribeUMemUpgradePriceRequest.php b/src/UMem/Apis/DescribeUMemUpgradePriceRequest.php new file mode 100644 index 00000000..f6b3b965 --- /dev/null +++ b/src/UMem/Apis/DescribeUMemUpgradePriceRequest.php @@ -0,0 +1,153 @@ + "DescribeUMemUpgradePrice"]); + $this->markRequired("Region"); + $this->markRequired("Size"); + $this->markRequired("Type"); + $this->markRequired("SpaceId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Size: 购买UMem大小,单位:GB + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 购买UMem大小,单位:GB + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * Type: 空间类型:single(无热备),double(热备)(默认: double) + * + * @return string|null + */ + public function getType(): string + { + return $this->get("Type"); + } + + /** + * Type: 空间类型:single(无热备),double(热备)(默认: double) + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } + + /** + * SpaceId: 需要升级的空间的SpaceId + * + * @return string|null + */ + public function getSpaceId(): string + { + return $this->get("SpaceId"); + } + + /** + * SpaceId: 需要升级的空间的SpaceId + * + * @param string $spaceId + */ + public function setSpaceId(string $spaceId) + { + $this->set("SpaceId", $spaceId); + } +} diff --git a/src/UMem/Apis/DescribeUMemUpgradePriceResponse.php b/src/UMem/Apis/DescribeUMemUpgradePriceResponse.php new file mode 100644 index 00000000..f4dc11ef --- /dev/null +++ b/src/UMem/Apis/DescribeUMemUpgradePriceResponse.php @@ -0,0 +1,64 @@ +get("Price"); + } + + /** + * Price: 价格 + * + * @param int $price + */ + public function setPrice(int $price) + { + $this->set("Price", $price); + } + + /** + * OriginalPrice: 原价 + * + * @return integer|null + */ + public function getOriginalPrice(): int + { + return $this->get("OriginalPrice"); + } + + /** + * OriginalPrice: 原价 + * + * @param int $originalPrice + */ + public function setOriginalPrice(int $originalPrice) + { + $this->set("OriginalPrice", $originalPrice); + } +} diff --git a/src/UMem/Apis/DescribeUMemcacheGroupRequest.php b/src/UMem/Apis/DescribeUMemcacheGroupRequest.php new file mode 100644 index 00000000..da096654 --- /dev/null +++ b/src/UMem/Apis/DescribeUMemcacheGroupRequest.php @@ -0,0 +1,150 @@ + "DescribeUMemcacheGroup"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * GroupId: 组的ID,如果指定则获取描述,否则为列表操 作,需指定Offset/Limit + * + * @return string|null + */ + public function getGroupId(): string + { + return $this->get("GroupId"); + } + + /** + * GroupId: 组的ID,如果指定则获取描述,否则为列表操 作,需指定Offset/Limit + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } + + /** + * Offset: 分页显示的起始偏移, 默认值为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 分页显示的起始偏移, 默认值为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 分页显示的条目数, 默认值为20 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 分页显示的条目数, 默认值为20 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/UMem/Apis/DescribeUMemcacheGroupResponse.php b/src/UMem/Apis/DescribeUMemcacheGroupResponse.php new file mode 100644 index 00000000..97e1118e --- /dev/null +++ b/src/UMem/Apis/DescribeUMemcacheGroupResponse.php @@ -0,0 +1,74 @@ +get("TotalCount"); + } + + /** + * TotalCount: 组的总的节点个数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * DataSet: 组列表,参见 UMemcacheGroupSet + * + * @return UMemcacheGroupSet[]|null + */ + public function getDataSet(): array + { + $items = $this->get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UMemcacheGroupSet($item)); + } + return $result; + } + + /** + * DataSet: 组列表,参见 UMemcacheGroupSet + * + * @param UMemcacheGroupSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UMem/Apis/DescribeUMemcachePriceRequest.php b/src/UMem/Apis/DescribeUMemcachePriceRequest.php new file mode 100644 index 00000000..7fa35bf9 --- /dev/null +++ b/src/UMem/Apis/DescribeUMemcachePriceRequest.php @@ -0,0 +1,172 @@ + "DescribeUMemcachePrice"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("Size"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Size: 容量大小,单位:GB 取值范围[1-32] + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 容量大小,单位:GB 取值范围[1-32] + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * ChargeType: 计费模式,Year, Month, Dynamic,默认: Dynamic 默认: 获取所有计费模式的价格 + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式,Year, Month, Dynamic,默认: Dynamic 默认: 获取所有计费模式的价格 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买umemcache的时长,默认值为1 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买umemcache的时长,默认值为1 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * Type: 空间类型:single(无热备),double(热备)(默认: double) + * + * @return string|null + */ + public function getType(): string + { + return $this->get("Type"); + } + + /** + * Type: 空间类型:single(无热备),double(热备)(默认: double) + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } +} diff --git a/src/UMem/Apis/DescribeUMemcachePriceResponse.php b/src/UMem/Apis/DescribeUMemcachePriceResponse.php new file mode 100644 index 00000000..6657adc6 --- /dev/null +++ b/src/UMem/Apis/DescribeUMemcachePriceResponse.php @@ -0,0 +1,54 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UMemcachePriceSet($item)); + } + return $result; + } + + /** + * DataSet: 价格列表, 参见 UMemcachePriceSet + * + * @param UMemcachePriceSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UMem/Apis/DescribeUMemcacheUpgradePriceRequest.php b/src/UMem/Apis/DescribeUMemcacheUpgradePriceRequest.php new file mode 100644 index 00000000..e58f3882 --- /dev/null +++ b/src/UMem/Apis/DescribeUMemcacheUpgradePriceRequest.php @@ -0,0 +1,71 @@ + "DescribeUMemcacheUpgradePrice"]); + $this->markRequired("Size"); + $this->markRequired("GroupId"); + } + + + + /** + * Size: 购买umemcache大小,单位:GB + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 购买umemcache大小,单位:GB + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * GroupId: 需要升级的空间的GroupId,请参考DescribeUMemcacheGroup接口 + * + * @return string|null + */ + public function getGroupId(): string + { + return $this->get("GroupId"); + } + + /** + * GroupId: 需要升级的空间的GroupId,请参考DescribeUMemcacheGroup接口 + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } +} diff --git a/src/UMem/Apis/DescribeUMemcacheUpgradePriceResponse.php b/src/UMem/Apis/DescribeUMemcacheUpgradePriceResponse.php new file mode 100644 index 00000000..af5b795a --- /dev/null +++ b/src/UMem/Apis/DescribeUMemcacheUpgradePriceResponse.php @@ -0,0 +1,44 @@ +get("Price"); + } + + /** + * Price: 价格,单位:元 + * + * @param float $price + */ + public function setPrice(float $price) + { + $this->set("Price", $price); + } +} diff --git a/src/UMem/Apis/DescribeURedisBackupRequest.php b/src/UMem/Apis/DescribeURedisBackupRequest.php new file mode 100644 index 00000000..58adf9cf --- /dev/null +++ b/src/UMem/Apis/DescribeURedisBackupRequest.php @@ -0,0 +1,130 @@ + "DescribeURedisBackup"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Offset: 分页显示的起始偏移, 默认值为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 分页显示的起始偏移, 默认值为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 分页显示的条目数, 默认值为10 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 分页显示的条目数, 默认值为10 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * GroupId: 组的ID + * + * @return string|null + */ + public function getGroupId(): string + { + return $this->get("GroupId"); + } + + /** + * GroupId: 组的ID + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } +} diff --git a/src/UMem/Apis/DescribeURedisBackupResponse.php b/src/UMem/Apis/DescribeURedisBackupResponse.php new file mode 100644 index 00000000..2667580e --- /dev/null +++ b/src/UMem/Apis/DescribeURedisBackupResponse.php @@ -0,0 +1,74 @@ +get("TotalCount"); + } + + /** + * TotalCount: 用户名下总的备份个数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * DataSet: 备份列表 参见 URedisBackupSet + * + * @return URedisBackupSet[]|null + */ + public function getDataSet(): array + { + $items = $this->get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new URedisBackupSet($item)); + } + return $result; + } + + /** + * DataSet: 备份列表 参见 URedisBackupSet + * + * @param URedisBackupSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UMem/Apis/DescribeURedisBackupURLRequest.php b/src/UMem/Apis/DescribeURedisBackupURLRequest.php new file mode 100644 index 00000000..4e44b1c2 --- /dev/null +++ b/src/UMem/Apis/DescribeURedisBackupURLRequest.php @@ -0,0 +1,171 @@ + "DescribeURedisBackupURL"]); + $this->markRequired("Region"); + $this->markRequired("BackupId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * BackupId: 备份ID + * + * @return string|null + */ + public function getBackupId(): string + { + return $this->get("BackupId"); + } + + /** + * BackupId: 备份ID + * + * @param string $backupId + */ + public function setBackupId(string $backupId) + { + $this->set("BackupId", $backupId); + } + + /** + * RegionFlag: 是否是跨机房URedis(默认false) + * + * @return boolean|null + */ + public function getRegionFlag(): bool + { + return $this->get("RegionFlag"); + } + + /** + * RegionFlag: 是否是跨机房URedis(默认false) + * + * @param boolean $regionFlag + */ + public function setRegionFlag(bool $regionFlag) + { + $this->set("RegionFlag", $regionFlag); + } + + /** + * GroupId: 实例名称 + * + * @return string|null + */ + public function getGroupId(): string + { + return $this->get("GroupId"); + } + + /** + * GroupId: 实例名称 + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } + + /** + * SlaveZone: 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) + * + * @return string|null + */ + public function getSlaveZone(): string + { + return $this->get("SlaveZone"); + } + + /** + * SlaveZone: 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) + * + * @param string $slaveZone + */ + public function setSlaveZone(string $slaveZone) + { + $this->set("SlaveZone", $slaveZone); + } +} diff --git a/src/UMem/Apis/DescribeURedisBackupURLResponse.php b/src/UMem/Apis/DescribeURedisBackupURLResponse.php new file mode 100644 index 00000000..f0205df0 --- /dev/null +++ b/src/UMem/Apis/DescribeURedisBackupURLResponse.php @@ -0,0 +1,64 @@ +get("BackupURL"); + } + + /** + * BackupURL: 备份文件公网的地址 + * + * @param string $backupURL + */ + public function setBackupURL(string $backupURL) + { + $this->set("BackupURL", $backupURL); + } + + /** + * BackupPath: 备份文件公网的地址 + * + * @return string|null + */ + public function getBackupPath(): string + { + return $this->get("BackupPath"); + } + + /** + * BackupPath: 备份文件公网的地址 + * + * @param string $backupPath + */ + public function setBackupPath(string $backupPath) + { + $this->set("BackupPath", $backupPath); + } +} diff --git a/src/UMem/Apis/DescribeURedisConfigRequest.php b/src/UMem/Apis/DescribeURedisConfigRequest.php new file mode 100644 index 00000000..766a3485 --- /dev/null +++ b/src/UMem/Apis/DescribeURedisConfigRequest.php @@ -0,0 +1,192 @@ + "DescribeURedisConfig"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("RegionFlag"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * RegionFlag: 是否是跨机房URedis(默认false) + * + * @return boolean|null + */ + public function getRegionFlag(): bool + { + return $this->get("RegionFlag"); + } + + /** + * RegionFlag: 是否是跨机房URedis(默认false) + * + * @param boolean $regionFlag + */ + public function setRegionFlag(bool $regionFlag) + { + $this->set("RegionFlag", $regionFlag); + } + + /** + * Version: Redis版本号 + * + * @return string|null + */ + public function getVersion(): string + { + return $this->get("Version"); + } + + /** + * Version: Redis版本号 + * + * @param string $version + */ + public function setVersion(string $version) + { + $this->set("Version", $version); + } + + /** + * ConfigId: 配置文件ID + * + * @return string|null + */ + public function getConfigId(): string + { + return $this->get("ConfigId"); + } + + /** + * ConfigId: 配置文件ID + * + * @param string $configId + */ + public function setConfigId(string $configId) + { + $this->set("ConfigId", $configId); + } + + /** + * Offset: 页显示的起始偏移, 默认值为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 页显示的起始偏移, 默认值为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 页显示的条目数, 默认值为10 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 页显示的条目数, 默认值为10 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/UMem/Apis/DescribeURedisConfigResponse.php b/src/UMem/Apis/DescribeURedisConfigResponse.php new file mode 100644 index 00000000..faff0fc7 --- /dev/null +++ b/src/UMem/Apis/DescribeURedisConfigResponse.php @@ -0,0 +1,74 @@ +get("TotalCount"); + } + + /** + * TotalCount: 根据过滤条件得到的总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * DataSet: 配置文件列表 参见 URedisConfigSet + * + * @return URedisConfigSet[]|null + */ + public function getDataSet(): array + { + $items = $this->get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new URedisConfigSet($item)); + } + return $result; + } + + /** + * DataSet: 配置文件列表 参见 URedisConfigSet + * + * @param URedisConfigSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UMem/Apis/DescribeURedisGroupRequest.php b/src/UMem/Apis/DescribeURedisGroupRequest.php new file mode 100644 index 00000000..b35abac1 --- /dev/null +++ b/src/UMem/Apis/DescribeURedisGroupRequest.php @@ -0,0 +1,150 @@ + "DescribeURedisGroup"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * GroupId: 组的ID,如果指定则获取描述,否则为列表操 作,需指定Offset/Limit + * + * @return string|null + */ + public function getGroupId(): string + { + return $this->get("GroupId"); + } + + /** + * GroupId: 组的ID,如果指定则获取描述,否则为列表操 作,需指定Offset/Limit + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } + + /** + * Offset: 分页显示的起始偏移, 默认值为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 分页显示的起始偏移, 默认值为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 分页显示的条目数, 默认值为20 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 分页显示的条目数, 默认值为20 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/UMem/Apis/DescribeURedisGroupResponse.php b/src/UMem/Apis/DescribeURedisGroupResponse.php new file mode 100644 index 00000000..b4588121 --- /dev/null +++ b/src/UMem/Apis/DescribeURedisGroupResponse.php @@ -0,0 +1,74 @@ +get("TotalCount"); + } + + /** + * TotalCount: 组的总的节点个数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * DataSet: 组列表 参见 URedisGroupSet + * + * @return URedisGroupSet[]|null + */ + public function getDataSet(): array + { + $items = $this->get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new URedisGroupSet($item)); + } + return $result; + } + + /** + * DataSet: 组列表 参见 URedisGroupSet + * + * @param URedisGroupSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UMem/Apis/DescribeURedisPriceRequest.php b/src/UMem/Apis/DescribeURedisPriceRequest.php new file mode 100644 index 00000000..5663ccfb --- /dev/null +++ b/src/UMem/Apis/DescribeURedisPriceRequest.php @@ -0,0 +1,192 @@ + "DescribeURedisPrice"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("Size"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Size: 量大小,单位:GB 取值范围[1-32] + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 量大小,单位:GB 取值范围[1-32] + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * ChargeType: 计费模式,Year, Month, Dynamic;如果不指定,则一次性获取三种计费 + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式,Year, Month, Dynamic;如果不指定,则一次性获取三种计费 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 计费模式为Dynamic时,购买的时长, 默认为1 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 计费模式为Dynamic时,购买的时长, 默认为1 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * RegionFlag: 是否是跨机房URedis(默认false) + * + * @return boolean|null + */ + public function getRegionFlag(): bool + { + return $this->get("RegionFlag"); + } + + /** + * RegionFlag: 是否是跨机房URedis(默认false) + * + * @param boolean $regionFlag + */ + public function setRegionFlag(bool $regionFlag) + { + $this->set("RegionFlag", $regionFlag); + } + + /** + * ProductType: 产品类型:MS_Redis(标准主备版),S_Redis(从库),默认为MS_Redis + * + * @return string|null + */ + public function getProductType(): string + { + return $this->get("ProductType"); + } + + /** + * ProductType: 产品类型:MS_Redis(标准主备版),S_Redis(从库),默认为MS_Redis + * + * @param string $productType + */ + public function setProductType(string $productType) + { + $this->set("ProductType", $productType); + } +} diff --git a/src/UMem/Apis/DescribeURedisPriceResponse.php b/src/UMem/Apis/DescribeURedisPriceResponse.php new file mode 100644 index 00000000..86ec8a0f --- /dev/null +++ b/src/UMem/Apis/DescribeURedisPriceResponse.php @@ -0,0 +1,54 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new URedisPriceSet($item)); + } + return $result; + } + + /** + * DataSet: 价格 参数见 UMemPriceSet + * + * @param URedisPriceSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UMem/Apis/DescribeURedisSlowlogRequest.php b/src/UMem/Apis/DescribeURedisSlowlogRequest.php new file mode 100644 index 00000000..d326bc32 --- /dev/null +++ b/src/UMem/Apis/DescribeURedisSlowlogRequest.php @@ -0,0 +1,132 @@ + "DescribeURedisSlowlog"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("GroupId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * GroupId: 资源ID + * + * @return string|null + */ + public function getGroupId(): string + { + return $this->get("GroupId"); + } + + /** + * GroupId: 资源ID + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } + + /** + * Limit: 分页显示的条目数,默认为10 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 分页显示的条目数,默认为10 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/UMem/Apis/DescribeURedisSlowlogResponse.php b/src/UMem/Apis/DescribeURedisSlowlogResponse.php new file mode 100644 index 00000000..9256d387 --- /dev/null +++ b/src/UMem/Apis/DescribeURedisSlowlogResponse.php @@ -0,0 +1,74 @@ +get("TotalCount"); + } + + /** + * TotalCount: 总条目数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * DataSet: 条目数据 + * + * @return URedisSlowlogSet[]|null + */ + public function getDataSet(): array + { + $items = $this->get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new URedisSlowlogSet($item)); + } + return $result; + } + + /** + * DataSet: 条目数据 + * + * @param URedisSlowlogSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UMem/Apis/DescribeURedisUpgradePriceRequest.php b/src/UMem/Apis/DescribeURedisUpgradePriceRequest.php new file mode 100644 index 00000000..46482522 --- /dev/null +++ b/src/UMem/Apis/DescribeURedisUpgradePriceRequest.php @@ -0,0 +1,112 @@ + "DescribeURedisUpgradePrice"]); + $this->markRequired("Region"); + $this->markRequired("Size"); + $this->markRequired("GroupId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * Size: 购买uredis大小,单位:GB,范围是[1-32] + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 购买uredis大小,单位:GB,范围是[1-32] + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * GroupId: 要升级的空间的GroupId,请参考DescribeURedisGroup接口 + * + * @return string|null + */ + public function getGroupId(): string + { + return $this->get("GroupId"); + } + + /** + * GroupId: 要升级的空间的GroupId,请参考DescribeURedisGroup接口 + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } +} diff --git a/src/UMem/Apis/DescribeURedisUpgradePriceResponse.php b/src/UMem/Apis/DescribeURedisUpgradePriceResponse.php new file mode 100644 index 00000000..5e376c19 --- /dev/null +++ b/src/UMem/Apis/DescribeURedisUpgradePriceResponse.php @@ -0,0 +1,44 @@ +get("Price"); + } + + /** + * Price: 扩容差价,单位: 元,保留小数点后两位有效数字 + * + * @param float $price + */ + public function setPrice(float $price) + { + $this->set("Price", $price); + } +} diff --git a/src/UMem/Apis/DescribeURedisVersionRequest.php b/src/UMem/Apis/DescribeURedisVersionRequest.php new file mode 100644 index 00000000..d689d281 --- /dev/null +++ b/src/UMem/Apis/DescribeURedisVersionRequest.php @@ -0,0 +1,91 @@ + "DescribeURedisVersion"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } +} diff --git a/src/UMem/Apis/DescribeURedisVersionResponse.php b/src/UMem/Apis/DescribeURedisVersionResponse.php new file mode 100644 index 00000000..6f969a2a --- /dev/null +++ b/src/UMem/Apis/DescribeURedisVersionResponse.php @@ -0,0 +1,74 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new URedisVersionSet($item)); + } + return $result; + } + + /** + * DataSet: 组列表 参见 URedisVersionSet + * + * @param URedisVersionSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalCount: 总版本个数 + * + * @return integer|null + */ + public function getTotalCount(): int + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 总版本个数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/UMem/Apis/FlushallURedisGroupRequest.php b/src/UMem/Apis/FlushallURedisGroupRequest.php new file mode 100644 index 00000000..fb544c82 --- /dev/null +++ b/src/UMem/Apis/FlushallURedisGroupRequest.php @@ -0,0 +1,213 @@ + "FlushallURedisGroup"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("GroupId"); + $this->markRequired("FlushType"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * GroupId: 组的ID + * + * @return string|null + */ + public function getGroupId(): string + { + return $this->get("GroupId"); + } + + /** + * GroupId: 组的ID + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } + + /** + * FlushType: FlushDb或FlushAll + * + * @return string|null + */ + public function getFlushType(): string + { + return $this->get("FlushType"); + } + + /** + * FlushType: FlushDb或FlushAll + * + * @param string $flushType + */ + public function setFlushType(string $flushType) + { + $this->set("FlushType", $flushType); + } + + /** + * DbNum: 清空的db,FlushType为FlushDb,此项为必传项 + * + * @return integer|null + */ + public function getDbNum(): int + { + return $this->get("DbNum"); + } + + /** + * DbNum: 清空的db,FlushType为FlushDb,此项为必传项 + * + * @param int $dbNum + */ + public function setDbNum(int $dbNum) + { + $this->set("DbNum", $dbNum); + } + + /** + * TopOrganizationId: company_id + * + * @return integer|null + */ + public function getTopOrganizationId(): int + { + return $this->get("TopOrganizationId"); + } + + /** + * TopOrganizationId: company_id + * + * @param int $topOrganizationId + */ + public function setTopOrganizationId(int $topOrganizationId) + { + $this->set("TopOrganizationId", $topOrganizationId); + } + + /** + * OrganizationId: OrganizationId + * + * @return integer|null + */ + public function getOrganizationId(): int + { + return $this->get("OrganizationId"); + } + + /** + * OrganizationId: OrganizationId + * + * @param int $organizationId + */ + public function setOrganizationId(int $organizationId) + { + $this->set("OrganizationId", $organizationId); + } + + /** + * SlaveZone: 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) + * + * @return string|null + */ + public function getSlaveZone(): string + { + return $this->get("SlaveZone"); + } + + /** + * SlaveZone: 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) + * + * @param string $slaveZone + */ + public function setSlaveZone(string $slaveZone) + { + $this->set("SlaveZone", $slaveZone); + } +} diff --git a/src/UMem/Apis/FlushallURedisGroupResponse.php b/src/UMem/Apis/FlushallURedisGroupResponse.php new file mode 100644 index 00000000..34e157e7 --- /dev/null +++ b/src/UMem/Apis/FlushallURedisGroupResponse.php @@ -0,0 +1,26 @@ + "GetUMemSpaceState"]); + $this->markRequired("Region"); + $this->markRequired("SpaceId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SpaceId: 内存空间ID + * + * @return string|null + */ + public function getSpaceId(): string + { + return $this->get("SpaceId"); + } + + /** + * SpaceId: 内存空间ID + * + * @param string $spaceId + */ + public function setSpaceId(string $spaceId) + { + $this->set("SpaceId", $spaceId); + } +} diff --git a/src/UMem/Apis/GetUMemSpaceStateResponse.php b/src/UMem/Apis/GetUMemSpaceStateResponse.php new file mode 100644 index 00000000..978dad05 --- /dev/null +++ b/src/UMem/Apis/GetUMemSpaceStateResponse.php @@ -0,0 +1,44 @@ +get("State"); + } + + /** + * State: Starting:创建中 Running:运行中 Fail:失败 + * + * @param string $state + */ + public function setState(string $state) + { + $this->set("State", $state); + } +} diff --git a/src/UMem/Apis/ISolationURedisGroupRequest.php b/src/UMem/Apis/ISolationURedisGroupRequest.php new file mode 100644 index 00000000..a3d32cf7 --- /dev/null +++ b/src/UMem/Apis/ISolationURedisGroupRequest.php @@ -0,0 +1,153 @@ + "ISolationURedisGroup"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("GroupId"); + $this->markRequired("TransformType"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * GroupId: 组的ID + * + * @return string|null + */ + public function getGroupId(): string + { + return $this->get("GroupId"); + } + + /** + * GroupId: 组的ID + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } + + /** + * TransformType: UNBind(关闭)或Bind(打开) + * + * @return string|null + */ + public function getTransformType(): string + { + return $this->get("TransformType"); + } + + /** + * TransformType: UNBind(关闭)或Bind(打开) + * + * @param string $transformType + */ + public function setTransformType(string $transformType) + { + $this->set("TransformType", $transformType); + } + + /** + * SlaveZone: 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) + * + * @return string|null + */ + public function getSlaveZone(): string + { + return $this->get("SlaveZone"); + } + + /** + * SlaveZone: 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) + * + * @param string $slaveZone + */ + public function setSlaveZone(string $slaveZone) + { + $this->set("SlaveZone", $slaveZone); + } +} diff --git a/src/UMem/Apis/ISolationURedisGroupResponse.php b/src/UMem/Apis/ISolationURedisGroupResponse.php new file mode 100644 index 00000000..8ade8094 --- /dev/null +++ b/src/UMem/Apis/ISolationURedisGroupResponse.php @@ -0,0 +1,26 @@ + "ModifyUMemSpaceName"]); + $this->markRequired("Region"); + $this->markRequired("SpaceId"); + $this->markRequired("Name"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SpaceId: UMem内存空间ID + * + * @return string|null + */ + public function getSpaceId(): string + { + return $this->get("SpaceId"); + } + + /** + * SpaceId: UMem内存空间ID + * + * @param string $spaceId + */ + public function setSpaceId(string $spaceId) + { + $this->set("SpaceId", $spaceId); + } + + /** + * Name: 新的名称,长度(6<=size<=63) + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 新的名称,长度(6<=size<=63) + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } +} diff --git a/src/UMem/Apis/ModifyUMemSpaceNameResponse.php b/src/UMem/Apis/ModifyUMemSpaceNameResponse.php new file mode 100644 index 00000000..21e5982d --- /dev/null +++ b/src/UMem/Apis/ModifyUMemSpaceNameResponse.php @@ -0,0 +1,26 @@ + "ModifyURedisGroupName"]); + $this->markRequired("Region"); + $this->markRequired("GroupId"); + $this->markRequired("Name"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * GroupId: 组的ID + * + * @return string|null + */ + public function getGroupId(): string + { + return $this->get("GroupId"); + } + + /** + * GroupId: 组的ID + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } + + /** + * Name: Redis组名称 (范围[6-63],只能包含英文、数字以及符号-和_) + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: Redis组名称 (范围[6-63],只能包含英文、数字以及符号-和_) + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } +} diff --git a/src/UMem/Apis/ModifyURedisGroupNameResponse.php b/src/UMem/Apis/ModifyURedisGroupNameResponse.php new file mode 100644 index 00000000..b017abc4 --- /dev/null +++ b/src/UMem/Apis/ModifyURedisGroupNameResponse.php @@ -0,0 +1,26 @@ + "ModifyURedisGroupPassword"]); + $this->markRequired("Region"); + $this->markRequired("GroupId"); + $this->markRequired("Password"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * GroupId: 组的ID + * + * @return string|null + */ + public function getGroupId(): string + { + return $this->get("GroupId"); + } + + /** + * GroupId: 组的ID + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } + + /** + * Password: 新密码字符串,要求长度为6~36个字符,且只能包含英文、数字以及-和下划线;并且需要base64加密;如要取消密码,此值为空字符串, + * + * @return string|null + */ + public function getPassword(): string + { + return $this->get("Password"); + } + + /** + * Password: 新密码字符串,要求长度为6~36个字符,且只能包含英文、数字以及-和下划线;并且需要base64加密;如要取消密码,此值为空字符串, + * + * @param string $password + */ + public function setPassword(string $password) + { + $this->set("Password", $password); + } +} diff --git a/src/UMem/Apis/ModifyURedisGroupPasswordResponse.php b/src/UMem/Apis/ModifyURedisGroupPasswordResponse.php new file mode 100644 index 00000000..0bcbc2d6 --- /dev/null +++ b/src/UMem/Apis/ModifyURedisGroupPasswordResponse.php @@ -0,0 +1,26 @@ + "RemoveUDRedisData"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("SpaceId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SpaceId: 实例id + * + * @return string|null + */ + public function getSpaceId(): string + { + return $this->get("SpaceId"); + } + + /** + * SpaceId: 实例id + * + * @param string $spaceId + */ + public function setSpaceId(string $spaceId) + { + $this->set("SpaceId", $spaceId); + } +} diff --git a/src/UMem/Apis/RemoveUDRedisDataResponse.php b/src/UMem/Apis/RemoveUDRedisDataResponse.php new file mode 100644 index 00000000..0645a61e --- /dev/null +++ b/src/UMem/Apis/RemoveUDRedisDataResponse.php @@ -0,0 +1,26 @@ + "ResizeUMemSpace"]); + $this->markRequired("Region"); + $this->markRequired("SpaceId"); + $this->markRequired("Size"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SpaceId: UMem 内存空间Id + * + * @return string|null + */ + public function getSpaceId(): string + { + return $this->get("SpaceId"); + } + + /** + * SpaceId: UMem 内存空间Id + * + * @param string $spaceId + */ + public function setSpaceId(string $spaceId) + { + $this->set("SpaceId", $spaceId); + } + + /** + * Size: 内存大小, 单位:GB (需要大于原size,<= 1024) + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 内存大小, 单位:GB (需要大于原size,<= 1024) + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * CouponId: 使用的代金券Id + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 使用的代金券Id + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UMem/Apis/ResizeUMemSpaceResponse.php b/src/UMem/Apis/ResizeUMemSpaceResponse.php new file mode 100644 index 00000000..e0119705 --- /dev/null +++ b/src/UMem/Apis/ResizeUMemSpaceResponse.php @@ -0,0 +1,26 @@ + "ResizeURedisGroup"]); + $this->markRequired("Region"); + $this->markRequired("GroupId"); + $this->markRequired("Size"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * GroupId: 组ID + * + * @return string|null + */ + public function getGroupId(): string + { + return $this->get("GroupId"); + } + + /** + * GroupId: 组ID + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } + + /** + * Size: 内存大小, 单位:GB (需要大于原size,且小于等于32) 目前仅支持1/2/4/8/16/32 G 六种容量规格 + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 内存大小, 单位:GB (需要大于原size,且小于等于32) 目前仅支持1/2/4/8/16/32 G 六种容量规格 + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * ChargeType: + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Type: 空间类型:single(无热备),double(热备)(默认: double) + * + * @return string|null + */ + public function getType(): string + { + return $this->get("Type"); + } + + /** + * Type: 空间类型:single(无热备),double(热备)(默认: double) + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } + + /** + * CouponId: 代金券ID 请参考DescribeCoupon接口 + * + * @return integer|null + */ + public function getCouponId(): int + { + return $this->get("CouponId"); + } + + /** + * CouponId: 代金券ID 请参考DescribeCoupon接口 + * + * @param int $couponId + */ + public function setCouponId(int $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UMem/Apis/ResizeURedisGroupResponse.php b/src/UMem/Apis/ResizeURedisGroupResponse.php new file mode 100644 index 00000000..d07c2ac8 --- /dev/null +++ b/src/UMem/Apis/ResizeURedisGroupResponse.php @@ -0,0 +1,26 @@ + "RestartUMemcacheGroup"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("GroupId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * GroupId: 组的ID + * + * @return string|null + */ + public function getGroupId(): string + { + return $this->get("GroupId"); + } + + /** + * GroupId: 组的ID + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } +} diff --git a/src/UMem/Apis/RestartUMemcacheGroupResponse.php b/src/UMem/Apis/RestartUMemcacheGroupResponse.php new file mode 100644 index 00000000..0c1de7b5 --- /dev/null +++ b/src/UMem/Apis/RestartUMemcacheGroupResponse.php @@ -0,0 +1,26 @@ + "RestartURedisGroup"]); + $this->markRequired("Region"); + $this->markRequired("GroupId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * GroupId: 资源ID + * + * @return string|null + */ + public function getGroupId(): string + { + return $this->get("GroupId"); + } + + /** + * GroupId: 资源ID + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } +} diff --git a/src/UMem/Apis/RestartURedisGroupResponse.php b/src/UMem/Apis/RestartURedisGroupResponse.php new file mode 100644 index 00000000..57a803fb --- /dev/null +++ b/src/UMem/Apis/RestartURedisGroupResponse.php @@ -0,0 +1,26 @@ + "UpdateURedisBackupStrategy"]); + $this->markRequired("Region"); + $this->markRequired("GroupId"); + $this->markRequired("BackupTime"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * GroupId: 组的ID + * + * @return string|null + */ + public function getGroupId(): string + { + return $this->get("GroupId"); + } + + /** + * GroupId: 组的ID + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } + + /** + * BackupTime: 备份时间,默认为0 + * + * @return string|null + */ + public function getBackupTime(): string + { + return $this->get("BackupTime"); + } + + /** + * BackupTime: 备份时间,默认为0 + * + * @param string $backupTime + */ + public function setBackupTime(string $backupTime) + { + $this->set("BackupTime", $backupTime); + } + + /** + * AutoBackup: 是否打开默认备份功能。enable(打开),disable(关闭),默认enable + * + * @return string|null + */ + public function getAutoBackup(): string + { + return $this->get("AutoBackup"); + } + + /** + * AutoBackup: 是否打开默认备份功能。enable(打开),disable(关闭),默认enable + * + * @param string $autoBackup + */ + public function setAutoBackup(string $autoBackup) + { + $this->set("AutoBackup", $autoBackup); + } + + /** + * SlaveZone: 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) + * + * @return string|null + */ + public function getSlaveZone(): string + { + return $this->get("SlaveZone"); + } + + /** + * SlaveZone: 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) + * + * @param string $slaveZone + */ + public function setSlaveZone(string $slaveZone) + { + $this->set("SlaveZone", $slaveZone); + } +} diff --git a/src/UMem/Apis/UpdateURedisBackupStrategyResponse.php b/src/UMem/Apis/UpdateURedisBackupStrategyResponse.php new file mode 100644 index 00000000..49a717be --- /dev/null +++ b/src/UMem/Apis/UpdateURedisBackupStrategyResponse.php @@ -0,0 +1,26 @@ +get("StartTime"); + } + + /** + * StartTime: 查询发生的时间 + * + * @param int $startTime + */ + public function setStartTime(int $startTime) + { + $this->set("StartTime", $startTime); + } + + /** + * SpendTime: 查询消耗的时间 + * + * @return integer|null + */ + public function getSpendTime(): int + { + return $this->get("SpendTime"); + } + + /** + * SpendTime: 查询消耗的时间 + * + * @param int $spendTime + */ + public function setSpendTime(int $spendTime) + { + $this->set("SpendTime", $spendTime); + } + + /** + * Command: 查询命令 + * + * @return string|null + */ + public function getCommand(): string + { + return $this->get("Command"); + } + + /** + * Command: 查询命令 + * + * @param string $command + */ + public function setCommand(string $command) + { + $this->set("Command", $command); + } + + /** + * BlockId: 分片id + * + * @return string|null + */ + public function getBlockId(): string + { + return $this->get("BlockId"); + } + + /** + * BlockId: 分片id + * + * @param string $blockId + */ + public function setBlockId(string $blockId) + { + $this->set("BlockId", $blockId); + } +} diff --git a/src/UMem/Models/UMemBackupSet.php b/src/UMem/Models/UMemBackupSet.php new file mode 100644 index 00000000..4998883b --- /dev/null +++ b/src/UMem/Models/UMemBackupSet.php @@ -0,0 +1,144 @@ +get("BackupName"); + } + + /** + * BackupName: 备份名称 + * + * @param string $backupName + */ + public function setBackupName(string $backupName) + { + $this->set("BackupName", $backupName); + } + + /** + * CreateTime: 创建时间 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * State: Starting:备份中 Done:完成 + * + * @return string|null + */ + public function getState(): string + { + return $this->get("State"); + } + + /** + * State: Starting:备份中 Done:完成 + * + * @param string $state + */ + public function setState(string $state) + { + $this->set("State", $state); + } + + /** + * BackupId: 空间的备份ID + * + * @return string|null + */ + public function getBackupId(): string + { + return $this->get("BackupId"); + } + + /** + * BackupId: 空间的备份ID + * + * @param string $backupId + */ + public function setBackupId(string $backupId) + { + $this->set("BackupId", $backupId); + } + + /** + * BackupType: 备份类型: auto(自动) ,manual(手动) + * + * @return string|null + */ + public function getBackupType(): string + { + return $this->get("BackupType"); + } + + /** + * BackupType: 备份类型: auto(自动) ,manual(手动) + * + * @param string $backupType + */ + public function setBackupType(string $backupType) + { + $this->set("BackupType", $backupType); + } + + /** + * BlockCount: 本次备份,分片的数量 + * + * @return integer|null + */ + public function getBlockCount(): int + { + return $this->get("BlockCount"); + } + + /** + * BlockCount: 本次备份,分片的数量 + * + * @param int $blockCount + */ + public function setBlockCount(int $blockCount) + { + $this->set("BlockCount", $blockCount); + } +} diff --git a/src/UMem/Models/UMemBlockInfo.php b/src/UMem/Models/UMemBlockInfo.php new file mode 100644 index 00000000..8b31ea71 --- /dev/null +++ b/src/UMem/Models/UMemBlockInfo.php @@ -0,0 +1,184 @@ +get("BlockId"); + } + + /** + * BlockId: 分片id + * + * @param string $blockId + */ + public function setBlockId(string $blockId) + { + $this->set("BlockId", $blockId); + } + + /** + * BlockVip: 分片ip + * + * @return string|null + */ + public function getBlockVip(): string + { + return $this->get("BlockVip"); + } + + /** + * BlockVip: 分片ip + * + * @param string $blockVip + */ + public function setBlockVip(string $blockVip) + { + $this->set("BlockVip", $blockVip); + } + + /** + * BlockPort: 分片端口 + * + * @return integer|null + */ + public function getBlockPort(): int + { + return $this->get("BlockPort"); + } + + /** + * BlockPort: 分片端口 + * + * @param int $blockPort + */ + public function setBlockPort(int $blockPort) + { + $this->set("BlockPort", $blockPort); + } + + /** + * BlockSize: 容量单位GB + * + * @return integer|null + */ + public function getBlockSize(): int + { + return $this->get("BlockSize"); + } + + /** + * BlockSize: 容量单位GB + * + * @param int $blockSize + */ + public function setBlockSize(int $blockSize) + { + $this->set("BlockSize", $blockSize); + } + + /** + * BlockUsedSize: 使用量单位MB + * + * @return integer|null + */ + public function getBlockUsedSize(): int + { + return $this->get("BlockUsedSize"); + } + + /** + * BlockUsedSize: 使用量单位MB + * + * @param int $blockUsedSize + */ + public function setBlockUsedSize(int $blockUsedSize) + { + $this->set("BlockUsedSize", $blockUsedSize); + } + + /** + * BlockState: 实例状态 Starting // 创建中 Creating // 初始化中 CreateFail // 创建失败 Fail // 创建失败 Deleting // 删除中 DeleteFail // 删除失败 Running // 运行 Resizing // 容量调整中 ResizeFail // 容量调整失败 Configing // 配置中 ConfigFail // 配置失败Restarting // 重启中 SetPasswordFail //设置密码失败 + * + * @return string|null + */ + public function getBlockState(): string + { + return $this->get("BlockState"); + } + + /** + * BlockState: 实例状态 Starting // 创建中 Creating // 初始化中 CreateFail // 创建失败 Fail // 创建失败 Deleting // 删除中 DeleteFail // 删除失败 Running // 运行 Resizing // 容量调整中 ResizeFail // 容量调整失败 Configing // 配置中 ConfigFail // 配置失败Restarting // 重启中 SetPasswordFail //设置密码失败 + * + * @param string $blockState + */ + public function setBlockState(string $blockState) + { + $this->set("BlockState", $blockState); + } + + /** + * BlockSlotBegin: 分片维护的键槽起始值 + * + * @return integer|null + */ + public function getBlockSlotBegin(): int + { + return $this->get("BlockSlotBegin"); + } + + /** + * BlockSlotBegin: 分片维护的键槽起始值 + * + * @param int $blockSlotBegin + */ + public function setBlockSlotBegin(int $blockSlotBegin) + { + $this->set("BlockSlotBegin", $blockSlotBegin); + } + + /** + * BlockSlotEnd: 分片维护的键槽结束值 + * + * @return integer|null + */ + public function getBlockSlotEnd(): int + { + return $this->get("BlockSlotEnd"); + } + + /** + * BlockSlotEnd: 分片维护的键槽结束值 + * + * @param int $blockSlotEnd + */ + public function setBlockSlotEnd(int $blockSlotEnd) + { + $this->set("BlockSlotEnd", $blockSlotEnd); + } +} diff --git a/src/UMem/Models/UMemDataSet.php b/src/UMem/Models/UMemDataSet.php new file mode 100644 index 00000000..8ea3f6d8 --- /dev/null +++ b/src/UMem/Models/UMemDataSet.php @@ -0,0 +1,562 @@ +get("Zone"); + } + + /** + * Zone: 实例所在可用区,或者master redis所在可用区,参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * OwnSlave: 是否拥有只读Slave“Yes” 包含“No” 不包含 + * + * @return string|null + */ + public function getOwnSlave(): string + { + return $this->get("OwnSlave"); + } + + /** + * OwnSlave: 是否拥有只读Slave“Yes” 包含“No” 不包含 + * + * @param string $ownSlave + */ + public function setOwnSlave(string $ownSlave) + { + $this->set("OwnSlave", $ownSlave); + } + + /** + * DataSet: UMEM实例列表 UMemSlaveDataSet 如果没有slave,则没有该字段 + * + * @return UMemSlaveDataSet[]|null + */ + public function getDataSet(): array + { + $items = $this->get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UMemSlaveDataSet($item)); + } + return $result; + } + + /** + * DataSet: UMEM实例列表 UMemSlaveDataSet 如果没有slave,则没有该字段 + * + * @param UMemSlaveDataSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * Role: 表示实例是主库还是从库,master,slave仅主备redis返回该项参数 + * + * @return string|null + */ + public function getRole(): string + { + return $this->get("Role"); + } + + /** + * Role: 表示实例是主库还是从库,master,slave仅主备redis返回该项参数 + * + * @param string $role + */ + public function setRole(string $role) + { + $this->set("Role", $role); + } + + /** + * RewriteTime: 主备redis和分布式redis运维时间0 //0点1 //1点以此类推单机版memcache不返回该项 + * + * @return integer|null + */ + public function getRewriteTime(): int + { + return $this->get("RewriteTime"); + } + + /** + * RewriteTime: 主备redis和分布式redis运维时间0 //0点1 //1点以此类推单机版memcache不返回该项 + * + * @param int $rewriteTime + */ + public function setRewriteTime(int $rewriteTime) + { + $this->set("RewriteTime", $rewriteTime); + } + + /** + * VPCId: vpc + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: vpc + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: 子网 + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网 + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * ResourceId: 资源ID + * + * @return string|null + */ + public function getResourceId(): string + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: 资源ID + * + * @param string $resourceId + */ + public function setResourceId(string $resourceId) + { + $this->set("ResourceId", $resourceId); + } + + /** + * Name: 资源名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 资源名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * CreateTime: 创建时间 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ExpireTime: 到期时间 + * + * @return integer|null + */ + public function getExpireTime(): int + { + return $this->get("ExpireTime"); + } + + /** + * ExpireTime: 到期时间 + * + * @param int $expireTime + */ + public function setExpireTime(int $expireTime) + { + $this->set("ExpireTime", $expireTime); + } + + /** + * Type: 空间类型:single(无热备),double(热备) + * + * @return string|null + */ + public function getType(): string + { + return $this->get("Type"); + } + + /** + * Type: 空间类型:single(无热备),double(热备) + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } + + /** + * Protocol: 协议类型: memcache, redis + * + * @return string|null + */ + public function getProtocol(): string + { + return $this->get("Protocol"); + } + + /** + * Protocol: 协议类型: memcache, redis + * + * @param string $protocol + */ + public function setProtocol(string $protocol) + { + $this->set("Protocol", $protocol); + } + + /** + * Size: 容量单位GB + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 容量单位GB + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * UsedSize: 使用量单位MB + * + * @return integer|null + */ + public function getUsedSize(): int + { + return $this->get("UsedSize"); + } + + /** + * UsedSize: 使用量单位MB + * + * @param int $usedSize + */ + public function setUsedSize(int $usedSize) + { + $this->set("UsedSize", $usedSize); + } + + /** + * State: 实例状态 Starting // 创建中 Creating // 初始化中 CreateFail // 创建失败 Fail // 创建失败 Deleting // 删除中 DeleteFail // 删除失败 Running // 运行 Resizing // 容量调整中 ResizeFail // 容量调整失败 Configing // 配置中 ConfigFail // 配置失败Restarting // 重启中SetPasswordFail //设置密码失败 + * + * @return string|null + */ + public function getState(): string + { + return $this->get("State"); + } + + /** + * State: 实例状态 Starting // 创建中 Creating // 初始化中 CreateFail // 创建失败 Fail // 创建失败 Deleting // 删除中 DeleteFail // 删除失败 Running // 运行 Resizing // 容量调整中 ResizeFail // 容量调整失败 Configing // 配置中 ConfigFail // 配置失败Restarting // 重启中SetPasswordFail //设置密码失败 + * + * @param string $state + */ + public function setState(string $state) + { + $this->set("State", $state); + } + + /** + * ChargeType: 计费模式,Year, Month, Dynamic, Trial + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式,Year, Month, Dynamic, Trial + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Address: IP端口信息请,参见UMemSpaceAddressSet + * + * @return UMemSpaceAddressSet[]|null + */ + public function getAddress(): array + { + $items = $this->get("Address") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UMemSpaceAddressSet($item)); + } + return $result; + } + + /** + * Address: IP端口信息请,参见UMemSpaceAddressSet + * + * @param UMemSpaceAddressSet[] $address + */ + public function setAddress(array $address) + { + $result = []; + foreach ($address as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * Tag: 业务组名称 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组名称 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * ResourceType: distributed: 分布式版Redis,或者分布式Memcache;single:主备版Redis,或者单机Memcache;performance:高性能版 + * + * @return string|null + */ + public function getResourceType(): string + { + return $this->get("ResourceType"); + } + + /** + * ResourceType: distributed: 分布式版Redis,或者分布式Memcache;single:主备版Redis,或者单机Memcache;performance:高性能版 + * + * @param string $resourceType + */ + public function setResourceType(string $resourceType) + { + $this->set("ResourceType", $resourceType); + } + + /** + * ConfigId: 节点的配置ID + * + * @return string|null + */ + public function getConfigId(): string + { + return $this->get("ConfigId"); + } + + /** + * ConfigId: 节点的配置ID + * + * @param string $configId + */ + public function setConfigId(string $configId) + { + $this->set("ConfigId", $configId); + } + + /** + * AutoBackup: 是否需要自动备份,enable,disable + * + * @return string|null + */ + public function getAutoBackup(): string + { + return $this->get("AutoBackup"); + } + + /** + * AutoBackup: 是否需要自动备份,enable,disable + * + * @param string $autoBackup + */ + public function setAutoBackup(string $autoBackup) + { + $this->set("AutoBackup", $autoBackup); + } + + /** + * BackupTime: 自动备份开始时间,单位小时计,范围[0-23] + * + * @return integer|null + */ + public function getBackupTime(): int + { + return $this->get("BackupTime"); + } + + /** + * BackupTime: 自动备份开始时间,单位小时计,范围[0-23] + * + * @param int $backupTime + */ + public function setBackupTime(int $backupTime) + { + $this->set("BackupTime", $backupTime); + } + + /** + * HighAvailability: 是否开启高可用,enable,disable + * + * @return string|null + */ + public function getHighAvailability(): string + { + return $this->get("HighAvailability"); + } + + /** + * HighAvailability: 是否开启高可用,enable,disable + * + * @param string $highAvailability + */ + public function setHighAvailability(string $highAvailability) + { + $this->set("HighAvailability", $highAvailability); + } + + /** + * Version: Redis版本信息 + * + * @return string|null + */ + public function getVersion(): string + { + return $this->get("Version"); + } + + /** + * Version: Redis版本信息 + * + * @param string $version + */ + public function setVersion(string $version) + { + $this->set("Version", $version); + } + + /** + * SlaveZone: 跨机房URedis,slave redis所在可用区,参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getSlaveZone(): string + { + return $this->get("SlaveZone"); + } + + /** + * SlaveZone: 跨机房URedis,slave redis所在可用区,参见 [可用区列表](../summary/regionlist.html) + * + * @param string $slaveZone + */ + public function setSlaveZone(string $slaveZone) + { + $this->set("SlaveZone", $slaveZone); + } +} diff --git a/src/UMem/Models/UMemPriceSet.php b/src/UMem/Models/UMemPriceSet.php new file mode 100644 index 00000000..a1d67764 --- /dev/null +++ b/src/UMem/Models/UMemPriceSet.php @@ -0,0 +1,84 @@ +get("ChargeType"); + } + + /** + * ChargeType: Year, Month, Dynamic,Trial + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Price: 现价 + * + * @return integer|null + */ + public function getPrice(): int + { + return $this->get("Price"); + } + + /** + * Price: 现价 + * + * @param int $price + */ + public function setPrice(int $price) + { + $this->set("Price", $price); + } + + /** + * OriginalPrice: 原价 + * + * @return integer|null + */ + public function getOriginalPrice(): int + { + return $this->get("OriginalPrice"); + } + + /** + * OriginalPrice: 原价 + * + * @param int $originalPrice + */ + public function setOriginalPrice(int $originalPrice) + { + $this->set("OriginalPrice", $originalPrice); + } +} diff --git a/src/UMem/Models/UMemSlaveDataSet.php b/src/UMem/Models/UMemSlaveDataSet.php new file mode 100644 index 00000000..766ca2c6 --- /dev/null +++ b/src/UMem/Models/UMemSlaveDataSet.php @@ -0,0 +1,484 @@ +get("Zone"); + } + + /** + * Zone: 实例所在可用区,或者master redis所在可用区,参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * SubnetId: 子网 + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网 + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * VPCId: vpc + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: vpc + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * VirtualIP: + * + * @return string|null + */ + public function getVirtualIP(): string + { + return $this->get("VirtualIP"); + } + + /** + * VirtualIP: + * + * @param string $virtualIP + */ + public function setVirtualIP(string $virtualIP) + { + $this->set("VirtualIP", $virtualIP); + } + + /** + * RewriteTime: 主备Redis返回运维时间 0//0点 1 //1点 以此类推 + * + * @return integer|null + */ + public function getRewriteTime(): int + { + return $this->get("RewriteTime"); + } + + /** + * RewriteTime: 主备Redis返回运维时间 0//0点 1 //1点 以此类推 + * + * @param int $rewriteTime + */ + public function setRewriteTime(int $rewriteTime) + { + $this->set("RewriteTime", $rewriteTime); + } + + /** + * MasterGroupId: 主实例id + * + * @return string|null + */ + public function getMasterGroupId(): string + { + return $this->get("MasterGroupId"); + } + + /** + * MasterGroupId: 主实例id + * + * @param string $masterGroupId + */ + public function setMasterGroupId(string $masterGroupId) + { + $this->set("MasterGroupId", $masterGroupId); + } + + /** + * GroupId: 资源id + * + * @return string|null + */ + public function getGroupId(): string + { + return $this->get("GroupId"); + } + + /** + * GroupId: 资源id + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } + + /** + * Port: 端口 + * + * @return integer|null + */ + public function getPort(): int + { + return $this->get("Port"); + } + + /** + * Port: 端口 + * + * @param int $port + */ + public function setPort(int $port) + { + $this->set("Port", $port); + } + + /** + * MemorySize: 实力大小 + * + * @return integer|null + */ + public function getMemorySize(): int + { + return $this->get("MemorySize"); + } + + /** + * MemorySize: 实力大小 + * + * @param int $memorySize + */ + public function setMemorySize(int $memorySize) + { + $this->set("MemorySize", $memorySize); + } + + /** + * GroupName: 资源名称 + * + * @return string|null + */ + public function getGroupName(): string + { + return $this->get("GroupName"); + } + + /** + * GroupName: 资源名称 + * + * @param string $groupName + */ + public function setGroupName(string $groupName) + { + $this->set("GroupName", $groupName); + } + + /** + * Role: 表示实例是主库还是从库,master,slave + * + * @return string|null + */ + public function getRole(): string + { + return $this->get("Role"); + } + + /** + * Role: 表示实例是主库还是从库,master,slave + * + * @param string $role + */ + public function setRole(string $role) + { + $this->set("Role", $role); + } + + /** + * ModifyTime: 修改时间 + * + * @return integer|null + */ + public function getModifyTime(): int + { + return $this->get("ModifyTime"); + } + + /** + * ModifyTime: 修改时间 + * + * @param int $modifyTime + */ + public function setModifyTime(int $modifyTime) + { + $this->set("ModifyTime", $modifyTime); + } + + /** + * Name: 资源名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 资源名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * CreateTime: 创建时间 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ExpireTime: 到期时间 + * + * @return integer|null + */ + public function getExpireTime(): int + { + return $this->get("ExpireTime"); + } + + /** + * ExpireTime: 到期时间 + * + * @param int $expireTime + */ + public function setExpireTime(int $expireTime) + { + $this->set("ExpireTime", $expireTime); + } + + /** + * Size: 容量单位GB + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 容量单位GB + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * UsedSize: 使用量单位MB + * + * @return integer|null + */ + public function getUsedSize(): int + { + return $this->get("UsedSize"); + } + + /** + * UsedSize: 使用量单位MB + * + * @param int $usedSize + */ + public function setUsedSize(int $usedSize) + { + $this->set("UsedSize", $usedSize); + } + + /** + * State: 实例状态 Starting // 创建中 Creating // 初始化中 CreateFail // 创建失败 Fail // 创建失败 Deleting // 删除中 DeleteFail // 删除失败 Running // 运行 Resizing // 容量调整中 ResizeFail // 容量调整失败 Configing // 配置中 ConfigFail // 配置失败Restarting // 重启中SetPasswordFail //设置密码失败 + * + * @return string|null + */ + public function getState(): string + { + return $this->get("State"); + } + + /** + * State: 实例状态 Starting // 创建中 Creating // 初始化中 CreateFail // 创建失败 Fail // 创建失败 Deleting // 删除中 DeleteFail // 删除失败 Running // 运行 Resizing // 容量调整中 ResizeFail // 容量调整失败 Configing // 配置中 ConfigFail // 配置失败Restarting // 重启中SetPasswordFail //设置密码失败 + * + * @param string $state + */ + public function setState(string $state) + { + $this->set("State", $state); + } + + /** + * ChargeType: 计费模式,Year, Month, Dynamic, Trial + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式,Year, Month, Dynamic, Trial + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Tag: 业务组名称 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组名称 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * ResourceType: distributed: 分布式版Redis,或者分布式Memcache;single:主备版Redis,或者单机Memcache;performance:高性能版 + * + * @return string|null + */ + public function getResourceType(): string + { + return $this->get("ResourceType"); + } + + /** + * ResourceType: distributed: 分布式版Redis,或者分布式Memcache;single:主备版Redis,或者单机Memcache;performance:高性能版 + * + * @param string $resourceType + */ + public function setResourceType(string $resourceType) + { + $this->set("ResourceType", $resourceType); + } + + /** + * ConfigId: 节点的配置ID + * + * @return string|null + */ + public function getConfigId(): string + { + return $this->get("ConfigId"); + } + + /** + * ConfigId: 节点的配置ID + * + * @param string $configId + */ + public function setConfigId(string $configId) + { + $this->set("ConfigId", $configId); + } + + /** + * Version: Redis版本信息 + * + * @return string|null + */ + public function getVersion(): string + { + return $this->get("Version"); + } + + /** + * Version: Redis版本信息 + * + * @param string $version + */ + public function setVersion(string $version) + { + $this->set("Version", $version); + } +} diff --git a/src/UMem/Models/UMemSpaceAddressSet.php b/src/UMem/Models/UMemSpaceAddressSet.php new file mode 100644 index 00000000..e6f7dea0 --- /dev/null +++ b/src/UMem/Models/UMemSpaceAddressSet.php @@ -0,0 +1,64 @@ +get("IP"); + } + + /** + * IP: UMem实例访问IP + * + * @param string $ip + */ + public function setIP(string $ip) + { + $this->set("IP", $ip); + } + + /** + * Port: UMem实例访问Port + * + * @return integer|null + */ + public function getPort(): int + { + return $this->get("Port"); + } + + /** + * Port: UMem实例访问Port + * + * @param int $port + */ + public function setPort(int $port) + { + $this->set("Port", $port); + } +} diff --git a/src/UMem/Models/UMemSpaceSet.php b/src/UMem/Models/UMemSpaceSet.php new file mode 100644 index 00000000..e446c8fb --- /dev/null +++ b/src/UMem/Models/UMemSpaceSet.php @@ -0,0 +1,353 @@ +get("Zone"); + } + + /** + * Zone: 可用区,参见[可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * Tag: + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * RewriteTime: 运维时间0 //0点1 //1点依次类推 + * + * @return integer|null + */ + public function getRewriteTime(): int + { + return $this->get("RewriteTime"); + } + + /** + * RewriteTime: 运维时间0 //0点1 //1点依次类推 + * + * @param int $rewriteTime + */ + public function setRewriteTime(int $rewriteTime) + { + $this->set("RewriteTime", $rewriteTime); + } + + /** + * SpaceId: 内存空间ID + * + * @return string|null + */ + public function getSpaceId(): string + { + return $this->get("SpaceId"); + } + + /** + * SpaceId: 内存空间ID + * + * @param string $spaceId + */ + public function setSpaceId(string $spaceId) + { + $this->set("SpaceId", $spaceId); + } + + /** + * SubnetId: + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * VPCId: + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * Name: 内存空间名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 内存空间名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * CreateTime: 创建时间 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ExpireTime: 到期时间 + * + * @return integer|null + */ + public function getExpireTime(): int + { + return $this->get("ExpireTime"); + } + + /** + * ExpireTime: 到期时间 + * + * @param int $expireTime + */ + public function setExpireTime(int $expireTime) + { + $this->set("ExpireTime", $expireTime); + } + + /** + * Type: 空间类型:single(无热备),double(热备) + * + * @return string|null + */ + public function getType(): string + { + return $this->get("Type"); + } + + /** + * Type: 空间类型:single(无热备),double(热备) + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } + + /** + * Protocol: 协议类型: memcache, redis + * + * @return string|null + */ + public function getProtocol(): string + { + return $this->get("Protocol"); + } + + /** + * Protocol: 协议类型: memcache, redis + * + * @param string $protocol + */ + public function setProtocol(string $protocol) + { + $this->set("Protocol", $protocol); + } + + /** + * Size: 容量单位GB + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 容量单位GB + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * UsedSize: 使用量单位MB + * + * @return integer|null + */ + public function getUsedSize(): int + { + return $this->get("UsedSize"); + } + + /** + * UsedSize: 使用量单位MB + * + * @param int $usedSize + */ + public function setUsedSize(int $usedSize) + { + $this->set("UsedSize", $usedSize); + } + + /** + * State: Starting:创建中 Running:运行中 Fail:失败 + * + * @return string|null + */ + public function getState(): string + { + return $this->get("State"); + } + + /** + * State: Starting:创建中 Running:运行中 Fail:失败 + * + * @param string $state + */ + public function setState(string $state) + { + $this->set("State", $state); + } + + /** + * ChargeType: Year, Month, Dynamic, Trial + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: Year, Month, Dynamic, Trial + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Address: IP端口信息请参见 UMemSpaceAddressSet + * + * @return UMemSpaceAddressSet[]|null + */ + public function getAddress(): array + { + $items = $this->get("Address") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UMemSpaceAddressSet($item)); + } + return $result; + } + + /** + * Address: IP端口信息请参见 UMemSpaceAddressSet + * + * @param UMemSpaceAddressSet[] $address + */ + public function setAddress(array $address) + { + $result = []; + foreach ($address as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UMem/Models/UMemcacheGroupSet.php b/src/UMem/Models/UMemcacheGroupSet.php new file mode 100644 index 00000000..508f4aa9 --- /dev/null +++ b/src/UMem/Models/UMemcacheGroupSet.php @@ -0,0 +1,304 @@ +get("GroupId"); + } + + /** + * GroupId: 组ID + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } + + /** + * Name: 组名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 组名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * ConfigId: 节点的配置ID + * + * @return string|null + */ + public function getConfigId(): string + { + return $this->get("ConfigId"); + } + + /** + * ConfigId: 节点的配置ID + * + * @param string $configId + */ + public function setConfigId(string $configId) + { + $this->set("ConfigId", $configId); + } + + /** + * VirtualIP: 节点的虚拟IP地址 + * + * @return string|null + */ + public function getVirtualIP(): string + { + return $this->get("VirtualIP"); + } + + /** + * VirtualIP: 节点的虚拟IP地址 + * + * @param string $virtualIP + */ + public function setVirtualIP(string $virtualIP) + { + $this->set("VirtualIP", $virtualIP); + } + + /** + * Port: 节点分配的服务端口 + * + * @return integer|null + */ + public function getPort(): int + { + return $this->get("Port"); + } + + /** + * Port: 节点分配的服务端口 + * + * @param int $port + */ + public function setPort(int $port) + { + $this->set("Port", $port); + } + + /** + * Size: 容量单位GB + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 容量单位GB + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * UsedSize: 使用量单位MB + * + * @return integer|null + */ + public function getUsedSize(): int + { + return $this->get("UsedSize"); + } + + /** + * UsedSize: 使用量单位MB + * + * @param int $usedSize + */ + public function setUsedSize(int $usedSize) + { + $this->set("UsedSize", $usedSize); + } + + /** + * Version: Memcache版本信息,默认为1.4.31 + * + * @return string|null + */ + public function getVersion(): string + { + return $this->get("Version"); + } + + /** + * Version: Memcache版本信息,默认为1.4.31 + * + * @param string $version + */ + public function setVersion(string $version) + { + $this->set("Version", $version); + } + + /** + * State: 状态标记 Creating // 初始化中 CreateFail // 创建失败 Deleting // 删除中 DeleteFail // 删除失败 Running // 运行 Resizing // 容量调整中 ResizeFail // 容量调整失败 Configing // 配置中 ConfigFail // 配置失败Restarting // 重启中 + * + * @return string|null + */ + public function getState(): string + { + return $this->get("State"); + } + + /** + * State: 状态标记 Creating // 初始化中 CreateFail // 创建失败 Deleting // 删除中 DeleteFail // 删除失败 Running // 运行 Resizing // 容量调整中 ResizeFail // 容量调整失败 Configing // 配置中 ConfigFail // 配置失败Restarting // 重启中 + * + * @param string $state + */ + public function setState(string $state) + { + $this->set("State", $state); + } + + /** + * CreateTime: 创建时间 (UNIX时间戳) + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 (UNIX时间戳) + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ModifyTime: 修改时间 (UNIX时间戳) + * + * @return integer|null + */ + public function getModifyTime(): int + { + return $this->get("ModifyTime"); + } + + /** + * ModifyTime: 修改时间 (UNIX时间戳) + * + * @param int $modifyTime + */ + public function setModifyTime(int $modifyTime) + { + $this->set("ModifyTime", $modifyTime); + } + + /** + * ExpireTime: 过期时间 (UNIX时间戳) + * + * @return integer|null + */ + public function getExpireTime(): int + { + return $this->get("ExpireTime"); + } + + /** + * ExpireTime: 过期时间 (UNIX时间戳) + * + * @param int $expireTime + */ + public function setExpireTime(int $expireTime) + { + $this->set("ExpireTime", $expireTime); + } + + /** + * ChargeType: 计费类型:Year,Month,Dynamic 默认Dynamic + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费类型:Year,Month,Dynamic 默认Dynamic + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Tag: 业务组名称 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组名称 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } +} diff --git a/src/UMem/Models/UMemcachePriceSet.php b/src/UMem/Models/UMemcachePriceSet.php new file mode 100644 index 00000000..d966e294 --- /dev/null +++ b/src/UMem/Models/UMemcachePriceSet.php @@ -0,0 +1,104 @@ +get("ChargeType"); + } + + /** + * ChargeType: 计费模式,Year, Month, Dynamic + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Price: 总价格 + * + * @return integer|null + */ + public function getPrice(): int + { + return $this->get("Price"); + } + + /** + * Price: 总价格 + * + * @param int $price + */ + public function setPrice(int $price) + { + $this->set("Price", $price); + } + + /** + * ListPrice: 产品列表价 + * + * @return integer|null + */ + public function getListPrice(): int + { + return $this->get("ListPrice"); + } + + /** + * ListPrice: 产品列表价 + * + * @param int $listPrice + */ + public function setListPrice(int $listPrice) + { + $this->set("ListPrice", $listPrice); + } + + /** + * OriginalPrice: 原价 + * + * @return integer|null + */ + public function getOriginalPrice(): int + { + return $this->get("OriginalPrice"); + } + + /** + * OriginalPrice: 原价 + * + * @param int $originalPrice + */ + public function setOriginalPrice(int $originalPrice) + { + $this->set("OriginalPrice", $originalPrice); + } +} diff --git a/src/UMem/Models/URedisBackupSet.php b/src/UMem/Models/URedisBackupSet.php new file mode 100644 index 00000000..376402bd --- /dev/null +++ b/src/UMem/Models/URedisBackupSet.php @@ -0,0 +1,204 @@ +get("BackupId"); + } + + /** + * BackupId: 备份ID + * + * @param string $backupId + */ + public function setBackupId(string $backupId) + { + $this->set("BackupId", $backupId); + } + + /** + * Zone: 可用区,参见[可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区,参见[可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * GroupId: 对应的实例ID + * + * @return string|null + */ + public function getGroupId(): string + { + return $this->get("GroupId"); + } + + /** + * GroupId: 对应的实例ID + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } + + /** + * GroupName: 组名称 + * + * @return string|null + */ + public function getGroupName(): string + { + return $this->get("GroupName"); + } + + /** + * GroupName: 组名称 + * + * @param string $groupName + */ + public function setGroupName(string $groupName) + { + $this->set("GroupName", $groupName); + } + + /** + * BackupName: 备份的名称 + * + * @return string|null + */ + public function getBackupName(): string + { + return $this->get("BackupName"); + } + + /** + * BackupName: 备份的名称 + * + * @param string $backupName + */ + public function setBackupName(string $backupName) + { + $this->set("BackupName", $backupName); + } + + /** + * BackupTime: 备份时间 (UNIX时间戳) + * + * @return integer|null + */ + public function getBackupTime(): int + { + return $this->get("BackupTime"); + } + + /** + * BackupTime: 备份时间 (UNIX时间戳) + * + * @param int $backupTime + */ + public function setBackupTime(int $backupTime) + { + $this->set("BackupTime", $backupTime); + } + + /** + * BackupSize: 备份文件大小, 以字节为单位 + * + * @return integer|null + */ + public function getBackupSize(): int + { + return $this->get("BackupSize"); + } + + /** + * BackupSize: 备份文件大小, 以字节为单位 + * + * @param int $backupSize + */ + public function setBackupSize(int $backupSize) + { + $this->set("BackupSize", $backupSize); + } + + /** + * BackupType: 备份类型: Manual 手动 Auto 自动 + * + * @return string|null + */ + public function getBackupType(): string + { + return $this->get("BackupType"); + } + + /** + * BackupType: 备份类型: Manual 手动 Auto 自动 + * + * @param string $backupType + */ + public function setBackupType(string $backupType) + { + $this->set("BackupType", $backupType); + } + + /** + * State: 备份的状态: Backuping 备份中 Success 备份成功 Error 备份失败 Expired 备份过期 + * + * @return string|null + */ + public function getState(): string + { + return $this->get("State"); + } + + /** + * State: 备份的状态: Backuping 备份中 Success 备份成功 Error 备份失败 Expired 备份过期 + * + * @param string $state + */ + public function setState(string $state) + { + $this->set("State", $state); + } +} diff --git a/src/UMem/Models/URedisConfigSet.php b/src/UMem/Models/URedisConfigSet.php new file mode 100644 index 00000000..f40f1a2f --- /dev/null +++ b/src/UMem/Models/URedisConfigSet.php @@ -0,0 +1,224 @@ +get("Zone"); + } + + /** + * Zone: Zone + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ConfigId: 配置ID + * + * @return string|null + */ + public function getConfigId(): string + { + return $this->get("ConfigId"); + } + + /** + * ConfigId: 配置ID + * + * @param string $configId + */ + public function setConfigId(string $configId) + { + $this->set("ConfigId", $configId); + } + + /** + * Name: 配置名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 配置名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Description: 配置描述 + * + * @return string|null + */ + public function getDescription(): string + { + return $this->get("Description"); + } + + /** + * Description: 配置描述 + * + * @param string $description + */ + public function setDescription(string $description) + { + $this->set("Description", $description); + } + + /** + * Version: 配置对应的Redis版本 + * + * @return string|null + */ + public function getVersion(): string + { + return $this->get("Version"); + } + + /** + * Version: 配置对应的Redis版本 + * + * @param string $version + */ + public function setVersion(string $version) + { + $this->set("Version", $version); + } + + /** + * IsModify: 置是否可以修改 + * + * @return string|null + */ + public function getIsModify(): string + { + return $this->get("IsModify"); + } + + /** + * IsModify: 置是否可以修改 + * + * @param string $isModify + */ + public function setIsModify(string $isModify) + { + $this->set("IsModify", $isModify); + } + + /** + * State: 配置所处的状态 + * + * @return string|null + */ + public function getState(): string + { + return $this->get("State"); + } + + /** + * State: 配置所处的状态 + * + * @param string $state + */ + public function setState(string $state) + { + $this->set("State", $state); + } + + /** + * CreateTime: 创建时间 (UNIX时间戳) + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 (UNIX时间戳) + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ModifyTime: 修改时间 (UNIX时间戳) + * + * @return integer|null + */ + public function getModifyTime(): int + { + return $this->get("ModifyTime"); + } + + /** + * ModifyTime: 修改时间 (UNIX时间戳) + * + * @param int $modifyTime + */ + public function setModifyTime(int $modifyTime) + { + $this->set("ModifyTime", $modifyTime); + } + + /** + * RegionFlag: 是否是跨机房URedis(默认false) + * + * @return boolean|null + */ + public function getRegionFlag(): bool + { + return $this->get("RegionFlag"); + } + + /** + * RegionFlag: 是否是跨机房URedis(默认false) + * + * @param boolean $regionFlag + */ + public function setRegionFlag(bool $regionFlag) + { + $this->set("RegionFlag", $regionFlag); + } +} diff --git a/src/UMem/Models/URedisGroupSet.php b/src/UMem/Models/URedisGroupSet.php new file mode 100644 index 00000000..586c68d8 --- /dev/null +++ b/src/UMem/Models/URedisGroupSet.php @@ -0,0 +1,564 @@ +get("Zone"); + } + + /** + * Zone: 实例所在可用区,或者master redis所在可用区,参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * RewriteTime: 返回运维时间 0 //0点 1 //1点 以此类推 + * + * @return integer|null + */ + public function getRewriteTime(): int + { + return $this->get("RewriteTime"); + } + + /** + * RewriteTime: 返回运维时间 0 //0点 1 //1点 以此类推 + * + * @param int $rewriteTime + */ + public function setRewriteTime(int $rewriteTime) + { + $this->set("RewriteTime", $rewriteTime); + } + + /** + * Role: 实例类型 + * + * @return string|null + */ + public function getRole(): string + { + return $this->get("Role"); + } + + /** + * Role: 实例类型 + * + * @param string $role + */ + public function setRole(string $role) + { + $this->set("Role", $role); + } + + /** + * VPCId: vpcid + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: vpcid + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: subnetid + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: subnetid + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * GroupId: 组ID + * + * @return string|null + */ + public function getGroupId(): string + { + return $this->get("GroupId"); + } + + /** + * GroupId: 组ID + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } + + /** + * Name: 组名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 组名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Type: 空间类型:single(无热备),double(热备) + * + * @return string|null + */ + public function getType(): string + { + return $this->get("Type"); + } + + /** + * Type: 空间类型:single(无热备),double(热备) + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } + + /** + * Protocol: 协议 + * + * @return string|null + */ + public function getProtocol(): string + { + return $this->get("Protocol"); + } + + /** + * Protocol: 协议 + * + * @param string $protocol + */ + public function setProtocol(string $protocol) + { + $this->set("Protocol", $protocol); + } + + /** + * MemorySize: 容量单位GB + * + * @return integer|null + */ + public function getMemorySize(): int + { + return $this->get("MemorySize"); + } + + /** + * MemorySize: 容量单位GB + * + * @param int $memorySize + */ + public function setMemorySize(int $memorySize) + { + $this->set("MemorySize", $memorySize); + } + + /** + * GroupName: 组名称 + * + * @return string|null + */ + public function getGroupName(): string + { + return $this->get("GroupName"); + } + + /** + * GroupName: 组名称 + * + * @param string $groupName + */ + public function setGroupName(string $groupName) + { + $this->set("GroupName", $groupName); + } + + /** + * ConfigId: 节点的配置ID + * + * @return string|null + */ + public function getConfigId(): string + { + return $this->get("ConfigId"); + } + + /** + * ConfigId: 节点的配置ID + * + * @param string $configId + */ + public function setConfigId(string $configId) + { + $this->set("ConfigId", $configId); + } + + /** + * VirtualIP: 节点的虚拟IP地址 + * + * @return string|null + */ + public function getVirtualIP(): string + { + return $this->get("VirtualIP"); + } + + /** + * VirtualIP: 节点的虚拟IP地址 + * + * @param string $virtualIP + */ + public function setVirtualIP(string $virtualIP) + { + $this->set("VirtualIP", $virtualIP); + } + + /** + * Port: 节点分配的服务端口 + * + * @return integer|null + */ + public function getPort(): int + { + return $this->get("Port"); + } + + /** + * Port: 节点分配的服务端口 + * + * @param int $port + */ + public function setPort(int $port) + { + $this->set("Port", $port); + } + + /** + * Size: 容量单位GB + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 容量单位GB + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * UsedSize: 使用量单位MB + * + * @return integer|null + */ + public function getUsedSize(): int + { + return $this->get("UsedSize"); + } + + /** + * UsedSize: 使用量单位MB + * + * @param int $usedSize + */ + public function setUsedSize(int $usedSize) + { + $this->set("UsedSize", $usedSize); + } + + /** + * AutoBackup: 是否需要自动备份,enable,disable + * + * @return string|null + */ + public function getAutoBackup(): string + { + return $this->get("AutoBackup"); + } + + /** + * AutoBackup: 是否需要自动备份,enable,disable + * + * @param string $autoBackup + */ + public function setAutoBackup(string $autoBackup) + { + $this->set("AutoBackup", $autoBackup); + } + + /** + * BackupTime: 组自动备份开始时间,单位小时计,范围[0-23] + * + * @return integer|null + */ + public function getBackupTime(): int + { + return $this->get("BackupTime"); + } + + /** + * BackupTime: 组自动备份开始时间,单位小时计,范围[0-23] + * + * @param int $backupTime + */ + public function setBackupTime(int $backupTime) + { + $this->set("BackupTime", $backupTime); + } + + /** + * HighAvailability: 是否开启高可用,enable,disable + * + * @return string|null + */ + public function getHighAvailability(): string + { + return $this->get("HighAvailability"); + } + + /** + * HighAvailability: 是否开启高可用,enable,disable + * + * @param string $highAvailability + */ + public function setHighAvailability(string $highAvailability) + { + $this->set("HighAvailability", $highAvailability); + } + + /** + * Version: Redis版本信息 + * + * @return string|null + */ + public function getVersion(): string + { + return $this->get("Version"); + } + + /** + * Version: Redis版本信息 + * + * @param string $version + */ + public function setVersion(string $version) + { + $this->set("Version", $version); + } + + /** + * ExpireTime: 过期时间 (UNIX时间戳) + * + * @return integer|null + */ + public function getExpireTime(): int + { + return $this->get("ExpireTime"); + } + + /** + * ExpireTime: 过期时间 (UNIX时间戳) + * + * @param int $expireTime + */ + public function setExpireTime(int $expireTime) + { + $this->set("ExpireTime", $expireTime); + } + + /** + * ChargeType: 计费类型:Year,Month,Dynamic 默认Dynamic + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费类型:Year,Month,Dynamic 默认Dynamic + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * State: 状态标记 Creating // 初始化中 CreateFail // 创建失败 Deleting // 删除中 DeleteFail // 删除失败 Running // 运行 Resizing // 容量调整中 ResizeFail // 容量调整失败 Configing // 配置中 ConfigFail // 配置失败 + * + * @return string|null + */ + public function getState(): string + { + return $this->get("State"); + } + + /** + * State: 状态标记 Creating // 初始化中 CreateFail // 创建失败 Deleting // 删除中 DeleteFail // 删除失败 Running // 运行 Resizing // 容量调整中 ResizeFail // 容量调整失败 Configing // 配置中 ConfigFail // 配置失败 + * + * @param string $state + */ + public function setState(string $state) + { + $this->set("State", $state); + } + + /** + * CreateTime: 创建时间 (UNIX时间戳) + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 (UNIX时间戳) + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ModifyTime: 修改时间 (UNIX时间戳) + * + * @return integer|null + */ + public function getModifyTime(): int + { + return $this->get("ModifyTime"); + } + + /** + * ModifyTime: 修改时间 (UNIX时间戳) + * + * @param int $modifyTime + */ + public function setModifyTime(int $modifyTime) + { + $this->set("ModifyTime", $modifyTime); + } + + /** + * Tag: 业务组名称 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组名称 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * SlaveZone: 跨机房URedis,slave redis所在可用区,参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getSlaveZone(): string + { + return $this->get("SlaveZone"); + } + + /** + * SlaveZone: 跨机房URedis,slave redis所在可用区,参见 [可用区列表](../summary/regionlist.html) + * + * @param string $slaveZone + */ + public function setSlaveZone(string $slaveZone) + { + $this->set("SlaveZone", $slaveZone); + } +} diff --git a/src/UMem/Models/URedisPriceSet.php b/src/UMem/Models/URedisPriceSet.php new file mode 100644 index 00000000..b8da4e66 --- /dev/null +++ b/src/UMem/Models/URedisPriceSet.php @@ -0,0 +1,104 @@ +get("OriginalPrice"); + } + + /** + * OriginalPrice: 原价 + * + * @param int $originalPrice + */ + public function setOriginalPrice(int $originalPrice) + { + $this->set("OriginalPrice", $originalPrice); + } + + /** + * ChargeType: Year, Month, Dynamic,Trial + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: Year, Month, Dynamic,Trial + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * ListPrice: 产品列表价 + * + * @return integer|null + */ + public function getListPrice(): int + { + return $this->get("ListPrice"); + } + + /** + * ListPrice: 产品列表价 + * + * @param int $listPrice + */ + public function setListPrice(int $listPrice) + { + $this->set("ListPrice", $listPrice); + } + + /** + * Price: 总价格 + * + * @return integer|null + */ + public function getPrice(): int + { + return $this->get("Price"); + } + + /** + * Price: 总价格 + * + * @param int $price + */ + public function setPrice(int $price) + { + $this->set("Price", $price); + } +} diff --git a/src/UMem/Models/URedisSlowlogSet.php b/src/UMem/Models/URedisSlowlogSet.php new file mode 100644 index 00000000..e7c7dfa7 --- /dev/null +++ b/src/UMem/Models/URedisSlowlogSet.php @@ -0,0 +1,84 @@ +get("StartTime"); + } + + /** + * StartTime: 查询发生的时间 + * + * @param int $startTime + */ + public function setStartTime(int $startTime) + { + $this->set("StartTime", $startTime); + } + + /** + * SpendTime: 查询消耗的时间 + * + * @return integer|null + */ + public function getSpendTime(): int + { + return $this->get("SpendTime"); + } + + /** + * SpendTime: 查询消耗的时间 + * + * @param int $spendTime + */ + public function setSpendTime(int $spendTime) + { + $this->set("SpendTime", $spendTime); + } + + /** + * Command: 查询命令 + * + * @return string|null + */ + public function getCommand(): string + { + return $this->get("Command"); + } + + /** + * Command: 查询命令 + * + * @param string $command + */ + public function setCommand(string $command) + { + $this->set("Command", $command); + } +} diff --git a/src/UMem/Models/URedisVersionSet.php b/src/UMem/Models/URedisVersionSet.php new file mode 100644 index 00000000..87f0e6e1 --- /dev/null +++ b/src/UMem/Models/URedisVersionSet.php @@ -0,0 +1,44 @@ +get("Version"); + } + + /** + * Version: Redis版本 + * + * @param string $version + */ + public function setVersion(string $version) + { + $this->set("Version", $version); + } +} diff --git a/src/UMem/UMemClient.php b/src/UMem/UMemClient.php new file mode 100644 index 00000000..0d625578 --- /dev/null +++ b/src/UMem/UMemClient.php @@ -0,0 +1,1558 @@ + (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Size" => (integer) 创建实例的容量大小,,扩容时的分片目标容量大小 + * "Count" => (string) 创建实例的数量,[1-10] + * "GroupId" => (string) 资源ID,扩缩容时的必传参数 + * ] + * + * Outputs: + * + * $outputs = [ + * "Count" => (integer) 创建实例资源时,表示可创建的数量;扩容资源时,返回1表示可以扩容,0表示可用区资源不足不能扩容 + * ] + * + * @throws UCloudException + */ + public function checkUDredisSpaceAllowance(CheckUDredisSpaceAllowanceRequest $request = null): CheckUDredisSpaceAllowanceResponse + { + $resp = $this->invoke($request); + return new CheckUDredisSpaceAllowanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CheckURedisAllowance - 检查主备Redis的资源是否足够创建新实例,以及主备Redis的扩容资源预检查 + * + * See also: https://docs.ucloud.cn/api/UMem-api/check_uredis_allowance + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Size" => (integer) 创建实例的容量大小, 单位:GB 目前仅支持1/2/4/8/16/32六种规格;扩缩容时,表示实例的目标资源大小 + * "Count" => (integer) 创建实例的数量,[1-10] + * "Protocol" => (string) + * "RegionFlag" => (boolean) 是否是跨机房URedis(默认false) + * "GroupId" => (string) 资源ID,扩容实例资源时的必传参数 + * ] + * + * Outputs: + * + * $outputs = [ + * "Count" => (integer) 创建实例资源时,表示可创建的数量;扩容资源时,返回1表示可以扩容,0表示可用区资源不足不能扩容 + * ] + * + * @throws UCloudException + */ + public function checkURedisAllowance(CheckURedisAllowanceRequest $request = null): CheckURedisAllowanceResponse + { + $resp = $this->invoke($request); + return new CheckURedisAllowanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUMemBackup - 创建分布式redis备份 + * + * See also: https://docs.ucloud.cn/api/UMem-api/create_umem_backup + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "SpaceId" => (string) 资源id + * "BackupName" => (string) 请求创建备份的名称 (范围[6-63],只能包含英文、数字以及符号-和_) + * ] + * + * Outputs: + * + * $outputs = [ + * "BackupId" => (string) 备份Id + * ] + * + * @throws UCloudException + */ + public function createUMemBackup(CreateUMemBackupRequest $request = null): CreateUMemBackupResponse + { + $resp = $this->invoke($request); + return new CreateUMemBackupResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUMemSpace - 创建UMem内存空间 + * + * See also: https://docs.ucloud.cn/api/UMem-api/create_umem_space + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Size" => (integer) 内存大小, 单位:GB, 范围[1~1024] + * "Name" => (string) 空间名称,长度(6<=size<=63) + * "Protocol" => (string) 协议:memcache, redis (默认redis).注意:redis无single类型 + * "Type" => (string) 空间类型:single(无热备),double(热备)(默认: double) + * "ChargeType" => (string) Year , Month, Dynamic, Trial 默认: Month + * "Quantity" => (integer) 购买时长 默认: 1 + * "CouponId" => (string) 使用的代金券id + * ] + * + * Outputs: + * + * $outputs = [ + * "SpaceId" => (string) 创建内存空间ID列表 + * ] + * + * @throws UCloudException + */ + public function createUMemSpace(CreateUMemSpaceRequest $request = null): CreateUMemSpaceResponse + { + $resp = $this->invoke($request); + return new CreateUMemSpaceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUMemcacheGroup - 创建单机Memcache + * + * See also: https://docs.ucloud.cn/api/UMem-api/create_umem_cache_group + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Name" => (string) 请求创建组的名称 范围[6-60] + * "Size" => (integer) 每个节点的内存大小,单位GB,默认1GB 目前仅支持1/2/4/8/16/32这几档 + * "ConfigId" => (string) 配置ID,目前仅支持默认配置id 默认配置id:"9a891891-c245-4b66-bce8-67e59430d67c" + * "Version" => (string) Memcache版本信息,默认为1.4.31 + * "ChargeType" => (string) 计费模式,Year , Month, Dynamic 默认: Month + * "Quantity" => (integer) 购买时长,默认为1 + * "Tag" => (string) 业务组 默认:Default + * "Protocol" => (string) + * "CouponId" => (string) 代金券ID + * ] + * + * Outputs: + * + * $outputs = [ + * "GroupId" => (string) 创建的组ID + * ] + * + * @throws UCloudException + */ + public function createUMemcacheGroup(CreateUMemcacheGroupRequest $request = null): CreateUMemcacheGroupResponse + { + $resp = $this->invoke($request); + return new CreateUMemcacheGroupResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateURedisBackup - 创建主备Redis备份 + * + * See also: https://docs.ucloud.cn/api/UMem-api/create_uredis_backup + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "GroupId" => (string) 资源id + * "BackupName" => (string) 请求创建组的名称 (范围[6-63],只能包含英文、数字以及符号-和_) + * "SlaveZone" => (string) 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) + * ] + * + * Outputs: + * + * $outputs = [ + * "BackupId" => (string) 备份id + * ] + * + * @throws UCloudException + */ + public function createURedisBackup(CreateURedisBackupRequest $request = null): CreateURedisBackupResponse + { + $resp = $this->invoke($request); + return new CreateURedisBackupResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateURedisGroup - 创建主备redis + * + * See also: https://docs.ucloud.cn/api/UMem-api/create_uredis_group + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Name" => (string) 请求创建组的名称 (范围[6-63],只能包含英文、数字以及符号-和_) + * "HighAvailability" => (string) 是否开启高可用,enable或disable + * "Size" => (integer) 每个节点的内存大小,单位GB,默认1GB,目前仅支持1/2/4/8/16/32,六种 + * "AutoBackup" => (string) 是否自动备份,enable或disable,默认disable + * "BackupTime" => (integer) 自动备份开始时间,范围[0-23],默认3点 + * "ConfigId" => (string) 配置ID,目前支持 3.0版本配置ID:"03f58ca9-b64d-4bdd-abc7-c6b9a46fd801",3.2版本配置ID:"3e45ac48-f8a2-a9q2-261d-l342dab130gf", 4.0版本配置ID:"6c9298a3-9d7f-428c-b1d0-e87ab3b8a1ea",默认版本3.0,从备份创建为必传项 + * "Version" => (string) Redis版本信息(详见DescribeURedisVersion返回结果),默认版本3.0 + * "ChargeType" => (string) 计费模式,Year , Month, Dynamic 默认: Month + * "Quantity" => (integer) 购买时长,默认为1 + * "Tag" => (string) 业务组名称 + * "Password" => (string) 初始化密码,需要 base64 编码 + * "BackupId" => (string) 有此项代表从备份中创建,无代表正常创建 + * "SlaveZone" => (string) 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) + * "MasterGroupId" => (string) Master Redis Group的ID,创建只读Slave时,必须填写 + * "EnableIpV6" => (boolean) 是否创建使用ipv6 资源, 默认为false, 或者不填, 创建ipv6为true + * "SubnetId" => (string) 子网ID + * "VPCId" => (string) VPC的ID + * "CouponId" => (string) 代金券ID + * ] + * + * Outputs: + * + * $outputs = [ + * "GroupId" => (string) 创建的组ID + * ] + * + * @throws UCloudException + */ + public function createURedisGroup(CreateURedisGroupRequest $request = null): CreateURedisGroupResponse + { + $resp = $this->invoke($request); + return new CreateURedisGroupResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteUMemSpace - 删除UMem内存空间 + * + * See also: https://docs.ucloud.cn/api/UMem-api/delete_umem_space + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "SpaceId" => (string) UMem内存空间ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteUMemSpace(DeleteUMemSpaceRequest $request = null): DeleteUMemSpaceResponse + { + $resp = $this->invoke($request); + return new DeleteUMemSpaceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteUMemcacheGroup - 删除单机Memcache + * + * See also: https://docs.ucloud.cn/api/UMem-api/delete_umem_cache_group + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "GroupId" => (string) 组ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteUMemcacheGroup(DeleteUMemcacheGroupRequest $request = null): DeleteUMemcacheGroupResponse + { + $resp = $this->invoke($request); + return new DeleteUMemcacheGroupResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteURedisGroup - 删除主备redis + * + * See also: https://docs.ucloud.cn/api/UMem-api/delete_uredis_group + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "GroupId" => (string) 组ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteURedisGroup(DeleteURedisGroupRequest $request = null): DeleteURedisGroupResponse + { + $resp = $this->invoke($request); + return new DeleteURedisGroupResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUDRedisSlowlog - 查询UDRedis慢日志 + * + * See also: https://docs.ucloud.cn/api/UMem-api/describe_ud_redis_slowlog + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "InstanceId" => (string) 实例id + * "Limit" => (integer) 分页显示的条目数,默认为10 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 总条目数 + * "DataSet" => (array) 条目数据[ + * [ + * "StartTime" => (integer) 查询发生的时间 + * "SpendTime" => (integer) 查询消耗的时间 + * "Command" => (string) 查询命令 + * "BlockId" => (string) 分片id + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeUDRedisSlowlog(DescribeUDRedisSlowlogRequest $request = null): DescribeUDRedisSlowlogResponse + { + $resp = $this->invoke($request); + return new DescribeUDRedisSlowlogResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUMem - 获取UMem列表 + * + * See also: https://docs.ucloud.cn/api/UMem-api/describe_umem + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Protocol" => (string) 协议类型: memcache, redis + * "Offset" => (integer) 分页显示的起始偏移, 默认值为0 + * "Limit" => (integer) 分页显示的条目数, 默认值为20 + * "ResourceId" => (string) 资源ID + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 根据过滤条件得到的总数 + * "DataSet" => (array) UMem实例列表, 详细参见UMemDataSet[ + * [ + * "Zone" => (string) 实例所在可用区,或者master redis所在可用区,参见 [可用区列表](../summary/regionlist.html) + * "OwnSlave" => (string) 是否拥有只读Slave“Yes” 包含“No” 不包含 + * "DataSet" => (array) UMEM实例列表 UMemSlaveDataSet 如果没有slave,则没有该字段[ + * [ + * "Zone" => (string) 实例所在可用区,或者master redis所在可用区,参见 [可用区列表](../summary/regionlist.html) + * "SubnetId" => (string) 子网 + * "VPCId" => (string) vpc + * "VirtualIP" => (string) + * "RewriteTime" => (integer) 主备Redis返回运维时间 0//0点 1 //1点 以此类推 + * "MasterGroupId" => (string) 主实例id + * "GroupId" => (string) 资源id + * "Port" => (integer) 端口 + * "MemorySize" => (integer) 实力大小 + * "GroupName" => (string) 资源名称 + * "Role" => (string) 表示实例是主库还是从库,master,slave + * "ModifyTime" => (integer) 修改时间 + * "Name" => (string) 资源名称 + * "CreateTime" => (integer) 创建时间 + * "ExpireTime" => (integer) 到期时间 + * "Size" => (integer) 容量单位GB + * "UsedSize" => (integer) 使用量单位MB + * "State" => (string) 实例状态 Starting // 创建中 Creating // 初始化中 CreateFail // 创建失败 Fail // 创建失败 Deleting // 删除中 DeleteFail // 删除失败 Running // 运行 Resizing // 容量调整中 ResizeFail // 容量调整失败 Configing // 配置中 ConfigFail // 配置失败Restarting // 重启中SetPasswordFail //设置密码失败 + * "ChargeType" => (string) 计费模式,Year, Month, Dynamic, Trial + * "Tag" => (string) 业务组名称 + * "ResourceType" => (string) distributed: 分布式版Redis,或者分布式Memcache;single:主备版Redis,或者单机Memcache;performance:高性能版 + * "ConfigId" => (string) 节点的配置ID + * "Version" => (string) Redis版本信息 + * ] + * ] + * "Role" => (string) 表示实例是主库还是从库,master,slave仅主备redis返回该项参数 + * "RewriteTime" => (integer) 主备redis和分布式redis运维时间0 //0点1 //1点以此类推单机版memcache不返回该项 + * "VPCId" => (string) vpc + * "SubnetId" => (string) 子网 + * "ResourceId" => (string) 资源ID + * "Name" => (string) 资源名称 + * "CreateTime" => (integer) 创建时间 + * "ExpireTime" => (integer) 到期时间 + * "Type" => (string) 空间类型:single(无热备),double(热备) + * "Protocol" => (string) 协议类型: memcache, redis + * "Size" => (integer) 容量单位GB + * "UsedSize" => (integer) 使用量单位MB + * "State" => (string) 实例状态 Starting // 创建中 Creating // 初始化中 CreateFail // 创建失败 Fail // 创建失败 Deleting // 删除中 DeleteFail // 删除失败 Running // 运行 Resizing // 容量调整中 ResizeFail // 容量调整失败 Configing // 配置中 ConfigFail // 配置失败Restarting // 重启中SetPasswordFail //设置密码失败 + * "ChargeType" => (string) 计费模式,Year, Month, Dynamic, Trial + * "Address" => (array) IP端口信息请,参见UMemSpaceAddressSet[ + * [ + * "IP" => (string) UMem实例访问IP + * "Port" => (integer) UMem实例访问Port + * ] + * ] + * "Tag" => (string) 业务组名称 + * "ResourceType" => (string) distributed: 分布式版Redis,或者分布式Memcache;single:主备版Redis,或者单机Memcache;performance:高性能版 + * "ConfigId" => (string) 节点的配置ID + * "AutoBackup" => (string) 是否需要自动备份,enable,disable + * "BackupTime" => (integer) 自动备份开始时间,单位小时计,范围[0-23] + * "HighAvailability" => (string) 是否开启高可用,enable,disable + * "Version" => (string) Redis版本信息 + * "SlaveZone" => (string) 跨机房URedis,slave redis所在可用区,参见 [可用区列表](../summary/regionlist.html) + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeUMem(DescribeUMemRequest $request = null): DescribeUMemResponse + { + $resp = $this->invoke($request); + return new DescribeUMemResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUMemBackup - 查询分布式redis备份 + * + * See also: https://docs.ucloud.cn/api/UMem-api/describe_umem_backup + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "SpaceId" => (string) 资源id + * "Offset" => (integer) 分页显示的起始偏移, 默认值为0 + * "Limit" => (integer) 分页显示的条目数, 默认值为10 + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 分布式redis 备份,数组的每个元素为每个分片的备份[ + * [ + * "BackupName" => (string) 备份名称 + * "CreateTime" => (integer) 创建时间 + * "State" => (string) Starting:备份中 Done:完成 + * "BackupId" => (string) 空间的备份ID + * "BackupType" => (string) 备份类型: auto(自动) ,manual(手动) + * "BlockCount" => (integer) 本次备份,分片的数量 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeUMemBackup(DescribeUMemBackupRequest $request = null): DescribeUMemBackupResponse + { + $resp = $this->invoke($request); + return new DescribeUMemBackupResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUMemBackupURL - 获取分布式redis 备份下载链接 + * + * See also: https://docs.ucloud.cn/api/UMem-api/describe_umem_backup_url + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "SpaceId" => (string) 资源id + * "BackupId" => (string) 备份Id + * "BlockId" => (string) 分片id + * ] + * + * Outputs: + * + * $outputs = [ + * "BackupURL" => (array) 备份url,每个分片一个下载URL + * ] + * + * @throws UCloudException + */ + public function describeUMemBackupURL(DescribeUMemBackupURLRequest $request = null): DescribeUMemBackupURLResponse + { + $resp = $this->invoke($request); + return new DescribeUMemBackupURLResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUMemBlockInfo - 拉取UDRedis分片信息 + * + * See also: https://docs.ucloud.cn/api/UMem-api/describe_umem_block_info + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "SpaceId" => (string) UMem内存资源ID + * "Offset" => (integer) 分页显示的起始偏移, 默认值为0 + * "Limit" => (integer) 分页显示的条目数, 默认值为10 + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 分布式redis 分片信息[ + * [ + * "BlockId" => (string) 分片id + * "BlockVip" => (string) 分片ip + * "BlockPort" => (integer) 分片端口 + * "BlockSize" => (integer) 容量单位GB + * "BlockUsedSize" => (integer) 使用量单位MB + * "BlockState" => (string) 实例状态 Starting // 创建中 Creating // 初始化中 CreateFail // 创建失败 Fail // 创建失败 Deleting // 删除中 DeleteFail // 删除失败 Running // 运行 Resizing // 容量调整中 ResizeFail // 容量调整失败 Configing // 配置中 ConfigFail // 配置失败Restarting // 重启中 SetPasswordFail //设置密码失败 + * "BlockSlotBegin" => (integer) 分片维护的键槽起始值 + * "BlockSlotEnd" => (integer) 分片维护的键槽结束值 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeUMemBlockInfo(DescribeUMemBlockInfoRequest $request = null): DescribeUMemBlockInfoResponse + { + $resp = $this->invoke($request); + return new DescribeUMemBlockInfoResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUMemPrice - 获取UMem实例价格信息 + * + * See also: https://docs.ucloud.cn/api/UMem-api/describe_umem_price + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Size" => (integer) 购买umem大小,单位:GB,范围[1~1024] + * "Type" => (string) 空间类型:single(无热备),double(热备)(默认: double) + * "ChargeType" => (string) Year, Month, Dynamic 如果不指定,则一次性获取三种计费 + * "Quantity" => (integer) 购买UMem的时长,默认值为1 + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 价格 参数见 UMemPriceSet[ + * [ + * "ChargeType" => (string) Year, Month, Dynamic,Trial + * "Price" => (integer) 现价 + * "OriginalPrice" => (integer) 原价 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeUMemPrice(DescribeUMemPriceRequest $request = null): DescribeUMemPriceResponse + { + $resp = $this->invoke($request); + return new DescribeUMemPriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUMemSpace - 获取UMem内存空间列表 + * + * See also: https://docs.ucloud.cn/api/UMem-api/describe_umem_space + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Offset" => (integer) 数据偏移量, 默认为0 + * "Limit" => (integer) 返回数据长度, 默认为20 + * "SpaceId" => (string) 内存空间ID (无ID,则获取所有) + * "Protocol" => (string) 协议类型: memcache, redis + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) JSON 格式的UMem内存空间实例列表, 详细参见 UMemSpaceSet[ + * [ + * "Zone" => (string) 可用区,参见[可用区列表](../summary/regionlist.html) + * "Tag" => (string) + * "RewriteTime" => (integer) 运维时间0 //0点1 //1点依次类推 + * "SpaceId" => (string) 内存空间ID + * "SubnetId" => (string) + * "VPCId" => (string) + * "Name" => (string) 内存空间名称 + * "CreateTime" => (integer) 创建时间 + * "ExpireTime" => (integer) 到期时间 + * "Type" => (string) 空间类型:single(无热备),double(热备) + * "Protocol" => (string) 协议类型: memcache, redis + * "Size" => (integer) 容量单位GB + * "UsedSize" => (integer) 使用量单位MB + * "State" => (string) Starting:创建中 Running:运行中 Fail:失败 + * "ChargeType" => (string) Year, Month, Dynamic, Trial + * "Address" => (array) IP端口信息请参见 UMemSpaceAddressSet[ + * [ + * "IP" => (string) UMem实例访问IP + * "Port" => (integer) UMem实例访问Port + * ] + * ] + * ] + * ] + * "TotalCount" => (integer) 根据过滤条件得到的总数 + * ] + * + * @throws UCloudException + */ + public function describeUMemSpace(DescribeUMemSpaceRequest $request = null): DescribeUMemSpaceResponse + { + $resp = $this->invoke($request); + return new DescribeUMemSpaceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUMemUpgradePrice - 获取UMem升级价格信息 + * + * See also: https://docs.ucloud.cn/api/UMem-api/describe_umem_upgrade_price + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Size" => (integer) 购买UMem大小,单位:GB + * "Type" => (string) 空间类型:single(无热备),double(热备)(默认: double) + * "SpaceId" => (string) 需要升级的空间的SpaceId + * ] + * + * Outputs: + * + * $outputs = [ + * "Price" => (integer) 价格 + * "OriginalPrice" => (integer) 原价 + * ] + * + * @throws UCloudException + */ + public function describeUMemUpgradePrice(DescribeUMemUpgradePriceRequest $request = null): DescribeUMemUpgradePriceResponse + { + $resp = $this->invoke($request); + return new DescribeUMemUpgradePriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUMemcacheGroup - 显示Memcache + * + * See also: https://docs.ucloud.cn/api/UMem-api/describe_umem_cache_group + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "GroupId" => (string) 组的ID,如果指定则获取描述,否则为列表操 作,需指定Offset/Limit + * "Offset" => (integer) 分页显示的起始偏移, 默认值为0 + * "Limit" => (integer) 分页显示的条目数, 默认值为20 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 组的总的节点个数 + * "DataSet" => (array) 组列表,参见 UMemcacheGroupSet[ + * [ + * "GroupId" => (string) 组ID + * "Name" => (string) 组名称 + * "ConfigId" => (string) 节点的配置ID + * "VirtualIP" => (string) 节点的虚拟IP地址 + * "Port" => (integer) 节点分配的服务端口 + * "Size" => (integer) 容量单位GB + * "UsedSize" => (integer) 使用量单位MB + * "Version" => (string) Memcache版本信息,默认为1.4.31 + * "State" => (string) 状态标记 Creating // 初始化中 CreateFail // 创建失败 Deleting // 删除中 DeleteFail // 删除失败 Running // 运行 Resizing // 容量调整中 ResizeFail // 容量调整失败 Configing // 配置中 ConfigFail // 配置失败Restarting // 重启中 + * "CreateTime" => (integer) 创建时间 (UNIX时间戳) + * "ModifyTime" => (integer) 修改时间 (UNIX时间戳) + * "ExpireTime" => (integer) 过期时间 (UNIX时间戳) + * "ChargeType" => (string) 计费类型:Year,Month,Dynamic 默认Dynamic + * "Tag" => (string) 业务组名称 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeUMemcacheGroup(DescribeUMemcacheGroupRequest $request = null): DescribeUMemcacheGroupResponse + { + $resp = $this->invoke($request); + return new DescribeUMemcacheGroupResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUMemcachePrice - 获取umemcache组价格信息 + * + * See also: https://docs.ucloud.cn/api/UMem-api/describe_umem_cache_price + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Size" => (integer) 容量大小,单位:GB 取值范围[1-32] + * "ChargeType" => (string) 计费模式,Year, Month, Dynamic,默认: Dynamic 默认: 获取所有计费模式的价格 + * "Quantity" => (integer) 购买umemcache的时长,默认值为1 + * "Type" => (string) 空间类型:single(无热备),double(热备)(默认: double) + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 价格列表, 参见 UMemcachePriceSet[ + * [ + * "ChargeType" => (string) 计费模式,Year, Month, Dynamic + * "Price" => (integer) 总价格 + * "ListPrice" => (integer) 产品列表价 + * "OriginalPrice" => (integer) 原价 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeUMemcachePrice(DescribeUMemcachePriceRequest $request = null): DescribeUMemcachePriceResponse + { + $resp = $this->invoke($request); + return new DescribeUMemcachePriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUMemcacheUpgradePrice - 获取umemcache升级价格信息 + * + * See also: https://docs.ucloud.cn/api/UMem-api/describe_umem_cache_upgrade_price + * + * Arguments: + * + * $args = [ + * "Size" => (integer) 购买umemcache大小,单位:GB + * "GroupId" => (string) 需要升级的空间的GroupId,请参考DescribeUMemcacheGroup接口 + * ] + * + * Outputs: + * + * $outputs = [ + * "Price" => (number) 价格,单位:元 + * ] + * + * @throws UCloudException + */ + public function describeUMemcacheUpgradePrice(DescribeUMemcacheUpgradePriceRequest $request = null): DescribeUMemcacheUpgradePriceResponse + { + $resp = $this->invoke($request); + return new DescribeUMemcacheUpgradePriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeURedisBackup - 查询主备redis备份 + * + * See also: https://docs.ucloud.cn/api/UMem-api/describe_uredis_backup + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Offset" => (integer) 分页显示的起始偏移, 默认值为0 + * "Limit" => (integer) 分页显示的条目数, 默认值为10 + * "GroupId" => (string) 组的ID + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 用户名下总的备份个数 + * "DataSet" => (array) 备份列表 参见 URedisBackupSet[ + * [ + * "BackupId" => (string) 备份ID + * "Zone" => (string) 可用区,参见[可用区列表](../summary/regionlist.html) + * "GroupId" => (string) 对应的实例ID + * "GroupName" => (string) 组名称 + * "BackupName" => (string) 备份的名称 + * "BackupTime" => (integer) 备份时间 (UNIX时间戳) + * "BackupSize" => (integer) 备份文件大小, 以字节为单位 + * "BackupType" => (string) 备份类型: Manual 手动 Auto 自动 + * "State" => (string) 备份的状态: Backuping 备份中 Success 备份成功 Error 备份失败 Expired 备份过期 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeURedisBackup(DescribeURedisBackupRequest $request = null): DescribeURedisBackupResponse + { + $resp = $this->invoke($request); + return new DescribeURedisBackupResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeURedisBackupURL - 获取主备Redis备份下载链接 + * + * See also: https://docs.ucloud.cn/api/UMem-api/describe_uredis_backup_url + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "BackupId" => (string) 备份ID + * "RegionFlag" => (boolean) 是否是跨机房URedis(默认false) + * "GroupId" => (string) 实例名称 + * "SlaveZone" => (string) 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) + * ] + * + * Outputs: + * + * $outputs = [ + * "BackupURL" => (string) 备份文件公网的地址 + * "BackupPath" => (string) 备份文件公网的地址 + * ] + * + * @throws UCloudException + */ + public function describeURedisBackupURL(DescribeURedisBackupURLRequest $request = null): DescribeURedisBackupURLResponse + { + $resp = $this->invoke($request); + return new DescribeURedisBackupURLResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeURedisConfig - 查询主备Redis所有配置文件 + * + * See also: https://docs.ucloud.cn/api/UMem-api/describe_uredis_config + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "RegionFlag" => (boolean) 是否是跨机房URedis(默认false) + * "Version" => (string) Redis版本号 + * "ConfigId" => (string) 配置文件ID + * "Offset" => (integer) 页显示的起始偏移, 默认值为0 + * "Limit" => (integer) 页显示的条目数, 默认值为10 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 根据过滤条件得到的总数 + * "DataSet" => (array) 配置文件列表 参见 URedisConfigSet[ + * [ + * "Zone" => (string) Zone + * "ConfigId" => (string) 配置ID + * "Name" => (string) 配置名称 + * "Description" => (string) 配置描述 + * "Version" => (string) 配置对应的Redis版本 + * "IsModify" => (string) 置是否可以修改 + * "State" => (string) 配置所处的状态 + * "CreateTime" => (integer) 创建时间 (UNIX时间戳) + * "ModifyTime" => (integer) 修改时间 (UNIX时间戳) + * "RegionFlag" => (boolean) 是否是跨机房URedis(默认false) + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeURedisConfig(DescribeURedisConfigRequest $request = null): DescribeURedisConfigResponse + { + $resp = $this->invoke($request); + return new DescribeURedisConfigResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeURedisGroup - 查询主备Redis + * + * See also: https://docs.ucloud.cn/api/UMem-api/describe_uredis_group + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "GroupId" => (string) 组的ID,如果指定则获取描述,否则为列表操 作,需指定Offset/Limit + * "Offset" => (integer) 分页显示的起始偏移, 默认值为0 + * "Limit" => (integer) 分页显示的条目数, 默认值为20 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 组的总的节点个数 + * "DataSet" => (array) 组列表 参见 URedisGroupSet[ + * [ + * "Zone" => (string) 实例所在可用区,或者master redis所在可用区,参见 [可用区列表](../summary/regionlist.html) + * "RewriteTime" => (integer) 返回运维时间 0 //0点 1 //1点 以此类推 + * "Role" => (string) 实例类型 + * "VPCId" => (string) vpcid + * "SubnetId" => (string) subnetid + * "GroupId" => (string) 组ID + * "Name" => (string) 组名称 + * "Type" => (string) 空间类型:single(无热备),double(热备) + * "Protocol" => (string) 协议 + * "MemorySize" => (integer) 容量单位GB + * "GroupName" => (string) 组名称 + * "ConfigId" => (string) 节点的配置ID + * "VirtualIP" => (string) 节点的虚拟IP地址 + * "Port" => (integer) 节点分配的服务端口 + * "Size" => (integer) 容量单位GB + * "UsedSize" => (integer) 使用量单位MB + * "AutoBackup" => (string) 是否需要自动备份,enable,disable + * "BackupTime" => (integer) 组自动备份开始时间,单位小时计,范围[0-23] + * "HighAvailability" => (string) 是否开启高可用,enable,disable + * "Version" => (string) Redis版本信息 + * "ExpireTime" => (integer) 过期时间 (UNIX时间戳) + * "ChargeType" => (string) 计费类型:Year,Month,Dynamic 默认Dynamic + * "State" => (string) 状态标记 Creating // 初始化中 CreateFail // 创建失败 Deleting // 删除中 DeleteFail // 删除失败 Running // 运行 Resizing // 容量调整中 ResizeFail // 容量调整失败 Configing // 配置中 ConfigFail // 配置失败 + * "CreateTime" => (integer) 创建时间 (UNIX时间戳) + * "ModifyTime" => (integer) 修改时间 (UNIX时间戳) + * "Tag" => (string) 业务组名称 + * "SlaveZone" => (string) 跨机房URedis,slave redis所在可用区,参见 [可用区列表](../summary/regionlist.html) + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeURedisGroup(DescribeURedisGroupRequest $request = null): DescribeURedisGroupResponse + { + $resp = $this->invoke($request); + return new DescribeURedisGroupResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeURedisPrice - 取uredis价格信息 + * + * See also: https://docs.ucloud.cn/api/UMem-api/describe_uredis_price + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Size" => (integer) 量大小,单位:GB 取值范围[1-32] + * "ChargeType" => (string) 计费模式,Year, Month, Dynamic;如果不指定,则一次性获取三种计费 + * "Quantity" => (integer) 计费模式为Dynamic时,购买的时长, 默认为1 + * "RegionFlag" => (boolean) 是否是跨机房URedis(默认false) + * "ProductType" => (string) 产品类型:MS_Redis(标准主备版),S_Redis(从库),默认为MS_Redis + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 价格 参数见 UMemPriceSet[ + * [ + * "OriginalPrice" => (integer) 原价 + * "ChargeType" => (string) Year, Month, Dynamic,Trial + * "ListPrice" => (integer) 产品列表价 + * "Price" => (integer) 总价格 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeURedisPrice(DescribeURedisPriceRequest $request = null): DescribeURedisPriceResponse + { + $resp = $this->invoke($request); + return new DescribeURedisPriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeURedisSlowlog - 查询URedis慢日志 + * + * See also: https://docs.ucloud.cn/api/UMem-api/describe_uredis_slowlog + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "GroupId" => (string) 资源ID + * "Limit" => (integer) 分页显示的条目数,默认为10 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 总条目数 + * "DataSet" => (array) 条目数据[ + * [ + * "StartTime" => (integer) 查询发生的时间 + * "SpendTime" => (integer) 查询消耗的时间 + * "Command" => (string) 查询命令 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeURedisSlowlog(DescribeURedisSlowlogRequest $request = null): DescribeURedisSlowlogResponse + { + $resp = $this->invoke($request); + return new DescribeURedisSlowlogResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeURedisUpgradePrice - 获取uredis升级价格信息 + * + * See also: https://docs.ucloud.cn/api/UMem-api/describe_uredis_upgrade_price + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "Size" => (integer) 购买uredis大小,单位:GB,范围是[1-32] + * "GroupId" => (string) 要升级的空间的GroupId,请参考DescribeURedisGroup接口 + * ] + * + * Outputs: + * + * $outputs = [ + * "Price" => (number) 扩容差价,单位: 元,保留小数点后两位有效数字 + * ] + * + * @throws UCloudException + */ + public function describeURedisUpgradePrice(DescribeURedisUpgradePriceRequest $request = null): DescribeURedisUpgradePriceResponse + { + $resp = $this->invoke($request); + return new DescribeURedisUpgradePriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeURedisVersion - 获取主Redis可用版本 + * + * See also: https://docs.ucloud.cn/api/UMem-api/describe_uredis_version + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 组列表 参见 URedisVersionSet[ + * [ + * "Version" => (string) Redis版本 + * ] + * ] + * "TotalCount" => (integer) 总版本个数 + * ] + * + * @throws UCloudException + */ + public function describeURedisVersion(DescribeURedisVersionRequest $request = null): DescribeURedisVersionResponse + { + $resp = $this->invoke($request); + return new DescribeURedisVersionResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * FlushallURedisGroup - 清除主备redis数据 + * + * See also: https://docs.ucloud.cn/api/UMem-api/flushall_uredis_group + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "GroupId" => (string) 组的ID + * "FlushType" => (string) FlushDb或FlushAll + * "DbNum" => (integer) 清空的db,FlushType为FlushDb,此项为必传项 + * "TopOrganizationId" => (integer) company_id + * "OrganizationId" => (integer) OrganizationId + * "SlaveZone" => (string) 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function flushallURedisGroup(FlushallURedisGroupRequest $request = null): FlushallURedisGroupResponse + { + $resp = $this->invoke($request); + return new FlushallURedisGroupResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUMemSpaceState - 获取UMem内存空间列表 + * + * See also: https://docs.ucloud.cn/api/UMem-api/get_umem_space_state + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "SpaceId" => (string) 内存空间ID + * ] + * + * Outputs: + * + * $outputs = [ + * "State" => (string) Starting:创建中 Running:运行中 Fail:失败 + * ] + * + * @throws UCloudException + */ + public function getUMemSpaceState(GetUMemSpaceStateRequest $request = null): GetUMemSpaceStateResponse + { + $resp = $this->invoke($request); + return new GetUMemSpaceStateResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ISolationURedisGroup - 打开/关闭URedis + * + * See also: https://docs.ucloud.cn/api/UMem-api/i_solation_uredis_group + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "GroupId" => (string) 组的ID + * "TransformType" => (string) UNBind(关闭)或Bind(打开) + * "SlaveZone" => (string) 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function iSolationURedisGroup(ISolationURedisGroupRequest $request = null): ISolationURedisGroupResponse + { + $resp = $this->invoke($request); + return new ISolationURedisGroupResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyUMemSpaceName - 修改UMem内存空间名称 + * + * See also: https://docs.ucloud.cn/api/UMem-api/modify_umem_space_name + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "SpaceId" => (string) UMem内存空间ID + * "Name" => (string) 新的名称,长度(6<=size<=63) + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function modifyUMemSpaceName(ModifyUMemSpaceNameRequest $request = null): ModifyUMemSpaceNameResponse + { + $resp = $this->invoke($request); + return new ModifyUMemSpaceNameResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyURedisGroupName - 修改主备redis名称 + * + * See also: https://docs.ucloud.cn/api/UMem-api/modify_uredis_group_name + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "GroupId" => (string) 组的ID + * "Name" => (string) Redis组名称 (范围[6-63],只能包含英文、数字以及符号-和_) + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function modifyURedisGroupName(ModifyURedisGroupNameRequest $request = null): ModifyURedisGroupNameResponse + { + $resp = $this->invoke($request); + return new ModifyURedisGroupNameResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyURedisGroupPassword - 修改主备密码/重置密码 + * + * See also: https://docs.ucloud.cn/api/UMem-api/modify_uredis_group_password + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "GroupId" => (string) 组的ID + * "Password" => (string) 新密码字符串,要求长度为6~36个字符,且只能包含英文、数字以及-和下划线;并且需要base64加密;如要取消密码,此值为空字符串, + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function modifyURedisGroupPassword(ModifyURedisGroupPasswordRequest $request = null): ModifyURedisGroupPasswordResponse + { + $resp = $this->invoke($request); + return new ModifyURedisGroupPasswordResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * RemoveUDRedisData - 清除udredis实例数据 + * + * See also: https://docs.ucloud.cn/api/UMem-api/remove_ud_redis_data + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "SpaceId" => (string) 实例id + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function removeUDRedisData(RemoveUDRedisDataRequest $request = null): RemoveUDRedisDataResponse + { + $resp = $this->invoke($request); + return new RemoveUDRedisDataResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ResizeUMemSpace - 调整内存空间容量 + * + * See also: https://docs.ucloud.cn/api/UMem-api/resize_umem_space + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "SpaceId" => (string) UMem 内存空间Id + * "Size" => (integer) 内存大小, 单位:GB (需要大于原size,<= 1024) + * "CouponId" => (string) 使用的代金券Id + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function resizeUMemSpace(ResizeUMemSpaceRequest $request = null): ResizeUMemSpaceResponse + { + $resp = $this->invoke($request); + return new ResizeUMemSpaceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ResizeURedisGroup - 通过调用CheckURedisAllowance接口,检查资源情况,根据不同情形来调整主备redis容量,其中主要包括可用区资源不足无法扩容,主备所在宿主机资源不足需要迁移完成扩容(需要主从切换,会闪断及负载升高),以及直接扩容(业务无感知) + * + * See also: https://docs.ucloud.cn/api/UMem-api/resize_uredis_group + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "GroupId" => (string) 组ID + * "Size" => (integer) 内存大小, 单位:GB (需要大于原size,且小于等于32) 目前仅支持1/2/4/8/16/32 G 六种容量规格 + * "ChargeType" => (string) + * "Type" => (string) 空间类型:single(无热备),double(热备)(默认: double) + * "CouponId" => (integer) 代金券ID 请参考DescribeCoupon接口 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function resizeURedisGroup(ResizeURedisGroupRequest $request = null): ResizeURedisGroupResponse + { + $resp = $this->invoke($request); + return new ResizeURedisGroupResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * RestartUMemcacheGroup - 重启单机Memcache + * + * See also: https://docs.ucloud.cn/api/UMem-api/restart_umem_cache_group + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "GroupId" => (string) 组的ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function restartUMemcacheGroup(RestartUMemcacheGroupRequest $request = null): RestartUMemcacheGroupResponse + { + $resp = $this->invoke($request); + return new RestartUMemcacheGroupResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * RestartURedisGroup - 重启主备实例 + * + * See also: https://docs.ucloud.cn/api/UMem-api/restart_uredis_group + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "GroupId" => (string) 资源ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function restartURedisGroup(RestartURedisGroupRequest $request = null): RestartURedisGroupResponse + { + $resp = $this->invoke($request); + return new RestartURedisGroupResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateURedisBackupStrategy - URedisBackupStrategy + * + * See also: https://docs.ucloud.cn/api/UMem-api/update_uredis_backup_strategy + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "GroupId" => (string) 组的ID + * "BackupTime" => (string) 备份时间,默认为0 + * "AutoBackup" => (string) 是否打开默认备份功能。enable(打开),disable(关闭),默认enable + * "SlaveZone" => (string) 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function updateURedisBackupStrategy(UpdateURedisBackupStrategyRequest $request = null): UpdateURedisBackupStrategyResponse + { + $resp = $this->invoke($request); + return new UpdateURedisBackupStrategyResponse($resp->toArray(), $resp->getRequestId()); + } +} diff --git a/src/UNet/Apis/AllocateEIPRequest.php b/src/UNet/Apis/AllocateEIPRequest.php new file mode 100644 index 00000000..d4e70585 --- /dev/null +++ b/src/UNet/Apis/AllocateEIPRequest.php @@ -0,0 +1,272 @@ + "AllocateEIP"]); + $this->markRequired("Region"); + $this->markRequired("OperatorName"); + $this->markRequired("Bandwidth"); + } + + + + /** + * Region: 地域。 + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * OperatorName: 弹性IP线路,枚举值:国际线路, International;BGP线路:Bgp。使用BGP线路的地域:北京二、上海金融云、上海二、广州等,其他地域均使用国际线路。 + * + * @return string|null + */ + public function getOperatorName(): string + { + return $this->get("OperatorName"); + } + + /** + * OperatorName: 弹性IP线路,枚举值:国际线路, International;BGP线路:Bgp。使用BGP线路的地域:北京二、上海金融云、上海二、广州等,其他地域均使用国际线路。 + * + * @param string $operatorName + */ + public function setOperatorName(string $operatorName) + { + $this->set("OperatorName", $operatorName); + } + + /** + * Bandwidth: 弹性IP的外网带宽, 单位为Mbps. 共享带宽模式必须指定0M带宽, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-10000] + * + * @return integer|null + */ + public function getBandwidth(): int + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: 弹性IP的外网带宽, 单位为Mbps. 共享带宽模式必须指定0M带宽, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-10000] + * + * @param int $bandwidth + */ + public function setBandwidth(int $bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * Tag: 业务组名称, 默认为 "Default" + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组名称, 默认为 "Default" + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * ChargeType: 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按时付费,默认为按月付费。 + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按时付费,默认为按月付费。 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买的时长, 默认: 1 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买的时长, 默认: 1 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * PayMode: 弹性IP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; "ShareBandwidth",共享带宽模式. 默认为 "Bandwidth".“PostAccurateBandwidth”:带宽后付费模式 + * + * @return string|null + */ + public function getPayMode(): string + { + return $this->get("PayMode"); + } + + /** + * PayMode: 弹性IP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; "ShareBandwidth",共享带宽模式. 默认为 "Bandwidth".“PostAccurateBandwidth”:带宽后付费模式 + * + * @param string $payMode + */ + public function setPayMode(string $payMode) + { + $this->set("PayMode", $payMode); + } + + /** + * ShareBandwidthId: 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效 + * + * @return string|null + */ + public function getShareBandwidthId(): string + { + return $this->get("ShareBandwidthId"); + } + + /** + * ShareBandwidthId: 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效 + * + * @param string $shareBandwidthId + */ + public function setShareBandwidthId(string $shareBandwidthId) + { + $this->set("ShareBandwidthId", $shareBandwidthId); + } + + /** + * Name: 弹性IP的名称, 默认为 "EIP" + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 弹性IP的名称, 默认为 "EIP" + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Remark: 弹性IP的备注, 默认为空 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 弹性IP的备注, 默认为空 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } + + /** + * CouponId: 代金券ID, 默认不使用 + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 代金券ID, 默认不使用 + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UNet/Apis/AllocateEIPResponse.php b/src/UNet/Apis/AllocateEIPResponse.php new file mode 100644 index 00000000..f15dc1be --- /dev/null +++ b/src/UNet/Apis/AllocateEIPResponse.php @@ -0,0 +1,55 @@ +get("EIPSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UnetAllocateEIPSet($item)); + } + return $result; + } + + /** + * EIPSet: 申请到的EIP资源详情 参见 UnetAllocateEIPSet + * + * @param UnetAllocateEIPSet[] $eipSet + */ + public function setEIPSet(array $eipSet) + { + $result = []; + foreach ($eipSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UNet/Apis/AllocateShareBandwidthRequest.php b/src/UNet/Apis/AllocateShareBandwidthRequest.php new file mode 100644 index 00000000..66615e82 --- /dev/null +++ b/src/UNet/Apis/AllocateShareBandwidthRequest.php @@ -0,0 +1,173 @@ + "AllocateShareBandwidth"]); + $this->markRequired("Region"); + $this->markRequired("Name"); + $this->markRequired("ChargeType"); + $this->markRequired("ShareBandwidth"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Name: 共享带宽名字 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 共享带宽名字 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * ChargeType: 付费方式:Year 按年,Month 按月,Dynamic 按时; + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费方式:Year 按年,Month 按月,Dynamic 按时; + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * ShareBandwidth: 共享带宽值 + * + * @return integer|null + */ + public function getShareBandwidth(): int + { + return $this->get("ShareBandwidth"); + } + + /** + * ShareBandwidth: 共享带宽值 + * + * @param int $shareBandwidth + */ + public function setShareBandwidth(int $shareBandwidth) + { + $this->set("ShareBandwidth", $shareBandwidth); + } + + /** + * Quantity: 购买时长 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * IPVersion: 共享带宽类型,IPv4或者IPv6,不传默认IPv4 + * + * @return string|null + */ + public function getIPVersion(): string + { + return $this->get("IPVersion"); + } + + /** + * IPVersion: 共享带宽类型,IPv4或者IPv6,不传默认IPv4 + * + * @param string $ipVersion + */ + public function setIPVersion(string $ipVersion) + { + $this->set("IPVersion", $ipVersion); + } +} diff --git a/src/UNet/Apis/AllocateShareBandwidthResponse.php b/src/UNet/Apis/AllocateShareBandwidthResponse.php new file mode 100644 index 00000000..2411d72b --- /dev/null +++ b/src/UNet/Apis/AllocateShareBandwidthResponse.php @@ -0,0 +1,44 @@ +get("ShareBandwidthId"); + } + + /** + * ShareBandwidthId: 共享带宽资源Id + * + * @param string $shareBandwidthId + */ + public function setShareBandwidthId(string $shareBandwidthId) + { + $this->set("ShareBandwidthId", $shareBandwidthId); + } +} diff --git a/src/UNet/Apis/AssociateEIPWithShareBandwidthRequest.php b/src/UNet/Apis/AssociateEIPWithShareBandwidthRequest.php new file mode 100644 index 00000000..a1d3a93d --- /dev/null +++ b/src/UNet/Apis/AssociateEIPWithShareBandwidthRequest.php @@ -0,0 +1,132 @@ + "AssociateEIPWithShareBandwidth"]); + $this->markRequired("Region"); + $this->markRequired("EIPIds"); + $this->markRequired("ShareBandwidthId"); + } + + + + /** + * Region: 地域。 + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * EIPIds: 要加入共享带宽的EIP的资源Id + * + * @return string[]|null + */ + public function getEIPIds(): array + { + return $this->get("EIPIds"); + } + + /** + * EIPIds: 要加入共享带宽的EIP的资源Id + * + * @param string[] $eipIds + */ + public function setEIPIds(array $eipIds) + { + $this->set("EIPIds", $eipIds); + } + + /** + * ShareBandwidthId: 共享带宽ID + * + * @return string|null + */ + public function getShareBandwidthId(): string + { + return $this->get("ShareBandwidthId"); + } + + /** + * ShareBandwidthId: 共享带宽ID + * + * @param string $shareBandwidthId + */ + public function setShareBandwidthId(string $shareBandwidthId) + { + $this->set("ShareBandwidthId", $shareBandwidthId); + } + + /** + * IPVersion: 共享带宽类型,IPv4或者IPv6,不传默认IPv4 + * + * @return string|null + */ + public function getIPVersion(): string + { + return $this->get("IPVersion"); + } + + /** + * IPVersion: 共享带宽类型,IPv4或者IPv6,不传默认IPv4 + * + * @param string $ipVersion + */ + public function setIPVersion(string $ipVersion) + { + $this->set("IPVersion", $ipVersion); + } +} diff --git a/src/UNet/Apis/AssociateEIPWithShareBandwidthResponse.php b/src/UNet/Apis/AssociateEIPWithShareBandwidthResponse.php new file mode 100644 index 00000000..97040007 --- /dev/null +++ b/src/UNet/Apis/AssociateEIPWithShareBandwidthResponse.php @@ -0,0 +1,26 @@ + "BindEIP"]); + $this->markRequired("Region"); + $this->markRequired("EIPId"); + $this->markRequired("ResourceType"); + $this->markRequired("ResourceId"); + } + + + + /** + * Region: 地域 + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域 + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写 + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写 + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * EIPId: 弹性IP的资源Id + * + * @return string|null + */ + public function getEIPId(): string + { + return $this->get("EIPId"); + } + + /** + * EIPId: 弹性IP的资源Id + * + * @param string $eipId + */ + public function setEIPId(string $eipId) + { + $this->set("EIPId", $eipId); + } + + /** + * ResourceType: 弹性IP请求绑定的资源类型, 枚举值为: uhost: 云主机; ulb, 负载均衡器 upm: 物理机; hadoophost: 大数据集群;fortresshost:堡垒机;udockhost:容器;udhost:私有专区主机;natgw:natgw;udb:udb;vpngw:ipsec vpn;ucdr:云灾备;dbaudit:数据库审计;uni:虚拟网卡;cube,Cube容器。如果EIP为普通带宽计费,且带宽值高于2G,则只允许绑定在快杰型云主机和ULB + * + * @return string|null + */ + public function getResourceType(): string + { + return $this->get("ResourceType"); + } + + /** + * ResourceType: 弹性IP请求绑定的资源类型, 枚举值为: uhost: 云主机; ulb, 负载均衡器 upm: 物理机; hadoophost: 大数据集群;fortresshost:堡垒机;udockhost:容器;udhost:私有专区主机;natgw:natgw;udb:udb;vpngw:ipsec vpn;ucdr:云灾备;dbaudit:数据库审计;uni:虚拟网卡;cube,Cube容器。如果EIP为普通带宽计费,且带宽值高于2G,则只允许绑定在快杰型云主机和ULB + * + * @param string $resourceType + */ + public function setResourceType(string $resourceType) + { + $this->set("ResourceType", $resourceType); + } + + /** + * ResourceId: 弹性IP请求绑定的资源ID + * + * @return string|null + */ + public function getResourceId(): string + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: 弹性IP请求绑定的资源ID + * + * @param string $resourceId + */ + public function setResourceId(string $resourceId) + { + $this->set("ResourceId", $resourceId); + } +} diff --git a/src/UNet/Apis/BindEIPResponse.php b/src/UNet/Apis/BindEIPResponse.php new file mode 100644 index 00000000..7e42cd42 --- /dev/null +++ b/src/UNet/Apis/BindEIPResponse.php @@ -0,0 +1,26 @@ + "CreateBandwidthPackage"]); + $this->markRequired("Region"); + $this->markRequired("Bandwidth"); + $this->markRequired("EIPId"); + $this->markRequired("TimeRange"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Bandwidth: 带宽大小(单位Mbps), 取值范围[2,800] (最大值受地域限制) + * + * @return integer|null + */ + public function getBandwidth(): int + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: 带宽大小(单位Mbps), 取值范围[2,800] (最大值受地域限制) + * + * @param int $bandwidth + */ + public function setBandwidth(int $bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * EIPId: 所绑定弹性IP的资源ID + * + * @return string|null + */ + public function getEIPId(): string + { + return $this->get("EIPId"); + } + + /** + * EIPId: 所绑定弹性IP的资源ID + * + * @param string $eipId + */ + public function setEIPId(string $eipId) + { + $this->set("EIPId", $eipId); + } + + /** + * TimeRange: 带宽包有效时长, 取值范围为大于0的整数, 即该带宽包在EnableTime到 EnableTime+TimeRange时间段内生效 + * + * @return integer|null + */ + public function getTimeRange(): int + { + return $this->get("TimeRange"); + } + + /** + * TimeRange: 带宽包有效时长, 取值范围为大于0的整数, 即该带宽包在EnableTime到 EnableTime+TimeRange时间段内生效 + * + * @param int $timeRange + */ + public function setTimeRange(int $timeRange) + { + $this->set("TimeRange", $timeRange); + } + + /** + * EnableTime: 生效时间, 格式为 Unix timestamp, 默认为立即开通 + * + * @return integer|null + */ + public function getEnableTime(): int + { + return $this->get("EnableTime"); + } + + /** + * EnableTime: 生效时间, 格式为 Unix timestamp, 默认为立即开通 + * + * @param int $enableTime + */ + public function setEnableTime(int $enableTime) + { + $this->set("EnableTime", $enableTime); + } + + /** + * CouponId: 代金券ID + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 代金券ID + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UNet/Apis/CreateBandwidthPackageResponse.php b/src/UNet/Apis/CreateBandwidthPackageResponse.php new file mode 100644 index 00000000..387dd730 --- /dev/null +++ b/src/UNet/Apis/CreateBandwidthPackageResponse.php @@ -0,0 +1,44 @@ +get("BandwidthPackageId"); + } + + /** + * BandwidthPackageId: 所创建带宽包的资源ID + * + * @param string $bandwidthPackageId + */ + public function setBandwidthPackageId(string $bandwidthPackageId) + { + $this->set("BandwidthPackageId", $bandwidthPackageId); + } +} diff --git a/src/UNet/Apis/CreateFirewallRequest.php b/src/UNet/Apis/CreateFirewallRequest.php new file mode 100644 index 00000000..a19c8770 --- /dev/null +++ b/src/UNet/Apis/CreateFirewallRequest.php @@ -0,0 +1,152 @@ + "CreateFirewall"]); + $this->markRequired("Region"); + $this->markRequired("Rule"); + $this->markRequired("Name"); + } + + + + /** + * Region: 地域 + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域 + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写 + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写 + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Rule: 防火墙规则,例如:TCP|22|192.168.1.1/22|DROP|LOW|禁用22端口,第一个参数代表协议:第二个参数代表端口号,第三个参数为ip,第四个参数为ACCEPT(接受)和DROP(拒绝),第五个参数优先级:HIGH(高),MEDIUM(中),LOW(低),第六个参数为该条规则的自定义备注,bj1不支持添加备注 + * + * @return string[]|null + */ + public function getRule(): array + { + return $this->get("Rule"); + } + + /** + * Rule: 防火墙规则,例如:TCP|22|192.168.1.1/22|DROP|LOW|禁用22端口,第一个参数代表协议:第二个参数代表端口号,第三个参数为ip,第四个参数为ACCEPT(接受)和DROP(拒绝),第五个参数优先级:HIGH(高),MEDIUM(中),LOW(低),第六个参数为该条规则的自定义备注,bj1不支持添加备注 + * + * @param string[] $rule + */ + public function setRule(array $rule) + { + $this->set("Rule", $rule); + } + + /** + * Name: 防火墙名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 防火墙名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Tag: 防火墙业务组,默认为Default + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 防火墙业务组,默认为Default + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Remark: 防火墙描述,默认为空 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 防火墙描述,默认为空 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } +} diff --git a/src/UNet/Apis/CreateFirewallResponse.php b/src/UNet/Apis/CreateFirewallResponse.php new file mode 100644 index 00000000..81a52940 --- /dev/null +++ b/src/UNet/Apis/CreateFirewallResponse.php @@ -0,0 +1,44 @@ +get("FWId"); + } + + /** + * FWId: 防火墙ID + * + * @param string $fwId + */ + public function setFWId(string $fwId) + { + $this->set("FWId", $fwId); + } +} diff --git a/src/UNet/Apis/DeleteBandwidthPackageRequest.php b/src/UNet/Apis/DeleteBandwidthPackageRequest.php new file mode 100644 index 00000000..a69be812 --- /dev/null +++ b/src/UNet/Apis/DeleteBandwidthPackageRequest.php @@ -0,0 +1,91 @@ + "DeleteBandwidthPackage"]); + $this->markRequired("Region"); + $this->markRequired("BandwidthPackageId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * BandwidthPackageId: 带宽包资源ID + * + * @return string|null + */ + public function getBandwidthPackageId(): string + { + return $this->get("BandwidthPackageId"); + } + + /** + * BandwidthPackageId: 带宽包资源ID + * + * @param string $bandwidthPackageId + */ + public function setBandwidthPackageId(string $bandwidthPackageId) + { + $this->set("BandwidthPackageId", $bandwidthPackageId); + } +} diff --git a/src/UNet/Apis/DeleteBandwidthPackageResponse.php b/src/UNet/Apis/DeleteBandwidthPackageResponse.php new file mode 100644 index 00000000..5f98729c --- /dev/null +++ b/src/UNet/Apis/DeleteBandwidthPackageResponse.php @@ -0,0 +1,26 @@ + "DeleteFirewall"]); + $this->markRequired("Region"); + $this->markRequired("FWId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * FWId: 防火墙资源ID + * + * @return string|null + */ + public function getFWId(): string + { + return $this->get("FWId"); + } + + /** + * FWId: 防火墙资源ID + * + * @param string $fwId + */ + public function setFWId(string $fwId) + { + $this->set("FWId", $fwId); + } +} diff --git a/src/UNet/Apis/DeleteFirewallResponse.php b/src/UNet/Apis/DeleteFirewallResponse.php new file mode 100644 index 00000000..839c890e --- /dev/null +++ b/src/UNet/Apis/DeleteFirewallResponse.php @@ -0,0 +1,26 @@ + "DescribeBandwidthPackage"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Limit: 返回数据分页值, 取值范围为 [0,10000000] 之间的整数, 默认为20 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数据分页值, 取值范围为 [0,10000000] 之间的整数, 默认为20 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * Offset: 返回数据偏移量, 默认为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 返回数据偏移量, 默认为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } +} diff --git a/src/UNet/Apis/DescribeBandwidthPackageResponse.php b/src/UNet/Apis/DescribeBandwidthPackageResponse.php new file mode 100644 index 00000000..1170cb1b --- /dev/null +++ b/src/UNet/Apis/DescribeBandwidthPackageResponse.php @@ -0,0 +1,75 @@ +get("TotalCount"); + } + + /** + * TotalCount: 满足条件的带宽包总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * DataSets: 带宽包详细信息, 参见 UnetBandwidthPackageSet + * + * @return UnetBandwidthPackageSet[]|null + */ + public function getDataSets(): array + { + $items = $this->get("DataSets") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UnetBandwidthPackageSet($item)); + } + return $result; + } + + /** + * DataSets: 带宽包详细信息, 参见 UnetBandwidthPackageSet + * + * @param UnetBandwidthPackageSet[] $dataSets + */ + public function setDataSets(array $dataSets) + { + $result = []; + foreach ($dataSets as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UNet/Apis/DescribeBandwidthUsageRequest.php b/src/UNet/Apis/DescribeBandwidthUsageRequest.php new file mode 100644 index 00000000..52c6e643 --- /dev/null +++ b/src/UNet/Apis/DescribeBandwidthUsageRequest.php @@ -0,0 +1,130 @@ + "DescribeBandwidthUsage"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Limit: 返回数据分页值, 取值范围为 [0,10000000] 之间的整数, 默认为20 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数据分页值, 取值范围为 [0,10000000] 之间的整数, 默认为20 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * OffSet: 返回数据偏移量, 默认为0 + * + * @return integer|null + */ + public function getOffSet(): int + { + return $this->get("OffSet"); + } + + /** + * OffSet: 返回数据偏移量, 默认为0 + * + * @param int $offSet + */ + public function setOffSet(int $offSet) + { + $this->set("OffSet", $offSet); + } + + /** + * EIPIds: 弹性IP的资源Id. 如果为空, 则返回当前 Region中符合条件的所有EIP的带宽用量, n为自然数 + * + * @return string[]|null + */ + public function getEIPIds(): array + { + return $this->get("EIPIds"); + } + + /** + * EIPIds: 弹性IP的资源Id. 如果为空, 则返回当前 Region中符合条件的所有EIP的带宽用量, n为自然数 + * + * @param string[] $eipIds + */ + public function setEIPIds(array $eipIds) + { + $this->set("EIPIds", $eipIds); + } +} diff --git a/src/UNet/Apis/DescribeBandwidthUsageResponse.php b/src/UNet/Apis/DescribeBandwidthUsageResponse.php new file mode 100644 index 00000000..7e755c7e --- /dev/null +++ b/src/UNet/Apis/DescribeBandwidthUsageResponse.php @@ -0,0 +1,74 @@ +get("TotalCount"); + } + + /** + * TotalCount: EIPSet中的元素个数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * EIPSet: 单个弹性IP的带宽用量详细信息, 详见 UnetBandwidthUsageEIPSet, 如没有弹性IP资源则没有该返回值。 + * + * @return UnetBandwidthUsageEIPSet[]|null + */ + public function getEIPSet(): array + { + $items = $this->get("EIPSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UnetBandwidthUsageEIPSet($item)); + } + return $result; + } + + /** + * EIPSet: 单个弹性IP的带宽用量详细信息, 详见 UnetBandwidthUsageEIPSet, 如没有弹性IP资源则没有该返回值。 + * + * @param UnetBandwidthUsageEIPSet[] $eipSet + */ + public function setEIPSet(array $eipSet) + { + $result = []; + foreach ($eipSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UNet/Apis/DescribeEIPRequest.php b/src/UNet/Apis/DescribeEIPRequest.php new file mode 100644 index 00000000..61a990f1 --- /dev/null +++ b/src/UNet/Apis/DescribeEIPRequest.php @@ -0,0 +1,150 @@ + "DescribeEIP"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域 + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域 + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写 + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写 + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * EIPIds: 弹性IP的资源ID如果为空, 则返回当前 Region中符合条件的的所有EIP + * + * @return string[]|null + */ + public function getEIPIds(): array + { + return $this->get("EIPIds"); + } + + /** + * EIPIds: 弹性IP的资源ID如果为空, 则返回当前 Region中符合条件的的所有EIP + * + * @param string[] $eipIds + */ + public function setEIPIds(array $eipIds) + { + $this->set("EIPIds", $eipIds); + } + + /** + * Offset: 数据偏移量, 默认为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 数据偏移量, 默认为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 数据分页值, 默认为20 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 数据分页值, 默认为20 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * IPs: IP地址,支持通过ip查询,如果ip与EIP都传,会取并集查询 + * + * @return string[]|null + */ + public function getIPs(): array + { + return $this->get("IPs"); + } + + /** + * IPs: IP地址,支持通过ip查询,如果ip与EIP都传,会取并集查询 + * + * @param string[] $iPs + */ + public function setIPs(array $iPs) + { + $this->set("IPs", $iPs); + } +} diff --git a/src/UNet/Apis/DescribeEIPResponse.php b/src/UNet/Apis/DescribeEIPResponse.php new file mode 100644 index 00000000..ac37c917 --- /dev/null +++ b/src/UNet/Apis/DescribeEIPResponse.php @@ -0,0 +1,117 @@ +get("TotalCount"); + } + + /** + * TotalCount: 满足条件的弹性IP总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * UnbindCount: 未绑定的弹性IP总数 + * + * @return integer|null + */ + public function getUnbindCount(): int + { + return $this->get("UnbindCount"); + } + + /** + * UnbindCount: 未绑定的弹性IP总数 + * + * @param int $unbindCount + */ + public function setUnbindCount(int $unbindCount) + { + $this->set("UnbindCount", $unbindCount); + } + + /** + * TotalBandwidth: 满足条件的弹性IP带宽总和, 单位Mbps + * + * @return integer|null + */ + public function getTotalBandwidth(): int + { + return $this->get("TotalBandwidth"); + } + + /** + * TotalBandwidth: 满足条件的弹性IP带宽总和, 单位Mbps + * + * @param int $totalBandwidth + */ + public function setTotalBandwidth(int $totalBandwidth) + { + $this->set("TotalBandwidth", $totalBandwidth); + } + + /** + * EIPSet: 弹性IP列表, 每项参数详见 UnetEIPSet + * + * @return UnetEIPSet[]|null + */ + public function getEIPSet(): array + { + $items = $this->get("EIPSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UnetEIPSet($item)); + } + return $result; + } + + /** + * EIPSet: 弹性IP列表, 每项参数详见 UnetEIPSet + * + * @param UnetEIPSet[] $eipSet + */ + public function setEIPSet(array $eipSet) + { + $result = []; + foreach ($eipSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UNet/Apis/DescribeFirewallRequest.php b/src/UNet/Apis/DescribeFirewallRequest.php new file mode 100644 index 00000000..53bf3355 --- /dev/null +++ b/src/UNet/Apis/DescribeFirewallRequest.php @@ -0,0 +1,170 @@ + "DescribeFirewall"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域 + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域 + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写 + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写 + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * FWId: 防火墙ID,默认为返回所有防火墙 + * + * @return string|null + */ + public function getFWId(): string + { + return $this->get("FWId"); + } + + /** + * FWId: 防火墙ID,默认为返回所有防火墙 + * + * @param string $fwId + */ + public function setFWId(string $fwId) + { + $this->set("FWId", $fwId); + } + + /** + * ResourceType: 绑定防火墙组的资源类型,默认为全部资源类型。枚举值为:"unatgw",NAT网关; "uhost",云主机;“uni”,虚拟网卡; "upm",物理云主机; "hadoophost",hadoop节点; "fortresshost",堡垒机; "udhost",私有专区主机;"udockhost",容器;"dbaudit",数据库审计. + * + * @return string|null + */ + public function getResourceType(): string + { + return $this->get("ResourceType"); + } + + /** + * ResourceType: 绑定防火墙组的资源类型,默认为全部资源类型。枚举值为:"unatgw",NAT网关; "uhost",云主机;“uni”,虚拟网卡; "upm",物理云主机; "hadoophost",hadoop节点; "fortresshost",堡垒机; "udhost",私有专区主机;"udockhost",容器;"dbaudit",数据库审计. + * + * @param string $resourceType + */ + public function setResourceType(string $resourceType) + { + $this->set("ResourceType", $resourceType); + } + + /** + * ResourceId: 绑定防火墙组的资源ID + * + * @return string|null + */ + public function getResourceId(): string + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: 绑定防火墙组的资源ID + * + * @param string $resourceId + */ + public function setResourceId(string $resourceId) + { + $this->set("ResourceId", $resourceId); + } + + /** + * Limit: 返回数据长度,默认为20,最大10000000 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数据长度,默认为20,最大10000000 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * Offset: 列表起始位置偏移量,默认为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 列表起始位置偏移量,默认为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } +} diff --git a/src/UNet/Apis/DescribeFirewallResourceRequest.php b/src/UNet/Apis/DescribeFirewallResourceRequest.php new file mode 100644 index 00000000..9f5331b1 --- /dev/null +++ b/src/UNet/Apis/DescribeFirewallResourceRequest.php @@ -0,0 +1,131 @@ + "DescribeFirewallResource"]); + $this->markRequired("Region"); + $this->markRequired("FWId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * FWId: 防火墙ID + * + * @return string|null + */ + public function getFWId(): string + { + return $this->get("FWId"); + } + + /** + * FWId: 防火墙ID + * + * @param string $fwId + */ + public function setFWId(string $fwId) + { + $this->set("FWId", $fwId); + } + + /** + * Limit: 返回数据长度,默认为20,最大10000000 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数据长度,默认为20,最大10000000 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * Offset: 列表起始位置偏移量,默认为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 列表起始位置偏移量,默认为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } +} diff --git a/src/UNet/Apis/DescribeFirewallResourceResponse.php b/src/UNet/Apis/DescribeFirewallResourceResponse.php new file mode 100644 index 00000000..f6c31b3a --- /dev/null +++ b/src/UNet/Apis/DescribeFirewallResourceResponse.php @@ -0,0 +1,74 @@ +get("ResourceSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ResourceSet($item)); + } + return $result; + } + + /** + * ResourceSet: 资源列表,见 ResourceSet + * + * @param ResourceSet[] $resourceSet + */ + public function setResourceSet(array $resourceSet) + { + $result = []; + foreach ($resourceSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalCount: 绑定资源总数 + * + * @return integer|null + */ + public function getTotalCount(): int + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 绑定资源总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/UNet/Apis/DescribeFirewallResponse.php b/src/UNet/Apis/DescribeFirewallResponse.php new file mode 100644 index 00000000..4718a599 --- /dev/null +++ b/src/UNet/Apis/DescribeFirewallResponse.php @@ -0,0 +1,75 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new FirewallDataSet($item)); + } + return $result; + } + + /** + * DataSet: 获取的防火墙组详细信息 参见 FirewallDataSet + * + * @param FirewallDataSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalCount: 防火墙资源数量 + * + * @return integer|null + */ + public function getTotalCount(): int + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 防火墙资源数量 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/UNet/Apis/DescribeShareBandwidthRequest.php b/src/UNet/Apis/DescribeShareBandwidthRequest.php new file mode 100644 index 00000000..9f4a6a9e --- /dev/null +++ b/src/UNet/Apis/DescribeShareBandwidthRequest.php @@ -0,0 +1,90 @@ + "DescribeShareBandwidth"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ShareBandwidthIds: 需要返回的共享带宽Id + * + * @return string[]|null + */ + public function getShareBandwidthIds(): array + { + return $this->get("ShareBandwidthIds"); + } + + /** + * ShareBandwidthIds: 需要返回的共享带宽Id + * + * @param string[] $shareBandwidthIds + */ + public function setShareBandwidthIds(array $shareBandwidthIds) + { + $this->set("ShareBandwidthIds", $shareBandwidthIds); + } +} diff --git a/src/UNet/Apis/DescribeShareBandwidthResponse.php b/src/UNet/Apis/DescribeShareBandwidthResponse.php new file mode 100644 index 00000000..eaa7fd9c --- /dev/null +++ b/src/UNet/Apis/DescribeShareBandwidthResponse.php @@ -0,0 +1,76 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UnetShareBandwidthSet($item)); + } + return $result; + } + + /** + * DataSet: 共享带宽信息组 参见 UnetShareBandwidthSet + * + * @param UnetShareBandwidthSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalCount: 符合条件的共享带宽总数,大于等于返回DataSet长度 + * + * @return integer|null + */ + public function getTotalCount(): int + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 符合条件的共享带宽总数,大于等于返回DataSet长度 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/UNet/Apis/DisassociateEIPWithShareBandwidthRequest.php b/src/UNet/Apis/DisassociateEIPWithShareBandwidthRequest.php new file mode 100644 index 00000000..269c03b7 --- /dev/null +++ b/src/UNet/Apis/DisassociateEIPWithShareBandwidthRequest.php @@ -0,0 +1,172 @@ + "DisassociateEIPWithShareBandwidth"]); + $this->markRequired("Region"); + $this->markRequired("ShareBandwidthId"); + $this->markRequired("Bandwidth"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ShareBandwidthId: 共享带宽ID + * + * @return string|null + */ + public function getShareBandwidthId(): string + { + return $this->get("ShareBandwidthId"); + } + + /** + * ShareBandwidthId: 共享带宽ID + * + * @param string $shareBandwidthId + */ + public function setShareBandwidthId(string $shareBandwidthId) + { + $this->set("ShareBandwidthId", $shareBandwidthId); + } + + /** + * Bandwidth: 移出共享带宽后,EIP的外网带宽, 单位为Mbps. 各地域带宽范围如下: 流量计费[1-200],带宽计费[1-800] + * + * @return integer|null + */ + public function getBandwidth(): int + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: 移出共享带宽后,EIP的外网带宽, 单位为Mbps. 各地域带宽范围如下: 流量计费[1-200],带宽计费[1-800] + * + * @param int $bandwidth + */ + public function setBandwidth(int $bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * EIPIds: EIP的资源Id;默认移出该共享带宽下所有的EIP + * + * @return string[]|null + */ + public function getEIPIds(): array + { + return $this->get("EIPIds"); + } + + /** + * EIPIds: EIP的资源Id;默认移出该共享带宽下所有的EIP + * + * @param string[] $eipIds + */ + public function setEIPIds(array $eipIds) + { + $this->set("EIPIds", $eipIds); + } + + /** + * PayMode: 移出共享带宽后,EIP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; 默认为 "Bandwidth". + * + * @return string|null + */ + public function getPayMode(): string + { + return $this->get("PayMode"); + } + + /** + * PayMode: 移出共享带宽后,EIP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; 默认为 "Bandwidth". + * + * @param string $payMode + */ + public function setPayMode(string $payMode) + { + $this->set("PayMode", $payMode); + } + + /** + * IPVersion: 共享带宽类型,IPv4或者IPv6,不传默认IPv4 + * + * @return string|null + */ + public function getIPVersion(): string + { + return $this->get("IPVersion"); + } + + /** + * IPVersion: 共享带宽类型,IPv4或者IPv6,不传默认IPv4 + * + * @param string $ipVersion + */ + public function setIPVersion(string $ipVersion) + { + $this->set("IPVersion", $ipVersion); + } +} diff --git a/src/UNet/Apis/DisassociateEIPWithShareBandwidthResponse.php b/src/UNet/Apis/DisassociateEIPWithShareBandwidthResponse.php new file mode 100644 index 00000000..2769854d --- /dev/null +++ b/src/UNet/Apis/DisassociateEIPWithShareBandwidthResponse.php @@ -0,0 +1,26 @@ + "GetEIPPayMode"]); + $this->markRequired("Region"); + $this->markRequired("EIPId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * EIPId: 弹性IP的资源Id + * + * @return string[]|null + */ + public function getEIPId(): array + { + return $this->get("EIPId"); + } + + /** + * EIPId: 弹性IP的资源Id + * + * @param string[] $eipId + */ + public function setEIPId(array $eipId) + { + $this->set("EIPId", $eipId); + } +} diff --git a/src/UNet/Apis/GetEIPPayModeResponse.php b/src/UNet/Apis/GetEIPPayModeResponse.php new file mode 100644 index 00000000..6cd315dc --- /dev/null +++ b/src/UNet/Apis/GetEIPPayModeResponse.php @@ -0,0 +1,54 @@ +get("EIPPayMode") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new EIPPayModeSet($item)); + } + return $result; + } + + /** + * EIPPayMode: EIP的计费模式, 参见 EIPPayModeSet + * + * @param EIPPayModeSet[] $eipPayMode + */ + public function setEIPPayMode(array $eipPayMode) + { + $result = []; + foreach ($eipPayMode as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UNet/Apis/GetEIPPriceRequest.php b/src/UNet/Apis/GetEIPPriceRequest.php new file mode 100644 index 00000000..7aad212a --- /dev/null +++ b/src/UNet/Apis/GetEIPPriceRequest.php @@ -0,0 +1,172 @@ + "GetEIPPrice"]); + $this->markRequired("Region"); + $this->markRequired("OperatorName"); + $this->markRequired("Bandwidth"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * OperatorName: 弹性IP的线路如下: 国际: International BGP: Bgp 各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International,泉州为移动单线cn-qz:ChinaMobile + * + * @return string|null + */ + public function getOperatorName(): string + { + return $this->get("OperatorName"); + } + + /** + * OperatorName: 弹性IP的线路如下: 国际: International BGP: Bgp 各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International,泉州为移动单线cn-qz:ChinaMobile + * + * @param string $operatorName + */ + public function setOperatorName(string $operatorName) + { + $this->set("OperatorName", $operatorName); + } + + /** + * Bandwidth: 弹性IP的外网带宽, 单位为Mbps, 范围 [0-800] + * + * @return integer|null + */ + public function getBandwidth(): int + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: 弹性IP的外网带宽, 单位为Mbps, 范围 [0-800] + * + * @param int $bandwidth + */ + public function setBandwidth(int $bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * ChargeType: 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按时付费; 默认为获取三种价格 + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按时付费; 默认为获取三种价格 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * PayMode: 弹性IP计费方式r. 枚举值为: Traffic, 流量计费; Bandwidth, 带宽计费; "ShareBandwidth",共享带宽模式. 默认为Bandwidth + * + * @return string|null + */ + public function getPayMode(): string + { + return $this->get("PayMode"); + } + + /** + * PayMode: 弹性IP计费方式r. 枚举值为: Traffic, 流量计费; Bandwidth, 带宽计费; "ShareBandwidth",共享带宽模式. 默认为Bandwidth + * + * @param string $payMode + */ + public function setPayMode(string $payMode) + { + $this->set("PayMode", $payMode); + } + + /** + * Quantity: 购买时长。默认: 1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长。默认: 1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } +} diff --git a/src/UNet/Apis/GetEIPPriceResponse.php b/src/UNet/Apis/GetEIPPriceResponse.php new file mode 100644 index 00000000..fb58f03d --- /dev/null +++ b/src/UNet/Apis/GetEIPPriceResponse.php @@ -0,0 +1,54 @@ +get("PriceSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new EIPPriceDetailSet($item)); + } + return $result; + } + + /** + * PriceSet: 弹性IP价格详情 详情见 EIPPriceDetailSet + * + * @param EIPPriceDetailSet[] $priceSet + */ + public function setPriceSet(array $priceSet) + { + $result = []; + foreach ($priceSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UNet/Apis/GetEIPUpgradePriceRequest.php b/src/UNet/Apis/GetEIPUpgradePriceRequest.php new file mode 100644 index 00000000..e095c72e --- /dev/null +++ b/src/UNet/Apis/GetEIPUpgradePriceRequest.php @@ -0,0 +1,112 @@ + "GetEIPUpgradePrice"]); + $this->markRequired("Region"); + $this->markRequired("EIPId"); + $this->markRequired("Bandwidth"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * EIPId: 弹性IP的资源ID + * + * @return string|null + */ + public function getEIPId(): string + { + return $this->get("EIPId"); + } + + /** + * EIPId: 弹性IP的资源ID + * + * @param string $eipId + */ + public function setEIPId(string $eipId) + { + $this->set("EIPId", $eipId); + } + + /** + * Bandwidth: 弹性IP的外网带宽, 单位为Mbps, 范围 [1-800] + * + * @return integer|null + */ + public function getBandwidth(): int + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: 弹性IP的外网带宽, 单位为Mbps, 范围 [1-800] + * + * @param int $bandwidth + */ + public function setBandwidth(int $bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } +} diff --git a/src/UNet/Apis/GetEIPUpgradePriceResponse.php b/src/UNet/Apis/GetEIPUpgradePriceResponse.php new file mode 100644 index 00000000..ec8a6a26 --- /dev/null +++ b/src/UNet/Apis/GetEIPUpgradePriceResponse.php @@ -0,0 +1,44 @@ +get("Price"); + } + + /** + * Price: 调整带宽后的EIP价格, 单位为"元", 如需退费此处为负值 + * + * @param float $price + */ + public function setPrice(float $price) + { + $this->set("Price", $price); + } +} diff --git a/src/UNet/Apis/GetThroughputDailyBillingInfoRequest.php b/src/UNet/Apis/GetThroughputDailyBillingInfoRequest.php new file mode 100644 index 00000000..dc2d5d11 --- /dev/null +++ b/src/UNet/Apis/GetThroughputDailyBillingInfoRequest.php @@ -0,0 +1,133 @@ + "GetThroughputDailyBillingInfo"]); + $this->markRequired("Region"); + $this->markRequired("EIPId"); + $this->markRequired("StartTime"); + $this->markRequired("EndTime"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * EIPId: EIP的资源ID + * + * @return string|null + */ + public function getEIPId(): string + { + return $this->get("EIPId"); + } + + /** + * EIPId: EIP的资源ID + * + * @param string $eipId + */ + public function setEIPId(string $eipId) + { + $this->set("EIPId", $eipId); + } + + /** + * StartTime: 查询开始时间时间戳 + * + * @return integer|null + */ + public function getStartTime(): int + { + return $this->get("StartTime"); + } + + /** + * StartTime: 查询开始时间时间戳 + * + * @param int $startTime + */ + public function setStartTime(int $startTime) + { + $this->set("StartTime", $startTime); + } + + /** + * EndTime: 查询结束时间时间戳 + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 查询结束时间时间戳 + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } +} diff --git a/src/UNet/Apis/GetThroughputDailyBillingInfoResponse.php b/src/UNet/Apis/GetThroughputDailyBillingInfoResponse.php new file mode 100644 index 00000000..69881fd1 --- /dev/null +++ b/src/UNet/Apis/GetThroughputDailyBillingInfoResponse.php @@ -0,0 +1,94 @@ +get("Stats") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ThroughputDailyBillingInfo($item)); + } + return $result; + } + + /** + * Stats: EIP流量计费信息,详见模型ThroughputDailyBillingInfo + * + * @param ThroughputDailyBillingInfo[] $stats + */ + public function setStats(array $stats) + { + $result = []; + foreach ($stats as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalOutMoney: 计费总金额 + * + * @return integer|null + */ + public function getTotalOutMoney(): int + { + return $this->get("TotalOutMoney"); + } + + /** + * TotalOutMoney: 计费总金额 + * + * @param int $totalOutMoney + */ + public function setTotalOutMoney(int $totalOutMoney) + { + $this->set("TotalOutMoney", $totalOutMoney); + } + + /** + * TotalOutSize: 计费总流量 + * + * @return string|null + */ + public function getTotalOutSize(): string + { + return $this->get("TotalOutSize"); + } + + /** + * TotalOutSize: 计费总流量 + * + * @param string $totalOutSize + */ + public function setTotalOutSize(string $totalOutSize) + { + $this->set("TotalOutSize", $totalOutSize); + } +} diff --git a/src/UNet/Apis/GrantFirewallRequest.php b/src/UNet/Apis/GrantFirewallRequest.php new file mode 100644 index 00000000..5bffd36b --- /dev/null +++ b/src/UNet/Apis/GrantFirewallRequest.php @@ -0,0 +1,133 @@ + "GrantFirewall"]); + $this->markRequired("Region"); + $this->markRequired("FWId"); + $this->markRequired("ResourceType"); + $this->markRequired("ResourceId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * FWId: 防火墙资源ID + * + * @return string|null + */ + public function getFWId(): string + { + return $this->get("FWId"); + } + + /** + * FWId: 防火墙资源ID + * + * @param string $fwId + */ + public function setFWId(string $fwId) + { + $this->set("FWId", $fwId); + } + + /** + * ResourceType: 绑定防火墙组的资源类型,默认为全部资源类型。枚举值为:"unatgw",NAT网关; "uhost",云主机; "upm",物理云主机; "hadoophost",hadoop节点; "fortresshost",堡垒机; "udhost",私有专区主机;"udockhost",容器;"dbaudit",数据库审计,”uni“,虚拟网卡,“cube”,Cube容器实例。 + * + * @return string|null + */ + public function getResourceType(): string + { + return $this->get("ResourceType"); + } + + /** + * ResourceType: 绑定防火墙组的资源类型,默认为全部资源类型。枚举值为:"unatgw",NAT网关; "uhost",云主机; "upm",物理云主机; "hadoophost",hadoop节点; "fortresshost",堡垒机; "udhost",私有专区主机;"udockhost",容器;"dbaudit",数据库审计,”uni“,虚拟网卡,“cube”,Cube容器实例。 + * + * @param string $resourceType + */ + public function setResourceType(string $resourceType) + { + $this->set("ResourceType", $resourceType); + } + + /** + * ResourceId: 所应用资源ID + * + * @return string|null + */ + public function getResourceId(): string + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: 所应用资源ID + * + * @param string $resourceId + */ + public function setResourceId(string $resourceId) + { + $this->set("ResourceId", $resourceId); + } +} diff --git a/src/UNet/Apis/GrantFirewallResponse.php b/src/UNet/Apis/GrantFirewallResponse.php new file mode 100644 index 00000000..49014a5c --- /dev/null +++ b/src/UNet/Apis/GrantFirewallResponse.php @@ -0,0 +1,26 @@ + "ModifyEIPBandwidth"]); + $this->markRequired("Region"); + $this->markRequired("EIPId"); + $this->markRequired("Bandwidth"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * EIPId: 弹性IP的资源ID + * + * @return string|null + */ + public function getEIPId(): string + { + return $this->get("EIPId"); + } + + /** + * EIPId: 弹性IP的资源ID + * + * @param string $eipId + */ + public function setEIPId(string $eipId) + { + $this->set("EIPId", $eipId); + } + + /** + * Bandwidth: 弹性IP的外网带宽, 单位为Mbps. 各地域的带宽值范围如下:流量计费[1-200],带宽计费[1-800] + * + * @return integer|null + */ + public function getBandwidth(): int + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: 弹性IP的外网带宽, 单位为Mbps. 各地域的带宽值范围如下:流量计费[1-200],带宽计费[1-800] + * + * @param int $bandwidth + */ + public function setBandwidth(int $bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } +} diff --git a/src/UNet/Apis/ModifyEIPBandwidthResponse.php b/src/UNet/Apis/ModifyEIPBandwidthResponse.php new file mode 100644 index 00000000..3971c2de --- /dev/null +++ b/src/UNet/Apis/ModifyEIPBandwidthResponse.php @@ -0,0 +1,26 @@ + "ModifyEIPWeight"]); + $this->markRequired("Region"); + $this->markRequired("EIPId"); + $this->markRequired("Weight"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * EIPId: 弹性IP的资源ID + * + * @return string|null + */ + public function getEIPId(): string + { + return $this->get("EIPId"); + } + + /** + * EIPId: 弹性IP的资源ID + * + * @param string $eipId + */ + public function setEIPId(string $eipId) + { + $this->set("EIPId", $eipId); + } + + /** + * Weight: 外网出口权重, 范围[0-100] 取值为0时, 该弹性IP不会被使用. 取值为100时, 同主机下只会使用这个弹性IP,其他弹性IP不会被使用 请勿将多个绑定在同一资源的弹性IP设置为相同权重 + * + * @return integer|null + */ + public function getWeight(): int + { + return $this->get("Weight"); + } + + /** + * Weight: 外网出口权重, 范围[0-100] 取值为0时, 该弹性IP不会被使用. 取值为100时, 同主机下只会使用这个弹性IP,其他弹性IP不会被使用 请勿将多个绑定在同一资源的弹性IP设置为相同权重 + * + * @param int $weight + */ + public function setWeight(int $weight) + { + $this->set("Weight", $weight); + } +} diff --git a/src/UNet/Apis/ModifyEIPWeightResponse.php b/src/UNet/Apis/ModifyEIPWeightResponse.php new file mode 100644 index 00000000..f9896c88 --- /dev/null +++ b/src/UNet/Apis/ModifyEIPWeightResponse.php @@ -0,0 +1,26 @@ + "ReleaseEIP"]); + $this->markRequired("Region"); + $this->markRequired("EIPId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * EIPId: 弹性IP的资源ID + * + * @return string|null + */ + public function getEIPId(): string + { + return $this->get("EIPId"); + } + + /** + * EIPId: 弹性IP的资源ID + * + * @param string $eipId + */ + public function setEIPId(string $eipId) + { + $this->set("EIPId", $eipId); + } +} diff --git a/src/UNet/Apis/ReleaseEIPResponse.php b/src/UNet/Apis/ReleaseEIPResponse.php new file mode 100644 index 00000000..c10c6fcf --- /dev/null +++ b/src/UNet/Apis/ReleaseEIPResponse.php @@ -0,0 +1,26 @@ + "ReleaseShareBandwidth"]); + $this->markRequired("Region"); + $this->markRequired("ShareBandwidthId"); + $this->markRequired("EIPBandwidth"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ShareBandwidthId: 共享带宽ID + * + * @return string|null + */ + public function getShareBandwidthId(): string + { + return $this->get("ShareBandwidthId"); + } + + /** + * ShareBandwidthId: 共享带宽ID + * + * @param string $shareBandwidthId + */ + public function setShareBandwidthId(string $shareBandwidthId) + { + $this->set("ShareBandwidthId", $shareBandwidthId); + } + + /** + * EIPBandwidth: 关闭共享带宽后,各EIP恢复为的带宽值 + * + * @return integer|null + */ + public function getEIPBandwidth(): int + { + return $this->get("EIPBandwidth"); + } + + /** + * EIPBandwidth: 关闭共享带宽后,各EIP恢复为的带宽值 + * + * @param int $eipBandwidth + */ + public function setEIPBandwidth(int $eipBandwidth) + { + $this->set("EIPBandwidth", $eipBandwidth); + } + + /** + * PayMode: 默认为 Bandwidth 带宽计费 + * + * @return string|null + */ + public function getPayMode(): string + { + return $this->get("PayMode"); + } + + /** + * PayMode: 默认为 Bandwidth 带宽计费 + * + * @param string $payMode + */ + public function setPayMode(string $payMode) + { + $this->set("PayMode", $payMode); + } +} diff --git a/src/UNet/Apis/ReleaseShareBandwidthResponse.php b/src/UNet/Apis/ReleaseShareBandwidthResponse.php new file mode 100644 index 00000000..c7e2b1b0 --- /dev/null +++ b/src/UNet/Apis/ReleaseShareBandwidthResponse.php @@ -0,0 +1,26 @@ + "ResizeShareBandwidth"]); + $this->markRequired("Region"); + $this->markRequired("ShareBandwidth"); + $this->markRequired("ShareBandwidthId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ShareBandwidth: 带宽值,单位为Mb,范围 [20-5000] (最大值受地域限制) + * + * @return integer|null + */ + public function getShareBandwidth(): int + { + return $this->get("ShareBandwidth"); + } + + /** + * ShareBandwidth: 带宽值,单位为Mb,范围 [20-5000] (最大值受地域限制) + * + * @param int $shareBandwidth + */ + public function setShareBandwidth(int $shareBandwidth) + { + $this->set("ShareBandwidth", $shareBandwidth); + } + + /** + * ShareBandwidthId: 共享带宽的Id + * + * @return string|null + */ + public function getShareBandwidthId(): string + { + return $this->get("ShareBandwidthId"); + } + + /** + * ShareBandwidthId: 共享带宽的Id + * + * @param string $shareBandwidthId + */ + public function setShareBandwidthId(string $shareBandwidthId) + { + $this->set("ShareBandwidthId", $shareBandwidthId); + } +} diff --git a/src/UNet/Apis/ResizeShareBandwidthResponse.php b/src/UNet/Apis/ResizeShareBandwidthResponse.php new file mode 100644 index 00000000..2b34b1ca --- /dev/null +++ b/src/UNet/Apis/ResizeShareBandwidthResponse.php @@ -0,0 +1,26 @@ + "SetEIPPayMode"]); + $this->markRequired("Region"); + $this->markRequired("EIPId"); + $this->markRequired("PayMode"); + $this->markRequired("Bandwidth"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * EIPId: 弹性IP的资源Id + * + * @return string|null + */ + public function getEIPId(): string + { + return $this->get("EIPId"); + } + + /** + * EIPId: 弹性IP的资源Id + * + * @param string $eipId + */ + public function setEIPId(string $eipId) + { + $this->set("EIPId", $eipId); + } + + /** + * PayMode: 计费模式. 枚举值:"Traffic", 流量计费模式; "Bandwidth", 带宽计费模式 + * + * @return string|null + */ + public function getPayMode(): string + { + return $this->get("PayMode"); + } + + /** + * PayMode: 计费模式. 枚举值:"Traffic", 流量计费模式; "Bandwidth", 带宽计费模式 + * + * @param string $payMode + */ + public function setPayMode(string $payMode) + { + $this->set("PayMode", $payMode); + } + + /** + * Bandwidth: 调整的目标带宽值, 单位Mbps. 各地域的带宽值范围如下: 流量计费[1-200],其余情况[1-800] + * + * @return integer|null + */ + public function getBandwidth(): int + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: 调整的目标带宽值, 单位Mbps. 各地域的带宽值范围如下: 流量计费[1-200],其余情况[1-800] + * + * @param int $bandwidth + */ + public function setBandwidth(int $bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } +} diff --git a/src/UNet/Apis/SetEIPPayModeResponse.php b/src/UNet/Apis/SetEIPPayModeResponse.php new file mode 100644 index 00000000..bfdd651c --- /dev/null +++ b/src/UNet/Apis/SetEIPPayModeResponse.php @@ -0,0 +1,26 @@ + "UnBindEIP"]); + $this->markRequired("Region"); + $this->markRequired("EIPId"); + $this->markRequired("ResourceType"); + $this->markRequired("ResourceId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * EIPId: 弹性IP的资源Id + * + * @return string|null + */ + public function getEIPId(): string + { + return $this->get("EIPId"); + } + + /** + * EIPId: 弹性IP的资源Id + * + * @param string $eipId + */ + public function setEIPId(string $eipId) + { + $this->set("EIPId", $eipId); + } + + /** + * ResourceType: 弹性IP请求解绑的资源类型, 枚举值为: uhost: 云主机; ulb, 负载均衡器 upm: 物理机; hadoophost: 大数据集群;fortresshost:堡垒机;udockhost:容器;udhost:私有专区主机;natgw:NAT网关;udb:udb;vpngw:ipsec vpn;ucdr:云灾备;dbaudit:数据库审计; + * + * @return string|null + */ + public function getResourceType(): string + { + return $this->get("ResourceType"); + } + + /** + * ResourceType: 弹性IP请求解绑的资源类型, 枚举值为: uhost: 云主机; ulb, 负载均衡器 upm: 物理机; hadoophost: 大数据集群;fortresshost:堡垒机;udockhost:容器;udhost:私有专区主机;natgw:NAT网关;udb:udb;vpngw:ipsec vpn;ucdr:云灾备;dbaudit:数据库审计; + * + * @param string $resourceType + */ + public function setResourceType(string $resourceType) + { + $this->set("ResourceType", $resourceType); + } + + /** + * ResourceId: 弹性IP请求解绑的资源ID + * + * @return string|null + */ + public function getResourceId(): string + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: 弹性IP请求解绑的资源ID + * + * @param string $resourceId + */ + public function setResourceId(string $resourceId) + { + $this->set("ResourceId", $resourceId); + } +} diff --git a/src/UNet/Apis/UnBindEIPResponse.php b/src/UNet/Apis/UnBindEIPResponse.php new file mode 100644 index 00000000..82fb4507 --- /dev/null +++ b/src/UNet/Apis/UnBindEIPResponse.php @@ -0,0 +1,26 @@ + "UpdateEIPAttribute"]); + $this->markRequired("Region"); + $this->markRequired("EIPId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * EIPId: EIP资源ID + * + * @return string|null + */ + public function getEIPId(): string + { + return $this->get("EIPId"); + } + + /** + * EIPId: EIP资源ID + * + * @param string $eipId + */ + public function setEIPId(string $eipId) + { + $this->set("EIPId", $eipId); + } + + /** + * Name: 名字(Name Tag Remark都为空则报错) + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 名字(Name Tag Remark都为空则报错) + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Tag: 业务 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } +} diff --git a/src/UNet/Apis/UpdateEIPAttributeResponse.php b/src/UNet/Apis/UpdateEIPAttributeResponse.php new file mode 100644 index 00000000..669a4988 --- /dev/null +++ b/src/UNet/Apis/UpdateEIPAttributeResponse.php @@ -0,0 +1,26 @@ + "UpdateFirewallAttribute"]); + $this->markRequired("Region"); + $this->markRequired("FWId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * FWId: 防火墙资源ID + * + * @return string|null + */ + public function getFWId(): string + { + return $this->get("FWId"); + } + + /** + * FWId: 防火墙资源ID + * + * @param string $fwId + */ + public function setFWId(string $fwId) + { + $this->set("FWId", $fwId); + } + + /** + * Name: 防火墙名称,默认为空,为空则不做修改。Name,Tag,Remark必须填写1个及以上 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 防火墙名称,默认为空,为空则不做修改。Name,Tag,Remark必须填写1个及以上 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Tag: 防火墙业务组,默认为空,为空则不做修改。Name,Tag,Remark必须填写1个及以上 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 防火墙业务组,默认为空,为空则不做修改。Name,Tag,Remark必须填写1个及以上 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Remark: 防火墙备注,默认为空,为空则不做修改。Name,Tag,Remark必须填写1个及以上 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 防火墙备注,默认为空,为空则不做修改。Name,Tag,Remark必须填写1个及以上 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } +} diff --git a/src/UNet/Apis/UpdateFirewallAttributeResponse.php b/src/UNet/Apis/UpdateFirewallAttributeResponse.php new file mode 100644 index 00000000..f9db38c5 --- /dev/null +++ b/src/UNet/Apis/UpdateFirewallAttributeResponse.php @@ -0,0 +1,26 @@ + "UpdateFirewall"]); + $this->markRequired("Region"); + $this->markRequired("FWId"); + $this->markRequired("Rule"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * FWId: 防火墙资源ID + * + * @return string|null + */ + public function getFWId(): string + { + return $this->get("FWId"); + } + + /** + * FWId: 防火墙资源ID + * + * @param string $fwId + */ + public function setFWId(string $fwId) + { + $this->set("FWId", $fwId); + } + + /** + * Rule: 防火墙规则,例如:TCP|22|192.168.1.1/22|DROP|LOW|禁用22端口,第一个参数代表协议:第二个参数代表端口号,第三个参数为ip,第四个参数为ACCEPT(接受)和DROP(拒绝),第五个参数优先级:HIGH(高),MEDIUM(中),LOW(低),第六个参数为该条规则的自定义备注 + * + * @return string[]|null + */ + public function getRule(): array + { + return $this->get("Rule"); + } + + /** + * Rule: 防火墙规则,例如:TCP|22|192.168.1.1/22|DROP|LOW|禁用22端口,第一个参数代表协议:第二个参数代表端口号,第三个参数为ip,第四个参数为ACCEPT(接受)和DROP(拒绝),第五个参数优先级:HIGH(高),MEDIUM(中),LOW(低),第六个参数为该条规则的自定义备注 + * + * @param string[] $rule + */ + public function setRule(array $rule) + { + $this->set("Rule", $rule); + } +} diff --git a/src/UNet/Apis/UpdateFirewallResponse.php b/src/UNet/Apis/UpdateFirewallResponse.php new file mode 100644 index 00000000..586fefa0 --- /dev/null +++ b/src/UNet/Apis/UpdateFirewallResponse.php @@ -0,0 +1,44 @@ +get("FWId"); + } + + /** + * FWId: 防火墙id + * + * @param string $fwId + */ + public function setFWId(string $fwId) + { + $this->set("FWId", $fwId); + } +} diff --git a/src/UNet/Models/EIPAddrSet.php b/src/UNet/Models/EIPAddrSet.php new file mode 100644 index 00000000..88e51bfa --- /dev/null +++ b/src/UNet/Models/EIPAddrSet.php @@ -0,0 +1,64 @@ +get("OperatorName"); + } + + /** + * OperatorName: 运营商信息, 枚举值为: BGP: BGP; International: 国际. + * + * @param string $operatorName + */ + public function setOperatorName(string $operatorName) + { + $this->set("OperatorName", $operatorName); + } + + /** + * IP: 弹性IP地址 + * + * @return string|null + */ + public function getIP(): string + { + return $this->get("IP"); + } + + /** + * IP: 弹性IP地址 + * + * @param string $ip + */ + public function setIP(string $ip) + { + $this->set("IP", $ip); + } +} diff --git a/src/UNet/Models/EIPPayModeSet.php b/src/UNet/Models/EIPPayModeSet.php new file mode 100644 index 00000000..888bda88 --- /dev/null +++ b/src/UNet/Models/EIPPayModeSet.php @@ -0,0 +1,64 @@ +get("EIPId"); + } + + /** + * EIPId: EIP的资源ID + * + * @param string $eipId + */ + public function setEIPId(string $eipId) + { + $this->set("EIPId", $eipId); + } + + /** + * EIPPayMode: EIP的计费模式. 枚举值为:Bandwidth, 带宽计费;Traffic, 流量计费; "ShareBandwidth",共享带宽模式 + * + * @return string|null + */ + public function getEIPPayMode(): string + { + return $this->get("EIPPayMode"); + } + + /** + * EIPPayMode: EIP的计费模式. 枚举值为:Bandwidth, 带宽计费;Traffic, 流量计费; "ShareBandwidth",共享带宽模式 + * + * @param string $eipPayMode + */ + public function setEIPPayMode(string $eipPayMode) + { + $this->set("EIPPayMode", $eipPayMode); + } +} diff --git a/src/UNet/Models/EIPPriceDetailSet.php b/src/UNet/Models/EIPPriceDetailSet.php new file mode 100644 index 00000000..a4156f7e --- /dev/null +++ b/src/UNet/Models/EIPPriceDetailSet.php @@ -0,0 +1,104 @@ +get("ChargeType"); + } + + /** + * ChargeType: 弹性IP付费方式 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Price: 购买弹性IP的实际价格, 单位"元" + * + * @return float|null + */ + public function getPrice(): float + { + return $this->get("Price"); + } + + /** + * Price: 购买弹性IP的实际价格, 单位"元" + * + * @param float $price + */ + public function setPrice(float $price) + { + $this->set("Price", $price); + } + + /** + * OriginalPrice: 弹性IP的原价,单位“元” + * + * @return float|null + */ + public function getOriginalPrice(): float + { + return $this->get("OriginalPrice"); + } + + /** + * OriginalPrice: 弹性IP的原价,单位“元” + * + * @param float $originalPrice + */ + public function setOriginalPrice(float $originalPrice) + { + $this->set("OriginalPrice", $originalPrice); + } + + /** + * PurchaseValue: 资源有效期, 以Unix Timestamp表示 + * + * @return integer|null + */ + public function getPurchaseValue(): int + { + return $this->get("PurchaseValue"); + } + + /** + * PurchaseValue: 资源有效期, 以Unix Timestamp表示 + * + * @param int $purchaseValue + */ + public function setPurchaseValue(int $purchaseValue) + { + $this->set("PurchaseValue", $purchaseValue); + } +} diff --git a/src/UNet/Models/EIPSetData.php b/src/UNet/Models/EIPSetData.php new file mode 100644 index 00000000..8a3edd43 --- /dev/null +++ b/src/UNet/Models/EIPSetData.php @@ -0,0 +1,93 @@ +get("Bandwidth"); + } + + /** + * Bandwidth: EIP带宽值 + * + * @param int $bandwidth + */ + public function setBandwidth(int $bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * EIPAddr: EIP的IP信息,详情见EIPAddrSet + * + * @return EIPAddrSet[]|null + */ + public function getEIPAddr(): array + { + $items = $this->get("EIPAddr") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new EIPAddrSet($item)); + } + return $result; + } + + /** + * EIPAddr: EIP的IP信息,详情见EIPAddrSet + * + * @param EIPAddrSet[] $eipAddr + */ + public function setEIPAddr(array $eipAddr) + { + $result = []; + foreach ($eipAddr as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * EIPId: EIP资源Id + * + * @return string|null + */ + public function getEIPId(): string + { + return $this->get("EIPId"); + } + + /** + * EIPId: EIP资源Id + * + * @param string $eipId + */ + public function setEIPId(string $eipId) + { + $this->set("EIPId", $eipId); + } +} diff --git a/src/UNet/Models/FirewallDataSet.php b/src/UNet/Models/FirewallDataSet.php new file mode 100644 index 00000000..9b5c1f30 --- /dev/null +++ b/src/UNet/Models/FirewallDataSet.php @@ -0,0 +1,213 @@ +get("FWId"); + } + + /** + * FWId: 防火墙ID + * + * @param string $fwId + */ + public function setFWId(string $fwId) + { + $this->set("FWId", $fwId); + } + + /** + * GroupId: 安全组ID(即将废弃) + * + * @return string|null + */ + public function getGroupId(): string + { + return $this->get("GroupId"); + } + + /** + * GroupId: 安全组ID(即将废弃) + * + * @param string $groupId + */ + public function setGroupId(string $groupId) + { + $this->set("GroupId", $groupId); + } + + /** + * Name: 防火墙名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 防火墙名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Tag: 防火墙业务组 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 防火墙业务组 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Remark: 防火墙备注 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 防火墙备注 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } + + /** + * ResourceCount: 防火墙绑定资源数量 + * + * @return integer|null + */ + public function getResourceCount(): int + { + return $this->get("ResourceCount"); + } + + /** + * ResourceCount: 防火墙绑定资源数量 + * + * @param int $resourceCount + */ + public function setResourceCount(int $resourceCount) + { + $this->set("ResourceCount", $resourceCount); + } + + /** + * CreateTime: 防火墙组创建时间,格式为Unix Timestamp + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 防火墙组创建时间,格式为Unix Timestamp + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * Type: 防火墙组类型,枚举值为: "user defined", 用户自定义防火墙; "recommend web", 默认Web防火墙; "recommend non web", 默认非Web防火墙 + * + * @return string|null + */ + public function getType(): string + { + return $this->get("Type"); + } + + /** + * Type: 防火墙组类型,枚举值为: "user defined", 用户自定义防火墙; "recommend web", 默认Web防火墙; "recommend non web", 默认非Web防火墙 + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } + + /** + * Rule: 防火墙组中的规则列表,参见 FirewallRuleSet + * + * @return FirewallRuleSet[]|null + */ + public function getRule(): array + { + $items = $this->get("Rule") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new FirewallRuleSet($item)); + } + return $result; + } + + /** + * Rule: 防火墙组中的规则列表,参见 FirewallRuleSet + * + * @param FirewallRuleSet[] $rule + */ + public function setRule(array $rule) + { + $result = []; + foreach ($rule as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UNet/Models/FirewallRuleSet.php b/src/UNet/Models/FirewallRuleSet.php new file mode 100644 index 00000000..58048db8 --- /dev/null +++ b/src/UNet/Models/FirewallRuleSet.php @@ -0,0 +1,144 @@ +get("SrcIP"); + } + + /** + * SrcIP: 源地址 + * + * @param string $srcIP + */ + public function setSrcIP(string $srcIP) + { + $this->set("SrcIP", $srcIP); + } + + /** + * Priority: 优先级 + * + * @return string|null + */ + public function getPriority(): string + { + return $this->get("Priority"); + } + + /** + * Priority: 优先级 + * + * @param string $priority + */ + public function setPriority(string $priority) + { + $this->set("Priority", $priority); + } + + /** + * ProtocolType: 协议类型 + * + * @return string|null + */ + public function getProtocolType(): string + { + return $this->get("ProtocolType"); + } + + /** + * ProtocolType: 协议类型 + * + * @param string $protocolType + */ + public function setProtocolType(string $protocolType) + { + $this->set("ProtocolType", $protocolType); + } + + /** + * DstPort: 目标端口 + * + * @return string|null + */ + public function getDstPort(): string + { + return $this->get("DstPort"); + } + + /** + * DstPort: 目标端口 + * + * @param string $dstPort + */ + public function setDstPort(string $dstPort) + { + $this->set("DstPort", $dstPort); + } + + /** + * RuleAction: 防火墙动作 + * + * @return string|null + */ + public function getRuleAction(): string + { + return $this->get("RuleAction"); + } + + /** + * RuleAction: 防火墙动作 + * + * @param string $ruleAction + */ + public function setRuleAction(string $ruleAction) + { + $this->set("RuleAction", $ruleAction); + } + + /** + * Remark: 防火墙规则备注 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 防火墙规则备注 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } +} diff --git a/src/UNet/Models/ResourceSet.php b/src/UNet/Models/ResourceSet.php new file mode 100644 index 00000000..1348f483 --- /dev/null +++ b/src/UNet/Models/ResourceSet.php @@ -0,0 +1,184 @@ +get("Zone"); + } + + /** + * Zone: 可用区 + * + * @param int $zone + */ + public function setZone(int $zone) + { + $this->set("Zone", $zone); + } + + /** + * Name: 名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * PrivateIP: 内网IP + * + * @return string|null + */ + public function getPrivateIP(): string + { + return $this->get("PrivateIP"); + } + + /** + * PrivateIP: 内网IP + * + * @param string $privateIP + */ + public function setPrivateIP(string $privateIP) + { + $this->set("PrivateIP", $privateIP); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } + + /** + * ResourceID: 绑定该防火墙的资源id + * + * @return string|null + */ + public function getResourceID(): string + { + return $this->get("ResourceID"); + } + + /** + * ResourceID: 绑定该防火墙的资源id + * + * @param string $resourceID + */ + public function setResourceID(string $resourceID) + { + $this->set("ResourceID", $resourceID); + } + + /** + * ResourceType: 绑定防火墙组的资源类型。"unatgw",NAT网关; "uhost",云主机; "upm",物理云主机; "hadoophost",hadoop节点; "fortresshost",堡垒机; "udhost",私有专区主机;"udockhost",容器;"dbaudit",数据库审计. + * + * @return string|null + */ + public function getResourceType(): string + { + return $this->get("ResourceType"); + } + + /** + * ResourceType: 绑定防火墙组的资源类型。"unatgw",NAT网关; "uhost",云主机; "upm",物理云主机; "hadoophost",hadoop节点; "fortresshost",堡垒机; "udhost",私有专区主机;"udockhost",容器;"dbaudit",数据库审计. + * + * @param string $resourceType + */ + public function setResourceType(string $resourceType) + { + $this->set("ResourceType", $resourceType); + } + + /** + * Status: 状态 + * + * @return integer|null + */ + public function getStatus(): int + { + return $this->get("Status"); + } + + /** + * Status: 状态 + * + * @param int $status + */ + public function setStatus(int $status) + { + $this->set("Status", $status); + } + + /** + * Tag: 业务组 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } +} diff --git a/src/UNet/Models/ShareBandwidthSet.php b/src/UNet/Models/ShareBandwidthSet.php new file mode 100644 index 00000000..f5a9a710 --- /dev/null +++ b/src/UNet/Models/ShareBandwidthSet.php @@ -0,0 +1,84 @@ +get("ShareBandwidth"); + } + + /** + * ShareBandwidth: 共享带宽带宽值 + * + * @param int $shareBandwidth + */ + public function setShareBandwidth(int $shareBandwidth) + { + $this->set("ShareBandwidth", $shareBandwidth); + } + + /** + * ShareBandwidthName: 共享带宽的资源名称 + * + * @return string|null + */ + public function getShareBandwidthName(): string + { + return $this->get("ShareBandwidthName"); + } + + /** + * ShareBandwidthName: 共享带宽的资源名称 + * + * @param string $shareBandwidthName + */ + public function setShareBandwidthName(string $shareBandwidthName) + { + $this->set("ShareBandwidthName", $shareBandwidthName); + } + + /** + * ShareBandwidthId: 共享带宽ID + * + * @return string|null + */ + public function getShareBandwidthId(): string + { + return $this->get("ShareBandwidthId"); + } + + /** + * ShareBandwidthId: 共享带宽ID + * + * @param string $shareBandwidthId + */ + public function setShareBandwidthId(string $shareBandwidthId) + { + $this->set("ShareBandwidthId", $shareBandwidthId); + } +} diff --git a/src/UNet/Models/ThroughputDailyBillingInfo.php b/src/UNet/Models/ThroughputDailyBillingInfo.php new file mode 100644 index 00000000..179b399a --- /dev/null +++ b/src/UNet/Models/ThroughputDailyBillingInfo.php @@ -0,0 +1,124 @@ +get("StartTime"); + } + + /** + * StartTime: 计费开始时间 + * + * @param int $startTime + */ + public function setStartTime(int $startTime) + { + $this->set("StartTime", $startTime); + } + + /** + * EndTime: 计费结束时间 + * + * @return integer|null + */ + public function getEndTime(): int + { + return $this->get("EndTime"); + } + + /** + * EndTime: 计费结束时间 + * + * @param int $endTime + */ + public function setEndTime(int $endTime) + { + $this->set("EndTime", $endTime); + } + + /** + * QuantityOutSize: 计费流量,单位“GB” + * + * @return integer|null + */ + public function getQuantityOutSize(): int + { + return $this->get("QuantityOutSize"); + } + + /** + * QuantityOutSize: 计费流量,单位“GB” + * + * @param int $quantityOutSize + */ + public function setQuantityOutSize(int $quantityOutSize) + { + $this->set("QuantityOutSize", $quantityOutSize); + } + + /** + * QuantityOutMoney: 计费金额,单位“元” + * + * @return integer|null + */ + public function getQuantityOutMoney(): int + { + return $this->get("QuantityOutMoney"); + } + + /** + * QuantityOutMoney: 计费金额,单位“元” + * + * @param int $quantityOutMoney + */ + public function setQuantityOutMoney(int $quantityOutMoney) + { + $this->set("QuantityOutMoney", $quantityOutMoney); + } + + /** + * BillingState: 是否已计费,“Yes”或者“No” + * + * @return string|null + */ + public function getBillingState(): string + { + return $this->get("BillingState"); + } + + /** + * BillingState: 是否已计费,“Yes”或者“No” + * + * @param string $billingState + */ + public function setBillingState(string $billingState) + { + $this->set("BillingState", $billingState); + } +} diff --git a/src/UNet/Models/UnetAllocateEIPSet.php b/src/UNet/Models/UnetAllocateEIPSet.php new file mode 100644 index 00000000..7936337e --- /dev/null +++ b/src/UNet/Models/UnetAllocateEIPSet.php @@ -0,0 +1,73 @@ +get("EIPId"); + } + + /** + * EIPId: 申请到的EIP资源ID + * + * @param string $eipId + */ + public function setEIPId(string $eipId) + { + $this->set("EIPId", $eipId); + } + + /** + * EIPAddr: 申请到的IPv4地址. + * + * @return UnetEIPAddrSet[]|null + */ + public function getEIPAddr(): array + { + $items = $this->get("EIPAddr") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UnetEIPAddrSet($item)); + } + return $result; + } + + /** + * EIPAddr: 申请到的IPv4地址. + * + * @param UnetEIPAddrSet[] $eipAddr + */ + public function setEIPAddr(array $eipAddr) + { + $result = []; + foreach ($eipAddr as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UNet/Models/UnetBandwidthPackageSet.php b/src/UNet/Models/UnetBandwidthPackageSet.php new file mode 100644 index 00000000..f2f8a11c --- /dev/null +++ b/src/UNet/Models/UnetBandwidthPackageSet.php @@ -0,0 +1,173 @@ +get("BandwidthPackageId"); + } + + /** + * BandwidthPackageId: 带宽包的资源ID + * + * @param string $bandwidthPackageId + */ + public function setBandwidthPackageId(string $bandwidthPackageId) + { + $this->set("BandwidthPackageId", $bandwidthPackageId); + } + + /** + * EnableTime: 生效时间, 格式为 Unix Timestamp + * + * @return integer|null + */ + public function getEnableTime(): int + { + return $this->get("EnableTime"); + } + + /** + * EnableTime: 生效时间, 格式为 Unix Timestamp + * + * @param int $enableTime + */ + public function setEnableTime(int $enableTime) + { + $this->set("EnableTime", $enableTime); + } + + /** + * DisableTime: 失效时间, 格式为 Unix Timestamp + * + * @return integer|null + */ + public function getDisableTime(): int + { + return $this->get("DisableTime"); + } + + /** + * DisableTime: 失效时间, 格式为 Unix Timestamp + * + * @param int $disableTime + */ + public function setDisableTime(int $disableTime) + { + $this->set("DisableTime", $disableTime); + } + + /** + * CreateTime: 创建时间, 格式为 Unix Timestamp + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间, 格式为 Unix Timestamp + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * Bandwidth: 带宽包的临时带宽值, 单位Mbps + * + * @return integer|null + */ + public function getBandwidth(): int + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: 带宽包的临时带宽值, 单位Mbps + * + * @param int $bandwidth + */ + public function setBandwidth(int $bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * EIPId: 带宽包所绑定弹性IP的资源ID + * + * @return string|null + */ + public function getEIPId(): string + { + return $this->get("EIPId"); + } + + /** + * EIPId: 带宽包所绑定弹性IP的资源ID + * + * @param string $eipId + */ + public function setEIPId(string $eipId) + { + $this->set("EIPId", $eipId); + } + + /** + * EIPAddr: 带宽包所绑定弹性IP的详细信息,只有当EIPId对应双线IP时, EIPAddr的长度为2, 其他情况, EIPAddr长度均为1.参见 EIPAddrSet + * + * @return EIPAddrSet[]|null + */ + public function getEIPAddr(): array + { + $items = $this->get("EIPAddr") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new EIPAddrSet($item)); + } + return $result; + } + + /** + * EIPAddr: 带宽包所绑定弹性IP的详细信息,只有当EIPId对应双线IP时, EIPAddr的长度为2, 其他情况, EIPAddr长度均为1.参见 EIPAddrSet + * + * @param EIPAddrSet[] $eipAddr + */ + public function setEIPAddr(array $eipAddr) + { + $result = []; + foreach ($eipAddr as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UNet/Models/UnetBandwidthUsageEIPSet.php b/src/UNet/Models/UnetBandwidthUsageEIPSet.php new file mode 100644 index 00000000..9acb2b15 --- /dev/null +++ b/src/UNet/Models/UnetBandwidthUsageEIPSet.php @@ -0,0 +1,64 @@ +get("CurBandwidth"); + } + + /** + * CurBandwidth: 最近5分钟带宽用量, 单位Mbps + * + * @param float $curBandwidth + */ + public function setCurBandwidth(float $curBandwidth) + { + $this->set("CurBandwidth", $curBandwidth); + } + + /** + * EIPId: 弹性IP资源ID + * + * @return string|null + */ + public function getEIPId(): string + { + return $this->get("EIPId"); + } + + /** + * EIPId: 弹性IP资源ID + * + * @param string $eipId + */ + public function setEIPId(string $eipId) + { + $this->set("EIPId", $eipId); + } +} diff --git a/src/UNet/Models/UnetEIPAddrSet.php b/src/UNet/Models/UnetEIPAddrSet.php new file mode 100644 index 00000000..3f135872 --- /dev/null +++ b/src/UNet/Models/UnetEIPAddrSet.php @@ -0,0 +1,64 @@ +get("OperatorName"); + } + + /** + * OperatorName: 运营商信息如: 国际: International, BGP: BGP + * + * @param string $operatorName + */ + public function setOperatorName(string $operatorName) + { + $this->set("OperatorName", $operatorName); + } + + /** + * IP: IP地址 + * + * @return string|null + */ + public function getIP(): string + { + return $this->get("IP"); + } + + /** + * IP: IP地址 + * + * @param string $ip + */ + public function setIP(string $ip) + { + $this->set("IP", $ip); + } +} diff --git a/src/UNet/Models/UnetEIPResourceSet.php b/src/UNet/Models/UnetEIPResourceSet.php new file mode 100644 index 00000000..a54ddc68 --- /dev/null +++ b/src/UNet/Models/UnetEIPResourceSet.php @@ -0,0 +1,164 @@ +get("ResourceType"); + } + + /** + * ResourceType: 已绑定的资源类型, 枚举值为: uhost, 云主机;natgw:NAT网关;ulb:负载均衡器;upm: 物理机; hadoophost: 大数据集群;fortresshost:堡垒机;udockhost:容器;udhost:私有专区主机;vpngw:IPSec VPN;ucdr:云灾备;dbaudit:数据库审计,uni:虚拟网卡。 + * + * @param string $resourceType + */ + public function setResourceType(string $resourceType) + { + $this->set("ResourceType", $resourceType); + } + + /** + * ResourceName: 已绑定的资源名称 + * + * @return string|null + */ + public function getResourceName(): string + { + return $this->get("ResourceName"); + } + + /** + * ResourceName: 已绑定的资源名称 + * + * @param string $resourceName + */ + public function setResourceName(string $resourceName) + { + $this->set("ResourceName", $resourceName); + } + + /** + * ResourceID: 已绑定资源的资源ID + * + * @return string|null + */ + public function getResourceID(): string + { + return $this->get("ResourceID"); + } + + /** + * ResourceID: 已绑定资源的资源ID + * + * @param string $resourceID + */ + public function setResourceID(string $resourceID) + { + $this->set("ResourceID", $resourceID); + } + + /** + * SubResourceType: 资源绑定的虚拟网卡的类型。uni,虚拟网卡。 + * + * @return string|null + */ + public function getSubResourceType(): string + { + return $this->get("SubResourceType"); + } + + /** + * SubResourceType: 资源绑定的虚拟网卡的类型。uni,虚拟网卡。 + * + * @param string $subResourceType + */ + public function setSubResourceType(string $subResourceType) + { + $this->set("SubResourceType", $subResourceType); + } + + /** + * SubResourceName: 资源绑定的虚拟网卡的名称 + * + * @return string|null + */ + public function getSubResourceName(): string + { + return $this->get("SubResourceName"); + } + + /** + * SubResourceName: 资源绑定的虚拟网卡的名称 + * + * @param string $subResourceName + */ + public function setSubResourceName(string $subResourceName) + { + $this->set("SubResourceName", $subResourceName); + } + + /** + * SubResourceId: 资源绑定的虚拟网卡的ID + * + * @return string|null + */ + public function getSubResourceId(): string + { + return $this->get("SubResourceId"); + } + + /** + * SubResourceId: 资源绑定的虚拟网卡的ID + * + * @param string $subResourceId + */ + public function setSubResourceId(string $subResourceId) + { + $this->set("SubResourceId", $subResourceId); + } + + /** + * EIPId: 弹性IP的资源ID + * + * @return string|null + */ + public function getEIPId(): string + { + return $this->get("EIPId"); + } + + /** + * EIPId: 弹性IP的资源ID + * + * @param string $eipId + */ + public function setEIPId(string $eipId) + { + $this->set("EIPId", $eipId); + } +} diff --git a/src/UNet/Models/UnetEIPSet.php b/src/UNet/Models/UnetEIPSet.php new file mode 100644 index 00000000..a8a15b5a --- /dev/null +++ b/src/UNet/Models/UnetEIPSet.php @@ -0,0 +1,353 @@ +get("EIPId"); + } + + /** + * EIPId: 弹性IP的资源ID + * + * @param string $eipId + */ + public function setEIPId(string $eipId) + { + $this->set("EIPId", $eipId); + } + + /** + * Weight: 外网出口权重, 默认为50, 范围[0-100] + * + * @return integer|null + */ + public function getWeight(): int + { + return $this->get("Weight"); + } + + /** + * Weight: 外网出口权重, 默认为50, 范围[0-100] + * + * @param int $weight + */ + public function setWeight(int $weight) + { + $this->set("Weight", $weight); + } + + /** + * BandwidthType: 带宽模式, 枚举值为: 0: 非共享带宽模式, 1: 共享带宽模式 + * + * @return integer|null + */ + public function getBandwidthType(): int + { + return $this->get("BandwidthType"); + } + + /** + * BandwidthType: 带宽模式, 枚举值为: 0: 非共享带宽模式, 1: 共享带宽模式 + * + * @param int $bandwidthType + */ + public function setBandwidthType(int $bandwidthType) + { + $this->set("BandwidthType", $bandwidthType); + } + + /** + * Bandwidth: 弹性IP的带宽, 单位为Mbps, 当BandwidthType=1时, 该处显示为共享带宽值. 当BandwidthType=0时, 该处显示这个弹性IP的带宽. + * + * @return integer|null + */ + public function getBandwidth(): int + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: 弹性IP的带宽, 单位为Mbps, 当BandwidthType=1时, 该处显示为共享带宽值. 当BandwidthType=0时, 该处显示这个弹性IP的带宽. + * + * @param int $bandwidth + */ + public function setBandwidth(int $bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * Status: 弹性IP的资源绑定状态, 枚举值为: used: 已绑定, free: 未绑定, freeze: 已冻结 + * + * @return string|null + */ + public function getStatus(): string + { + return $this->get("Status"); + } + + /** + * Status: 弹性IP的资源绑定状态, 枚举值为: used: 已绑定, free: 未绑定, freeze: 已冻结 + * + * @param string $status + */ + public function setStatus(string $status) + { + $this->set("Status", $status); + } + + /** + * ChargeType: 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按小时付费; Trial, 试用. 按小时付费和试用这两种付费模式需要开通权限. + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按小时付费; Trial, 试用. 按小时付费和试用这两种付费模式需要开通权限. + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * CreateTime: 弹性IP的创建时间, 格式为Unix Timestamp + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 弹性IP的创建时间, 格式为Unix Timestamp + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ExpireTime: 弹性IP的到期时间, 格式为Unix Timestamp + * + * @return integer|null + */ + public function getExpireTime(): int + { + return $this->get("ExpireTime"); + } + + /** + * ExpireTime: 弹性IP的到期时间, 格式为Unix Timestamp + * + * @param int $expireTime + */ + public function setExpireTime(int $expireTime) + { + $this->set("ExpireTime", $expireTime); + } + + /** + * Resource: 弹性IP的详细信息列表, 具体结构见下方 UnetEIPResourceSet + * + * @return UnetEIPResourceSet|null + */ + public function getResource(): UnetEIPResourceSet + { + return new UnetEIPResourceSet($this->get("Resource")); + } + + /** + * Resource: 弹性IP的详细信息列表, 具体结构见下方 UnetEIPResourceSet + * + * @param UnetEIPResourceSet $resource + */ + public function setResource(UnetEIPResourceSet $resource) + { + $this->set("Resource", $resource->getAll()); + } + + /** + * EIPAddr: 弹性IP的详细信息列表, 具体结构见下方 UnetEIPAddrSet + * + * @return UnetEIPAddrSet[]|null + */ + public function getEIPAddr(): array + { + $items = $this->get("EIPAddr") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UnetEIPAddrSet($item)); + } + return $result; + } + + /** + * EIPAddr: 弹性IP的详细信息列表, 具体结构见下方 UnetEIPAddrSet + * + * @param UnetEIPAddrSet[] $eipAddr + */ + public function setEIPAddr(array $eipAddr) + { + $result = []; + foreach ($eipAddr as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * Name: 弹性IP的名称,缺省值为 "EIP" + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 弹性IP的名称,缺省值为 "EIP" + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Tag: 弹性IP的业务组标识, 缺省值为 "Default" + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 弹性IP的业务组标识, 缺省值为 "Default" + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Remark: 弹性IP的备注, 缺省值为 "" + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 弹性IP的备注, 缺省值为 "" + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } + + /** + * PayMode: 弹性IP的计费模式, 枚举值为: "Bandwidth", 带宽计费; "Traffic", 流量计费; "ShareBandwidth",共享带宽模式. 默认为 "Bandwidth". + * + * @return string|null + */ + public function getPayMode(): string + { + return $this->get("PayMode"); + } + + /** + * PayMode: 弹性IP的计费模式, 枚举值为: "Bandwidth", 带宽计费; "Traffic", 流量计费; "ShareBandwidth",共享带宽模式. 默认为 "Bandwidth". + * + * @param string $payMode + */ + public function setPayMode(string $payMode) + { + $this->set("PayMode", $payMode); + } + + /** + * ShareBandwidthSet: 共享带宽信息 参见 ShareBandwidthSet + * + * @return ShareBandwidthSet|null + */ + public function getShareBandwidthSet(): ShareBandwidthSet + { + return new ShareBandwidthSet($this->get("ShareBandwidthSet")); + } + + /** + * ShareBandwidthSet: 共享带宽信息 参见 ShareBandwidthSet + * + * @param ShareBandwidthSet $shareBandwidthSet + */ + public function setShareBandwidthSet(ShareBandwidthSet $shareBandwidthSet) + { + $this->set("ShareBandwidthSet", $shareBandwidthSet->getAll()); + } + + /** + * Expire: 弹性IP是否到期 + * + * @return boolean|null + */ + public function getExpire(): bool + { + return $this->get("Expire"); + } + + /** + * Expire: 弹性IP是否到期 + * + * @param boolean $expire + */ + public function setExpire(bool $expire) + { + $this->set("Expire", $expire); + } +} diff --git a/src/UNet/Models/UnetShareBandwidthSet.php b/src/UNet/Models/UnetShareBandwidthSet.php new file mode 100644 index 00000000..174f02e1 --- /dev/null +++ b/src/UNet/Models/UnetShareBandwidthSet.php @@ -0,0 +1,193 @@ +get("IPVersion"); + } + + /** + * IPVersion: 共享带宽类型 + * + * @param string $ipVersion + */ + public function setIPVersion(string $ipVersion) + { + $this->set("IPVersion", $ipVersion); + } + + /** + * ShareBandwidth: 共享带宽值(预付费)/共享带宽峰值(后付费), 单位Mbps + * + * @return integer|null + */ + public function getShareBandwidth(): int + { + return $this->get("ShareBandwidth"); + } + + /** + * ShareBandwidth: 共享带宽值(预付费)/共享带宽峰值(后付费), 单位Mbps + * + * @param int $shareBandwidth + */ + public function setShareBandwidth(int $shareBandwidth) + { + $this->set("ShareBandwidth", $shareBandwidth); + } + + /** + * ShareBandwidthId: 共享带宽的资源ID + * + * @return string|null + */ + public function getShareBandwidthId(): string + { + return $this->get("ShareBandwidthId"); + } + + /** + * ShareBandwidthId: 共享带宽的资源ID + * + * @param string $shareBandwidthId + */ + public function setShareBandwidthId(string $shareBandwidthId) + { + $this->set("ShareBandwidthId", $shareBandwidthId); + } + + /** + * ChargeType: 付费方式, 预付费:Year 按年,Month 按月,Dynamic 按需;后付费:PostPay(按月) + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费方式, 预付费:Year 按年,Month 按月,Dynamic 按需;后付费:PostPay(按月) + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * CreateTime: 创建时间, 格式为Unix Timestamp + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间, 格式为Unix Timestamp + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ExpireTime: 过期时间, 格式为Unix Timestamp + * + * @return integer|null + */ + public function getExpireTime(): int + { + return $this->get("ExpireTime"); + } + + /** + * ExpireTime: 过期时间, 格式为Unix Timestamp + * + * @param int $expireTime + */ + public function setExpireTime(int $expireTime) + { + $this->set("ExpireTime", $expireTime); + } + + /** + * EIPSet: EIP信息,详情见 EIPSetData + * + * @return EIPSetData[]|null + */ + public function getEIPSet(): array + { + $items = $this->get("EIPSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new EIPSetData($item)); + } + return $result; + } + + /** + * EIPSet: EIP信息,详情见 EIPSetData + * + * @param EIPSetData[] $eipSet + */ + public function setEIPSet(array $eipSet) + { + $result = []; + foreach ($eipSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * Name: 共享带宽名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 共享带宽名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } +} diff --git a/src/UNet/UNetClient.php b/src/UNet/UNetClient.php new file mode 100644 index 00000000..f29e2276 --- /dev/null +++ b/src/UNet/UNetClient.php @@ -0,0 +1,1096 @@ + (string) 地域。 + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 + * "OperatorName" => (string) 弹性IP线路,枚举值:国际线路, International;BGP线路:Bgp。使用BGP线路的地域:北京二、上海金融云、上海二、广州等,其他地域均使用国际线路。 + * "Bandwidth" => (integer) 弹性IP的外网带宽, 单位为Mbps. 共享带宽模式必须指定0M带宽, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-10000] + * "Tag" => (string) 业务组名称, 默认为 "Default" + * "ChargeType" => (string) 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按时付费,默认为按月付费。 + * "Quantity" => (integer) 购买的时长, 默认: 1 + * "PayMode" => (string) 弹性IP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; "ShareBandwidth",共享带宽模式. 默认为 "Bandwidth".“PostAccurateBandwidth”:带宽后付费模式 + * "ShareBandwidthId" => (string) 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效 + * "Name" => (string) 弹性IP的名称, 默认为 "EIP" + * "Remark" => (string) 弹性IP的备注, 默认为空 + * "CouponId" => (string) 代金券ID, 默认不使用 + * ] + * + * Outputs: + * + * $outputs = [ + * "EIPSet" => (array) 申请到的EIP资源详情 参见 UnetAllocateEIPSet[ + * [ + * "EIPId" => (string) 申请到的EIP资源ID + * "EIPAddr" => (array) 申请到的IPv4地址. [ + * [ + * "OperatorName" => (string) 运营商信息如: 国际: International, BGP: BGP + * "IP" => (string) IP地址 + * ] + * ] + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function allocateEIP(AllocateEIPRequest $request = null): AllocateEIPResponse + { + $resp = $this->invoke($request); + return new AllocateEIPResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * AllocateShareBandwidth - 开通共享带宽 + * + * See also: https://docs.ucloud.cn/api/UNet-api/allocate_share_bandwidth + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 + * "Name" => (string) 共享带宽名字 + * "ChargeType" => (string) 付费方式:Year 按年,Month 按月,Dynamic 按时; + * "ShareBandwidth" => (integer) 共享带宽值 + * "Quantity" => (integer) 购买时长 + * "IPVersion" => (string) 共享带宽类型,IPv4或者IPv6,不传默认IPv4 + * ] + * + * Outputs: + * + * $outputs = [ + * "ShareBandwidthId" => (string) 共享带宽资源Id + * ] + * + * @throws UCloudException + */ + public function allocateShareBandwidth(AllocateShareBandwidthRequest $request = null): AllocateShareBandwidthResponse + { + $resp = $this->invoke($request); + return new AllocateShareBandwidthResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * AssociateEIPWithShareBandwidth - 将EIP加入共享带宽 + * + * See also: https://docs.ucloud.cn/api/UNet-api/associate_eip_with_share_bandwidth + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 + * "EIPIds" => (array) 要加入共享带宽的EIP的资源Id + * "ShareBandwidthId" => (string) 共享带宽ID + * "IPVersion" => (string) 共享带宽类型,IPv4或者IPv6,不传默认IPv4 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function associateEIPWithShareBandwidth(AssociateEIPWithShareBandwidthRequest $request = null): AssociateEIPWithShareBandwidthResponse + { + $resp = $this->invoke($request); + return new AssociateEIPWithShareBandwidthResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * BindEIP - 将尚未使用的弹性IP绑定到指定的资源 + * + * See also: https://docs.ucloud.cn/api/UNet-api/bind_eip + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域 + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写 + * "EIPId" => (string) 弹性IP的资源Id + * "ResourceType" => (string) 弹性IP请求绑定的资源类型, 枚举值为: uhost: 云主机; ulb, 负载均衡器 upm: 物理机; hadoophost: 大数据集群;fortresshost:堡垒机;udockhost:容器;udhost:私有专区主机;natgw:natgw;udb:udb;vpngw:ipsec vpn;ucdr:云灾备;dbaudit:数据库审计;uni:虚拟网卡;cube,Cube容器。如果EIP为普通带宽计费,且带宽值高于2G,则只允许绑定在快杰型云主机和ULB + * "ResourceId" => (string) 弹性IP请求绑定的资源ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function bindEIP(BindEIPRequest $request = null): BindEIPResponse + { + $resp = $this->invoke($request); + return new BindEIPResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateBandwidthPackage - 为非共享带宽模式下, 已绑定资源实例的带宽计费弹性IP附加临时带宽包 + * + * See also: https://docs.ucloud.cn/api/UNet-api/create_bandwidth_package + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Bandwidth" => (integer) 带宽大小(单位Mbps), 取值范围[2,800] (最大值受地域限制) + * "EIPId" => (string) 所绑定弹性IP的资源ID + * "TimeRange" => (integer) 带宽包有效时长, 取值范围为大于0的整数, 即该带宽包在EnableTime到 EnableTime+TimeRange时间段内生效 + * "EnableTime" => (integer) 生效时间, 格式为 Unix timestamp, 默认为立即开通 + * "CouponId" => (string) 代金券ID + * ] + * + * Outputs: + * + * $outputs = [ + * "BandwidthPackageId" => (string) 所创建带宽包的资源ID + * ] + * + * @throws UCloudException + */ + public function createBandwidthPackage(CreateBandwidthPackageRequest $request = null): CreateBandwidthPackageResponse + { + $resp = $this->invoke($request); + return new CreateBandwidthPackageResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateFirewall - 创建防火墙 + * + * See also: https://docs.ucloud.cn/api/UNet-api/create_firewall + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域 + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写 + * "Rule" => (array) 防火墙规则,例如:TCP|22|192.168.1.1/22|DROP|LOW|禁用22端口,第一个参数代表协议:第二个参数代表端口号,第三个参数为ip,第四个参数为ACCEPT(接受)和DROP(拒绝),第五个参数优先级:HIGH(高),MEDIUM(中),LOW(低),第六个参数为该条规则的自定义备注,bj1不支持添加备注 + * "Name" => (string) 防火墙名称 + * "Tag" => (string) 防火墙业务组,默认为Default + * "Remark" => (string) 防火墙描述,默认为空 + * ] + * + * Outputs: + * + * $outputs = [ + * "FWId" => (string) 防火墙ID + * ] + * + * @throws UCloudException + */ + public function createFirewall(CreateFirewallRequest $request = null): CreateFirewallResponse + { + $resp = $this->invoke($request); + return new CreateFirewallResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteBandwidthPackage - 删除弹性IP上已附加带宽包 + * + * See also: https://docs.ucloud.cn/api/UNet-api/delete_bandwidth_package + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "BandwidthPackageId" => (string) 带宽包资源ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteBandwidthPackage(DeleteBandwidthPackageRequest $request = null): DeleteBandwidthPackageResponse + { + $resp = $this->invoke($request); + return new DeleteBandwidthPackageResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteFirewall - 删除防火墙 + * + * See also: https://docs.ucloud.cn/api/UNet-api/delete_firewall + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "FWId" => (string) 防火墙资源ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteFirewall(DeleteFirewallRequest $request = null): DeleteFirewallResponse + { + $resp = $this->invoke($request); + return new DeleteFirewallResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeBandwidthPackage - 获取某地域下的带宽包信息 + * + * See also: https://docs.ucloud.cn/api/UNet-api/describe_bandwidth_package + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Limit" => (integer) 返回数据分页值, 取值范围为 [0,10000000] 之间的整数, 默认为20 + * "Offset" => (integer) 返回数据偏移量, 默认为0 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 满足条件的带宽包总数 + * "DataSets" => (array) 带宽包详细信息, 参见 UnetBandwidthPackageSet[ + * [ + * "BandwidthPackageId" => (string) 带宽包的资源ID + * "EnableTime" => (integer) 生效时间, 格式为 Unix Timestamp + * "DisableTime" => (integer) 失效时间, 格式为 Unix Timestamp + * "CreateTime" => (integer) 创建时间, 格式为 Unix Timestamp + * "Bandwidth" => (integer) 带宽包的临时带宽值, 单位Mbps + * "EIPId" => (string) 带宽包所绑定弹性IP的资源ID + * "EIPAddr" => (array) 带宽包所绑定弹性IP的详细信息,只有当EIPId对应双线IP时, EIPAddr的长度为2, 其他情况, EIPAddr长度均为1.参见 EIPAddrSet[ + * [ + * "OperatorName" => (string) 运营商信息, 枚举值为: BGP: BGP; International: 国际. + * "IP" => (string) 弹性IP地址 + * ] + * ] + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeBandwidthPackage(DescribeBandwidthPackageRequest $request = null): DescribeBandwidthPackageResponse + { + $resp = $this->invoke($request); + return new DescribeBandwidthPackageResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeBandwidthUsage - 获取带宽用量信息 + * + * See also: https://docs.ucloud.cn/api/UNet-api/describe_bandwidth_usage + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Limit" => (integer) 返回数据分页值, 取值范围为 [0,10000000] 之间的整数, 默认为20 + * "OffSet" => (integer) 返回数据偏移量, 默认为0 + * "EIPIds" => (array) 弹性IP的资源Id. 如果为空, 则返回当前 Region中符合条件的所有EIP的带宽用量, n为自然数 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) EIPSet中的元素个数 + * "EIPSet" => (array) 单个弹性IP的带宽用量详细信息, 详见 UnetBandwidthUsageEIPSet, 如没有弹性IP资源则没有该返回值。[ + * [ + * "CurBandwidth" => (number) 最近5分钟带宽用量, 单位Mbps + * "EIPId" => (string) 弹性IP资源ID + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeBandwidthUsage(DescribeBandwidthUsageRequest $request = null): DescribeBandwidthUsageResponse + { + $resp = $this->invoke($request); + return new DescribeBandwidthUsageResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeEIP - 获取弹性IP信息 + * + * See also: https://docs.ucloud.cn/api/UNet-api/describe_eip + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域 + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写 + * "EIPIds" => (array) 弹性IP的资源ID如果为空, 则返回当前 Region中符合条件的的所有EIP + * "Offset" => (integer) 数据偏移量, 默认为0 + * "Limit" => (integer) 数据分页值, 默认为20 + * "IPs" => (array) IP地址,支持通过ip查询,如果ip与EIP都传,会取并集查询 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 满足条件的弹性IP总数 + * "UnbindCount" => (integer) 未绑定的弹性IP总数 + * "TotalBandwidth" => (integer) 满足条件的弹性IP带宽总和, 单位Mbps + * "EIPSet" => (array) 弹性IP列表, 每项参数详见 UnetEIPSet[ + * [ + * "EIPId" => (string) 弹性IP的资源ID + * "Weight" => (integer) 外网出口权重, 默认为50, 范围[0-100] + * "BandwidthType" => (integer) 带宽模式, 枚举值为: 0: 非共享带宽模式, 1: 共享带宽模式 + * "Bandwidth" => (integer) 弹性IP的带宽, 单位为Mbps, 当BandwidthType=1时, 该处显示为共享带宽值. 当BandwidthType=0时, 该处显示这个弹性IP的带宽. + * "Status" => (string) 弹性IP的资源绑定状态, 枚举值为: used: 已绑定, free: 未绑定, freeze: 已冻结 + * "ChargeType" => (string) 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按小时付费; Trial, 试用. 按小时付费和试用这两种付费模式需要开通权限. + * "CreateTime" => (integer) 弹性IP的创建时间, 格式为Unix Timestamp + * "ExpireTime" => (integer) 弹性IP的到期时间, 格式为Unix Timestamp + * "Resource" => (object) 弹性IP的详细信息列表, 具体结构见下方 UnetEIPResourceSet[ + * "ResourceType" => (string) 已绑定的资源类型, 枚举值为: uhost, 云主机;natgw:NAT网关;ulb:负载均衡器;upm: 物理机; hadoophost: 大数据集群;fortresshost:堡垒机;udockhost:容器;udhost:私有专区主机;vpngw:IPSec VPN;ucdr:云灾备;dbaudit:数据库审计,uni:虚拟网卡。 + * "ResourceName" => (string) 已绑定的资源名称 + * "ResourceID" => (string) 已绑定资源的资源ID + * "SubResourceType" => (string) 资源绑定的虚拟网卡的类型。uni,虚拟网卡。 + * "SubResourceName" => (string) 资源绑定的虚拟网卡的名称 + * "SubResourceId" => (string) 资源绑定的虚拟网卡的ID + * "EIPId" => (string) 弹性IP的资源ID + * ] + * "EIPAddr" => (array) 弹性IP的详细信息列表, 具体结构见下方 UnetEIPAddrSet[ + * [ + * "OperatorName" => (string) 运营商信息如: 国际: International, BGP: BGP + * "IP" => (string) IP地址 + * ] + * ] + * "Name" => (string) 弹性IP的名称,缺省值为 "EIP" + * "Tag" => (string) 弹性IP的业务组标识, 缺省值为 "Default" + * "Remark" => (string) 弹性IP的备注, 缺省值为 "" + * "PayMode" => (string) 弹性IP的计费模式, 枚举值为: "Bandwidth", 带宽计费; "Traffic", 流量计费; "ShareBandwidth",共享带宽模式. 默认为 "Bandwidth". + * "ShareBandwidthSet" => (object) 共享带宽信息 参见 ShareBandwidthSet[ + * "ShareBandwidth" => (integer) 共享带宽带宽值 + * "ShareBandwidthName" => (string) 共享带宽的资源名称 + * "ShareBandwidthId" => (string) 共享带宽ID + * ] + * "Expire" => (boolean) 弹性IP是否到期 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeEIP(DescribeEIPRequest $request = null): DescribeEIPResponse + { + $resp = $this->invoke($request); + return new DescribeEIPResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeFirewall - 获取防火墙组信息 + * + * See also: https://docs.ucloud.cn/api/UNet-api/describe_firewall + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域 + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写 + * "FWId" => (string) 防火墙ID,默认为返回所有防火墙 + * "ResourceType" => (string) 绑定防火墙组的资源类型,默认为全部资源类型。枚举值为:"unatgw",NAT网关; "uhost",云主机;“uni”,虚拟网卡; "upm",物理云主机; "hadoophost",hadoop节点; "fortresshost",堡垒机; "udhost",私有专区主机;"udockhost",容器;"dbaudit",数据库审计. + * "ResourceId" => (string) 绑定防火墙组的资源ID + * "Limit" => (integer) 返回数据长度,默认为20,最大10000000 + * "Offset" => (integer) 列表起始位置偏移量,默认为0 + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 获取的防火墙组详细信息 参见 FirewallDataSet[ + * [ + * "FWId" => (string) 防火墙ID + * "GroupId" => (string) 安全组ID(即将废弃) + * "Name" => (string) 防火墙名称 + * "Tag" => (string) 防火墙业务组 + * "Remark" => (string) 防火墙备注 + * "ResourceCount" => (integer) 防火墙绑定资源数量 + * "CreateTime" => (integer) 防火墙组创建时间,格式为Unix Timestamp + * "Type" => (string) 防火墙组类型,枚举值为: "user defined", 用户自定义防火墙; "recommend web", 默认Web防火墙; "recommend non web", 默认非Web防火墙 + * "Rule" => (array) 防火墙组中的规则列表,参见 FirewallRuleSet[ + * [ + * "SrcIP" => (string) 源地址 + * "Priority" => (string) 优先级 + * "ProtocolType" => (string) 协议类型 + * "DstPort" => (string) 目标端口 + * "RuleAction" => (string) 防火墙动作 + * "Remark" => (string) 防火墙规则备注 + * ] + * ] + * ] + * ] + * "TotalCount" => (integer) 防火墙资源数量 + * ] + * + * @throws UCloudException + */ + public function describeFirewall(DescribeFirewallRequest $request = null): DescribeFirewallResponse + { + $resp = $this->invoke($request); + return new DescribeFirewallResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeFirewallResource - 获取防火墙组所绑定资源的外网IP + * + * See also: https://docs.ucloud.cn/api/UNet-api/describe_firewall_resource + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "FWId" => (string) 防火墙ID + * "Limit" => (integer) 返回数据长度,默认为20,最大10000000 + * "Offset" => (integer) 列表起始位置偏移量,默认为0 + * ] + * + * Outputs: + * + * $outputs = [ + * "ResourceSet" => (array) 资源列表,见 ResourceSet[ + * [ + * "Zone" => (integer) 可用区 + * "Name" => (string) 名称 + * "PrivateIP" => (string) 内网IP + * "Remark" => (string) 备注 + * "ResourceID" => (string) 绑定该防火墙的资源id + * "ResourceType" => (string) 绑定防火墙组的资源类型。"unatgw",NAT网关; "uhost",云主机; "upm",物理云主机; "hadoophost",hadoop节点; "fortresshost",堡垒机; "udhost",私有专区主机;"udockhost",容器;"dbaudit",数据库审计. + * "Status" => (integer) 状态 + * "Tag" => (string) 业务组 + * ] + * ] + * "TotalCount" => (integer) 绑定资源总数 + * ] + * + * @throws UCloudException + */ + public function describeFirewallResource(DescribeFirewallResourceRequest $request = null): DescribeFirewallResourceResponse + { + $resp = $this->invoke($request); + return new DescribeFirewallResourceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeShareBandwidth - 获取共享带宽信息 + * + * See also: https://docs.ucloud.cn/api/UNet-api/describe_share_bandwidth + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "ShareBandwidthIds" => (array) 需要返回的共享带宽Id + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 共享带宽信息组 参见 UnetShareBandwidthSet[ + * [ + * "IPVersion" => (string) 共享带宽类型 + * "ShareBandwidth" => (integer) 共享带宽值(预付费)/共享带宽峰值(后付费), 单位Mbps + * "ShareBandwidthId" => (string) 共享带宽的资源ID + * "ChargeType" => (string) 付费方式, 预付费:Year 按年,Month 按月,Dynamic 按需;后付费:PostPay(按月) + * "CreateTime" => (integer) 创建时间, 格式为Unix Timestamp + * "ExpireTime" => (integer) 过期时间, 格式为Unix Timestamp + * "EIPSet" => (array) EIP信息,详情见 EIPSetData[ + * [ + * "Bandwidth" => (integer) EIP带宽值 + * "EIPAddr" => (array) EIP的IP信息,详情见EIPAddrSet[ + * [ + * "OperatorName" => (string) 运营商信息, 枚举值为: BGP: BGP; International: 国际. + * "IP" => (string) 弹性IP地址 + * ] + * ] + * "EIPId" => (string) EIP资源Id + * ] + * ] + * "Name" => (string) 共享带宽名称 + * ] + * ] + * "TotalCount" => (integer) 符合条件的共享带宽总数,大于等于返回DataSet长度 + * ] + * + * @throws UCloudException + */ + public function describeShareBandwidth(DescribeShareBandwidthRequest $request = null): DescribeShareBandwidthResponse + { + $resp = $this->invoke($request); + return new DescribeShareBandwidthResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DisassociateEIPWithShareBandwidth - 将EIP移出共享带宽 + * + * See also: https://docs.ucloud.cn/api/UNet-api/disassociate_eip_with_share_bandwidth + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "ShareBandwidthId" => (string) 共享带宽ID + * "Bandwidth" => (integer) 移出共享带宽后,EIP的外网带宽, 单位为Mbps. 各地域带宽范围如下: 流量计费[1-200],带宽计费[1-800] + * "EIPIds" => (array) EIP的资源Id;默认移出该共享带宽下所有的EIP + * "PayMode" => (string) 移出共享带宽后,EIP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; 默认为 "Bandwidth". + * "IPVersion" => (string) 共享带宽类型,IPv4或者IPv6,不传默认IPv4 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function disassociateEIPWithShareBandwidth(DisassociateEIPWithShareBandwidthRequest $request = null): DisassociateEIPWithShareBandwidthResponse + { + $resp = $this->invoke($request); + return new DisassociateEIPWithShareBandwidthResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetEIPPayMode - 获取弹性IP计费模式 + * + * See also: https://docs.ucloud.cn/api/UNet-api/get_eip_pay_mode + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "EIPId" => (array) 弹性IP的资源Id + * ] + * + * Outputs: + * + * $outputs = [ + * "EIPPayMode" => (array) EIP的计费模式, 参见 EIPPayModeSet[ + * [ + * "EIPId" => (string) EIP的资源ID + * "EIPPayMode" => (string) EIP的计费模式. 枚举值为:Bandwidth, 带宽计费;Traffic, 流量计费; "ShareBandwidth",共享带宽模式 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getEIPPayMode(GetEIPPayModeRequest $request = null): GetEIPPayModeResponse + { + $resp = $this->invoke($request); + return new GetEIPPayModeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetEIPPrice - 获取弹性IP价格 + * + * See also: https://docs.ucloud.cn/api/UNet-api/get_eip_price + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "OperatorName" => (string) 弹性IP的线路如下: 国际: International BGP: Bgp 各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International,泉州为移动单线cn-qz:ChinaMobile + * "Bandwidth" => (integer) 弹性IP的外网带宽, 单位为Mbps, 范围 [0-800] + * "ChargeType" => (string) 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按时付费; 默认为获取三种价格 + * "PayMode" => (string) 弹性IP计费方式r. 枚举值为: Traffic, 流量计费; Bandwidth, 带宽计费; "ShareBandwidth",共享带宽模式. 默认为Bandwidth + * "Quantity" => (integer) 购买时长。默认: 1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末 + * ] + * + * Outputs: + * + * $outputs = [ + * "PriceSet" => (array) 弹性IP价格详情 详情见 EIPPriceDetailSet[ + * [ + * "ChargeType" => (string) 弹性IP付费方式 + * "Price" => (number) 购买弹性IP的实际价格, 单位"元" + * "OriginalPrice" => (number) 弹性IP的原价,单位“元” + * "PurchaseValue" => (integer) 资源有效期, 以Unix Timestamp表示 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getEIPPrice(GetEIPPriceRequest $request = null): GetEIPPriceResponse + { + $resp = $this->invoke($request); + return new GetEIPPriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetEIPUpgradePrice - 获取弹性IP带宽改动价格 + * + * See also: https://docs.ucloud.cn/api/UNet-api/get_eip_upgrade_price + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "EIPId" => (string) 弹性IP的资源ID + * "Bandwidth" => (integer) 弹性IP的外网带宽, 单位为Mbps, 范围 [1-800] + * ] + * + * Outputs: + * + * $outputs = [ + * "Price" => (number) 调整带宽后的EIP价格, 单位为"元", 如需退费此处为负值 + * ] + * + * @throws UCloudException + */ + public function getEIPUpgradePrice(GetEIPUpgradePriceRequest $request = null): GetEIPUpgradePriceResponse + { + $resp = $this->invoke($request); + return new GetEIPUpgradePriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetThroughputDailyBillingInfo - 获取流量计费EIP每日流量计费信息 + * + * See also: https://docs.ucloud.cn/api/UNet-api/get_throughput_daily_billing_info + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "EIPId" => (string) EIP的资源ID + * "StartTime" => (integer) 查询开始时间时间戳 + * "EndTime" => (integer) 查询结束时间时间戳 + * ] + * + * Outputs: + * + * $outputs = [ + * "Stats" => (array) EIP流量计费信息,详见模型ThroughputDailyBillingInfo[ + * [ + * "StartTime" => (integer) 计费开始时间 + * "EndTime" => (integer) 计费结束时间 + * "QuantityOutSize" => (integer) 计费流量,单位“GB” + * "QuantityOutMoney" => (integer) 计费金额,单位“元” + * "BillingState" => (string) 是否已计费,“Yes”或者“No” + * ] + * ] + * "TotalOutMoney" => (integer) 计费总金额 + * "TotalOutSize" => (string) 计费总流量 + * ] + * + * @throws UCloudException + */ + public function getThroughputDailyBillingInfo(GetThroughputDailyBillingInfoRequest $request = null): GetThroughputDailyBillingInfoResponse + { + $resp = $this->invoke($request); + return new GetThroughputDailyBillingInfoResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GrantFirewall - 将防火墙应用到资源上 + * + * See also: https://docs.ucloud.cn/api/UNet-api/grant_firewall + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "FWId" => (string) 防火墙资源ID + * "ResourceType" => (string) 绑定防火墙组的资源类型,默认为全部资源类型。枚举值为:"unatgw",NAT网关; "uhost",云主机; "upm",物理云主机; "hadoophost",hadoop节点; "fortresshost",堡垒机; "udhost",私有专区主机;"udockhost",容器;"dbaudit",数据库审计,”uni“,虚拟网卡,“cube”,Cube容器实例。 + * "ResourceId" => (string) 所应用资源ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function grantFirewall(GrantFirewallRequest $request = null): GrantFirewallResponse + { + $resp = $this->invoke($request); + return new GrantFirewallResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyEIPBandwidth - 调整弹性IP的外网带宽 + * + * See also: https://docs.ucloud.cn/api/UNet-api/modify_eip_bandwidth + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "EIPId" => (string) 弹性IP的资源ID + * "Bandwidth" => (integer) 弹性IP的外网带宽, 单位为Mbps. 各地域的带宽值范围如下:流量计费[1-200],带宽计费[1-800] + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function modifyEIPBandwidth(ModifyEIPBandwidthRequest $request = null): ModifyEIPBandwidthResponse + { + $resp = $this->invoke($request); + return new ModifyEIPBandwidthResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyEIPWeight - 修改弹性IP的外网出口权重 + * + * See also: https://docs.ucloud.cn/api/UNet-api/modify_eip_weight + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "EIPId" => (string) 弹性IP的资源ID + * "Weight" => (integer) 外网出口权重, 范围[0-100] 取值为0时, 该弹性IP不会被使用. 取值为100时, 同主机下只会使用这个弹性IP,其他弹性IP不会被使用 请勿将多个绑定在同一资源的弹性IP设置为相同权重 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function modifyEIPWeight(ModifyEIPWeightRequest $request = null): ModifyEIPWeightResponse + { + $resp = $this->invoke($request); + return new ModifyEIPWeightResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ReleaseEIP - 释放弹性IP资源, 所释放弹性IP必须为非绑定状态. + * + * See also: https://docs.ucloud.cn/api/UNet-api/release_eip + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "EIPId" => (string) 弹性IP的资源ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function releaseEIP(ReleaseEIPRequest $request = null): ReleaseEIPResponse + { + $resp = $this->invoke($request); + return new ReleaseEIPResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ReleaseShareBandwidth - 关闭共享带宽 + * + * See also: https://docs.ucloud.cn/api/UNet-api/release_share_bandwidth + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "ShareBandwidthId" => (string) 共享带宽ID + * "EIPBandwidth" => (integer) 关闭共享带宽后,各EIP恢复为的带宽值 + * "PayMode" => (string) 默认为 Bandwidth 带宽计费 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function releaseShareBandwidth(ReleaseShareBandwidthRequest $request = null): ReleaseShareBandwidthResponse + { + $resp = $this->invoke($request); + return new ReleaseShareBandwidthResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ResizeShareBandwidth - 调整共享带宽的带宽值 + * + * See also: https://docs.ucloud.cn/api/UNet-api/resize_share_bandwidth + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ShareBandwidth" => (integer) 带宽值,单位为Mb,范围 [20-5000] (最大值受地域限制) + * "ShareBandwidthId" => (string) 共享带宽的Id + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function resizeShareBandwidth(ResizeShareBandwidthRequest $request = null): ResizeShareBandwidthResponse + { + $resp = $this->invoke($request); + return new ResizeShareBandwidthResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * SetEIPPayMode - 设置弹性IP计费模式, 切换时会涉及付费/退费. + * + * See also: https://docs.ucloud.cn/api/UNet-api/set_eip_pay_mode + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "EIPId" => (string) 弹性IP的资源Id + * "PayMode" => (string) 计费模式. 枚举值:"Traffic", 流量计费模式; "Bandwidth", 带宽计费模式 + * "Bandwidth" => (integer) 调整的目标带宽值, 单位Mbps. 各地域的带宽值范围如下: 流量计费[1-200],其余情况[1-800] + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function setEIPPayMode(SetEIPPayModeRequest $request = null): SetEIPPayModeResponse + { + $resp = $this->invoke($request); + return new SetEIPPayModeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UnBindEIP - 将弹性IP从资源上解绑 + * + * See also: https://docs.ucloud.cn/api/UNet-api/un_bind_eip + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "EIPId" => (string) 弹性IP的资源Id + * "ResourceType" => (string) 弹性IP请求解绑的资源类型, 枚举值为: uhost: 云主机; ulb, 负载均衡器 upm: 物理机; hadoophost: 大数据集群;fortresshost:堡垒机;udockhost:容器;udhost:私有专区主机;natgw:NAT网关;udb:udb;vpngw:ipsec vpn;ucdr:云灾备;dbaudit:数据库审计; + * "ResourceId" => (string) 弹性IP请求解绑的资源ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function unBindEIP(UnBindEIPRequest $request = null): UnBindEIPResponse + { + $resp = $this->invoke($request); + return new UnBindEIPResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateEIPAttribute - 更新弹性IP名称,业务组,备注等属性字段 + * + * See also: https://docs.ucloud.cn/api/UNet-api/update_eip_attribute + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "EIPId" => (string) EIP资源ID + * "Name" => (string) 名字(Name Tag Remark都为空则报错) + * "Tag" => (string) 业务 + * "Remark" => (string) 备注 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function updateEIPAttribute(UpdateEIPAttributeRequest $request = null): UpdateEIPAttributeResponse + { + $resp = $this->invoke($request); + return new UpdateEIPAttributeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateFirewall - 更新防火墙规则 + * + * See also: https://docs.ucloud.cn/api/UNet-api/update_firewall + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "FWId" => (string) 防火墙资源ID + * "Rule" => (array) 防火墙规则,例如:TCP|22|192.168.1.1/22|DROP|LOW|禁用22端口,第一个参数代表协议:第二个参数代表端口号,第三个参数为ip,第四个参数为ACCEPT(接受)和DROP(拒绝),第五个参数优先级:HIGH(高),MEDIUM(中),LOW(低),第六个参数为该条规则的自定义备注 + * ] + * + * Outputs: + * + * $outputs = [ + * "FWId" => (string) 防火墙id + * ] + * + * @throws UCloudException + */ + public function updateFirewall(UpdateFirewallRequest $request = null): UpdateFirewallResponse + { + $resp = $this->invoke($request); + return new UpdateFirewallResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateFirewallAttribute - 更新防火墙规则 + * + * See also: https://docs.ucloud.cn/api/UNet-api/update_firewall_attribute + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "FWId" => (string) 防火墙资源ID + * "Name" => (string) 防火墙名称,默认为空,为空则不做修改。Name,Tag,Remark必须填写1个及以上 + * "Tag" => (string) 防火墙业务组,默认为空,为空则不做修改。Name,Tag,Remark必须填写1个及以上 + * "Remark" => (string) 防火墙备注,默认为空,为空则不做修改。Name,Tag,Remark必须填写1个及以上 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function updateFirewallAttribute(UpdateFirewallAttributeRequest $request = null): UpdateFirewallAttributeResponse + { + $resp = $this->invoke($request); + return new UpdateFirewallAttributeResponse($resp->toArray(), $resp->getRequestId()); + } +} diff --git a/src/UPHost/Apis/CreatePHostRequest.php b/src/UPHost/Apis/CreatePHostRequest.php new file mode 100644 index 00000000..a2e9acbf --- /dev/null +++ b/src/UPHost/Apis/CreatePHostRequest.php @@ -0,0 +1,423 @@ + "CreatePHost"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ImageId"); + $this->markRequired("Password"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ImageId: ImageId,可以通过接口 [DescribePHostImage](api/uphost-api/describe_phost_image.html)获取 + * + * @return string|null + */ + public function getImageId(): string + { + return $this->get("ImageId"); + } + + /** + * ImageId: ImageId,可以通过接口 [DescribePHostImage](api/uphost-api/describe_phost_image.html)获取 + * + * @param string $imageId + */ + public function setImageId(string $imageId) + { + $this->set("ImageId", $imageId); + } + + /** + * Password: 密码(密码需使用base64进行编码) + * + * @return string|null + */ + public function getPassword(): string + { + return $this->get("Password"); + } + + /** + * Password: 密码(密码需使用base64进行编码) + * + * @param string $password + */ + public function setPassword(string $password) + { + $this->set("Password", $password); + } + + /** + * Type: 物理机类型,默认为:db-2(基础型-SAS-V3) + * + * @return string|null + */ + public function getType(): string + { + return $this->get("Type"); + } + + /** + * Type: 物理机类型,默认为:db-2(基础型-SAS-V3) + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } + + /** + * Name: 物理机名称,默认为phost + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 物理机名称,默认为phost + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Remark: 物理机备注,默认为空 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 物理机备注,默认为空 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } + + /** + * Tag: 业务组,默认为default + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组,默认为default + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * ChargeType: 计费模式,枚举值为:year, 按年付费; month,按月付费;默认为按月付费 + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式,枚举值为:year, 按年付费; month,按月付费;默认为按月付费 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时长,1-10个月或1-10年;默认值为1。月付时,此参数传0,代表购买至月末,1代表整月。 + * + * @return string|null + */ + public function getQuantity(): string + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长,1-10个月或1-10年;默认值为1。月付时,此参数传0,代表购买至月末,1代表整月。 + * + * @param string $quantity + */ + public function setQuantity(string $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * SecurityGroupId: 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 + * + * @return string|null + */ + public function getSecurityGroupId(): string + { + return $this->get("SecurityGroupId"); + } + + /** + * SecurityGroupId: 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 + * + * @param string $securityGroupId + */ + public function setSecurityGroupId(string $securityGroupId) + { + $this->set("SecurityGroupId", $securityGroupId); + } + + /** + * Raid: Raid配置,默认Raid10 支持:Raid0、Raid1、Raid5、Raid10,NoRaid + * + * @return string|null + */ + public function getRaid(): string + { + return $this->get("Raid"); + } + + /** + * Raid: Raid配置,默认Raid10 支持:Raid0、Raid1、Raid5、Raid10,NoRaid + * + * @param string $raid + */ + public function setRaid(string $raid) + { + $this->set("Raid", $raid); + } + + /** + * VPCId: VPC ID,不填为默认,VPC2.0下需要填写此字段。 + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPC ID,不填为默认,VPC2.0下需要填写此字段。 + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: 子网ID,不填为默认,VPC2.0下需要填写此字段。 + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网ID,不填为默认,VPC2.0下需要填写此字段。 + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * Cluster: 网络环境,可选千兆:1G ,万兆:10G, 默认1G。智能网卡可以选择25G。 + * + * @return string|null + */ + public function getCluster(): string + { + return $this->get("Cluster"); + } + + /** + * Cluster: 网络环境,可选千兆:1G ,万兆:10G, 默认1G。智能网卡可以选择25G。 + * + * @param string $cluster + */ + public function setCluster(string $cluster) + { + $this->set("Cluster", $cluster); + } + + /** + * Disks: + * + * @return CreatePHostParamDisks[]|null + */ + public function getDisks(): array + { + $items = $this->get("Disks") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreatePHostParamDisks($item)); + } + return $result; + } + + /** + * Disks: + * + * @param CreatePHostParamDisks[] $disks + */ + public function setDisks(array $disks) + { + $result = []; + foreach ($disks as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * VpcIp: 指定内网ip创建 + * + * @return string|null + */ + public function getVpcIp(): string + { + return $this->get("VpcIp"); + } + + /** + * VpcIp: 指定内网ip创建 + * + * @param string $vpcIp + */ + public function setVpcIp(string $vpcIp) + { + $this->set("VpcIp", $vpcIp); + } + + /** + * CouponId: 代金券 + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 代金券 + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UPHost/Apis/CreatePHostResponse.php b/src/UPHost/Apis/CreatePHostResponse.php new file mode 100644 index 00000000..e0a85f74 --- /dev/null +++ b/src/UPHost/Apis/CreatePHostResponse.php @@ -0,0 +1,44 @@ +get("PHostId"); + } + + /** + * PHostId: PHost的资源ID数组 + * + * @param string[] $pHostId + */ + public function setPHostId(array $pHostId) + { + $this->set("PHostId", $pHostId); + } +} diff --git a/src/UPHost/Apis/DescribeBaremetalMachineTypeRequest.php b/src/UPHost/Apis/DescribeBaremetalMachineTypeRequest.php new file mode 100644 index 00000000..bda6e4bf --- /dev/null +++ b/src/UPHost/Apis/DescribeBaremetalMachineTypeRequest.php @@ -0,0 +1,111 @@ + "DescribeBaremetalMachineType"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Type: 具体机型。若不填写,则返回全部机型 + * + * @return string|null + */ + public function getType(): string + { + return $this->get("Type"); + } + + /** + * Type: 具体机型。若不填写,则返回全部机型 + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } +} diff --git a/src/UPHost/Apis/DescribeBaremetalMachineTypeResponse.php b/src/UPHost/Apis/DescribeBaremetalMachineTypeResponse.php new file mode 100644 index 00000000..6d9a5829 --- /dev/null +++ b/src/UPHost/Apis/DescribeBaremetalMachineTypeResponse.php @@ -0,0 +1,57 @@ +get("MachineTypes") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new PHostCloudMachineTypeSet($item)); + } + return $result; + } + + /** + * MachineTypes: 机型列表,模型:PHostCloudMachineTypeSet + * + * @param PHostCloudMachineTypeSet[] $machineTypes + */ + public function setMachineTypes(array $machineTypes) + { + $result = []; + foreach ($machineTypes as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UPHost/Apis/DescribePHostImageRequest.php b/src/UPHost/Apis/DescribePHostImageRequest.php new file mode 100644 index 00000000..e6322974 --- /dev/null +++ b/src/UPHost/Apis/DescribePHostImageRequest.php @@ -0,0 +1,191 @@ + "DescribePHostImage"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ImageType: 镜像类别,枚举值,Base是基础镜像; + * + * @return string|null + */ + public function getImageType(): string + { + return $this->get("ImageType"); + } + + /** + * ImageType: 镜像类别,枚举值,Base是基础镜像; + * + * @param string $imageType + */ + public function setImageType(string $imageType) + { + $this->set("ImageType", $imageType); + } + + /** + * ImageId: 镜像ID + * + * @return string[]|null + */ + public function getImageId(): array + { + return $this->get("ImageId"); + } + + /** + * ImageId: 镜像ID + * + * @param string[] $imageId + */ + public function setImageId(array $imageId) + { + $this->set("ImageId", $imageId); + } + + /** + * Offset: 数据偏移量,默认为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 数据偏移量,默认为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 返回数据长度,默认为20 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数据长度,默认为20 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * MachineType: 机器型号,只支持当前zone的展示机型 + * + * @return string|null + */ + public function getMachineType(): string + { + return $this->get("MachineType"); + } + + /** + * MachineType: 机器型号,只支持当前zone的展示机型 + * + * @param string $machineType + */ + public function setMachineType(string $machineType) + { + $this->set("MachineType", $machineType); + } +} diff --git a/src/UPHost/Apis/DescribePHostImageResponse.php b/src/UPHost/Apis/DescribePHostImageResponse.php new file mode 100644 index 00000000..c0dfdedf --- /dev/null +++ b/src/UPHost/Apis/DescribePHostImageResponse.php @@ -0,0 +1,74 @@ +get("TotalCount"); + } + + /** + * TotalCount: 满足条件的镜像总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * ImageSet: 镜像列表 PHostImageSet + * + * @return PHostImageSet[]|null + */ + public function getImageSet(): array + { + $items = $this->get("ImageSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new PHostImageSet($item)); + } + return $result; + } + + /** + * ImageSet: 镜像列表 PHostImageSet + * + * @param PHostImageSet[] $imageSet + */ + public function setImageSet(array $imageSet) + { + $result = []; + foreach ($imageSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UPHost/Apis/DescribePHostMachineTypeRequest.php b/src/UPHost/Apis/DescribePHostMachineTypeRequest.php new file mode 100644 index 00000000..50cd4677 --- /dev/null +++ b/src/UPHost/Apis/DescribePHostMachineTypeRequest.php @@ -0,0 +1,111 @@ + "DescribePHostMachineType"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Type: 具体机型。若不填写,则返回全部机型 + * + * @return string|null + */ + public function getType(): string + { + return $this->get("Type"); + } + + /** + * Type: 具体机型。若不填写,则返回全部机型 + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } +} diff --git a/src/UPHost/Apis/DescribePHostMachineTypeResponse.php b/src/UPHost/Apis/DescribePHostMachineTypeResponse.php new file mode 100644 index 00000000..8dc2500d --- /dev/null +++ b/src/UPHost/Apis/DescribePHostMachineTypeResponse.php @@ -0,0 +1,58 @@ +get("MachineTypes") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new PHostMachineTypeSet($item)); + } + return $result; + } + + /** + * MachineTypes: 机型列表,模型:PHostMachineTypeSet + * + * @param PHostMachineTypeSet[] $machineTypes + */ + public function setMachineTypes(array $machineTypes) + { + $result = []; + foreach ($machineTypes as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UPHost/Apis/DescribePHostRequest.php b/src/UPHost/Apis/DescribePHostRequest.php new file mode 100644 index 00000000..6919caf4 --- /dev/null +++ b/src/UPHost/Apis/DescribePHostRequest.php @@ -0,0 +1,190 @@ + "DescribePHost"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * PHostId: PHost资源ID,若为空,则返回当前Region所有PHost。 + * + * @return string[]|null + */ + public function getPHostId(): array + { + return $this->get("PHostId"); + } + + /** + * PHostId: PHost资源ID,若为空,则返回当前Region所有PHost。 + * + * @param string[] $pHostId + */ + public function setPHostId(array $pHostId) + { + $this->set("PHostId", $pHostId); + } + + /** + * Offset: 数据偏移量,默认为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 数据偏移量,默认为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 返回数据长度,默认为20 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数据长度,默认为20 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * UDiskIdForAttachment: 要挂载的云盘id,过滤返回能被UDiskId挂载的云主机。目前主要针对rssd云盘使用 + * + * @return string|null + */ + public function getUDiskIdForAttachment(): string + { + return $this->get("UDiskIdForAttachment"); + } + + /** + * UDiskIdForAttachment: 要挂载的云盘id,过滤返回能被UDiskId挂载的云主机。目前主要针对rssd云盘使用 + * + * @param string $uDiskIdForAttachment + */ + public function setUDiskIdForAttachment(string $uDiskIdForAttachment) + { + $this->set("UDiskIdForAttachment", $uDiskIdForAttachment); + } + + /** + * VPCId: ULB使用参数,获取同VPC下机器信息。 + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: ULB使用参数,获取同VPC下机器信息。 + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } +} diff --git a/src/UPHost/Apis/DescribePHostResponse.php b/src/UPHost/Apis/DescribePHostResponse.php new file mode 100644 index 00000000..5a704511 --- /dev/null +++ b/src/UPHost/Apis/DescribePHostResponse.php @@ -0,0 +1,77 @@ +get("TotalCount"); + } + + /** + * TotalCount: 满足条件的PHost总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * PHostSet: PHost资源列表,参见 PHostSet + * + * @return PHostSet[]|null + */ + public function getPHostSet(): array + { + $items = $this->get("PHostSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new PHostSet($item)); + } + return $result; + } + + /** + * PHostSet: PHost资源列表,参见 PHostSet + * + * @param PHostSet[] $pHostSet + */ + public function setPHostSet(array $pHostSet) + { + $result = []; + foreach ($pHostSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UPHost/Apis/DescribePHostTagsRequest.php b/src/UPHost/Apis/DescribePHostTagsRequest.php new file mode 100644 index 00000000..c71a400d --- /dev/null +++ b/src/UPHost/Apis/DescribePHostTagsRequest.php @@ -0,0 +1,90 @@ + "DescribePHostTags"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } +} diff --git a/src/UPHost/Apis/DescribePHostTagsResponse.php b/src/UPHost/Apis/DescribePHostTagsResponse.php new file mode 100644 index 00000000..1d54a4ea --- /dev/null +++ b/src/UPHost/Apis/DescribePHostTagsResponse.php @@ -0,0 +1,74 @@ +get("TotalCount"); + } + + /** + * TotalCount: Tag的个数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * TagSet: 具体参见 PHostTagSet + * + * @return PHostTagSet[]|null + */ + public function getTagSet(): array + { + $items = $this->get("TagSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new PHostTagSet($item)); + } + return $result; + } + + /** + * TagSet: 具体参见 PHostTagSet + * + * @param PHostTagSet[] $tagSet + */ + public function setTagSet(array $tagSet) + { + $result = []; + foreach ($tagSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UPHost/Apis/GetPHostDiskUpgradePriceRequest.php b/src/UPHost/Apis/GetPHostDiskUpgradePriceRequest.php new file mode 100644 index 00000000..af9cead4 --- /dev/null +++ b/src/UPHost/Apis/GetPHostDiskUpgradePriceRequest.php @@ -0,0 +1,173 @@ + "GetPHostDiskUpgradePrice"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("PHostId"); + $this->markRequired("DiskSpace"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * PHostId: UPHost实例ID。 + * + * @return string|null + */ + public function getPHostId(): string + { + return $this->get("PHostId"); + } + + /** + * PHostId: UPHost实例ID。 + * + * @param string $pHostId + */ + public function setPHostId(string $pHostId) + { + $this->set("PHostId", $pHostId); + } + + /** + * DiskSpace: 磁盘大小,单位GB,必须是10GB的整数倍。系统盘20-500GB,数据盘单块盘20-32000GB。 + * + * @return integer|null + */ + public function getDiskSpace(): int + { + return $this->get("DiskSpace"); + } + + /** + * DiskSpace: 磁盘大小,单位GB,必须是10GB的整数倍。系统盘20-500GB,数据盘单块盘20-32000GB。 + * + * @param int $diskSpace + */ + public function setDiskSpace(int $diskSpace) + { + $this->set("DiskSpace", $diskSpace); + } + + /** + * UDiskId: 磁盘 ID。获取扩容价格必填(只能扩不能减);重装时候不需要填(根据所选盘大小决定) + * + * @return string|null + */ + public function getUDiskId(): string + { + return $this->get("UDiskId"); + } + + /** + * UDiskId: 磁盘 ID。获取扩容价格必填(只能扩不能减);重装时候不需要填(根据所选盘大小决定) + * + * @param string $uDiskId + */ + public function setUDiskId(string $uDiskId) + { + $this->set("UDiskId", $uDiskId); + } + + /** + * ReinstallTag: 是否重装价格获取。复用此接口。扩容只能增加云盘大小。重装不限制。枚举值:true/false + * + * @return boolean|null + */ + public function getReinstallTag(): bool + { + return $this->get("ReinstallTag"); + } + + /** + * ReinstallTag: 是否重装价格获取。复用此接口。扩容只能增加云盘大小。重装不限制。枚举值:true/false + * + * @param boolean $reinstallTag + */ + public function setReinstallTag(bool $reinstallTag) + { + $this->set("ReinstallTag", $reinstallTag); + } +} diff --git a/src/UPHost/Apis/GetPHostDiskUpgradePriceResponse.php b/src/UPHost/Apis/GetPHostDiskUpgradePriceResponse.php new file mode 100644 index 00000000..0f74805e --- /dev/null +++ b/src/UPHost/Apis/GetPHostDiskUpgradePriceResponse.php @@ -0,0 +1,64 @@ +get("Price"); + } + + /** + * Price: 升级差价。精度为小数点后2位。 + * + * @param float $price + */ + public function setPrice(float $price) + { + $this->set("Price", $price); + } + + /** + * OriginalPrice: 升价差价原价。精度为小数点后2位。 + * + * @return float|null + */ + public function getOriginalPrice(): float + { + return $this->get("OriginalPrice"); + } + + /** + * OriginalPrice: 升价差价原价。精度为小数点后2位。 + * + * @param float $originalPrice + */ + public function setOriginalPrice(float $originalPrice) + { + $this->set("OriginalPrice", $originalPrice); + } +} diff --git a/src/UPHost/Apis/GetPHostPriceRequest.php b/src/UPHost/Apis/GetPHostPriceRequest.php new file mode 100644 index 00000000..f1d69b70 --- /dev/null +++ b/src/UPHost/Apis/GetPHostPriceRequest.php @@ -0,0 +1,223 @@ + "GetPHostPrice"]); + $this->markRequired("Region"); + $this->markRequired("Count"); + $this->markRequired("ChargeType"); + $this->markRequired("Quantity"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Count: 购买数量,范围[1-5] + * + * @return integer|null + */ + public function getCount(): int + { + return $this->get("Count"); + } + + /** + * Count: 购买数量,范围[1-5] + * + * @param int $count + */ + public function setCount(int $count) + { + $this->set("Count", $count); + } + + /** + * ChargeType: 计费模式,枚举值为: Year/Month + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式,枚举值为: Year/Month + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时长,1-10个月或1-10年;默认值为1。月付时,此参数传0,代表购买至月末,1代表整月。 + * + * @return integer|null + */ + public function getQuantity(): int + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长,1-10个月或1-10年;默认值为1。月付时,此参数传0,代表购买至月末,1代表整月。 + * + * @param int $quantity + */ + public function setQuantity(int $quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * Cluster: 网络环境,可选千兆:1G ;万兆:10G;25G网络:25G。 + * + * @return string|null + */ + public function getCluster(): string + { + return $this->get("Cluster"); + } + + /** + * Cluster: 网络环境,可选千兆:1G ;万兆:10G;25G网络:25G。 + * + * @param string $cluster + */ + public function setCluster(string $cluster) + { + $this->set("Cluster", $cluster); + } + + /** + * Type: 默认为:DB(数据库型),可以通过接口 [DescribePHostMachineType](api/uphost-api/describe_phost_machine_type.html)获取 + * + * @return string|null + */ + public function getType(): string + { + return $this->get("Type"); + } + + /** + * Type: 默认为:DB(数据库型),可以通过接口 [DescribePHostMachineType](api/uphost-api/describe_phost_machine_type.html)获取 + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } + + /** + * Disks: + * + * @return GetPHostPriceParamDisks[]|null + */ + public function getDisks(): array + { + $items = $this->get("Disks") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new GetPHostPriceParamDisks($item)); + } + return $result; + } + + /** + * Disks: + * + * @param GetPHostPriceParamDisks[] $disks + */ + public function setDisks(array $disks) + { + $result = []; + foreach ($disks as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UPHost/Apis/GetPHostPriceResponse.php b/src/UPHost/Apis/GetPHostPriceResponse.php new file mode 100644 index 00000000..17572a69 --- /dev/null +++ b/src/UPHost/Apis/GetPHostPriceResponse.php @@ -0,0 +1,54 @@ +get("PriceSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new PHostPriceSet($item)); + } + return $result; + } + + /** + * PriceSet: 价格列表 见 PHostPriceSet + * + * @param PHostPriceSet[] $priceSet + */ + public function setPriceSet(array $priceSet) + { + $result = []; + foreach ($priceSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UPHost/Apis/ModifyPHostInfoRequest.php b/src/UPHost/Apis/ModifyPHostInfoRequest.php new file mode 100644 index 00000000..5468e47e --- /dev/null +++ b/src/UPHost/Apis/ModifyPHostInfoRequest.php @@ -0,0 +1,171 @@ + "ModifyPHostInfo"]); + $this->markRequired("Region"); + $this->markRequired("PHostId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * PHostId: 物理机资源ID + * + * @return string|null + */ + public function getPHostId(): string + { + return $this->get("PHostId"); + } + + /** + * PHostId: 物理机资源ID + * + * @param string $pHostId + */ + public function setPHostId(string $pHostId) + { + $this->set("PHostId", $pHostId); + } + + /** + * Name: 物理机名称,默认不更改 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 物理机名称,默认不更改 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Remark: 物理机备注,默认不更改 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 物理机备注,默认不更改 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } + + /** + * Tag: 业务组,默认不更改 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组,默认不更改 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } +} diff --git a/src/UPHost/Apis/ModifyPHostInfoResponse.php b/src/UPHost/Apis/ModifyPHostInfoResponse.php new file mode 100644 index 00000000..adcff65f --- /dev/null +++ b/src/UPHost/Apis/ModifyPHostInfoResponse.php @@ -0,0 +1,44 @@ +get("PHostId"); + } + + /** + * PHostId: PHost 的资源ID + * + * @param string $pHostId + */ + public function setPHostId(string $pHostId) + { + $this->set("PHostId", $pHostId); + } +} diff --git a/src/UPHost/Apis/PoweroffPHostRequest.php b/src/UPHost/Apis/PoweroffPHostRequest.php new file mode 100644 index 00000000..24884f81 --- /dev/null +++ b/src/UPHost/Apis/PoweroffPHostRequest.php @@ -0,0 +1,112 @@ + "PoweroffPHost"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("PHostId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * PHostId: PHost资源ID + * + * @return string|null + */ + public function getPHostId(): string + { + return $this->get("PHostId"); + } + + /** + * PHostId: PHost资源ID + * + * @param string $pHostId + */ + public function setPHostId(string $pHostId) + { + $this->set("PHostId", $pHostId); + } +} diff --git a/src/UPHost/Apis/PoweroffPHostResponse.php b/src/UPHost/Apis/PoweroffPHostResponse.php new file mode 100644 index 00000000..08cb427f --- /dev/null +++ b/src/UPHost/Apis/PoweroffPHostResponse.php @@ -0,0 +1,44 @@ +get("PHostId"); + } + + /** + * PHostId: PHost 的资源ID + * + * @param string $pHostId + */ + public function setPHostId(string $pHostId) + { + $this->set("PHostId", $pHostId); + } +} diff --git a/src/UPHost/Apis/RebootPHostRequest.php b/src/UPHost/Apis/RebootPHostRequest.php new file mode 100644 index 00000000..1d7632a5 --- /dev/null +++ b/src/UPHost/Apis/RebootPHostRequest.php @@ -0,0 +1,112 @@ + "RebootPHost"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("PHostId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * PHostId: PHost资源ID + * + * @return string|null + */ + public function getPHostId(): string + { + return $this->get("PHostId"); + } + + /** + * PHostId: PHost资源ID + * + * @param string $pHostId + */ + public function setPHostId(string $pHostId) + { + $this->set("PHostId", $pHostId); + } +} diff --git a/src/UPHost/Apis/RebootPHostResponse.php b/src/UPHost/Apis/RebootPHostResponse.php new file mode 100644 index 00000000..e2d56b4c --- /dev/null +++ b/src/UPHost/Apis/RebootPHostResponse.php @@ -0,0 +1,44 @@ +get("PHostId"); + } + + /** + * PHostId: PHost 的资源ID + * + * @param string $pHostId + */ + public function setPHostId(string $pHostId) + { + $this->set("PHostId", $pHostId); + } +} diff --git a/src/UPHost/Apis/ReinstallPHostRequest.php b/src/UPHost/Apis/ReinstallPHostRequest.php new file mode 100644 index 00000000..746da319 --- /dev/null +++ b/src/UPHost/Apis/ReinstallPHostRequest.php @@ -0,0 +1,273 @@ + "ReinstallPHost"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("PHostId"); + $this->markRequired("Password"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * PHostId: PHost资源ID + * + * @return string|null + */ + public function getPHostId(): string + { + return $this->get("PHostId"); + } + + /** + * PHostId: PHost资源ID + * + * @param string $pHostId + */ + public function setPHostId(string $pHostId) + { + $this->set("PHostId", $pHostId); + } + + /** + * Password: 密码 + * + * @return string|null + */ + public function getPassword(): string + { + return $this->get("Password"); + } + + /** + * Password: 密码 + * + * @param string $password + */ + public function setPassword(string $password) + { + $this->set("Password", $password); + } + + /** + * ImageId: 镜像Id,参考镜像列表,默认使用原镜像 + * + * @return string|null + */ + public function getImageId(): string + { + return $this->get("ImageId"); + } + + /** + * ImageId: 镜像Id,参考镜像列表,默认使用原镜像 + * + * @param string $imageId + */ + public function setImageId(string $imageId) + { + $this->set("ImageId", $imageId); + } + + /** + * Name: 物理机名称,默认不更改 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 物理机名称,默认不更改 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Remark: 物理机备注,默认为不更改。 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 物理机备注,默认为不更改。 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } + + /** + * Tag: 业务组,默认不更改。 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组,默认不更改。 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * ReserveDisk: 是否保留数据盘,保留:Yes,不报留:No, 默认:Yes + * + * @return string|null + */ + public function getReserveDisk(): string + { + return $this->get("ReserveDisk"); + } + + /** + * ReserveDisk: 是否保留数据盘,保留:Yes,不报留:No, 默认:Yes + * + * @param string $reserveDisk + */ + public function setReserveDisk(string $reserveDisk) + { + $this->set("ReserveDisk", $reserveDisk); + } + + /** + * Raid: 不保留数据盘重装,可选Raid + * + * @return string|null + */ + public function getRaid(): string + { + return $this->get("Raid"); + } + + /** + * Raid: 不保留数据盘重装,可选Raid + * + * @param string $raid + */ + public function setRaid(string $raid) + { + $this->set("Raid", $raid); + } + + /** + * BootDiskSpace: 裸金属机型参数->系统盘大小。 单位:GB, 范围[20,500], 步长:10 + * + * @return integer|null + */ + public function getBootDiskSpace(): int + { + return $this->get("BootDiskSpace"); + } + + /** + * BootDiskSpace: 裸金属机型参数->系统盘大小。 单位:GB, 范围[20,500], 步长:10 + * + * @param int $bootDiskSpace + */ + public function setBootDiskSpace(int $bootDiskSpace) + { + $this->set("BootDiskSpace", $bootDiskSpace); + } +} diff --git a/src/UPHost/Apis/ReinstallPHostResponse.php b/src/UPHost/Apis/ReinstallPHostResponse.php new file mode 100644 index 00000000..5b32801b --- /dev/null +++ b/src/UPHost/Apis/ReinstallPHostResponse.php @@ -0,0 +1,44 @@ +get("PHostId"); + } + + /** + * PHostId: PHost 的资源ID + * + * @param string $pHostId + */ + public function setPHostId(string $pHostId) + { + $this->set("PHostId", $pHostId); + } +} diff --git a/src/UPHost/Apis/ResetPHostPasswordRequest.php b/src/UPHost/Apis/ResetPHostPasswordRequest.php new file mode 100644 index 00000000..8f87ba7d --- /dev/null +++ b/src/UPHost/Apis/ResetPHostPasswordRequest.php @@ -0,0 +1,133 @@ + "ResetPHostPassword"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("PHostId"); + $this->markRequired("Password"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * PHostId: 裸金属实例ID + * + * @return string|null + */ + public function getPHostId(): string + { + return $this->get("PHostId"); + } + + /** + * PHostId: 裸金属实例ID + * + * @param string $pHostId + */ + public function setPHostId(string $pHostId) + { + $this->set("PHostId", $pHostId); + } + + /** + * Password: PHost新密码(密码格式使用BASE64编码) + * + * @return string|null + */ + public function getPassword(): string + { + return $this->get("Password"); + } + + /** + * Password: PHost新密码(密码格式使用BASE64编码) + * + * @param string $password + */ + public function setPassword(string $password) + { + $this->set("Password", $password); + } +} diff --git a/src/UPHost/Apis/ResetPHostPasswordResponse.php b/src/UPHost/Apis/ResetPHostPasswordResponse.php new file mode 100644 index 00000000..f5eca7af --- /dev/null +++ b/src/UPHost/Apis/ResetPHostPasswordResponse.php @@ -0,0 +1,44 @@ +get("PHostId"); + } + + /** + * PHostId: 裸金属实例ID + * + * @param string $pHostId + */ + public function setPHostId(string $pHostId) + { + $this->set("PHostId", $pHostId); + } +} diff --git a/src/UPHost/Apis/ResizePHostAttachedDiskRequest.php b/src/UPHost/Apis/ResizePHostAttachedDiskRequest.php new file mode 100644 index 00000000..f906ee06 --- /dev/null +++ b/src/UPHost/Apis/ResizePHostAttachedDiskRequest.php @@ -0,0 +1,151 @@ + "ResizePHostAttachedDisk"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * PHostId: UPHost实例ID。 + * + * @return string|null + */ + public function getPHostId(): string + { + return $this->get("PHostId"); + } + + /** + * PHostId: UPHost实例ID。 + * + * @param string $pHostId + */ + public function setPHostId(string $pHostId) + { + $this->set("PHostId", $pHostId); + } + + /** + * UDiskId: 磁盘ID。 + * + * @return string|null + */ + public function getUDiskId(): string + { + return $this->get("UDiskId"); + } + + /** + * UDiskId: 磁盘ID。 + * + * @param string $uDiskId + */ + public function setUDiskId(string $uDiskId) + { + $this->set("UDiskId", $uDiskId); + } + + /** + * DiskSpace: 裸金属机型参数->磁盘大小,单位GB,必须是10GB的整数倍。系统盘20-500GB,数据盘单块盘20-32000GB。 + * + * @return integer|null + */ + public function getDiskSpace(): int + { + return $this->get("DiskSpace"); + } + + /** + * DiskSpace: 裸金属机型参数->磁盘大小,单位GB,必须是10GB的整数倍。系统盘20-500GB,数据盘单块盘20-32000GB。 + * + * @param int $diskSpace + */ + public function setDiskSpace(int $diskSpace) + { + $this->set("DiskSpace", $diskSpace); + } +} diff --git a/src/UPHost/Apis/ResizePHostAttachedDiskResponse.php b/src/UPHost/Apis/ResizePHostAttachedDiskResponse.php new file mode 100644 index 00000000..76b54210 --- /dev/null +++ b/src/UPHost/Apis/ResizePHostAttachedDiskResponse.php @@ -0,0 +1,44 @@ +get("UDiskId"); + } + + /** + * UDiskId: 改配成功的磁盘id + * + * @param string $uDiskId + */ + public function setUDiskId(string $uDiskId) + { + $this->set("UDiskId", $uDiskId); + } +} diff --git a/src/UPHost/Apis/StartPHostRequest.php b/src/UPHost/Apis/StartPHostRequest.php new file mode 100644 index 00000000..7a00b438 --- /dev/null +++ b/src/UPHost/Apis/StartPHostRequest.php @@ -0,0 +1,112 @@ + "StartPHost"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("PHostId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * PHostId: PHost资源ID + * + * @return string|null + */ + public function getPHostId(): string + { + return $this->get("PHostId"); + } + + /** + * PHostId: PHost资源ID + * + * @param string $pHostId + */ + public function setPHostId(string $pHostId) + { + $this->set("PHostId", $pHostId); + } +} diff --git a/src/UPHost/Apis/StartPHostResponse.php b/src/UPHost/Apis/StartPHostResponse.php new file mode 100644 index 00000000..aff55dc4 --- /dev/null +++ b/src/UPHost/Apis/StartPHostResponse.php @@ -0,0 +1,44 @@ +get("PHostId"); + } + + /** + * PHostId: PHost 的资源ID + * + * @param string $pHostId + */ + public function setPHostId(string $pHostId) + { + $this->set("PHostId", $pHostId); + } +} diff --git a/src/UPHost/Apis/TerminatePHostRequest.php b/src/UPHost/Apis/TerminatePHostRequest.php new file mode 100644 index 00000000..2b8a3854 --- /dev/null +++ b/src/UPHost/Apis/TerminatePHostRequest.php @@ -0,0 +1,152 @@ + "TerminatePHost"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("PHostId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * PHostId: PHost资源ID + * + * @return string|null + */ + public function getPHostId(): string + { + return $this->get("PHostId"); + } + + /** + * PHostId: PHost资源ID + * + * @param string $pHostId + */ + public function setPHostId(string $pHostId) + { + $this->set("PHostId", $pHostId); + } + + /** + * ReleaseEIP: 是否释放绑定的EIP。true: 解绑EIP后,并释放;其他值或不填:解绑EIP。 + * + * @return boolean|null + */ + public function getReleaseEIP(): bool + { + return $this->get("ReleaseEIP"); + } + + /** + * ReleaseEIP: 是否释放绑定的EIP。true: 解绑EIP后,并释放;其他值或不填:解绑EIP。 + * + * @param boolean $releaseEIP + */ + public function setReleaseEIP(bool $releaseEIP) + { + $this->set("ReleaseEIP", $releaseEIP); + } + + /** + * ReleaseUDisk: 裸金属机型参数->删除主机时是否同时删除挂载的数据盘。默认为false。 + * + * @return boolean|null + */ + public function getReleaseUDisk(): bool + { + return $this->get("ReleaseUDisk"); + } + + /** + * ReleaseUDisk: 裸金属机型参数->删除主机时是否同时删除挂载的数据盘。默认为false。 + * + * @param boolean $releaseUDisk + */ + public function setReleaseUDisk(bool $releaseUDisk) + { + $this->set("ReleaseUDisk", $releaseUDisk); + } +} diff --git a/src/UPHost/Apis/TerminatePHostResponse.php b/src/UPHost/Apis/TerminatePHostResponse.php new file mode 100644 index 00000000..7304cd32 --- /dev/null +++ b/src/UPHost/Apis/TerminatePHostResponse.php @@ -0,0 +1,44 @@ +get("PHostId"); + } + + /** + * PHostId: PHost 的资源ID + * + * @param string $pHostId + */ + public function setPHostId(string $pHostId) + { + $this->set("PHostId", $pHostId); + } +} diff --git a/src/UPHost/Models/PHostCPUSet.php b/src/UPHost/Models/PHostCPUSet.php new file mode 100644 index 00000000..d53131e9 --- /dev/null +++ b/src/UPHost/Models/PHostCPUSet.php @@ -0,0 +1,104 @@ +get("Model"); + } + + /** + * Model: CPU型号 + * + * @param string $model + */ + public function setModel(string $model) + { + $this->set("Model", $model); + } + + /** + * Frequence: CPU主频 + * + * @return float|null + */ + public function getFrequence(): float + { + return $this->get("Frequence"); + } + + /** + * Frequence: CPU主频 + * + * @param float $frequence + */ + public function setFrequence(float $frequence) + { + $this->set("Frequence", $frequence); + } + + /** + * Count: CPU个数 + * + * @return integer|null + */ + public function getCount(): int + { + return $this->get("Count"); + } + + /** + * Count: CPU个数 + * + * @param int $count + */ + public function setCount(int $count) + { + $this->set("Count", $count); + } + + /** + * CoreCount: CPU核数 + * + * @return integer|null + */ + public function getCoreCount(): int + { + return $this->get("CoreCount"); + } + + /** + * CoreCount: CPU核数 + * + * @param int $coreCount + */ + public function setCoreCount(int $coreCount) + { + $this->set("CoreCount", $coreCount); + } +} diff --git a/src/UPHost/Models/PHostCloudMachineTypeSet.php b/src/UPHost/Models/PHostCloudMachineTypeSet.php new file mode 100644 index 00000000..38ec169a --- /dev/null +++ b/src/UPHost/Models/PHostCloudMachineTypeSet.php @@ -0,0 +1,133 @@ +get("Type"); + } + + /** + * Type: 物理云主机机型别名,全网唯一。 + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } + + /** + * CPU: CPU信息 + * + * @return PHostCPUSet|null + */ + public function getCPU(): PHostCPUSet + { + return new PHostCPUSet($this->get("CPU")); + } + + /** + * CPU: CPU信息 + * + * @param PHostCPUSet $cpu + */ + public function setCPU(PHostCPUSet $cpu) + { + $this->set("CPU", $cpu->getAll()); + } + + /** + * Memory: 内存大小,单位MB + * + * @return integer|null + */ + public function getMemory(): int + { + return $this->get("Memory"); + } + + /** + * Memory: 内存大小,单位MB + * + * @param int $memory + */ + public function setMemory(int $memory) + { + $this->set("Memory", $memory); + } + + /** + * Components: 其他组件信息 + * + * @return PHostComponentSet|null + */ + public function getComponents(): PHostComponentSet + { + return new PHostComponentSet($this->get("Components")); + } + + /** + * Components: 其他组件信息 + * + * @param PHostComponentSet $components + */ + public function setComponents(PHostComponentSet $components) + { + $this->set("Components", $components->getAll()); + } + + /** + * Clusters: 集群库存信息 + * + * @return PHostClusterSet[]|null + */ + public function getClusters(): array + { + $items = $this->get("Clusters") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new PHostClusterSet($item)); + } + return $result; + } + + /** + * Clusters: 集群库存信息 + * + * @param PHostClusterSet[] $clusters + */ + public function setClusters(array $clusters) + { + $result = []; + foreach ($clusters as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UPHost/Models/PHostClusterSet.php b/src/UPHost/Models/PHostClusterSet.php new file mode 100644 index 00000000..c5c6d943 --- /dev/null +++ b/src/UPHost/Models/PHostClusterSet.php @@ -0,0 +1,64 @@ +get("Name"); + } + + /** + * Name: 集群名。枚举值:千兆网络集群:1G;万兆网络集群:10G;智能网卡网络:25G; + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * StockStatus: 库存状态。枚举值:有库存:Available;无库存:SoldOut + * + * @return string|null + */ + public function getStockStatus(): string + { + return $this->get("StockStatus"); + } + + /** + * StockStatus: 库存状态。枚举值:有库存:Available;无库存:SoldOut + * + * @param string $stockStatus + */ + public function setStockStatus(string $stockStatus) + { + $this->set("StockStatus", $stockStatus); + } +} diff --git a/src/UPHost/Models/PHostComponentSet.php b/src/UPHost/Models/PHostComponentSet.php new file mode 100644 index 00000000..8cee9ca7 --- /dev/null +++ b/src/UPHost/Models/PHostComponentSet.php @@ -0,0 +1,64 @@ +get("Name"); + } + + /** + * Name: 组件名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Count: 组件数量 + * + * @return integer|null + */ + public function getCount(): int + { + return $this->get("Count"); + } + + /** + * Count: 组件数量 + * + * @param int $count + */ + public function setCount(int $count) + { + $this->set("Count", $count); + } +} diff --git a/src/UPHost/Models/PHostDescDiskSet.php b/src/UPHost/Models/PHostDescDiskSet.php new file mode 100644 index 00000000..95d77e10 --- /dev/null +++ b/src/UPHost/Models/PHostDescDiskSet.php @@ -0,0 +1,184 @@ +get("Space"); + } + + /** + * Space: 单盘大小,单位GB + * + * @param int $space + */ + public function setSpace(int $space) + { + $this->set("Space", $space); + } + + /** + * Count: 磁盘数量 + * + * @return integer|null + */ + public function getCount(): int + { + return $this->get("Count"); + } + + /** + * Count: 磁盘数量 + * + * @param int $count + */ + public function setCount(int $count) + { + $this->set("Count", $count); + } + + /** + * Type: 磁盘属性 + * + * @return string|null + */ + public function getType(): string + { + return $this->get("Type"); + } + + /** + * Type: 磁盘属性 + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } + + /** + * Name: 磁盘名称,sys/data + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 磁盘名称,sys/data + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * IOCap: 磁盘IO性能,单位MB/s(待废弃) + * + * @return integer|null + */ + public function getIOCap(): int + { + return $this->get("IOCap"); + } + + /** + * IOCap: 磁盘IO性能,单位MB/s(待废弃) + * + * @param int $ioCap + */ + public function setIOCap(int $ioCap) + { + $this->set("IOCap", $ioCap); + } + + /** + * Drive: 裸金属机型参数:磁盘盘符 + * + * @return string|null + */ + public function getDrive(): string + { + return $this->get("Drive"); + } + + /** + * Drive: 裸金属机型参数:磁盘盘符 + * + * @param string $drive + */ + public function setDrive(string $drive) + { + $this->set("Drive", $drive); + } + + /** + * DiskId: 裸金属机型参数:磁盘ID + * + * @return string|null + */ + public function getDiskId(): string + { + return $this->get("DiskId"); + } + + /** + * DiskId: 裸金属机型参数:磁盘ID + * + * @param string $diskId + */ + public function setDiskId(string $diskId) + { + $this->set("DiskId", $diskId); + } + + /** + * IsBoot: 裸金属机型参数:是否是启动盘。True/False + * + * @return string|null + */ + public function getIsBoot(): string + { + return $this->get("IsBoot"); + } + + /** + * IsBoot: 裸金属机型参数:是否是启动盘。True/False + * + * @param string $isBoot + */ + public function setIsBoot(string $isBoot) + { + $this->set("IsBoot", $isBoot); + } +} diff --git a/src/UPHost/Models/PHostDiskSet.php b/src/UPHost/Models/PHostDiskSet.php new file mode 100644 index 00000000..80bae938 --- /dev/null +++ b/src/UPHost/Models/PHostDiskSet.php @@ -0,0 +1,124 @@ +get("Space"); + } + + /** + * Space: 单盘大小,单位GB + * + * @param int $space + */ + public function setSpace(int $space) + { + $this->set("Space", $space); + } + + /** + * Count: 磁盘数量 + * + * @return integer|null + */ + public function getCount(): int + { + return $this->get("Count"); + } + + /** + * Count: 磁盘数量 + * + * @param int $count + */ + public function setCount(int $count) + { + $this->set("Count", $count); + } + + /** + * Type: 磁盘属性 + * + * @return string|null + */ + public function getType(): string + { + return $this->get("Type"); + } + + /** + * Type: 磁盘属性 + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } + + /** + * Name: 磁盘名称,sys/data + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 磁盘名称,sys/data + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * IOCap: 磁盘IO性能,单位MB/s(待废弃) + * + * @return integer|null + */ + public function getIOCap(): int + { + return $this->get("IOCap"); + } + + /** + * IOCap: 磁盘IO性能,单位MB/s(待废弃) + * + * @param int $ioCap + */ + public function setIOCap(int $ioCap) + { + $this->set("IOCap", $ioCap); + } +} diff --git a/src/UPHost/Models/PHostIPSet.php b/src/UPHost/Models/PHostIPSet.php new file mode 100644 index 00000000..a83b9405 --- /dev/null +++ b/src/UPHost/Models/PHostIPSet.php @@ -0,0 +1,164 @@ +get("OperatorName"); + } + + /** + * OperatorName: 国际: Internation, BGP: BGP, 内网: Private + * + * @param string $operatorName + */ + public function setOperatorName(string $operatorName) + { + $this->set("OperatorName", $operatorName); + } + + /** + * IPId: IP资源ID(内网IP无资源ID)(待废弃) + * + * @return string|null + */ + public function getIPId(): string + { + return $this->get("IPId"); + } + + /** + * IPId: IP资源ID(内网IP无资源ID)(待废弃) + * + * @param string $ipId + */ + public function setIPId(string $ipId) + { + $this->set("IPId", $ipId); + } + + /** + * IPAddr: IP地址, + * + * @return string|null + */ + public function getIPAddr(): string + { + return $this->get("IPAddr"); + } + + /** + * IPAddr: IP地址, + * + * @param string $ipAddr + */ + public function setIPAddr(string $ipAddr) + { + $this->set("IPAddr", $ipAddr); + } + + /** + * MACAddr: MAC地址 + * + * @return string|null + */ + public function getMACAddr(): string + { + return $this->get("MACAddr"); + } + + /** + * MACAddr: MAC地址 + * + * @param string $macAddr + */ + public function setMACAddr(string $macAddr) + { + $this->set("MACAddr", $macAddr); + } + + /** + * Bandwidth: IP对应带宽,单位Mb,内网IP不显示带宽信息 + * + * @return integer|null + */ + public function getBandwidth(): int + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: IP对应带宽,单位Mb,内网IP不显示带宽信息 + * + * @param int $bandwidth + */ + public function setBandwidth(int $bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * SubnetId: 子网ID + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网ID + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * VPCId: VPC ID + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPC ID + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } +} diff --git a/src/UPHost/Models/PHostImageSet.php b/src/UPHost/Models/PHostImageSet.php new file mode 100644 index 00000000..f8233e00 --- /dev/null +++ b/src/UPHost/Models/PHostImageSet.php @@ -0,0 +1,144 @@ +get("ImageId"); + } + + /** + * ImageId: 镜像ID + * + * @param string $imageId + */ + public function setImageId(string $imageId) + { + $this->set("ImageId", $imageId); + } + + /** + * ImageName: 镜像名称 + * + * @return string|null + */ + public function getImageName(): string + { + return $this->get("ImageName"); + } + + /** + * ImageName: 镜像名称 + * + * @param string $imageName + */ + public function setImageName(string $imageName) + { + $this->set("ImageName", $imageName); + } + + /** + * OsName: 操作系统名称 + * + * @return string|null + */ + public function getOsName(): string + { + return $this->get("OsName"); + } + + /** + * OsName: 操作系统名称 + * + * @param string $osName + */ + public function setOsName(string $osName) + { + $this->set("OsName", $osName); + } + + /** + * OsType: 操作系统类型 + * + * @return string|null + */ + public function getOsType(): string + { + return $this->get("OsType"); + } + + /** + * OsType: 操作系统类型 + * + * @param string $osType + */ + public function setOsType(string $osType) + { + $this->set("OsType", $osType); + } + + /** + * Support: 支持的机型 + * + * @return string[]|null + */ + public function getSupport(): array + { + return $this->get("Support"); + } + + /** + * Support: 支持的机型 + * + * @param string[] $support + */ + public function setSupport(array $support) + { + $this->set("Support", $support); + } + + /** + * Version: 当前版本 + * + * @return string|null + */ + public function getVersion(): string + { + return $this->get("Version"); + } + + /** + * Version: 当前版本 + * + * @param string $version + */ + public function setVersion(string $version) + { + $this->set("Version", $version); + } +} diff --git a/src/UPHost/Models/PHostMachineTypeSet.php b/src/UPHost/Models/PHostMachineTypeSet.php new file mode 100644 index 00000000..e8e8a535 --- /dev/null +++ b/src/UPHost/Models/PHostMachineTypeSet.php @@ -0,0 +1,182 @@ +get("Type"); + } + + /** + * Type: 物理云主机机型别名,全网唯一。 + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } + + /** + * CPU: CPU信息 + * + * @return PHostCPUSet|null + */ + public function getCPU(): PHostCPUSet + { + return new PHostCPUSet($this->get("CPU")); + } + + /** + * CPU: CPU信息 + * + * @param PHostCPUSet $cpu + */ + public function setCPU(PHostCPUSet $cpu) + { + $this->set("CPU", $cpu->getAll()); + } + + /** + * Memory: 内存大小,单位MB + * + * @return integer|null + */ + public function getMemory(): int + { + return $this->get("Memory"); + } + + /** + * Memory: 内存大小,单位MB + * + * @param int $memory + */ + public function setMemory(int $memory) + { + $this->set("Memory", $memory); + } + + /** + * Disks: 磁盘信息 + * + * @return PHostDiskSet[]|null + */ + public function getDisks(): array + { + $items = $this->get("Disks") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new PHostDiskSet($item)); + } + return $result; + } + + /** + * Disks: 磁盘信息 + * + * @param PHostDiskSet[] $disks + */ + public function setDisks(array $disks) + { + $result = []; + foreach ($disks as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * Components: 其他组件信息 + * + * @return PHostComponentSet|null + */ + public function getComponents(): PHostComponentSet + { + return new PHostComponentSet($this->get("Components")); + } + + /** + * Components: 其他组件信息 + * + * @param PHostComponentSet $components + */ + public function setComponents(PHostComponentSet $components) + { + $this->set("Components", $components->getAll()); + } + + /** + * Clusters: 集群库存信息 + * + * @return PHostClusterSet[]|null + */ + public function getClusters(): array + { + $items = $this->get("Clusters") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new PHostClusterSet($item)); + } + return $result; + } + + /** + * Clusters: 集群库存信息 + * + * @param PHostClusterSet[] $clusters + */ + public function setClusters(array $clusters) + { + $result = []; + foreach ($clusters as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * RaidSupported: 是否支持Raid。枚举值:支持:YES;不支持:NO + * + * @return string|null + */ + public function getRaidSupported(): string + { + return $this->get("RaidSupported"); + } + + /** + * RaidSupported: 是否支持Raid。枚举值:支持:YES;不支持:NO + * + * @param string $raidSupported + */ + public function setRaidSupported(string $raidSupported) + { + $this->set("RaidSupported", $raidSupported); + } +} diff --git a/src/UPHost/Models/PHostPriceSet.php b/src/UPHost/Models/PHostPriceSet.php new file mode 100644 index 00000000..462d8fa2 --- /dev/null +++ b/src/UPHost/Models/PHostPriceSet.php @@ -0,0 +1,104 @@ +get("ChargeType"); + } + + /** + * ChargeType: Year/Month + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Price: 价格, 单位:元, 保留小数点后两位有效数字 + * + * @return float|null + */ + public function getPrice(): float + { + return $this->get("Price"); + } + + /** + * Price: 价格, 单位:元, 保留小数点后两位有效数字 + * + * @param float $price + */ + public function setPrice(float $price) + { + $this->set("Price", $price); + } + + /** + * Product: 枚举值:phost=>为主机价格,如果是云盘包括了系统盘价格。cloudDisk=>所有数据盘价格,只是裸金属机型才返回此参数。 + * + * @return string|null + */ + public function getProduct(): string + { + return $this->get("Product"); + } + + /** + * Product: 枚举值:phost=>为主机价格,如果是云盘包括了系统盘价格。cloudDisk=>所有数据盘价格,只是裸金属机型才返回此参数。 + * + * @param string $product + */ + public function setProduct(string $product) + { + $this->set("Product", $product); + } + + /** + * OriginalPrice: 原价格, 单位:元, 保留小数点后两位有效数字 + * + * @return float|null + */ + public function getOriginalPrice(): float + { + return $this->get("OriginalPrice"); + } + + /** + * OriginalPrice: 原价格, 单位:元, 保留小数点后两位有效数字 + * + * @param float $originalPrice + */ + public function setOriginalPrice(float $originalPrice) + { + $this->set("OriginalPrice", $originalPrice); + } +} diff --git a/src/UPHost/Models/PHostSet.php b/src/UPHost/Models/PHostSet.php new file mode 100644 index 00000000..ea4eafbe --- /dev/null +++ b/src/UPHost/Models/PHostSet.php @@ -0,0 +1,542 @@ +get("Zone"); + } + + /** + * Zone: 可用区,参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * PHostId: PHost资源ID + * + * @return string|null + */ + public function getPHostId(): string + { + return $this->get("PHostId"); + } + + /** + * PHostId: PHost资源ID + * + * @param string $pHostId + */ + public function setPHostId(string $pHostId) + { + $this->set("PHostId", $pHostId); + } + + /** + * SN: 物理机序列号 + * + * @return string|null + */ + public function getSN(): string + { + return $this->get("SN"); + } + + /** + * SN: 物理机序列号 + * + * @param string $sn + */ + public function setSN(string $sn) + { + $this->set("SN", $sn); + } + + /** + * PMStatus: 物理云主机状态。枚举值:\\ > 初始化:Initializing; \\ > 启动中:Starting; \\ > 运行中:Running;\\ > 关机中:Stopping; \\ > 安装失败:InstallFailed; \\ > 重启中:Rebooting;\\ > 关机:Stopped; \\ > 迁移中(裸金属云盘):Migrating + * + * @return string|null + */ + public function getPMStatus(): string + { + return $this->get("PMStatus"); + } + + /** + * PMStatus: 物理云主机状态。枚举值:\\ > 初始化:Initializing; \\ > 启动中:Starting; \\ > 运行中:Running;\\ > 关机中:Stopping; \\ > 安装失败:InstallFailed; \\ > 重启中:Rebooting;\\ > 关机:Stopped; \\ > 迁移中(裸金属云盘):Migrating + * + * @param string $pmStatus + */ + public function setPMStatus(string $pmStatus) + { + $this->set("PMStatus", $pmStatus); + } + + /** + * Name: 物理机名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 物理机名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Remark: 物理机备注 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 物理机备注 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } + + /** + * Tag: 业务组 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * ImageName: 镜像名称 + * + * @return string|null + */ + public function getImageName(): string + { + return $this->get("ImageName"); + } + + /** + * ImageName: 镜像名称 + * + * @param string $imageName + */ + public function setImageName(string $imageName) + { + $this->set("ImageName", $imageName); + } + + /** + * OSname: 操作系统名称 + * + * @return string|null + */ + public function getOSname(): string + { + return $this->get("OSname"); + } + + /** + * OSname: 操作系统名称 + * + * @param string $oSname + */ + public function setOSname(string $oSname) + { + $this->set("OSname", $oSname); + } + + /** + * CreateTime: 创建时间 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ExpireTime: 到期时间 + * + * @return integer|null + */ + public function getExpireTime(): int + { + return $this->get("ExpireTime"); + } + + /** + * ExpireTime: 到期时间 + * + * @param int $expireTime + */ + public function setExpireTime(int $expireTime) + { + $this->set("ExpireTime", $expireTime); + } + + /** + * ChargeType: 计费模式,枚举值为: Year,按年付费; Month,按月付费;默认为月付 + * + * @return string|null + */ + public function getChargeType(): string + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式,枚举值为: Year,按年付费; Month,按月付费;默认为月付 + * + * @param string $chargeType + */ + public function setChargeType(string $chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * PowerState: 电源状态,on 或 off + * + * @return string|null + */ + public function getPowerState(): string + { + return $this->get("PowerState"); + } + + /** + * PowerState: 电源状态,on 或 off + * + * @param string $powerState + */ + public function setPowerState(string $powerState) + { + $this->set("PowerState", $powerState); + } + + /** + * PHostType: 物理机类型,参见DescribePHostMachineType返回值 + * + * @return string|null + */ + public function getPHostType(): string + { + return $this->get("PHostType"); + } + + /** + * PHostType: 物理机类型,参见DescribePHostMachineType返回值 + * + * @param string $pHostType + */ + public function setPHostType(string $pHostType) + { + $this->set("PHostType", $pHostType); + } + + /** + * Memory: 内存大小,单位:MB + * + * @return integer|null + */ + public function getMemory(): int + { + return $this->get("Memory"); + } + + /** + * Memory: 内存大小,单位:MB + * + * @param int $memory + */ + public function setMemory(int $memory) + { + $this->set("Memory", $memory); + } + + /** + * CPUSet: CPU信息,见 PHostCPUSet + * + * @return PHostCPUSet|null + */ + public function getCPUSet(): PHostCPUSet + { + return new PHostCPUSet($this->get("CPUSet")); + } + + /** + * CPUSet: CPU信息,见 PHostCPUSet + * + * @param PHostCPUSet $cpuSet + */ + public function setCPUSet(PHostCPUSet $cpuSet) + { + $this->set("CPUSet", $cpuSet->getAll()); + } + + /** + * DiskSet: 磁盘信息,见 PHostDescDiskSet + * + * @return PHostDescDiskSet[]|null + */ + public function getDiskSet(): array + { + $items = $this->get("DiskSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new PHostDescDiskSet($item)); + } + return $result; + } + + /** + * DiskSet: 磁盘信息,见 PHostDescDiskSet + * + * @param PHostDescDiskSet[] $diskSet + */ + public function setDiskSet(array $diskSet) + { + $result = []; + foreach ($diskSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * IPSet: IP信息,见 PHostIPSet + * + * @return PHostIPSet[]|null + */ + public function getIPSet(): array + { + $items = $this->get("IPSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new PHostIPSet($item)); + } + return $result; + } + + /** + * IPSet: IP信息,见 PHostIPSet + * + * @param PHostIPSet[] $ipSet + */ + public function setIPSet(array $ipSet) + { + $result = []; + foreach ($ipSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * Cluster: 网络环境。枚举值:千兆:1G ,万兆:10G + * + * @return string|null + */ + public function getCluster(): string + { + return $this->get("Cluster"); + } + + /** + * Cluster: 网络环境。枚举值:千兆:1G ,万兆:10G + * + * @param string $cluster + */ + public function setCluster(string $cluster) + { + $this->set("Cluster", $cluster); + } + + /** + * AutoRenew: 自动续费 + * + * @return string|null + */ + public function getAutoRenew(): string + { + return $this->get("AutoRenew"); + } + + /** + * AutoRenew: 自动续费 + * + * @param string $autoRenew + */ + public function setAutoRenew(string $autoRenew) + { + $this->set("AutoRenew", $autoRenew); + } + + /** + * IsSupportKVM: 是否支持紧急登录 + * + * @return string|null + */ + public function getIsSupportKVM(): string + { + return $this->get("IsSupportKVM"); + } + + /** + * IsSupportKVM: 是否支持紧急登录 + * + * @param string $isSupportKVM + */ + public function setIsSupportKVM(string $isSupportKVM) + { + $this->set("IsSupportKVM", $isSupportKVM); + } + + /** + * OSType: 操作系统类型 + * + * @return string|null + */ + public function getOSType(): string + { + return $this->get("OSType"); + } + + /** + * OSType: 操作系统类型 + * + * @param string $osType + */ + public function setOSType(string $osType) + { + $this->set("OSType", $osType); + } + + /** + * Components: 组件信息(暂不支持) + * + * @return string|null + */ + public function getComponents(): string + { + return $this->get("Components"); + } + + /** + * Components: 组件信息(暂不支持) + * + * @param string $components + */ + public function setComponents(string $components) + { + $this->set("Components", $components); + } + + /** + * RaidSupported: 是否支持Raid。枚举值:Yes:支持;No:不支持。 + * + * @return string|null + */ + public function getRaidSupported(): string + { + return $this->get("RaidSupported"); + } + + /** + * RaidSupported: 是否支持Raid。枚举值:Yes:支持;No:不支持。 + * + * @param string $raidSupported + */ + public function setRaidSupported(string $raidSupported) + { + $this->set("RaidSupported", $raidSupported); + } + + /** + * PhostClass: 物理云产品类型,枚举值:LocalDisk=>代表传统本地盘机型, CloudDisk=>云盘裸金属机型 + * + * @return string|null + */ + public function getPhostClass(): string + { + return $this->get("PhostClass"); + } + + /** + * PhostClass: 物理云产品类型,枚举值:LocalDisk=>代表传统本地盘机型, CloudDisk=>云盘裸金属机型 + * + * @param string $phostClass + */ + public function setPhostClass(string $phostClass) + { + $this->set("PhostClass", $phostClass); + } +} diff --git a/src/UPHost/Models/PHostTagSet.php b/src/UPHost/Models/PHostTagSet.php new file mode 100644 index 00000000..4c52b957 --- /dev/null +++ b/src/UPHost/Models/PHostTagSet.php @@ -0,0 +1,64 @@ +get("Tag"); + } + + /** + * Tag: 业务组名称 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * TotalCount: 该业务组中包含的主机个数 + * + * @return integer|null + */ + public function getTotalCount(): int + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 该业务组中包含的主机个数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/UPHost/Params/CreatePHostParamDisks.php b/src/UPHost/Params/CreatePHostParamDisks.php new file mode 100644 index 00000000..9c448df8 --- /dev/null +++ b/src/UPHost/Params/CreatePHostParamDisks.php @@ -0,0 +1,104 @@ +是否是系统盘。枚举值: True,是系统盘。 False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。 + * + * @return string|null + */ + public function getIsBoot(): string + { + return $this->get("IsBoot"); + } + + /** + * IsBoot: 裸金属机型参数->是否是系统盘。枚举值: True,是系统盘。 False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。 + * + * @param string $isBoot + */ + public function setIsBoot(string $isBoot) + { + $this->set("IsBoot", $isBoot); + } + + /** + * Type: 裸金属机型参数->磁盘类型:枚举值:CLOUD_RSSD + * + * @return string|null + */ + public function getType(): string + { + return $this->get("Type"); + } + + /** + * Type: 裸金属机型参数->磁盘类型:枚举值:CLOUD_RSSD + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } + + /** + * Size: 裸金属机型参数->磁盘大小,单位GB,必须是10GB的整数倍。系统盘20-500GB,数据盘单块盘20-32000GB。 + * + * @return integer|null + */ + public function getSize(): int + { + return $this->get("Size"); + } + + /** + * Size: 裸金属机型参数->磁盘大小,单位GB,必须是10GB的整数倍。系统盘20-500GB,数据盘单块盘20-32000GB。 + * + * @param int $size + */ + public function setSize(int $size) + { + $this->set("Size", $size); + } + + /** + * CouponId: 裸金属机型参数->云盘代金券id。不适用于系统盘。请通过DescribeCoupon接口查询,或登录用户中心查看 + * + * @return string|null + */ + public function getCouponId(): string + { + return $this->get("CouponId"); + } + + /** + * CouponId: 裸金属机型参数->云盘代金券id。不适用于系统盘。请通过DescribeCoupon接口查询,或登录用户中心查看 + * + * @param string $couponId + */ + public function setCouponId(string $couponId) + { + $this->set("CouponId", $couponId); + } +} diff --git a/src/UPHost/Params/GetPHostPriceParamDisks.php b/src/UPHost/Params/GetPHostPriceParamDisks.php new file mode 100644 index 00000000..d2b5114e --- /dev/null +++ b/src/UPHost/Params/GetPHostPriceParamDisks.php @@ -0,0 +1,84 @@ +枚举值:\\ > True,是系统盘 \\ > False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。 + * + * @return string|null + */ + public function getIsBoot(): string + { + return $this->get("IsBoot"); + } + + /** + * IsBoot: 裸金属机型参数->枚举值:\\ > True,是系统盘 \\ > False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。 + * + * @param string $isBoot + */ + public function setIsBoot(string $isBoot) + { + $this->set("IsBoot", $isBoot); + } + + /** + * Type: 裸金属机型参数->磁盘类型:枚举值:CLOUD_RSSD + * + * @return string|null + */ + public function getType(): string + { + return $this->get("Type"); + } + + /** + * Type: 裸金属机型参数->磁盘类型:枚举值:CLOUD_RSSD + * + * @param string $type + */ + public function setType(string $type) + { + $this->set("Type", $type); + } + + /** + * Size: 裸金属机型参数->磁盘大小,单位GB,必须是10GB的整数倍。系统盘20-500GB。数据盘是20-32000G。 + * + * @return string|null + */ + public function getSize(): string + { + return $this->get("Size"); + } + + /** + * Size: 裸金属机型参数->磁盘大小,单位GB,必须是10GB的整数倍。系统盘20-500GB。数据盘是20-32000G。 + * + * @param string $size + */ + public function setSize(string $size) + { + $this->set("Size", $size); + } +} diff --git a/src/UPHost/UPHostClient.php b/src/UPHost/UPHostClient.php new file mode 100644 index 00000000..09962c9d --- /dev/null +++ b/src/UPHost/UPHostClient.php @@ -0,0 +1,697 @@ + (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ImageId" => (string) ImageId,可以通过接口 [DescribePHostImage](api/uphost-api/describe_phost_image.html)获取 + * "Password" => (string) 密码(密码需使用base64进行编码) + * "Type" => (string) 物理机类型,默认为:db-2(基础型-SAS-V3) + * "Name" => (string) 物理机名称,默认为phost + * "Remark" => (string) 物理机备注,默认为空 + * "Tag" => (string) 业务组,默认为default + * "ChargeType" => (string) 计费模式,枚举值为:year, 按年付费; month,按月付费;默认为按月付费 + * "Quantity" => (string) 购买时长,1-10个月或1-10年;默认值为1。月付时,此参数传0,代表购买至月末,1代表整月。 + * "SecurityGroupId" => (string) 防火墙ID,默认:Web推荐防火墙。如何查询SecurityGroupId请参见 [DescribeFirewall](api/unet-api/describe_firewall.html)。 + * "Raid" => (string) Raid配置,默认Raid10 支持:Raid0、Raid1、Raid5、Raid10,NoRaid + * "VPCId" => (string) VPC ID,不填为默认,VPC2.0下需要填写此字段。 + * "SubnetId" => (string) 子网ID,不填为默认,VPC2.0下需要填写此字段。 + * "Cluster" => (string) 网络环境,可选千兆:1G ,万兆:10G, 默认1G。智能网卡可以选择25G。 + * "Disks" => (array) [ + * [ + * "IsBoot" => (string) 裸金属机型参数->是否是系统盘。枚举值: True,是系统盘。 False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。 + * "Type" => (string) 裸金属机型参数->磁盘类型:枚举值:CLOUD_RSSD + * "Size" => (integer) 裸金属机型参数->磁盘大小,单位GB,必须是10GB的整数倍。系统盘20-500GB,数据盘单块盘20-32000GB。 + * "CouponId" => (string) 裸金属机型参数->云盘代金券id。不适用于系统盘。请通过DescribeCoupon接口查询,或登录用户中心查看 + * ] + * ] + * "VpcIp" => (string) 指定内网ip创建 + * "CouponId" => (string) 代金券 + * ] + * + * Outputs: + * + * $outputs = [ + * "PHostId" => (array) PHost的资源ID数组 + * ] + * + * @throws UCloudException + */ + public function createPHost(CreatePHostRequest $request = null): CreatePHostResponse + { + $resp = $this->invoke($request); + return new CreatePHostResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeBaremetalMachineType - 获取裸金属机型的详细描述信息 + * + * See also: https://docs.ucloud.cn/api/UPHost-api/describe_baremetal_machine_type + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Type" => (string) 具体机型。若不填写,则返回全部机型 + * ] + * + * Outputs: + * + * $outputs = [ + * "MachineTypes" => (array) 机型列表,模型:PHostCloudMachineTypeSet[ + * [ + * "Type" => (string) 物理云主机机型别名,全网唯一。 + * "CPU" => (object) CPU信息[ + * "Model" => (string) CPU型号 + * "Frequence" => (number) CPU主频 + * "Count" => (integer) CPU个数 + * "CoreCount" => (integer) CPU核数 + * ] + * "Memory" => (integer) 内存大小,单位MB + * "Components" => (object) 其他组件信息[ + * "Name" => (string) 组件名称 + * "Count" => (integer) 组件数量 + * ] + * "Clusters" => (array) 集群库存信息[ + * [ + * "Name" => (string) 集群名。枚举值:千兆网络集群:1G;万兆网络集群:10G;智能网卡网络:25G; + * "StockStatus" => (string) 库存状态。枚举值:有库存:Available;无库存:SoldOut + * ] + * ] + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeBaremetalMachineType(DescribeBaremetalMachineTypeRequest $request = null): DescribeBaremetalMachineTypeResponse + { + $resp = $this->invoke($request); + return new DescribeBaremetalMachineTypeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribePHost - 获取物理机详细信息 + * + * See also: https://docs.ucloud.cn/api/UPHost-api/describe_phost + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "PHostId" => (array) PHost资源ID,若为空,则返回当前Region所有PHost。 + * "Offset" => (integer) 数据偏移量,默认为0 + * "Limit" => (integer) 返回数据长度,默认为20 + * "UDiskIdForAttachment" => (string) 要挂载的云盘id,过滤返回能被UDiskId挂载的云主机。目前主要针对rssd云盘使用 + * "VPCId" => (string) ULB使用参数,获取同VPC下机器信息。 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 满足条件的PHost总数 + * "PHostSet" => (array) PHost资源列表,参见 PHostSet[ + * [ + * "Zone" => (string) 可用区,参见 [可用区列表](../summary/regionlist.html) + * "PHostId" => (string) PHost资源ID + * "SN" => (string) 物理机序列号 + * "PMStatus" => (string) 物理云主机状态。枚举值:\\ > 初始化:Initializing; \\ > 启动中:Starting; \\ > 运行中:Running;\\ > 关机中:Stopping; \\ > 安装失败:InstallFailed; \\ > 重启中:Rebooting;\\ > 关机:Stopped; \\ > 迁移中(裸金属云盘):Migrating + * "Name" => (string) 物理机名称 + * "Remark" => (string) 物理机备注 + * "Tag" => (string) 业务组 + * "ImageName" => (string) 镜像名称 + * "OSname" => (string) 操作系统名称 + * "CreateTime" => (integer) 创建时间 + * "ExpireTime" => (integer) 到期时间 + * "ChargeType" => (string) 计费模式,枚举值为: Year,按年付费; Month,按月付费;默认为月付 + * "PowerState" => (string) 电源状态,on 或 off + * "PHostType" => (string) 物理机类型,参见DescribePHostMachineType返回值 + * "Memory" => (integer) 内存大小,单位:MB + * "CPUSet" => (object) CPU信息,见 PHostCPUSet[ + * "Model" => (string) CPU型号 + * "Frequence" => (number) CPU主频 + * "Count" => (integer) CPU个数 + * "CoreCount" => (integer) CPU核数 + * ] + * "DiskSet" => (array) 磁盘信息,见 PHostDescDiskSet[ + * [ + * "Space" => (integer) 单盘大小,单位GB + * "Count" => (integer) 磁盘数量 + * "Type" => (string) 磁盘属性 + * "Name" => (string) 磁盘名称,sys/data + * "IOCap" => (integer) 磁盘IO性能,单位MB/s(待废弃) + * "Drive" => (string) 裸金属机型参数:磁盘盘符 + * "DiskId" => (string) 裸金属机型参数:磁盘ID + * "IsBoot" => (string) 裸金属机型参数:是否是启动盘。True/False + * ] + * ] + * "IPSet" => (array) IP信息,见 PHostIPSet[ + * [ + * "OperatorName" => (string) 国际: Internation, BGP: BGP, 内网: Private + * "IPId" => (string) IP资源ID(内网IP无资源ID)(待废弃) + * "IPAddr" => (string) IP地址, + * "MACAddr" => (string) MAC地址 + * "Bandwidth" => (integer) IP对应带宽,单位Mb,内网IP不显示带宽信息 + * "SubnetId" => (string) 子网ID + * "VPCId" => (string) VPC ID + * ] + * ] + * "Cluster" => (string) 网络环境。枚举值:千兆:1G ,万兆:10G + * "AutoRenew" => (string) 自动续费 + * "IsSupportKVM" => (string) 是否支持紧急登录 + * "OSType" => (string) 操作系统类型 + * "Components" => (string) 组件信息(暂不支持) + * "RaidSupported" => (string) 是否支持Raid。枚举值:Yes:支持;No:不支持。 + * "PhostClass" => (string) 物理云产品类型,枚举值:LocalDisk=>代表传统本地盘机型, CloudDisk=>云盘裸金属机型 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describePHost(DescribePHostRequest $request = null): DescribePHostResponse + { + $resp = $this->invoke($request); + return new DescribePHostResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribePHostImage - 获取物理云主机镜像列表 + * + * See also: https://docs.ucloud.cn/api/UPHost-api/describe_phost_image + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "ImageType" => (string) 镜像类别,枚举值,Base是基础镜像; + * "ImageId" => (array) 镜像ID + * "Offset" => (integer) 数据偏移量,默认为0 + * "Limit" => (integer) 返回数据长度,默认为20 + * "MachineType" => (string) 机器型号,只支持当前zone的展示机型 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 满足条件的镜像总数 + * "ImageSet" => (array) 镜像列表 PHostImageSet[ + * [ + * "ImageId" => (string) 镜像ID + * "ImageName" => (string) 镜像名称 + * "OsName" => (string) 操作系统名称 + * "OsType" => (string) 操作系统类型 + * "Support" => (array) 支持的机型 + * "Version" => (string) 当前版本 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describePHostImage(DescribePHostImageRequest $request = null): DescribePHostImageResponse + { + $resp = $this->invoke($request); + return new DescribePHostImageResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribePHostMachineType - 获取物理云机型的详细描述信息 + * + * See also: https://docs.ucloud.cn/api/UPHost-api/describe_phost_machine_type + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Type" => (string) 具体机型。若不填写,则返回全部机型 + * ] + * + * Outputs: + * + * $outputs = [ + * "MachineTypes" => (array) 机型列表,模型:PHostMachineTypeSet[ + * [ + * "Type" => (string) 物理云主机机型别名,全网唯一。 + * "CPU" => (object) CPU信息[ + * "Model" => (string) CPU型号 + * "Frequence" => (number) CPU主频 + * "Count" => (integer) CPU个数 + * "CoreCount" => (integer) CPU核数 + * ] + * "Memory" => (integer) 内存大小,单位MB + * "Disks" => (array) 磁盘信息[ + * [ + * "Space" => (integer) 单盘大小,单位GB + * "Count" => (integer) 磁盘数量 + * "Type" => (string) 磁盘属性 + * "Name" => (string) 磁盘名称,sys/data + * "IOCap" => (integer) 磁盘IO性能,单位MB/s(待废弃) + * ] + * ] + * "Components" => (object) 其他组件信息[ + * "Name" => (string) 组件名称 + * "Count" => (integer) 组件数量 + * ] + * "Clusters" => (array) 集群库存信息[ + * [ + * "Name" => (string) 集群名。枚举值:千兆网络集群:1G;万兆网络集群:10G;智能网卡网络:25G; + * "StockStatus" => (string) 库存状态。枚举值:有库存:Available;无库存:SoldOut + * ] + * ] + * "RaidSupported" => (string) 是否支持Raid。枚举值:支持:YES;不支持:NO + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describePHostMachineType(DescribePHostMachineTypeRequest $request = null): DescribePHostMachineTypeResponse + { + $resp = $this->invoke($request); + return new DescribePHostMachineTypeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribePHostTags - 获取物理机tag列表(业务组) + * + * See also: https://docs.ucloud.cn/api/UPHost-api/describe_phost_tags + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) Tag的个数 + * "TagSet" => (array) 具体参见 PHostTagSet[ + * [ + * "Tag" => (string) 业务组名称 + * "TotalCount" => (integer) 该业务组中包含的主机个数 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describePHostTags(DescribePHostTagsRequest $request = null): DescribePHostTagsResponse + { + $resp = $this->invoke($request); + return new DescribePHostTagsResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetPHostDiskUpgradePrice - 获取物理云裸金属挂载磁盘的升级价格 + * + * See also: https://docs.ucloud.cn/api/UPHost-api/get_phost_disk_upgrade_price + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "PHostId" => (string) UPHost实例ID。 + * "DiskSpace" => (integer) 磁盘大小,单位GB,必须是10GB的整数倍。系统盘20-500GB,数据盘单块盘20-32000GB。 + * "UDiskId" => (string) 磁盘 ID。获取扩容价格必填(只能扩不能减);重装时候不需要填(根据所选盘大小决定) + * "ReinstallTag" => (boolean) 是否重装价格获取。复用此接口。扩容只能增加云盘大小。重装不限制。枚举值:true/false + * ] + * + * Outputs: + * + * $outputs = [ + * "Price" => (number) 升级差价。精度为小数点后2位。 + * "OriginalPrice" => (number) 升价差价原价。精度为小数点后2位。 + * ] + * + * @throws UCloudException + */ + public function getPHostDiskUpgradePrice(GetPHostDiskUpgradePriceRequest $request = null): GetPHostDiskUpgradePriceResponse + { + $resp = $this->invoke($request); + return new GetPHostDiskUpgradePriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetPHostPrice - 获取物理机价格列表 + * + * See also: https://docs.ucloud.cn/api/UPHost-api/get_phost_price + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Count" => (integer) 购买数量,范围[1-5] + * "ChargeType" => (string) 计费模式,枚举值为: Year/Month + * "Quantity" => (integer) 购买时长,1-10个月或1-10年;默认值为1。月付时,此参数传0,代表购买至月末,1代表整月。 + * "Cluster" => (string) 网络环境,可选千兆:1G ;万兆:10G;25G网络:25G。 + * "Type" => (string) 默认为:DB(数据库型),可以通过接口 [DescribePHostMachineType](api/uphost-api/describe_phost_machine_type.html)获取 + * "Disks" => (array) [ + * [ + * "IsBoot" => (string) 裸金属机型参数->枚举值:\\ > True,是系统盘 \\ > False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。 + * "Type" => (string) 裸金属机型参数->磁盘类型:枚举值:CLOUD_RSSD + * "Size" => (string) 裸金属机型参数->磁盘大小,单位GB,必须是10GB的整数倍。系统盘20-500GB。数据盘是20-32000G。 + * ] + * ] + * ] + * + * Outputs: + * + * $outputs = [ + * "PriceSet" => (array) 价格列表 见 PHostPriceSet[ + * [ + * "ChargeType" => (string) Year/Month + * "Price" => (number) 价格, 单位:元, 保留小数点后两位有效数字 + * "Product" => (string) 枚举值:phost=>为主机价格,如果是云盘包括了系统盘价格。cloudDisk=>所有数据盘价格,只是裸金属机型才返回此参数。 + * "OriginalPrice" => (number) 原价格, 单位:元, 保留小数点后两位有效数字 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getPHostPrice(GetPHostPriceRequest $request = null): GetPHostPriceResponse + { + $resp = $this->invoke($request); + return new GetPHostPriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyPHostInfo - 更改物理机信息 + * + * See also: https://docs.ucloud.cn/api/UPHost-api/modify_phost_info + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "PHostId" => (string) 物理机资源ID + * "Name" => (string) 物理机名称,默认不更改 + * "Remark" => (string) 物理机备注,默认不更改 + * "Tag" => (string) 业务组,默认不更改 + * ] + * + * Outputs: + * + * $outputs = [ + * "PHostId" => (string) PHost 的资源ID + * ] + * + * @throws UCloudException + */ + public function modifyPHostInfo(ModifyPHostInfoRequest $request = null): ModifyPHostInfoResponse + { + $resp = $this->invoke($request); + return new ModifyPHostInfoResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * PoweroffPHost - 断电物理云主机 + * + * See also: https://docs.ucloud.cn/api/UPHost-api/poweroff_phost + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "PHostId" => (string) PHost资源ID + * ] + * + * Outputs: + * + * $outputs = [ + * "PHostId" => (string) PHost 的资源ID + * ] + * + * @throws UCloudException + */ + public function poweroffPHost(PoweroffPHostRequest $request = null): PoweroffPHostResponse + { + $resp = $this->invoke($request); + return new PoweroffPHostResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * RebootPHost - 重启物理机 + * + * See also: https://docs.ucloud.cn/api/UPHost-api/reboot_phost + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "PHostId" => (string) PHost资源ID + * ] + * + * Outputs: + * + * $outputs = [ + * "PHostId" => (string) PHost 的资源ID + * ] + * + * @throws UCloudException + */ + public function rebootPHost(RebootPHostRequest $request = null): RebootPHostResponse + { + $resp = $this->invoke($request); + return new RebootPHostResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ReinstallPHost - 重装物理机操作系统 + * + * See also: https://docs.ucloud.cn/api/UPHost-api/reinstall_phost + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "PHostId" => (string) PHost资源ID + * "Password" => (string) 密码 + * "ImageId" => (string) 镜像Id,参考镜像列表,默认使用原镜像 + * "Name" => (string) 物理机名称,默认不更改 + * "Remark" => (string) 物理机备注,默认为不更改。 + * "Tag" => (string) 业务组,默认不更改。 + * "ReserveDisk" => (string) 是否保留数据盘,保留:Yes,不报留:No, 默认:Yes + * "Raid" => (string) 不保留数据盘重装,可选Raid + * "BootDiskSpace" => (integer) 裸金属机型参数->系统盘大小。 单位:GB, 范围[20,500], 步长:10 + * ] + * + * Outputs: + * + * $outputs = [ + * "PHostId" => (string) PHost 的资源ID + * ] + * + * @throws UCloudException + */ + public function reinstallPHost(ReinstallPHostRequest $request = null): ReinstallPHostResponse + { + $resp = $this->invoke($request); + return new ReinstallPHostResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ResetPHostPassword - 重置裸金属实例的管理员密码 + * + * See also: https://docs.ucloud.cn/api/UPHost-api/reset_phost_password + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "PHostId" => (string) 裸金属实例ID + * "Password" => (string) PHost新密码(密码格式使用BASE64编码) + * ] + * + * Outputs: + * + * $outputs = [ + * "PHostId" => (string) 裸金属实例ID + * ] + * + * @throws UCloudException + */ + public function resetPHostPassword(ResetPHostPasswordRequest $request = null): ResetPHostPasswordResponse + { + $resp = $this->invoke($request); + return new ResetPHostPasswordResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ResizePHostAttachedDisk - 修改裸金属物理云已经挂载的云盘容量大小 + * + * See also: https://docs.ucloud.cn/api/UPHost-api/resize_phost_attached_disk + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "PHostId" => (string) UPHost实例ID。 + * "UDiskId" => (string) 磁盘ID。 + * "DiskSpace" => (integer) 裸金属机型参数->磁盘大小,单位GB,必须是10GB的整数倍。系统盘20-500GB,数据盘单块盘20-32000GB。 + * ] + * + * Outputs: + * + * $outputs = [ + * "UDiskId" => (string) 改配成功的磁盘id + * ] + * + * @throws UCloudException + */ + public function resizePHostAttachedDisk(ResizePHostAttachedDiskRequest $request = null): ResizePHostAttachedDiskResponse + { + $resp = $this->invoke($request); + return new ResizePHostAttachedDiskResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * StartPHost - 启动物理机 + * + * See also: https://docs.ucloud.cn/api/UPHost-api/start_phost + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "PHostId" => (string) PHost资源ID + * ] + * + * Outputs: + * + * $outputs = [ + * "PHostId" => (string) PHost 的资源ID + * ] + * + * @throws UCloudException + */ + public function startPHost(StartPHostRequest $request = null): StartPHostResponse + { + $resp = $this->invoke($request); + return new StartPHostResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * TerminatePHost - 删除物理云主机 + * + * See also: https://docs.ucloud.cn/api/UPHost-api/terminate_phost + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "PHostId" => (string) PHost资源ID + * "ReleaseEIP" => (boolean) 是否释放绑定的EIP。true: 解绑EIP后,并释放;其他值或不填:解绑EIP。 + * "ReleaseUDisk" => (boolean) 裸金属机型参数->删除主机时是否同时删除挂载的数据盘。默认为false。 + * ] + * + * Outputs: + * + * $outputs = [ + * "PHostId" => (string) PHost 的资源ID + * ] + * + * @throws UCloudException + */ + public function terminatePHost(TerminatePHostRequest $request = null): TerminatePHostResponse + { + $resp = $this->invoke($request); + return new TerminatePHostResponse($resp->toArray(), $resp->getRequestId()); + } +} diff --git a/src/USMS/Apis/CreateUSMSSignatureRequest.php b/src/USMS/Apis/CreateUSMSSignatureRequest.php new file mode 100644 index 00000000..34b6157c --- /dev/null +++ b/src/USMS/Apis/CreateUSMSSignatureRequest.php @@ -0,0 +1,216 @@ + "CreateUSMSSignature"]); + $this->markRequired("ProjectId"); + $this->markRequired("SigContent"); + $this->markRequired("SigType"); + $this->markRequired("SigPurpose"); + $this->markRequired("CertificateType"); + $this->markRequired("Description"); + $this->markRequired("File"); + } + + + + /** + * ProjectId: 项目ID,不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID,不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SigContent: 签名内容 + * + * @return string|null + */ + public function getSigContent(): string + { + return $this->get("SigContent"); + } + + /** + * SigContent: 签名内容 + * + * @param string $sigContent + */ + public function setSigContent(string $sigContent) + { + $this->set("SigContent", $sigContent); + } + + /** + * SigType: 签名类型,说明如下:0-公司或企业的全称或简称;1-App应用的全称或简称;2-工信部备案网站的全称或简称;3-公众号或小程序的全称或简称;4-商标名的全称或简称;5-政府/机关事业单位/其他单位的全称或简称; + * + * @return integer|null + */ + public function getSigType(): int + { + return $this->get("SigType"); + } + + /** + * SigType: 签名类型,说明如下:0-公司或企业的全称或简称;1-App应用的全称或简称;2-工信部备案网站的全称或简称;3-公众号或小程序的全称或简称;4-商标名的全称或简称;5-政府/机关事业单位/其他单位的全称或简称; + * + * @param int $sigType + */ + public function setSigType(int $sigType) + { + $this->set("SigType", $sigType); + } + + /** + * SigPurpose: 签名用途,0-自用,1-他用; + * + * @return integer|null + */ + public function getSigPurpose(): int + { + return $this->get("SigPurpose"); + } + + /** + * SigPurpose: 签名用途,0-自用,1-他用; + * + * @param int $sigPurpose + */ + public function setSigPurpose(int $sigPurpose) + { + $this->set("SigPurpose", $sigPurpose); + } + + /** + * CertificateType: 签名的资质证明文件类型,需与签名类型保持一致,说明如下:0-三证合一/企业营业执照/组织机构代码证书/社会信用代码证书;1-应用商店后台开发者管理截图;2-备案服务商的备案成功截图(含域名,网站名称,备案号);3-公众号或小程序的管理界面截图;4-商标注册证书;5-组织机构代码证书、社会信用代码证书; + * + * @return integer|null + */ + public function getCertificateType(): int + { + return $this->get("CertificateType"); + } + + /** + * CertificateType: 签名的资质证明文件类型,需与签名类型保持一致,说明如下:0-三证合一/企业营业执照/组织机构代码证书/社会信用代码证书;1-应用商店后台开发者管理截图;2-备案服务商的备案成功截图(含域名,网站名称,备案号);3-公众号或小程序的管理界面截图;4-商标注册证书;5-组织机构代码证书、社会信用代码证书; + * + * @param int $certificateType + */ + public function setCertificateType(int $certificateType) + { + $this->set("CertificateType", $certificateType); + } + + /** + * Description: 短信签名申请原因 + * + * @return string|null + */ + public function getDescription(): string + { + return $this->get("Description"); + } + + /** + * Description: 短信签名申请原因 + * + * @param string $description + */ + public function setDescription(string $description) + { + $this->set("Description", $description); + } + + /** + * File: 短信签名的资质证明文件,需先进行base64编码格式转换,此处填写转换后的字符串。文件大小不超过4 MB + * + * @return string|null + */ + public function getFile(): string + { + return $this->get("File"); + } + + /** + * File: 短信签名的资质证明文件,需先进行base64编码格式转换,此处填写转换后的字符串。文件大小不超过4 MB + * + * @param string $file + */ + public function setFile(string $file) + { + $this->set("File", $file); + } + + /** + * International: 国内/国际短信。true:国际短信,false:国内短信,若不传值则默认该值为false + * + * @return boolean|null + */ + public function getInternational(): bool + { + return $this->get("International"); + } + + /** + * International: 国内/国际短信。true:国际短信,false:国内短信,若不传值则默认该值为false + * + * @param boolean $international + */ + public function setInternational(bool $international) + { + $this->set("International", $international); + } + + /** + * ProxyFile: 短信签名授权委托文件,需先进行base64编码格式转换,此处填写转换后的字符串。文件大小不超过4 MB;当您是代理并使用第三方的签名时(也即SigPurpose为1-他用),该项为必填项; + * + * @return string|null + */ + public function getProxyFile(): string + { + return $this->get("ProxyFile"); + } + + /** + * ProxyFile: 短信签名授权委托文件,需先进行base64编码格式转换,此处填写转换后的字符串。文件大小不超过4 MB;当您是代理并使用第三方的签名时(也即SigPurpose为1-他用),该项为必填项; + * + * @param string $proxyFile + */ + public function setProxyFile(string $proxyFile) + { + $this->set("ProxyFile", $proxyFile); + } +} diff --git a/src/USMS/Apis/CreateUSMSSignatureResponse.php b/src/USMS/Apis/CreateUSMSSignatureResponse.php new file mode 100644 index 00000000..1e0413a2 --- /dev/null +++ b/src/USMS/Apis/CreateUSMSSignatureResponse.php @@ -0,0 +1,44 @@ +get("SigId"); + } + + /** + * SigId: 短信签名ID(短信签名申请时的工单ID) + * + * @param string $sigId + */ + public function setSigId(string $sigId) + { + $this->set("SigId", $sigId); + } +} diff --git a/src/USMS/Apis/CreateUSMSTemplateRequest.php b/src/USMS/Apis/CreateUSMSTemplateRequest.php new file mode 100644 index 00000000..f9e548d0 --- /dev/null +++ b/src/USMS/Apis/CreateUSMSTemplateRequest.php @@ -0,0 +1,153 @@ + "CreateUSMSTemplate"]); + $this->markRequired("ProjectId"); + $this->markRequired("Purpose"); + $this->markRequired("TemplateName"); + $this->markRequired("Template"); + } + + + + /** + * ProjectId: 项目ID,不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID,不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Purpose: 短信模板用途类型:1-验证码类短信模板;2-系统通知类短信模板;3-会员推广类短信模板; + * + * @return integer|null + */ + public function getPurpose(): int + { + return $this->get("Purpose"); + } + + /** + * Purpose: 短信模板用途类型:1-验证码类短信模板;2-系统通知类短信模板;3-会员推广类短信模板; + * + * @param int $purpose + */ + public function setPurpose(int $purpose) + { + $this->set("Purpose", $purpose); + } + + /** + * TemplateName: 短信模板名称,不超过32个字符,每个中文、符号、英文、数字等都计为1个字。 + * + * @return string|null + */ + public function getTemplateName(): string + { + return $this->get("TemplateName"); + } + + /** + * TemplateName: 短信模板名称,不超过32个字符,每个中文、符号、英文、数字等都计为1个字。 + * + * @param string $templateName + */ + public function setTemplateName(string $templateName) + { + $this->set("TemplateName", $templateName); + } + + /** + * Template: 短信模板内容,说明如下:字数不超过500,每个中文、符号、英文、数组等都计为一个字;模板中的变量填写格式:{N},其中N为大于1的整数,有多个参数时,建议N从1开始顺次,例如:{1}、{2}等;短信模板禁止仅包括变量的情况; + * + * @return string|null + */ + public function getTemplate(): string + { + return $this->get("Template"); + } + + /** + * Template: 短信模板内容,说明如下:字数不超过500,每个中文、符号、英文、数组等都计为一个字;模板中的变量填写格式:{N},其中N为大于1的整数,有多个参数时,建议N从1开始顺次,例如:{1}、{2}等;短信模板禁止仅包括变量的情况; + * + * @param string $template + */ + public function setTemplate(string $template) + { + $this->set("Template", $template); + } + + /** + * International: 标记是否为国际短信。true:国际短信,false:国内短信,若不传值则默认该值为false + * + * @return boolean|null + */ + public function getInternational(): bool + { + return $this->get("International"); + } + + /** + * International: 标记是否为国际短信。true:国际短信,false:国内短信,若不传值则默认该值为false + * + * @param boolean $international + */ + public function setInternational(bool $international) + { + $this->set("International", $international); + } + + /** + * Remark: 短信模板申请原因说明,字数不超过128,每个中文、符号、英文、数字等都计为1个字。 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 短信模板申请原因说明,字数不超过128,每个中文、符号、英文、数字等都计为1个字。 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } +} diff --git a/src/USMS/Apis/CreateUSMSTemplateResponse.php b/src/USMS/Apis/CreateUSMSTemplateResponse.php new file mode 100644 index 00000000..29ec39b9 --- /dev/null +++ b/src/USMS/Apis/CreateUSMSTemplateResponse.php @@ -0,0 +1,44 @@ +get("TemplateId"); + } + + /** + * TemplateId: 短信模板ID(短信模板申请时的工单ID) + * + * @param string $templateId + */ + public function setTemplateId(string $templateId) + { + $this->set("TemplateId", $templateId); + } +} diff --git a/src/USMS/Apis/DeleteUSMSSignatureRequest.php b/src/USMS/Apis/DeleteUSMSSignatureRequest.php new file mode 100644 index 00000000..6bc3c984 --- /dev/null +++ b/src/USMS/Apis/DeleteUSMSSignatureRequest.php @@ -0,0 +1,71 @@ + "DeleteUSMSSignature"]); + $this->markRequired("ProjectId"); + $this->markRequired("SigIds"); + } + + + + /** + * ProjectId: 项目ID,不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID,不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SigIds: 签名ID(也即短信签名申请时的工单ID),支持以数组的方式,举例,以SigIds.0、SigIds.1...SigIds.N方式传入 + * + * @return string[]|null + */ + public function getSigIds(): array + { + return $this->get("SigIds"); + } + + /** + * SigIds: 签名ID(也即短信签名申请时的工单ID),支持以数组的方式,举例,以SigIds.0、SigIds.1...SigIds.N方式传入 + * + * @param string[] $sigIds + */ + public function setSigIds(array $sigIds) + { + $this->set("SigIds", $sigIds); + } +} diff --git a/src/USMS/Apis/DeleteUSMSSignatureResponse.php b/src/USMS/Apis/DeleteUSMSSignatureResponse.php new file mode 100644 index 00000000..537a8cea --- /dev/null +++ b/src/USMS/Apis/DeleteUSMSSignatureResponse.php @@ -0,0 +1,26 @@ + "DeleteUSMSTemplate"]); + $this->markRequired("ProjectId"); + $this->markRequired("TemplateIds"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * TemplateIds: 模板ID(也即短信模板申请时的工单ID),支持以数组的方式,举例,以TemplateIds.0、TemplateIds.1...TemplateIds.N方式传入 + * + * @return string[]|null + */ + public function getTemplateIds(): array + { + return $this->get("TemplateIds"); + } + + /** + * TemplateIds: 模板ID(也即短信模板申请时的工单ID),支持以数组的方式,举例,以TemplateIds.0、TemplateIds.1...TemplateIds.N方式传入 + * + * @param string[] $templateIds + */ + public function setTemplateIds(array $templateIds) + { + $this->set("TemplateIds", $templateIds); + } +} diff --git a/src/USMS/Apis/DeleteUSMSTemplateResponse.php b/src/USMS/Apis/DeleteUSMSTemplateResponse.php new file mode 100644 index 00000000..d27eb7a0 --- /dev/null +++ b/src/USMS/Apis/DeleteUSMSTemplateResponse.php @@ -0,0 +1,26 @@ + "GetUSMSSendReceipt"]); + $this->markRequired("SessionNoSet"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SessionNoSet: 发送短信时返回的SessionNo集合,SessionNoSet.0,SessionNoSet.1....格式 + * + * @return string[]|null + */ + public function getSessionNoSet(): array + { + return $this->get("SessionNoSet"); + } + + /** + * SessionNoSet: 发送短信时返回的SessionNo集合,SessionNoSet.0,SessionNoSet.1....格式 + * + * @param string[] $sessionNoSet + */ + public function setSessionNoSet(array $sessionNoSet) + { + $this->set("SessionNoSet", $sessionNoSet); + } +} diff --git a/src/USMS/Apis/GetUSMSSendReceiptResponse.php b/src/USMS/Apis/GetUSMSSendReceiptResponse.php new file mode 100644 index 00000000..25387b9f --- /dev/null +++ b/src/USMS/Apis/GetUSMSSendReceiptResponse.php @@ -0,0 +1,55 @@ +get("Data") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ReceiptPerSession($item)); + } + return $result; + } + + /** + * Data: 回执信息集合 + * + * @param ReceiptPerSession[] $data + */ + public function setData(array $data) + { + $result = []; + foreach ($data as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/USMS/Apis/QueryUSMSSignatureRequest.php b/src/USMS/Apis/QueryUSMSSignatureRequest.php new file mode 100644 index 00000000..b8d8a10b --- /dev/null +++ b/src/USMS/Apis/QueryUSMSSignatureRequest.php @@ -0,0 +1,89 @@ + "QueryUSMSSignature"]); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SigId: 已申请的短信签名ID(短信签名申请时的工单ID);签名ID和签名至少需填写1项; + * + * @return string|null + */ + public function getSigId(): string + { + return $this->get("SigId"); + } + + /** + * SigId: 已申请的短信签名ID(短信签名申请时的工单ID);签名ID和签名至少需填写1项; + * + * @param string $sigId + */ + public function setSigId(string $sigId) + { + $this->set("SigId", $sigId); + } + + /** + * SigContent: 签名内容;签名ID和签名至少需填写1项; + * + * @return string|null + */ + public function getSigContent(): string + { + return $this->get("SigContent"); + } + + /** + * SigContent: 签名内容;签名ID和签名至少需填写1项; + * + * @param string $sigContent + */ + public function setSigContent(string $sigContent) + { + $this->set("SigContent", $sigContent); + } +} diff --git a/src/USMS/Apis/QueryUSMSSignatureResponse.php b/src/USMS/Apis/QueryUSMSSignatureResponse.php new file mode 100644 index 00000000..8bbc958f --- /dev/null +++ b/src/USMS/Apis/QueryUSMSSignatureResponse.php @@ -0,0 +1,45 @@ +get("Data")); + } + + /** + * Data: 签名信息 + * + * @param OutSignature $data + */ + public function setData(OutSignature $data) + { + $this->set("Data", $data->getAll()); + } +} diff --git a/src/USMS/Apis/QueryUSMSTemplateRequest.php b/src/USMS/Apis/QueryUSMSTemplateRequest.php new file mode 100644 index 00000000..b3a51cd1 --- /dev/null +++ b/src/USMS/Apis/QueryUSMSTemplateRequest.php @@ -0,0 +1,71 @@ + "QueryUSMSTemplate"]); + $this->markRequired("ProjectId"); + $this->markRequired("TemplateId"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * TemplateId: 模板ID + * + * @return string|null + */ + public function getTemplateId(): string + { + return $this->get("TemplateId"); + } + + /** + * TemplateId: 模板ID + * + * @param string $templateId + */ + public function setTemplateId(string $templateId) + { + $this->set("TemplateId", $templateId); + } +} diff --git a/src/USMS/Apis/QueryUSMSTemplateResponse.php b/src/USMS/Apis/QueryUSMSTemplateResponse.php new file mode 100644 index 00000000..34bd466f --- /dev/null +++ b/src/USMS/Apis/QueryUSMSTemplateResponse.php @@ -0,0 +1,45 @@ +get("Data")); + } + + /** + * Data: 短信模板明细信息,各字段说明详见OutTemplate + * + * @param OutTemplate $data + */ + public function setData(OutTemplate $data) + { + $this->set("Data", $data->getAll()); + } +} diff --git a/src/USMS/Apis/SendBatchUSMSMessageRequest.php b/src/USMS/Apis/SendBatchUSMSMessageRequest.php new file mode 100644 index 00000000..73f860ed --- /dev/null +++ b/src/USMS/Apis/SendBatchUSMSMessageRequest.php @@ -0,0 +1,71 @@ + "SendBatchUSMSMessage"]); + $this->markRequired("ProjectId"); + $this->markRequired("TaskContent"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * TaskContent: 批量发送内容,该参数是json数组的base64编码结果。发送内容json数组中,每个“模板+签名”组合作为一个子项,每个子项内支持多个号码,示例:发送内容json数组(base64编码前):[{"TemplateId": "UTA20212831C85C", "SigContent": "UCloud", "Target": [{"TemplateParams": ["123456"], "Phone": "18500000123", "ExtendCode": "123", "UserId": "456"} ] } ] 。json数组中各参数的定义:"TemplateId":模板ID,"SigContent"短信签名内容,"Target"具体到号码粒度的发送内容。"Target"中的具体字段有:"TemplateParams"实际发送的模板参数(若使用的是无参数模板,该参数不能传值),"Phone"手机号码, "ExtendCode"短信扩展码, "UserId"自定义业务标识ID。其中必传参数为"TemplateId", "SigContent", "Target"("Target"中必传参数为"Phone")。实际调用本接口时TaskContent传值(发送内容base64编码后)为:W3siVGVtcGxhdGVJZCI6ICJVVEEyMDIxMjgzMUM4NUMiLCAiU2lnQ29udGVudCI6ICJVQ2xvdWQiLCAiVGFyZ2V0IjogW3siVGVtcGxhdGVQYXJhbXMiOiBbIjEyMzQ1NiJdLCAiUGhvbmUiOiAiMTg1MDAwMDAxMjMiLCAiRXh0ZW5kQ29kZSI6ICIxMjMiLCAiVXNlcklkIjogIjQ1NiJ9IF0gfSBdIA== + * + * @return string|null + */ + public function getTaskContent(): string + { + return $this->get("TaskContent"); + } + + /** + * TaskContent: 批量发送内容,该参数是json数组的base64编码结果。发送内容json数组中,每个“模板+签名”组合作为一个子项,每个子项内支持多个号码,示例:发送内容json数组(base64编码前):[{"TemplateId": "UTA20212831C85C", "SigContent": "UCloud", "Target": [{"TemplateParams": ["123456"], "Phone": "18500000123", "ExtendCode": "123", "UserId": "456"} ] } ] 。json数组中各参数的定义:"TemplateId":模板ID,"SigContent"短信签名内容,"Target"具体到号码粒度的发送内容。"Target"中的具体字段有:"TemplateParams"实际发送的模板参数(若使用的是无参数模板,该参数不能传值),"Phone"手机号码, "ExtendCode"短信扩展码, "UserId"自定义业务标识ID。其中必传参数为"TemplateId", "SigContent", "Target"("Target"中必传参数为"Phone")。实际调用本接口时TaskContent传值(发送内容base64编码后)为:W3siVGVtcGxhdGVJZCI6ICJVVEEyMDIxMjgzMUM4NUMiLCAiU2lnQ29udGVudCI6ICJVQ2xvdWQiLCAiVGFyZ2V0IjogW3siVGVtcGxhdGVQYXJhbXMiOiBbIjEyMzQ1NiJdLCAiUGhvbmUiOiAiMTg1MDAwMDAxMjMiLCAiRXh0ZW5kQ29kZSI6ICIxMjMiLCAiVXNlcklkIjogIjQ1NiJ9IF0gfSBdIA== + * + * @param string $taskContent + */ + public function setTaskContent(string $taskContent) + { + $this->set("TaskContent", $taskContent); + } +} diff --git a/src/USMS/Apis/SendBatchUSMSMessageResponse.php b/src/USMS/Apis/SendBatchUSMSMessageResponse.php new file mode 100644 index 00000000..acb4e8b3 --- /dev/null +++ b/src/USMS/Apis/SendBatchUSMSMessageResponse.php @@ -0,0 +1,115 @@ +get("SessionNo"); + } + + /** + * SessionNo: 本次提交发送任务的唯一ID,可根据该值查询本次发送的短信列表。注:成功提交短信数大于0时,才返回该字段 + * + * @param string $sessionNo + */ + public function setSessionNo(string $sessionNo) + { + $this->set("SessionNo", $sessionNo); + } + + /** + * ReqUuid: 本次请求Uuid + * + * @return string|null + */ + public function getReqUuid(): string + { + return $this->get("ReqUuid"); + } + + /** + * ReqUuid: 本次请求Uuid + * + * @param string $reqUuid + */ + public function setReqUuid(string $reqUuid) + { + $this->set("ReqUuid", $reqUuid); + } + + /** + * SuccessCount: 成功提交短信(未拆分)条数 + * + * @return integer|null + */ + public function getSuccessCount(): int + { + return $this->get("SuccessCount"); + } + + /** + * SuccessCount: 成功提交短信(未拆分)条数 + * + * @param int $successCount + */ + public function setSuccessCount(int $successCount) + { + $this->set("SuccessCount", $successCount); + } + + /** + * FailContent: 未发送成功的详情,返回码非0时该字段有效,可根据该字段数据重发 + * + * @return BatchInfo[]|null + */ + public function getFailContent(): array + { + $items = $this->get("FailContent") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new BatchInfo($item)); + } + return $result; + } + + /** + * FailContent: 未发送成功的详情,返回码非0时该字段有效,可根据该字段数据重发 + * + * @param BatchInfo[] $failContent + */ + public function setFailContent(array $failContent) + { + $result = []; + foreach ($failContent as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/USMS/Apis/SendUSMSMessageRequest.php b/src/USMS/Apis/SendUSMSMessageRequest.php new file mode 100644 index 00000000..d890baaa --- /dev/null +++ b/src/USMS/Apis/SendUSMSMessageRequest.php @@ -0,0 +1,173 @@ + "SendUSMSMessage"]); + $this->markRequired("ProjectId"); + $this->markRequired("PhoneNumbers"); + $this->markRequired("SigContent"); + $this->markRequired("TemplateId"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * PhoneNumbers: 电话号码数组,电话号码格式为(60)1xxxxxxxx,()中为国际长途区号(如中国为86或0086,两种格式都支持),后面为电话号码.若不传入国际区号,如1851623xxxx,则默认为国内手机号 + * + * @return string[]|null + */ + public function getPhoneNumbers(): array + { + return $this->get("PhoneNumbers"); + } + + /** + * PhoneNumbers: 电话号码数组,电话号码格式为(60)1xxxxxxxx,()中为国际长途区号(如中国为86或0086,两种格式都支持),后面为电话号码.若不传入国际区号,如1851623xxxx,则默认为国内手机号 + * + * @param string[] $phoneNumbers + */ + public function setPhoneNumbers(array $phoneNumbers) + { + $this->set("PhoneNumbers", $phoneNumbers); + } + + /** + * SigContent: 短信签名内容,请到[USMS控制台](https://console.ucloud.cn/usms)的签名管理页面查看;使用的短信签名必须是已申请并且通过审核; + * + * @return string|null + */ + public function getSigContent(): string + { + return $this->get("SigContent"); + } + + /** + * SigContent: 短信签名内容,请到[USMS控制台](https://console.ucloud.cn/usms)的签名管理页面查看;使用的短信签名必须是已申请并且通过审核; + * + * @param string $sigContent + */ + public function setSigContent(string $sigContent) + { + $this->set("SigContent", $sigContent); + } + + /** + * TemplateId: 模板ID(也即短信模板申请时的工单ID),请到[USMS控制台](https://console.ucloud.cn/usms)的模板管理页面查看;使用的短信模板必须是已申请并通过审核; + * + * @return string|null + */ + public function getTemplateId(): string + { + return $this->get("TemplateId"); + } + + /** + * TemplateId: 模板ID(也即短信模板申请时的工单ID),请到[USMS控制台](https://console.ucloud.cn/usms)的模板管理页面查看;使用的短信模板必须是已申请并通过审核; + * + * @param string $templateId + */ + public function setTemplateId(string $templateId) + { + $this->set("TemplateId", $templateId); + } + + /** + * TemplateParams: 模板可变参数,以数组的方式填写,举例,TempalteParams.0,TempalteParams.1,... 若模板中无可变参数,则该项可不填写;若模板中有可变参数,则该项为必填项,参数个数需与变量个数保持一致,否则无法发送; + * + * @return string[]|null + */ + public function getTemplateParams(): array + { + return $this->get("TemplateParams"); + } + + /** + * TemplateParams: 模板可变参数,以数组的方式填写,举例,TempalteParams.0,TempalteParams.1,... 若模板中无可变参数,则该项可不填写;若模板中有可变参数,则该项为必填项,参数个数需与变量个数保持一致,否则无法发送; + * + * @param string[] $templateParams + */ + public function setTemplateParams(array $templateParams) + { + $this->set("TemplateParams", $templateParams); + } + + /** + * ExtendCode: 短信扩展码,格式为阿拉伯数字串,默认不开通,如需开通请联系 UCloud技术支持 + * + * @return string|null + */ + public function getExtendCode(): string + { + return $this->get("ExtendCode"); + } + + /** + * ExtendCode: 短信扩展码,格式为阿拉伯数字串,默认不开通,如需开通请联系 UCloud技术支持 + * + * @param string $extendCode + */ + public function setExtendCode(string $extendCode) + { + $this->set("ExtendCode", $extendCode); + } + + /** + * UserId: 自定义的业务标识ID,字符串( 长度不能超过32 位),不支持 单引号、表情包符号等特殊字符 + * + * @return string|null + */ + public function getUserId(): string + { + return $this->get("UserId"); + } + + /** + * UserId: 自定义的业务标识ID,字符串( 长度不能超过32 位),不支持 单引号、表情包符号等特殊字符 + * + * @param string $userId + */ + public function setUserId(string $userId) + { + $this->set("UserId", $userId); + } +} diff --git a/src/USMS/Apis/SendUSMSMessageResponse.php b/src/USMS/Apis/SendUSMSMessageResponse.php new file mode 100644 index 00000000..352366a7 --- /dev/null +++ b/src/USMS/Apis/SendUSMSMessageResponse.php @@ -0,0 +1,64 @@ +get("SessionNo"); + } + + /** + * SessionNo: 本次提交发送的短信的唯一ID,可根据该值查询本次发送的短信列表 + * + * @param string $sessionNo + */ + public function setSessionNo(string $sessionNo) + { + $this->set("SessionNo", $sessionNo); + } + + /** + * UserId: 本次提交的自定义业务标识ID,仅当发送时传入有效的UserId,才返回该字段。 + * + * @return string|null + */ + public function getUserId(): string + { + return $this->get("UserId"); + } + + /** + * UserId: 本次提交的自定义业务标识ID,仅当发送时传入有效的UserId,才返回该字段。 + * + * @param string $userId + */ + public function setUserId(string $userId) + { + $this->set("UserId", $userId); + } +} diff --git a/src/USMS/Apis/UpdateUSMSSignatureRequest.php b/src/USMS/Apis/UpdateUSMSSignatureRequest.php new file mode 100644 index 00000000..3158dfa5 --- /dev/null +++ b/src/USMS/Apis/UpdateUSMSSignatureRequest.php @@ -0,0 +1,234 @@ + "UpdateUSMSSignature"]); + $this->markRequired("ProjectId"); + $this->markRequired("SigId"); + $this->markRequired("SigContent"); + $this->markRequired("SigType"); + $this->markRequired("SigPurpose"); + } + + + + /** + * ProjectId: 项目ID,不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID,不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SigId: 签名ID(也即短信签名申请时的工单ID),支持以数组的方式,举例,以SigIds.0、SigIds.1...SigIds.N方式传入 + * + * @return string|null + */ + public function getSigId(): string + { + return $this->get("SigId"); + } + + /** + * SigId: 签名ID(也即短信签名申请时的工单ID),支持以数组的方式,举例,以SigIds.0、SigIds.1...SigIds.N方式传入 + * + * @param string $sigId + */ + public function setSigId(string $sigId) + { + $this->set("SigId", $sigId); + } + + /** + * SigContent: 新的短信签名内容;长度为2-12个字符, 可包含中文、数字和符号;无需填写【】或[],系统会自动添加 + * + * @return string|null + */ + public function getSigContent(): string + { + return $this->get("SigContent"); + } + + /** + * SigContent: 新的短信签名内容;长度为2-12个字符, 可包含中文、数字和符号;无需填写【】或[],系统会自动添加 + * + * @param string $sigContent + */ + public function setSigContent(string $sigContent) + { + $this->set("SigContent", $sigContent); + } + + /** + * SigType: 签名类型,说明如下:0-公司或企业的全称或简称;1-App应用的全称或简称;2-工信部备案网站的全称或简称;3-公众号或小程序的全称或简称;4-商标名的全称或简称;5-政府/机关事业单位/其他单位的全称或简称; + * + * @return integer|null + */ + public function getSigType(): int + { + return $this->get("SigType"); + } + + /** + * SigType: 签名类型,说明如下:0-公司或企业的全称或简称;1-App应用的全称或简称;2-工信部备案网站的全称或简称;3-公众号或小程序的全称或简称;4-商标名的全称或简称;5-政府/机关事业单位/其他单位的全称或简称; + * + * @param int $sigType + */ + public function setSigType(int $sigType) + { + $this->set("SigType", $sigType); + } + + /** + * SigPurpose: 签名用途,0-自用,1-他用; + * + * @return integer|null + */ + public function getSigPurpose(): int + { + return $this->get("SigPurpose"); + } + + /** + * SigPurpose: 签名用途,0-自用,1-他用; + * + * @param int $sigPurpose + */ + public function setSigPurpose(int $sigPurpose) + { + $this->set("SigPurpose", $sigPurpose); + } + + /** + * File: 短信签名的资质证明文件内容,需先进行base64编码格式转换,此处填写转换后的字符串。文件大小不超过4 MB。内容格式如下: [file type];[code type],[base64] 如:image/jpeg;base64,5YaF5a65 + * + * @return string|null + */ + public function getFile(): string + { + return $this->get("File"); + } + + /** + * File: 短信签名的资质证明文件内容,需先进行base64编码格式转换,此处填写转换后的字符串。文件大小不超过4 MB。内容格式如下: [file type];[code type],[base64] 如:image/jpeg;base64,5YaF5a65 + * + * @param string $file + */ + public function setFile(string $file) + { + $this->set("File", $file); + } + + /** + * CertificateType: 签名的资质证明文件类型,需与签名类型保持一致,说明如下:0-三证合一/企业营业执照/组织机构代码证书/社会信用代码证书;1-应用商店后台开发者管理截图;2-备案服务商的备案成功截图(含域名,网站名称,备案号);3-公众号或小程序的管理界面截图;4-商标注册证书;5-组织机构代码证书、社会信用代码证书; + * + * @return integer|null + */ + public function getCertificateType(): int + { + return $this->get("CertificateType"); + } + + /** + * CertificateType: 签名的资质证明文件类型,需与签名类型保持一致,说明如下:0-三证合一/企业营业执照/组织机构代码证书/社会信用代码证书;1-应用商店后台开发者管理截图;2-备案服务商的备案成功截图(含域名,网站名称,备案号);3-公众号或小程序的管理界面截图;4-商标注册证书;5-组织机构代码证书、社会信用代码证书; + * + * @param int $certificateType + */ + public function setCertificateType(int $certificateType) + { + $this->set("CertificateType", $certificateType); + } + + /** + * ProxyFile: 短信签名授权委托文件内容,需先进行base64编码格式转换,此处填写转换后的字符串。文件大小不超过4 MB;当您是代理并使用第三方的签名时(也即SigPurpose为1-他用),该项为必填项;格式和File类似。 + * + * @return string|null + */ + public function getProxyFile(): string + { + return $this->get("ProxyFile"); + } + + /** + * ProxyFile: 短信签名授权委托文件内容,需先进行base64编码格式转换,此处填写转换后的字符串。文件大小不超过4 MB;当您是代理并使用第三方的签名时(也即SigPurpose为1-他用),该项为必填项;格式和File类似。 + * + * @param string $proxyFile + */ + public function setProxyFile(string $proxyFile) + { + $this->set("ProxyFile", $proxyFile); + } + + /** + * Document: 短信签名的资质证明文件URL,若未更改审核材料,则该处使用已上传审核材料的URL链接,否则使用File参数 + * + * @return string|null + */ + public function getDocument(): string + { + return $this->get("Document"); + } + + /** + * Document: 短信签名的资质证明文件URL,若未更改审核材料,则该处使用已上传审核材料的URL链接,否则使用File参数 + * + * @param string $document + */ + public function setDocument(string $document) + { + $this->set("Document", $document); + } + + /** + * ProxyDoc: 短信签名授权委托文件URL,若未更改授权委托文件,则该处填写已上传的授权委托文件的URL链接,否则使用ProxyFile参数 + * + * @return string|null + */ + public function getProxyDoc(): string + { + return $this->get("ProxyDoc"); + } + + /** + * ProxyDoc: 短信签名授权委托文件URL,若未更改授权委托文件,则该处填写已上传的授权委托文件的URL链接,否则使用ProxyFile参数 + * + * @param string $proxyDoc + */ + public function setProxyDoc(string $proxyDoc) + { + $this->set("ProxyDoc", $proxyDoc); + } +} diff --git a/src/USMS/Apis/UpdateUSMSSignatureResponse.php b/src/USMS/Apis/UpdateUSMSSignatureResponse.php new file mode 100644 index 00000000..966bd077 --- /dev/null +++ b/src/USMS/Apis/UpdateUSMSSignatureResponse.php @@ -0,0 +1,26 @@ + "UpdateUSMSTemplate"]); + $this->markRequired("ProjectId"); + $this->markRequired("TemplateId"); + $this->markRequired("Template"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * TemplateId: 短信模板ID + * + * @return string|null + */ + public function getTemplateId(): string + { + return $this->get("TemplateId"); + } + + /** + * TemplateId: 短信模板ID + * + * @param string $templateId + */ + public function setTemplateId(string $templateId) + { + $this->set("TemplateId", $templateId); + } + + /** + * Template: 新的模板内容。模板名称和模板内容必须提供一个,否则会报错。小于等于600个字 + * + * @return string|null + */ + public function getTemplate(): string + { + return $this->get("Template"); + } + + /** + * Template: 新的模板内容。模板名称和模板内容必须提供一个,否则会报错。小于等于600个字 + * + * @param string $template + */ + public function setTemplate(string $template) + { + $this->set("Template", $template); + } + + /** + * TemplateName: 新的模板名称。小于等于32个字,每个中文、英文、数组、符合都计为一个字 + * + * @return string|null + */ + public function getTemplateName(): string + { + return $this->get("TemplateName"); + } + + /** + * TemplateName: 新的模板名称。小于等于32个字,每个中文、英文、数组、符合都计为一个字 + * + * @param string $templateName + */ + public function setTemplateName(string $templateName) + { + $this->set("TemplateName", $templateName); + } + + /** + * Remark: 短信模板申请原因说明,字数不超过128,每个中文、符号、英文、数字等都计为1个字。 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 短信模板申请原因说明,字数不超过128,每个中文、符号、英文、数字等都计为1个字。 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } +} diff --git a/src/USMS/Apis/UpdateUSMSTemplateResponse.php b/src/USMS/Apis/UpdateUSMSTemplateResponse.php new file mode 100644 index 00000000..6485cf6a --- /dev/null +++ b/src/USMS/Apis/UpdateUSMSTemplateResponse.php @@ -0,0 +1,26 @@ +get("TemplateId"); + } + + /** + * TemplateId: 模板ID + * + * @param string $templateId + */ + public function setTemplateId(string $templateId) + { + $this->set("TemplateId", $templateId); + } + + /** + * SigContent: 签名 + * + * @return string|null + */ + public function getSigContent(): string + { + return $this->get("SigContent"); + } + + /** + * SigContent: 签名 + * + * @param string $sigContent + */ + public function setSigContent(string $sigContent) + { + $this->set("SigContent", $sigContent); + } + + /** + * Target: 具体号码信息 + * + * @return FailPhoneDetail[]|null + */ + public function getTarget(): array + { + $items = $this->get("Target") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new FailPhoneDetail($item)); + } + return $result; + } + + /** + * Target: 具体号码信息 + * + * @param FailPhoneDetail[] $target + */ + public function setTarget(array $target) + { + $result = []; + foreach ($target as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * FailureDetails: 未能成功发送的详情。注:模板/签名检验失败时,该字段有效 + * + * @return string|null + */ + public function getFailureDetails(): string + { + return $this->get("FailureDetails"); + } + + /** + * FailureDetails: 未能成功发送的详情。注:模板/签名检验失败时,该字段有效 + * + * @param string $failureDetails + */ + public function setFailureDetails(string $failureDetails) + { + $this->set("FailureDetails", $failureDetails); + } +} diff --git a/src/USMS/Models/FailPhoneDetail.php b/src/USMS/Models/FailPhoneDetail.php new file mode 100644 index 00000000..f3b797a7 --- /dev/null +++ b/src/USMS/Models/FailPhoneDetail.php @@ -0,0 +1,124 @@ +get("TemplateParams"); + } + + /** + * TemplateParams: 模板参数 + * + * @param string[] $templateParams + */ + public function setTemplateParams(array $templateParams) + { + $this->set("TemplateParams", $templateParams); + } + + /** + * Phone: 手机号 + * + * @return string|null + */ + public function getPhone(): string + { + return $this->get("Phone"); + } + + /** + * Phone: 手机号 + * + * @param string $phone + */ + public function setPhone(string $phone) + { + $this->set("Phone", $phone); + } + + /** + * ExtendCode: 扩展号码 + * + * @return string|null + */ + public function getExtendCode(): string + { + return $this->get("ExtendCode"); + } + + /** + * ExtendCode: 扩展号码 + * + * @param string $extendCode + */ + public function setExtendCode(string $extendCode) + { + $this->set("ExtendCode", $extendCode); + } + + /** + * UserId: 用户自定义ID + * + * @return string|null + */ + public function getUserId(): string + { + return $this->get("UserId"); + } + + /** + * UserId: 用户自定义ID + * + * @param string $userId + */ + public function setUserId(string $userId) + { + $this->set("UserId", $userId); + } + + /** + * FailureDetails: 发送失败原因。注:若模板/签名校验失败,该字段为空 + * + * @return string|null + */ + public function getFailureDetails(): string + { + return $this->get("FailureDetails"); + } + + /** + * FailureDetails: 发送失败原因。注:若模板/签名校验失败,该字段为空 + * + * @param string $failureDetails + */ + public function setFailureDetails(string $failureDetails) + { + $this->set("FailureDetails", $failureDetails); + } +} diff --git a/src/USMS/Models/OutSignature.php b/src/USMS/Models/OutSignature.php new file mode 100644 index 00000000..b38b10ce --- /dev/null +++ b/src/USMS/Models/OutSignature.php @@ -0,0 +1,104 @@ +get("SigId"); + } + + /** + * SigId: 短信签名ID + * + * @param string $sigId + */ + public function setSigId(string $sigId) + { + $this->set("SigId", $sigId); + } + + /** + * SigContent: 短信签名内容 + * + * @return string|null + */ + public function getSigContent(): string + { + return $this->get("SigContent"); + } + + /** + * SigContent: 短信签名内容 + * + * @param string $sigContent + */ + public function setSigContent(string $sigContent) + { + $this->set("SigContent", $sigContent); + } + + /** + * Status: 签名状态,0-待审核 1-审核中 2-审核通过 3-审核未通过 4-被禁用 + * + * @return integer|null + */ + public function getStatus(): int + { + return $this->get("Status"); + } + + /** + * Status: 签名状态,0-待审核 1-审核中 2-审核通过 3-审核未通过 4-被禁用 + * + * @param int $status + */ + public function setStatus(int $status) + { + $this->set("Status", $status); + } + + /** + * ErrDesc: 短信签名未通过审核原因 + * + * @return string|null + */ + public function getErrDesc(): string + { + return $this->get("ErrDesc"); + } + + /** + * ErrDesc: 短信签名未通过审核原因 + * + * @param string $errDesc + */ + public function setErrDesc(string $errDesc) + { + $this->set("ErrDesc", $errDesc); + } +} diff --git a/src/USMS/Models/OutTemplate.php b/src/USMS/Models/OutTemplate.php new file mode 100644 index 00000000..845a0be0 --- /dev/null +++ b/src/USMS/Models/OutTemplate.php @@ -0,0 +1,204 @@ +get("TemplateId"); + } + + /** + * TemplateId: 短信模板ID + * + * @param string $templateId + */ + public function setTemplateId(string $templateId) + { + $this->set("TemplateId", $templateId); + } + + /** + * Purpose: 模板类型,选项:1-验证码类 2-通知类 3-会员推广类 + * + * @return integer|null + */ + public function getPurpose(): int + { + return $this->get("Purpose"); + } + + /** + * Purpose: 模板类型,选项:1-验证码类 2-通知类 3-会员推广类 + * + * @param int $purpose + */ + public function setPurpose(int $purpose) + { + $this->set("Purpose", $purpose); + } + + /** + * TemplateName: 短信模板名称 + * + * @return string|null + */ + public function getTemplateName(): string + { + return $this->get("TemplateName"); + } + + /** + * TemplateName: 短信模板名称 + * + * @param string $templateName + */ + public function setTemplateName(string $templateName) + { + $this->set("TemplateName", $templateName); + } + + /** + * Template: 短信模板内容 + * + * @return string|null + */ + public function getTemplate(): string + { + return $this->get("Template"); + } + + /** + * Template: 短信模板内容 + * + * @param string $template + */ + public function setTemplate(string $template) + { + $this->set("Template", $template); + } + + /** + * UnsubscribeInfo: 退订信息;一般填写方式“回T退订”,当purpose为3(也即会员推广类)时,为必填项 + * + * @return string|null + */ + public function getUnsubscribeInfo(): string + { + return $this->get("UnsubscribeInfo"); + } + + /** + * UnsubscribeInfo: 退订信息;一般填写方式“回T退订”,当purpose为3(也即会员推广类)时,为必填项 + * + * @param string $unsubscribeInfo + */ + public function setUnsubscribeInfo(string $unsubscribeInfo) + { + $this->set("UnsubscribeInfo", $unsubscribeInfo); + } + + /** + * Status: 短信模板状态;状态说明:0-待审核,1-审核中,2-审核通过,3-审核未通过,4-被禁用 + * + * @return integer|null + */ + public function getStatus(): int + { + return $this->get("Status"); + } + + /** + * Status: 短信模板状态;状态说明:0-待审核,1-审核中,2-审核通过,3-审核未通过,4-被禁用 + * + * @param int $status + */ + public function setStatus(int $status) + { + $this->set("Status", $status); + } + + /** + * Remark: 模板说明 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 模板说明 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } + + /** + * ErrDesc: 审核失败原因 + * + * @return string|null + */ + public function getErrDesc(): string + { + return $this->get("ErrDesc"); + } + + /** + * ErrDesc: 审核失败原因 + * + * @param string $errDesc + */ + public function setErrDesc(string $errDesc) + { + $this->set("ErrDesc", $errDesc); + } + + /** + * CreateTime: 创建时间 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } +} diff --git a/src/USMS/Models/ReceiptPerPhone.php b/src/USMS/Models/ReceiptPerPhone.php new file mode 100644 index 00000000..6678784a --- /dev/null +++ b/src/USMS/Models/ReceiptPerPhone.php @@ -0,0 +1,164 @@ +get("Phone"); + } + + /** + * Phone: 手机号码 + * + * @param string $phone + */ + public function setPhone(string $phone) + { + $this->set("Phone", $phone); + } + + /** + * CostCount: 消耗短信条数 + * + * @return integer|null + */ + public function getCostCount(): int + { + return $this->get("CostCount"); + } + + /** + * CostCount: 消耗短信条数 + * + * @param int $costCount + */ + public function setCostCount(int $costCount) + { + $this->set("CostCount", $costCount); + } + + /** + * ReceiptResult: 回执结果,枚举值:\\ > 发送成功: 代表成功 \\ > Success: 代表成功 \\ > 发送失败: 代表失败 \\ > Fail: 代表失败 \\ > 状态未知: 代表未知 \\ > Unknow: 代表未知 + * + * @return string|null + */ + public function getReceiptResult(): string + { + return $this->get("ReceiptResult"); + } + + /** + * ReceiptResult: 回执结果,枚举值:\\ > 发送成功: 代表成功 \\ > Success: 代表成功 \\ > 发送失败: 代表失败 \\ > Fail: 代表失败 \\ > 状态未知: 代表未知 \\ > Unknow: 代表未知 + * + * @param string $receiptResult + */ + public function setReceiptResult(string $receiptResult) + { + $this->set("ReceiptResult", $receiptResult); + } + + /** + * ReceiptCode: 状态报告编码 + * + * @return string|null + */ + public function getReceiptCode(): string + { + return $this->get("ReceiptCode"); + } + + /** + * ReceiptCode: 状态报告编码 + * + * @param string $receiptCode + */ + public function setReceiptCode(string $receiptCode) + { + $this->set("ReceiptCode", $receiptCode); + } + + /** + * ReceiptDesc: 回执结果描述 + * + * @return string|null + */ + public function getReceiptDesc(): string + { + return $this->get("ReceiptDesc"); + } + + /** + * ReceiptDesc: 回执结果描述 + * + * @param string $receiptDesc + */ + public function setReceiptDesc(string $receiptDesc) + { + $this->set("ReceiptDesc", $receiptDesc); + } + + /** + * ReceiptTime: 回执返回时间 + * + * @return integer|null + */ + public function getReceiptTime(): int + { + return $this->get("ReceiptTime"); + } + + /** + * ReceiptTime: 回执返回时间 + * + * @param int $receiptTime + */ + public function setReceiptTime(int $receiptTime) + { + $this->set("ReceiptTime", $receiptTime); + } + + /** + * UserId: 自定义的业务标识ID,字符串 + * + * @return string|null + */ + public function getUserId(): string + { + return $this->get("UserId"); + } + + /** + * UserId: 自定义的业务标识ID,字符串 + * + * @param string $userId + */ + public function setUserId(string $userId) + { + $this->set("UserId", $userId); + } +} diff --git a/src/USMS/Models/ReceiptPerSession.php b/src/USMS/Models/ReceiptPerSession.php new file mode 100644 index 00000000..9b16e63b --- /dev/null +++ b/src/USMS/Models/ReceiptPerSession.php @@ -0,0 +1,73 @@ +get("SessionNo"); + } + + /** + * SessionNo: 发送短信时返回的SessionNo + * + * @param string $sessionNo + */ + public function setSessionNo(string $sessionNo) + { + $this->set("SessionNo", $sessionNo); + } + + /** + * ReceiptSet: 每个手机号的短信回执信息集合 + * + * @return ReceiptPerPhone[]|null + */ + public function getReceiptSet(): array + { + $items = $this->get("ReceiptSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ReceiptPerPhone($item)); + } + return $result; + } + + /** + * ReceiptSet: 每个手机号的短信回执信息集合 + * + * @param ReceiptPerPhone[] $receiptSet + */ + public function setReceiptSet(array $receiptSet) + { + $result = []; + foreach ($receiptSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/USMS/USMSClient.php b/src/USMS/USMSClient.php new file mode 100644 index 00000000..deb1e23a --- /dev/null +++ b/src/USMS/USMSClient.php @@ -0,0 +1,410 @@ + (string) 项目ID,不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "SigContent" => (string) 签名内容 + * "SigType" => (integer) 签名类型,说明如下:0-公司或企业的全称或简称;1-App应用的全称或简称;2-工信部备案网站的全称或简称;3-公众号或小程序的全称或简称;4-商标名的全称或简称;5-政府/机关事业单位/其他单位的全称或简称; + * "SigPurpose" => (integer) 签名用途,0-自用,1-他用; + * "CertificateType" => (integer) 签名的资质证明文件类型,需与签名类型保持一致,说明如下:0-三证合一/企业营业执照/组织机构代码证书/社会信用代码证书;1-应用商店后台开发者管理截图;2-备案服务商的备案成功截图(含域名,网站名称,备案号);3-公众号或小程序的管理界面截图;4-商标注册证书;5-组织机构代码证书、社会信用代码证书; + * "Description" => (string) 短信签名申请原因 + * "File" => (string) 短信签名的资质证明文件,需先进行base64编码格式转换,此处填写转换后的字符串。文件大小不超过4 MB + * "International" => (boolean) 国内/国际短信。true:国际短信,false:国内短信,若不传值则默认该值为false + * "ProxyFile" => (string) 短信签名授权委托文件,需先进行base64编码格式转换,此处填写转换后的字符串。文件大小不超过4 MB;当您是代理并使用第三方的签名时(也即SigPurpose为1-他用),该项为必填项; + * ] + * + * Outputs: + * + * $outputs = [ + * "SigId" => (string) 短信签名ID(短信签名申请时的工单ID) + * ] + * + * @throws UCloudException + */ + public function createUSMSSignature(CreateUSMSSignatureRequest $request = null): CreateUSMSSignatureResponse + { + $resp = $this->invoke($request); + return new CreateUSMSSignatureResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUSMSTemplate - 调用接口CreateUSMSTemplate申请短信模板 + * + * See also: https://docs.ucloud.cn/api/USMS-api/create_usms_template + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID,不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Purpose" => (integer) 短信模板用途类型:1-验证码类短信模板;2-系统通知类短信模板;3-会员推广类短信模板; + * "TemplateName" => (string) 短信模板名称,不超过32个字符,每个中文、符号、英文、数字等都计为1个字。 + * "Template" => (string) 短信模板内容,说明如下:字数不超过500,每个中文、符号、英文、数组等都计为一个字;模板中的变量填写格式:{N},其中N为大于1的整数,有多个参数时,建议N从1开始顺次,例如:{1}、{2}等;短信模板禁止仅包括变量的情况; + * "International" => (boolean) 标记是否为国际短信。true:国际短信,false:国内短信,若不传值则默认该值为false + * "Remark" => (string) 短信模板申请原因说明,字数不超过128,每个中文、符号、英文、数字等都计为1个字。 + * ] + * + * Outputs: + * + * $outputs = [ + * "TemplateId" => (string) 短信模板ID(短信模板申请时的工单ID) + * ] + * + * @throws UCloudException + */ + public function createUSMSTemplate(CreateUSMSTemplateRequest $request = null): CreateUSMSTemplateResponse + { + $resp = $this->invoke($request); + return new CreateUSMSTemplateResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteUSMSSignature - 调用接口DeleteUSMSSignature删除短信签名 + * + * See also: https://docs.ucloud.cn/api/USMS-api/delete_usms_signature + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID,不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "SigIds" => (array) 签名ID(也即短信签名申请时的工单ID),支持以数组的方式,举例,以SigIds.0、SigIds.1...SigIds.N方式传入 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteUSMSSignature(DeleteUSMSSignatureRequest $request = null): DeleteUSMSSignatureResponse + { + $resp = $this->invoke($request); + return new DeleteUSMSSignatureResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteUSMSTemplate - 调用接口DeleteUSMSTemplate删除短信模板 + * + * See also: https://docs.ucloud.cn/api/USMS-api/delete_usms_template + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "TemplateIds" => (array) 模板ID(也即短信模板申请时的工单ID),支持以数组的方式,举例,以TemplateIds.0、TemplateIds.1...TemplateIds.N方式传入 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteUSMSTemplate(DeleteUSMSTemplateRequest $request = null): DeleteUSMSTemplateResponse + { + $resp = $this->invoke($request); + return new DeleteUSMSTemplateResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUSMSSendReceipt - 调用接口GetUSMSSendReceipt短信发送状态信息 + * + * See also: https://docs.ucloud.cn/api/USMS-api/get_usms_send_receipt + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "SessionNoSet" => (array) 发送短信时返回的SessionNo集合,SessionNoSet.0,SessionNoSet.1....格式 + * ] + * + * Outputs: + * + * $outputs = [ + * "Data" => (array) 回执信息集合[ + * [ + * "SessionNo" => (string) 发送短信时返回的SessionNo + * "ReceiptSet" => (array) 每个手机号的短信回执信息集合[ + * [ + * "Phone" => (string) 手机号码 + * "CostCount" => (integer) 消耗短信条数 + * "ReceiptResult" => (string) 回执结果,枚举值:\\ > 发送成功: 代表成功 \\ > Success: 代表成功 \\ > 发送失败: 代表失败 \\ > Fail: 代表失败 \\ > 状态未知: 代表未知 \\ > Unknow: 代表未知 + * "ReceiptCode" => (string) 状态报告编码 + * "ReceiptDesc" => (string) 回执结果描述 + * "ReceiptTime" => (integer) 回执返回时间 + * "UserId" => (string) 自定义的业务标识ID,字符串 + * ] + * ] + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getUSMSSendReceipt(GetUSMSSendReceiptRequest $request = null): GetUSMSSendReceiptResponse + { + $resp = $this->invoke($request); + return new GetUSMSSendReceiptResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * QueryUSMSSignature - 调用接口QueryUSMSSignature查询短信签名申请状态 + * + * See also: https://docs.ucloud.cn/api/USMS-api/query_usms_signature + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "SigId" => (string) 已申请的短信签名ID(短信签名申请时的工单ID);签名ID和签名至少需填写1项; + * "SigContent" => (string) 签名内容;签名ID和签名至少需填写1项; + * ] + * + * Outputs: + * + * $outputs = [ + * "Data" => (object) 签名信息[ + * "SigId" => (string) 短信签名ID + * "SigContent" => (string) 短信签名内容 + * "Status" => (integer) 签名状态,0-待审核 1-审核中 2-审核通过 3-审核未通过 4-被禁用 + * "ErrDesc" => (string) 短信签名未通过审核原因 + * ] + * ] + * + * @throws UCloudException + */ + public function queryUSMSSignature(QueryUSMSSignatureRequest $request = null): QueryUSMSSignatureResponse + { + $resp = $this->invoke($request); + return new QueryUSMSSignatureResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * QueryUSMSTemplate - 调用接口QueryUSMSTemplate查询短信模板申请状态 + * + * See also: https://docs.ucloud.cn/api/USMS-api/query_usms_template + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "TemplateId" => (string) 模板ID + * ] + * + * Outputs: + * + * $outputs = [ + * "Data" => (object) 短信模板明细信息,各字段说明详见OutTemplate[ + * "TemplateId" => (string) 短信模板ID + * "Purpose" => (integer) 模板类型,选项:1-验证码类 2-通知类 3-会员推广类 + * "TemplateName" => (string) 短信模板名称 + * "Template" => (string) 短信模板内容 + * "UnsubscribeInfo" => (string) 退订信息;一般填写方式“回T退订”,当purpose为3(也即会员推广类)时,为必填项 + * "Status" => (integer) 短信模板状态;状态说明:0-待审核,1-审核中,2-审核通过,3-审核未通过,4-被禁用 + * "Remark" => (string) 模板说明 + * "ErrDesc" => (string) 审核失败原因 + * "CreateTime" => (integer) 创建时间 + * ] + * ] + * + * @throws UCloudException + */ + public function queryUSMSTemplate(QueryUSMSTemplateRequest $request = null): QueryUSMSTemplateResponse + { + $resp = $this->invoke($request); + return new QueryUSMSTemplateResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * SendBatchUSMSMessage - 调用SendBatchUSMSMessage接口批量发送短信 + * + * See also: https://docs.ucloud.cn/api/USMS-api/send_batch_usms_message + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "TaskContent" => (string) 批量发送内容,该参数是json数组的base64编码结果。发送内容json数组中,每个“模板+签名”组合作为一个子项,每个子项内支持多个号码,示例:发送内容json数组(base64编码前):[{"TemplateId": "UTA20212831C85C", "SigContent": "UCloud", "Target": [{"TemplateParams": ["123456"], "Phone": "18500000123", "ExtendCode": "123", "UserId": "456"} ] } ] 。json数组中各参数的定义:"TemplateId":模板ID,"SigContent"短信签名内容,"Target"具体到号码粒度的发送内容。"Target"中的具体字段有:"TemplateParams"实际发送的模板参数(若使用的是无参数模板,该参数不能传值),"Phone"手机号码, "ExtendCode"短信扩展码, "UserId"自定义业务标识ID。其中必传参数为"TemplateId", "SigContent", "Target"("Target"中必传参数为"Phone")。实际调用本接口时TaskContent传值(发送内容base64编码后)为:W3siVGVtcGxhdGVJZCI6ICJVVEEyMDIxMjgzMUM4NUMiLCAiU2lnQ29udGVudCI6ICJVQ2xvdWQiLCAiVGFyZ2V0IjogW3siVGVtcGxhdGVQYXJhbXMiOiBbIjEyMzQ1NiJdLCAiUGhvbmUiOiAiMTg1MDAwMDAxMjMiLCAiRXh0ZW5kQ29kZSI6ICIxMjMiLCAiVXNlcklkIjogIjQ1NiJ9IF0gfSBdIA== + * ] + * + * Outputs: + * + * $outputs = [ + * "SessionNo" => (string) 本次提交发送任务的唯一ID,可根据该值查询本次发送的短信列表。注:成功提交短信数大于0时,才返回该字段 + * "ReqUuid" => (string) 本次请求Uuid + * "SuccessCount" => (integer) 成功提交短信(未拆分)条数 + * "FailContent" => (array) 未发送成功的详情,返回码非0时该字段有效,可根据该字段数据重发[ + * [ + * "TemplateId" => (string) 模板ID + * "SigContent" => (string) 签名 + * "Target" => (array) 具体号码信息[ + * [ + * "TemplateParams" => (array) 模板参数 + * "Phone" => (string) 手机号 + * "ExtendCode" => (string) 扩展号码 + * "UserId" => (string) 用户自定义ID + * "FailureDetails" => (string) 发送失败原因。注:若模板/签名校验失败,该字段为空 + * ] + * ] + * "FailureDetails" => (string) 未能成功发送的详情。注:模板/签名检验失败时,该字段有效 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function sendBatchUSMSMessage(SendBatchUSMSMessageRequest $request = null): SendBatchUSMSMessageResponse + { + $resp = $this->invoke($request); + return new SendBatchUSMSMessageResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * SendUSMSMessage - 调用接口SendUSMSMessage发送短信 + * + * See also: https://docs.ucloud.cn/api/USMS-api/send_usms_message + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "PhoneNumbers" => (array) 电话号码数组,电话号码格式为(60)1xxxxxxxx,()中为国际长途区号(如中国为86或0086,两种格式都支持),后面为电话号码.若不传入国际区号,如1851623xxxx,则默认为国内手机号 + * "SigContent" => (string) 短信签名内容,请到[USMS控制台](https://console.ucloud.cn/usms)的签名管理页面查看;使用的短信签名必须是已申请并且通过审核; + * "TemplateId" => (string) 模板ID(也即短信模板申请时的工单ID),请到[USMS控制台](https://console.ucloud.cn/usms)的模板管理页面查看;使用的短信模板必须是已申请并通过审核; + * "TemplateParams" => (array) 模板可变参数,以数组的方式填写,举例,TempalteParams.0,TempalteParams.1,... 若模板中无可变参数,则该项可不填写;若模板中有可变参数,则该项为必填项,参数个数需与变量个数保持一致,否则无法发送; + * "ExtendCode" => (string) 短信扩展码,格式为阿拉伯数字串,默认不开通,如需开通请联系 UCloud技术支持 + * "UserId" => (string) 自定义的业务标识ID,字符串( 长度不能超过32 位),不支持 单引号、表情包符号等特殊字符 + * ] + * + * Outputs: + * + * $outputs = [ + * "SessionNo" => (string) 本次提交发送的短信的唯一ID,可根据该值查询本次发送的短信列表 + * "UserId" => (string) 本次提交的自定义业务标识ID,仅当发送时传入有效的UserId,才返回该字段。 + * ] + * + * @throws UCloudException + */ + public function sendUSMSMessage(SendUSMSMessageRequest $request = null): SendUSMSMessageResponse + { + $resp = $this->invoke($request); + return new SendUSMSMessageResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateUSMSSignature - 调用接口UpdateUSMSSignature修改未通过审核的短信签名,并重新提交审核 + * + * See also: https://docs.ucloud.cn/api/USMS-api/update_usms_signature + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID,不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "SigId" => (string) 签名ID(也即短信签名申请时的工单ID),支持以数组的方式,举例,以SigIds.0、SigIds.1...SigIds.N方式传入 + * "SigContent" => (string) 新的短信签名内容;长度为2-12个字符, 可包含中文、数字和符号;无需填写【】或[],系统会自动添加 + * "SigType" => (integer) 签名类型,说明如下:0-公司或企业的全称或简称;1-App应用的全称或简称;2-工信部备案网站的全称或简称;3-公众号或小程序的全称或简称;4-商标名的全称或简称;5-政府/机关事业单位/其他单位的全称或简称; + * "SigPurpose" => (integer) 签名用途,0-自用,1-他用; + * "File" => (string) 短信签名的资质证明文件内容,需先进行base64编码格式转换,此处填写转换后的字符串。文件大小不超过4 MB。内容格式如下: [file type];[code type],[base64] 如:image/jpeg;base64,5YaF5a65 + * "CertificateType" => (integer) 签名的资质证明文件类型,需与签名类型保持一致,说明如下:0-三证合一/企业营业执照/组织机构代码证书/社会信用代码证书;1-应用商店后台开发者管理截图;2-备案服务商的备案成功截图(含域名,网站名称,备案号);3-公众号或小程序的管理界面截图;4-商标注册证书;5-组织机构代码证书、社会信用代码证书; + * "ProxyFile" => (string) 短信签名授权委托文件内容,需先进行base64编码格式转换,此处填写转换后的字符串。文件大小不超过4 MB;当您是代理并使用第三方的签名时(也即SigPurpose为1-他用),该项为必填项;格式和File类似。 + * "Document" => (string) 短信签名的资质证明文件URL,若未更改审核材料,则该处使用已上传审核材料的URL链接,否则使用File参数 + * "ProxyDoc" => (string) 短信签名授权委托文件URL,若未更改授权委托文件,则该处填写已上传的授权委托文件的URL链接,否则使用ProxyFile参数 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function updateUSMSSignature(UpdateUSMSSignatureRequest $request = null): UpdateUSMSSignatureResponse + { + $resp = $this->invoke($request); + return new UpdateUSMSSignatureResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateUSMSTemplate - 调用接口UpdateUSMSTemplate修改未通过审核的短信模板,并重新提交审核 + * + * See also: https://docs.ucloud.cn/api/USMS-api/update_usms_template + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "TemplateId" => (string) 短信模板ID + * "Template" => (string) 新的模板内容。模板名称和模板内容必须提供一个,否则会报错。小于等于600个字 + * "TemplateName" => (string) 新的模板名称。小于等于32个字,每个中文、英文、数组、符合都计为一个字 + * "Remark" => (string) 短信模板申请原因说明,字数不超过128,每个中文、符号、英文、数字等都计为1个字。 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function updateUSMSTemplate(UpdateUSMSTemplateRequest $request = null): UpdateUSMSTemplateResponse + { + $resp = $this->invoke($request); + return new UpdateUSMSTemplateResponse($resp->toArray(), $resp->getRequestId()); + } +} diff --git a/src/VPC/Apis/AddSnatRuleRequest.php b/src/VPC/Apis/AddSnatRuleRequest.php new file mode 100644 index 00000000..e3646c44 --- /dev/null +++ b/src/VPC/Apis/AddSnatRuleRequest.php @@ -0,0 +1,153 @@ + "AddSnatRule"]); + $this->markRequired("Region"); + $this->markRequired("NATGWId"); + $this->markRequired("SourceIp"); + $this->markRequired("SnatIp"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * NATGWId: NAT网关的ID + * + * @return string|null + */ + public function getNATGWId(): string + { + return $this->get("NATGWId"); + } + + /** + * NATGWId: NAT网关的ID + * + * @param string $natgwId + */ + public function setNATGWId(string $natgwId) + { + $this->set("NATGWId", $natgwId); + } + + /** + * SourceIp: 需要出外网的私网IP地址,例如10.9.7.xx + * + * @return string|null + */ + public function getSourceIp(): string + { + return $this->get("SourceIp"); + } + + /** + * SourceIp: 需要出外网的私网IP地址,例如10.9.7.xx + * + * @param string $sourceIp + */ + public function setSourceIp(string $sourceIp) + { + $this->set("SourceIp", $sourceIp); + } + + /** + * SnatIp: EIP的ip地址,例如106.75.xx.xx + * + * @return string|null + */ + public function getSnatIp(): string + { + return $this->get("SnatIp"); + } + + /** + * SnatIp: EIP的ip地址,例如106.75.xx.xx + * + * @param string $snatIp + */ + public function setSnatIp(string $snatIp) + { + $this->set("SnatIp", $snatIp); + } + + /** + * Name: snat规则名称,默认为“出口规则” + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: snat规则名称,默认为“出口规则” + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } +} diff --git a/src/VPC/Apis/AddSnatRuleResponse.php b/src/VPC/Apis/AddSnatRuleResponse.php new file mode 100644 index 00000000..c3a47dbb --- /dev/null +++ b/src/VPC/Apis/AddSnatRuleResponse.php @@ -0,0 +1,26 @@ + "AddVPCNetwork"]); + $this->markRequired("Region"); + $this->markRequired("VPCId"); + $this->markRequired("Network"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VPCId: 源VPC短ID + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: 源VPC短ID + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * Network: 增加网段 + * + * @return string[]|null + */ + public function getNetwork(): array + { + return $this->get("Network"); + } + + /** + * Network: 增加网段 + * + * @param string[] $network + */ + public function setNetwork(array $network) + { + $this->set("Network", $network); + } +} diff --git a/src/VPC/Apis/AddVPCNetworkResponse.php b/src/VPC/Apis/AddVPCNetworkResponse.php new file mode 100644 index 00000000..76553628 --- /dev/null +++ b/src/VPC/Apis/AddVPCNetworkResponse.php @@ -0,0 +1,26 @@ + "AddWhiteListResource"]); + $this->markRequired("Region"); + $this->markRequired("NATGWId"); + $this->markRequired("ResourceIds"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * NATGWId: NAT网关Id + * + * @return string|null + */ + public function getNATGWId(): string + { + return $this->get("NATGWId"); + } + + /** + * NATGWId: NAT网关Id + * + * @param string $natgwId + */ + public function setNATGWId(string $natgwId) + { + $this->set("NATGWId", $natgwId); + } + + /** + * ResourceIds: 可添加白名单的资源Id + * + * @return string[]|null + */ + public function getResourceIds(): array + { + return $this->get("ResourceIds"); + } + + /** + * ResourceIds: 可添加白名单的资源Id + * + * @param string[] $resourceIds + */ + public function setResourceIds(array $resourceIds) + { + $this->set("ResourceIds", $resourceIds); + } +} diff --git a/src/VPC/Apis/AddWhiteListResourceResponse.php b/src/VPC/Apis/AddWhiteListResourceResponse.php new file mode 100644 index 00000000..6e6f731d --- /dev/null +++ b/src/VPC/Apis/AddWhiteListResourceResponse.php @@ -0,0 +1,26 @@ + "AllocateSecondaryIp"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ProjectId"); + $this->markRequired("Mac"); + $this->markRequired("ObjectId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Mac: 节点mac + * + * @return string|null + */ + public function getMac(): string + { + return $this->get("Mac"); + } + + /** + * Mac: 节点mac + * + * @param string $mac + */ + public function setMac(string $mac) + { + $this->set("Mac", $mac); + } + + /** + * ObjectId: 资源Id + * + * @return string|null + */ + public function getObjectId(): string + { + return $this->get("ObjectId"); + } + + /** + * ObjectId: 资源Id + * + * @param string $objectId + */ + public function setObjectId(string $objectId) + { + $this->set("ObjectId", $objectId); + } + + /** + * SubnetId: 子网Id(若未指定,则根据zone获取默认子网进行创建) + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网Id(若未指定,则根据zone获取默认子网进行创建) + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * VPCId: vpcId + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: vpcId + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * Ip: 指定Ip分配 + * + * @return string|null + */ + public function getIp(): string + { + return $this->get("Ip"); + } + + /** + * Ip: 指定Ip分配 + * + * @param string $ip + */ + public function setIp(string $ip) + { + $this->set("Ip", $ip); + } +} diff --git a/src/VPC/Apis/AllocateSecondaryIpResponse.php b/src/VPC/Apis/AllocateSecondaryIpResponse.php new file mode 100644 index 00000000..aece4a68 --- /dev/null +++ b/src/VPC/Apis/AllocateSecondaryIpResponse.php @@ -0,0 +1,45 @@ +get("IpInfo")); + } + + /** + * IpInfo: + * + * @param IpInfo $ipInfo + */ + public function setIpInfo(IpInfo $ipInfo) + { + $this->set("IpInfo", $ipInfo->getAll()); + } +} diff --git a/src/VPC/Apis/AllocateVIPRequest.php b/src/VPC/Apis/AllocateVIPRequest.php new file mode 100644 index 00000000..face08b6 --- /dev/null +++ b/src/VPC/Apis/AllocateVIPRequest.php @@ -0,0 +1,252 @@ + "AllocateVIP"]); + $this->markRequired("Region"); + $this->markRequired("VPCId"); + $this->markRequired("SubnetId"); + } + + + + /** + * Region: 地域 + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域 + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区 + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区 + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VPCId: 指定vip所属的VPC + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: 指定vip所属的VPC + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: 子网id + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网id + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * Ip: 指定ip + * + * @return string|null + */ + public function getIp(): string + { + return $this->get("Ip"); + } + + /** + * Ip: 指定ip + * + * @param string $ip + */ + public function setIp(string $ip) + { + $this->set("Ip", $ip); + } + + /** + * Count: 申请数量,默认: 1 + * + * @return integer|null + */ + public function getCount(): int + { + return $this->get("Count"); + } + + /** + * Count: 申请数量,默认: 1 + * + * @param int $count + */ + public function setCount(int $count) + { + $this->set("Count", $count); + } + + /** + * Name: vip名,默认:VIP + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: vip名,默认:VIP + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Tag: 业务组名称,默认为Default + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组名称,默认为Default + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } + + /** + * BusinessId: 业务组 + * + * @return string|null + */ + public function getBusinessId(): string + { + return $this->get("BusinessId"); + } + + /** + * BusinessId: 业务组 + * + * @param string $businessId + */ + public function setBusinessId(string $businessId) + { + $this->set("BusinessId", $businessId); + } +} diff --git a/src/VPC/Apis/AllocateVIPResponse.php b/src/VPC/Apis/AllocateVIPResponse.php new file mode 100644 index 00000000..2dfa98df --- /dev/null +++ b/src/VPC/Apis/AllocateVIPResponse.php @@ -0,0 +1,74 @@ +get("VIPSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new VIPSet($item)); + } + return $result; + } + + /** + * VIPSet: 申请到的VIP资源相关信息 + * + * @param VIPSet[] $vipSet + */ + public function setVIPSet(array $vipSet) + { + $result = []; + foreach ($vipSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * DataSet: 申请到的VIP地址 + * + * @return string[]|null + */ + public function getDataSet(): array + { + return $this->get("DataSet"); + } + + /** + * DataSet: 申请到的VIP地址 + * + * @param string[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $this->set("DataSet", $dataSet); + } +} diff --git a/src/VPC/Apis/AssociateRouteTableRequest.php b/src/VPC/Apis/AssociateRouteTableRequest.php new file mode 100644 index 00000000..fac2ff3b --- /dev/null +++ b/src/VPC/Apis/AssociateRouteTableRequest.php @@ -0,0 +1,113 @@ + "AssociateRouteTable"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("SubnetId"); + $this->markRequired("RouteTableId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SubnetId: 子网ID + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网ID + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * RouteTableId: 路由表资源ID + * + * @return string|null + */ + public function getRouteTableId(): string + { + return $this->get("RouteTableId"); + } + + /** + * RouteTableId: 路由表资源ID + * + * @param string $routeTableId + */ + public function setRouteTableId(string $routeTableId) + { + $this->set("RouteTableId", $routeTableId); + } +} diff --git a/src/VPC/Apis/AssociateRouteTableResponse.php b/src/VPC/Apis/AssociateRouteTableResponse.php new file mode 100644 index 00000000..bfffc17d --- /dev/null +++ b/src/VPC/Apis/AssociateRouteTableResponse.php @@ -0,0 +1,26 @@ + "CloneRouteTable"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("RouteTableId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * RouteTableId: 被克隆的路由表ID + * + * @return string|null + */ + public function getRouteTableId(): string + { + return $this->get("RouteTableId"); + } + + /** + * RouteTableId: 被克隆的路由表ID + * + * @param string $routeTableId + */ + public function setRouteTableId(string $routeTableId) + { + $this->set("RouteTableId", $routeTableId); + } +} diff --git a/src/VPC/Apis/CloneRouteTableResponse.php b/src/VPC/Apis/CloneRouteTableResponse.php new file mode 100644 index 00000000..1236f86b --- /dev/null +++ b/src/VPC/Apis/CloneRouteTableResponse.php @@ -0,0 +1,44 @@ +get("RouteTableId"); + } + + /** + * RouteTableId: 复制后新的路由表资源ID + * + * @param string $routeTableId + */ + public function setRouteTableId(string $routeTableId) + { + $this->set("RouteTableId", $routeTableId); + } +} diff --git a/src/VPC/Apis/CreateNATGWPolicyRequest.php b/src/VPC/Apis/CreateNATGWPolicyRequest.php new file mode 100644 index 00000000..23df8605 --- /dev/null +++ b/src/VPC/Apis/CreateNATGWPolicyRequest.php @@ -0,0 +1,216 @@ + "CreateNATGWPolicy"]); + $this->markRequired("Region"); + $this->markRequired("NATGWId"); + $this->markRequired("Protocol"); + $this->markRequired("SrcEIPId"); + $this->markRequired("SrcPort"); + $this->markRequired("DstIP"); + $this->markRequired("DstPort"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * NATGWId: NAT网关Id + * + * @return string|null + */ + public function getNATGWId(): string + { + return $this->get("NATGWId"); + } + + /** + * NATGWId: NAT网关Id + * + * @param string $natgwId + */ + public function setNATGWId(string $natgwId) + { + $this->set("NATGWId", $natgwId); + } + + /** + * Protocol: 协议类型。枚举值为:TCP、UDP + * + * @return string|null + */ + public function getProtocol(): string + { + return $this->get("Protocol"); + } + + /** + * Protocol: 协议类型。枚举值为:TCP、UDP + * + * @param string $protocol + */ + public function setProtocol(string $protocol) + { + $this->set("Protocol", $protocol); + } + + /** + * SrcEIPId: 源IP。填写对应的EIP Id + * + * @return string|null + */ + public function getSrcEIPId(): string + { + return $this->get("SrcEIPId"); + } + + /** + * SrcEIPId: 源IP。填写对应的EIP Id + * + * @param string $srcEIPId + */ + public function setSrcEIPId(string $srcEIPId) + { + $this->set("SrcEIPId", $srcEIPId); + } + + /** + * SrcPort: 源端口。可填写固定端口,也可填写端口范围。支持的端口范围为1-65535 + * + * @return string|null + */ + public function getSrcPort(): string + { + return $this->get("SrcPort"); + } + + /** + * SrcPort: 源端口。可填写固定端口,也可填写端口范围。支持的端口范围为1-65535 + * + * @param string $srcPort + */ + public function setSrcPort(string $srcPort) + { + $this->set("SrcPort", $srcPort); + } + + /** + * DstIP: 目标IP。填写对应的目标IP地址 + * + * @return string|null + */ + public function getDstIP(): string + { + return $this->get("DstIP"); + } + + /** + * DstIP: 目标IP。填写对应的目标IP地址 + * + * @param string $dstIP + */ + public function setDstIP(string $dstIP) + { + $this->set("DstIP", $dstIP); + } + + /** + * DstPort: 目标端口。可填写固定端口,也可填写端口范围。支持的端口范围为1-65535 + * + * @return string|null + */ + public function getDstPort(): string + { + return $this->get("DstPort"); + } + + /** + * DstPort: 目标端口。可填写固定端口,也可填写端口范围。支持的端口范围为1-65535 + * + * @param string $dstPort + */ + public function setDstPort(string $dstPort) + { + $this->set("DstPort", $dstPort); + } + + /** + * PolicyName: 转发策略名称。默认为空 + * + * @return string|null + */ + public function getPolicyName(): string + { + return $this->get("PolicyName"); + } + + /** + * PolicyName: 转发策略名称。默认为空 + * + * @param string $policyName + */ + public function setPolicyName(string $policyName) + { + $this->set("PolicyName", $policyName); + } +} diff --git a/src/VPC/Apis/CreateNATGWPolicyResponse.php b/src/VPC/Apis/CreateNATGWPolicyResponse.php new file mode 100644 index 00000000..c019b38c --- /dev/null +++ b/src/VPC/Apis/CreateNATGWPolicyResponse.php @@ -0,0 +1,44 @@ +get("PolicyId"); + } + + /** + * PolicyId: 创建时分配的策略Id + * + * @param string $policyId + */ + public function setPolicyId(string $policyId) + { + $this->set("PolicyId", $policyId); + } +} diff --git a/src/VPC/Apis/CreateNATGWRequest.php b/src/VPC/Apis/CreateNATGWRequest.php new file mode 100644 index 00000000..b93c75a3 --- /dev/null +++ b/src/VPC/Apis/CreateNATGWRequest.php @@ -0,0 +1,233 @@ + "CreateNATGW"]); + $this->markRequired("Region"); + $this->markRequired("NATGWName"); + $this->markRequired("EIPIds"); + $this->markRequired("FirewallId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * NATGWName: NAT网关名称 + * + * @return string|null + */ + public function getNATGWName(): string + { + return $this->get("NATGWName"); + } + + /** + * NATGWName: NAT网关名称 + * + * @param string $natgwName + */ + public function setNATGWName(string $natgwName) + { + $this->set("NATGWName", $natgwName); + } + + /** + * EIPIds: NAT网关绑定的EIPId + * + * @return string[]|null + */ + public function getEIPIds(): array + { + return $this->get("EIPIds"); + } + + /** + * EIPIds: NAT网关绑定的EIPId + * + * @param string[] $eipIds + */ + public function setEIPIds(array $eipIds) + { + $this->set("EIPIds", $eipIds); + } + + /** + * FirewallId: NAT网关绑定的防火墙Id + * + * @return string|null + */ + public function getFirewallId(): string + { + return $this->get("FirewallId"); + } + + /** + * FirewallId: NAT网关绑定的防火墙Id + * + * @param string $firewallId + */ + public function setFirewallId(string $firewallId) + { + $this->set("FirewallId", $firewallId); + } + + /** + * SubnetworkIds: NAT网关绑定的子网Id,默认为空。 + * + * @return string[]|null + */ + public function getSubnetworkIds(): array + { + return $this->get("SubnetworkIds"); + } + + /** + * SubnetworkIds: NAT网关绑定的子网Id,默认为空。 + * + * @param string[] $subnetworkIds + */ + public function setSubnetworkIds(array $subnetworkIds) + { + $this->set("SubnetworkIds", $subnetworkIds); + } + + /** + * VPCId: NAT网关所属的VPC Id。默认为Default VPC Id + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: NAT网关所属的VPC Id。默认为Default VPC Id + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * IfOpen: 白名单开关标记。0表示关闭,1表示开启。默认为0 + * + * @return integer|null + */ + public function getIfOpen(): int + { + return $this->get("IfOpen"); + } + + /** + * IfOpen: 白名单开关标记。0表示关闭,1表示开启。默认为0 + * + * @param int $ifOpen + */ + public function setIfOpen(int $ifOpen) + { + $this->set("IfOpen", $ifOpen); + } + + /** + * Tag: 业务组。默认为空 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组。默认为空 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Remark: 备注。默认为空 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 备注。默认为空 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } +} diff --git a/src/VPC/Apis/CreateNATGWResponse.php b/src/VPC/Apis/CreateNATGWResponse.php new file mode 100644 index 00000000..229206f7 --- /dev/null +++ b/src/VPC/Apis/CreateNATGWResponse.php @@ -0,0 +1,44 @@ +get("NATGWId"); + } + + /** + * NATGWId: 申请到的NATGateWay Id + * + * @param string $natgwId + */ + public function setNATGWId(string $natgwId) + { + $this->set("NATGWId", $natgwId); + } +} diff --git a/src/VPC/Apis/CreateNetworkAclAssociationRequest.php b/src/VPC/Apis/CreateNetworkAclAssociationRequest.php new file mode 100644 index 00000000..08572c1e --- /dev/null +++ b/src/VPC/Apis/CreateNetworkAclAssociationRequest.php @@ -0,0 +1,112 @@ + "CreateNetworkAclAssociation"]); + $this->markRequired("Region"); + $this->markRequired("AclId"); + $this->markRequired("SubnetworkId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * AclId: ACL的ID + * + * @return string|null + */ + public function getAclId(): string + { + return $this->get("AclId"); + } + + /** + * AclId: ACL的ID + * + * @param string $aclId + */ + public function setAclId(string $aclId) + { + $this->set("AclId", $aclId); + } + + /** + * SubnetworkId: 需要绑定的子网ID + * + * @return string|null + */ + public function getSubnetworkId(): string + { + return $this->get("SubnetworkId"); + } + + /** + * SubnetworkId: 需要绑定的子网ID + * + * @param string $subnetworkId + */ + public function setSubnetworkId(string $subnetworkId) + { + $this->set("SubnetworkId", $subnetworkId); + } +} diff --git a/src/VPC/Apis/CreateNetworkAclAssociationResponse.php b/src/VPC/Apis/CreateNetworkAclAssociationResponse.php new file mode 100644 index 00000000..796a5b6f --- /dev/null +++ b/src/VPC/Apis/CreateNetworkAclAssociationResponse.php @@ -0,0 +1,65 @@ +get("AssociationId"); + } + + /** + * AssociationId: 创建的绑定关系的ID + * + * @param string $associationId + */ + public function setAssociationId(string $associationId) + { + $this->set("AssociationId", $associationId); + } + + /** + * PrevAssociation: 该子网之前的绑定关系信息 + * + * @return AssociationInfo|null + */ + public function getPrevAssociation(): AssociationInfo + { + return new AssociationInfo($this->get("PrevAssociation")); + } + + /** + * PrevAssociation: 该子网之前的绑定关系信息 + * + * @param AssociationInfo $prevAssociation + */ + public function setPrevAssociation(AssociationInfo $prevAssociation) + { + $this->set("PrevAssociation", $prevAssociation->getAll()); + } +} diff --git a/src/VPC/Apis/CreateNetworkAclEntryRequest.php b/src/VPC/Apis/CreateNetworkAclEntryRequest.php new file mode 100644 index 00000000..a96c3501 --- /dev/null +++ b/src/VPC/Apis/CreateNetworkAclEntryRequest.php @@ -0,0 +1,277 @@ + "CreateNetworkAclEntry"]); + $this->markRequired("Region"); + $this->markRequired("AclId"); + $this->markRequired("Priority"); + $this->markRequired("Direction"); + $this->markRequired("IpProtocol"); + $this->markRequired("CidrBlock"); + $this->markRequired("PortRange"); + $this->markRequired("EntryAction"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * AclId: ACL的ID + * + * @return string|null + */ + public function getAclId(): string + { + return $this->get("AclId"); + } + + /** + * AclId: ACL的ID + * + * @param string $aclId + */ + public function setAclId(string $aclId) + { + $this->set("AclId", $aclId); + } + + /** + * Priority: Entry的优先级,对于同样的Direction来说,不能重复 + * + * @return integer|null + */ + public function getPriority(): int + { + return $this->get("Priority"); + } + + /** + * Priority: Entry的优先级,对于同样的Direction来说,不能重复 + * + * @param int $priority + */ + public function setPriority(int $priority) + { + $this->set("Priority", $priority); + } + + /** + * Direction: 出向或者入向(“Ingress”, "Egress") + * + * @return string|null + */ + public function getDirection(): string + { + return $this->get("Direction"); + } + + /** + * Direction: 出向或者入向(“Ingress”, "Egress") + * + * @param string $direction + */ + public function setDirection(string $direction) + { + $this->set("Direction", $direction); + } + + /** + * IpProtocol: 协议规则描述 + * + * @return string|null + */ + public function getIpProtocol(): string + { + return $this->get("IpProtocol"); + } + + /** + * IpProtocol: 协议规则描述 + * + * @param string $ipProtocol + */ + public function setIpProtocol(string $ipProtocol) + { + $this->set("IpProtocol", $ipProtocol); + } + + /** + * CidrBlock: IPv4段的CIDR表示 + * + * @return string|null + */ + public function getCidrBlock(): string + { + return $this->get("CidrBlock"); + } + + /** + * CidrBlock: IPv4段的CIDR表示 + * + * @param string $cidrBlock + */ + public function setCidrBlock(string $cidrBlock) + { + $this->set("CidrBlock", $cidrBlock); + } + + /** + * PortRange: 针对的端口范围 + * + * @return string|null + */ + public function getPortRange(): string + { + return $this->get("PortRange"); + } + + /** + * PortRange: 针对的端口范围 + * + * @param string $portRange + */ + public function setPortRange(string $portRange) + { + $this->set("PortRange", $portRange); + } + + /** + * EntryAction: 规则的行为("Accept", "Reject") + * + * @return string|null + */ + public function getEntryAction(): string + { + return $this->get("EntryAction"); + } + + /** + * EntryAction: 规则的行为("Accept", "Reject") + * + * @param string $entryAction + */ + public function setEntryAction(string $entryAction) + { + $this->set("EntryAction", $entryAction); + } + + /** + * Description: 描述。长度限制为不超过32字节。 + * + * @return string|null + */ + public function getDescription(): string + { + return $this->get("Description"); + } + + /** + * Description: 描述。长度限制为不超过32字节。 + * + * @param string $description + */ + public function setDescription(string $description) + { + $this->set("Description", $description); + } + + /** + * TargetType: 应用目标类型。0代表“子网内全部资源”,1代表“子网内指定资源”,默认为0 + * + * @return integer|null + */ + public function getTargetType(): int + { + return $this->get("TargetType"); + } + + /** + * TargetType: 应用目标类型。0代表“子网内全部资源”,1代表“子网内指定资源”,默认为0 + * + * @param int $targetType + */ + public function setTargetType(int $targetType) + { + $this->set("TargetType", $targetType); + } + + /** + * TargetResourceIds: 应用目标资源列表。默认为全部资源生效。TargetType为0时不用填写该值。 + * + * @return string[]|null + */ + public function getTargetResourceIds(): array + { + return $this->get("TargetResourceIds"); + } + + /** + * TargetResourceIds: 应用目标资源列表。默认为全部资源生效。TargetType为0时不用填写该值。 + * + * @param string[] $targetResourceIds + */ + public function setTargetResourceIds(array $targetResourceIds) + { + $this->set("TargetResourceIds", $targetResourceIds); + } +} diff --git a/src/VPC/Apis/CreateNetworkAclEntryResponse.php b/src/VPC/Apis/CreateNetworkAclEntryResponse.php new file mode 100644 index 00000000..ab9bdcc6 --- /dev/null +++ b/src/VPC/Apis/CreateNetworkAclEntryResponse.php @@ -0,0 +1,44 @@ +get("EntryId"); + } + + /** + * EntryId: 创建的Entry的ID + * + * @param string $entryId + */ + public function setEntryId(string $entryId) + { + $this->set("EntryId", $entryId); + } +} diff --git a/src/VPC/Apis/CreateNetworkAclRequest.php b/src/VPC/Apis/CreateNetworkAclRequest.php new file mode 100644 index 00000000..b37ade8a --- /dev/null +++ b/src/VPC/Apis/CreateNetworkAclRequest.php @@ -0,0 +1,132 @@ + "CreateNetworkAcl"]); + $this->markRequired("Region"); + $this->markRequired("VpcId"); + $this->markRequired("AclName"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VpcId: 将要创建的ACL所属VPC的ID + * + * @return string|null + */ + public function getVpcId(): string + { + return $this->get("VpcId"); + } + + /** + * VpcId: 将要创建的ACL所属VPC的ID + * + * @param string $vpcId + */ + public function setVpcId(string $vpcId) + { + $this->set("VpcId", $vpcId); + } + + /** + * AclName: ACL的名称 + * + * @return string|null + */ + public function getAclName(): string + { + return $this->get("AclName"); + } + + /** + * AclName: ACL的名称 + * + * @param string $aclName + */ + public function setAclName(string $aclName) + { + $this->set("AclName", $aclName); + } + + /** + * Description: ACL的描述 + * + * @return string|null + */ + public function getDescription(): string + { + return $this->get("Description"); + } + + /** + * Description: ACL的描述 + * + * @param string $description + */ + public function setDescription(string $description) + { + $this->set("Description", $description); + } +} diff --git a/src/VPC/Apis/CreateNetworkAclResponse.php b/src/VPC/Apis/CreateNetworkAclResponse.php new file mode 100644 index 00000000..a9839207 --- /dev/null +++ b/src/VPC/Apis/CreateNetworkAclResponse.php @@ -0,0 +1,44 @@ +get("AclId"); + } + + /** + * AclId: 创建的ACL的ID + * + * @param string $aclId + */ + public function setAclId(string $aclId) + { + $this->set("AclId", $aclId); + } +} diff --git a/src/VPC/Apis/CreateRouteTableRequest.php b/src/VPC/Apis/CreateRouteTableRequest.php new file mode 100644 index 00000000..042fd483 --- /dev/null +++ b/src/VPC/Apis/CreateRouteTableRequest.php @@ -0,0 +1,152 @@ + "CreateRouteTable"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("VPCId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VPCId: 所属的VPC资源ID + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: 所属的VPC资源ID + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * Name: 路由表名称。默认为RouteTable + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 路由表名称。默认为RouteTable + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Tag: 路由表所属业务组 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 路由表所属业务组 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } +} diff --git a/src/VPC/Apis/CreateRouteTableResponse.php b/src/VPC/Apis/CreateRouteTableResponse.php new file mode 100644 index 00000000..3386d236 --- /dev/null +++ b/src/VPC/Apis/CreateRouteTableResponse.php @@ -0,0 +1,44 @@ +get("RouteTableId"); + } + + /** + * RouteTableId: 路由表ID + * + * @param string $routeTableId + */ + public function setRouteTableId(string $routeTableId) + { + $this->set("RouteTableId", $routeTableId); + } +} diff --git a/src/VPC/Apis/CreateSubnetRequest.php b/src/VPC/Apis/CreateSubnetRequest.php new file mode 100644 index 00000000..d63b12a4 --- /dev/null +++ b/src/VPC/Apis/CreateSubnetRequest.php @@ -0,0 +1,192 @@ + "CreateSubnet"]); + $this->markRequired("Region"); + $this->markRequired("VPCId"); + $this->markRequired("Subnet"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VPCId: VPC资源ID + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPC资源ID + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * Subnet: 子网网络地址,例如192.168.0.0 + * + * @return string|null + */ + public function getSubnet(): string + { + return $this->get("Subnet"); + } + + /** + * Subnet: 子网网络地址,例如192.168.0.0 + * + * @param string $subnet + */ + public function setSubnet(string $subnet) + { + $this->set("Subnet", $subnet); + } + + /** + * Netmask: 子网网络号位数,默认为24 + * + * @return integer|null + */ + public function getNetmask(): int + { + return $this->get("Netmask"); + } + + /** + * Netmask: 子网网络号位数,默认为24 + * + * @param int $netmask + */ + public function setNetmask(int $netmask) + { + $this->set("Netmask", $netmask); + } + + /** + * SubnetName: 子网名称,默认为Subnet + * + * @return string|null + */ + public function getSubnetName(): string + { + return $this->get("SubnetName"); + } + + /** + * SubnetName: 子网名称,默认为Subnet + * + * @param string $subnetName + */ + public function setSubnetName(string $subnetName) + { + $this->set("SubnetName", $subnetName); + } + + /** + * Tag: 业务组名称,默认为Default + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组名称,默认为Default + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } +} diff --git a/src/VPC/Apis/CreateSubnetResponse.php b/src/VPC/Apis/CreateSubnetResponse.php new file mode 100644 index 00000000..777fb8ef --- /dev/null +++ b/src/VPC/Apis/CreateSubnetResponse.php @@ -0,0 +1,44 @@ +get("SubnetId"); + } + + /** + * SubnetId: 子网ID + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } +} diff --git a/src/VPC/Apis/CreateVPCIntercomRequest.php b/src/VPC/Apis/CreateVPCIntercomRequest.php new file mode 100644 index 00000000..6bdc1393 --- /dev/null +++ b/src/VPC/Apis/CreateVPCIntercomRequest.php @@ -0,0 +1,152 @@ + "CreateVPCIntercom"]); + $this->markRequired("Region"); + $this->markRequired("VPCId"); + $this->markRequired("DstVPCId"); + } + + + + /** + * Region: 源VPC所在地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 源VPC所在地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 源VPC所在项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 源VPC所在项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VPCId: 源VPC短ID + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: 源VPC短ID + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * DstVPCId: 目的VPC短ID + * + * @return string|null + */ + public function getDstVPCId(): string + { + return $this->get("DstVPCId"); + } + + /** + * DstVPCId: 目的VPC短ID + * + * @param string $dstVPCId + */ + public function setDstVPCId(string $dstVPCId) + { + $this->set("DstVPCId", $dstVPCId); + } + + /** + * DstRegion: 目的VPC所在地域,默认与源VPC同地域。 + * + * @return string|null + */ + public function getDstRegion(): string + { + return $this->get("DstRegion"); + } + + /** + * DstRegion: 目的VPC所在地域,默认与源VPC同地域。 + * + * @param string $dstRegion + */ + public function setDstRegion(string $dstRegion) + { + $this->set("DstRegion", $dstRegion); + } + + /** + * DstProjectId: 目的VPC项目ID。默认与源VPC同项目。 + * + * @return string|null + */ + public function getDstProjectId(): string + { + return $this->get("DstProjectId"); + } + + /** + * DstProjectId: 目的VPC项目ID。默认与源VPC同项目。 + * + * @param string $dstProjectId + */ + public function setDstProjectId(string $dstProjectId) + { + $this->set("DstProjectId", $dstProjectId); + } +} diff --git a/src/VPC/Apis/CreateVPCIntercomResponse.php b/src/VPC/Apis/CreateVPCIntercomResponse.php new file mode 100644 index 00000000..23c1d425 --- /dev/null +++ b/src/VPC/Apis/CreateVPCIntercomResponse.php @@ -0,0 +1,26 @@ + "CreateVPC"]); + $this->markRequired("Region"); + $this->markRequired("Name"); + $this->markRequired("Network"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Name: VPC名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: VPC名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Network: VPC网段 + * + * @return string[]|null + */ + public function getNetwork(): array + { + return $this->get("Network"); + } + + /** + * Network: VPC网段 + * + * @param string[] $network + */ + public function setNetwork(array $network) + { + $this->set("Network", $network); + } + + /** + * Tag: 业务组名称 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组名称 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } +} diff --git a/src/VPC/Apis/CreateVPCResponse.php b/src/VPC/Apis/CreateVPCResponse.php new file mode 100644 index 00000000..abfbbde4 --- /dev/null +++ b/src/VPC/Apis/CreateVPCResponse.php @@ -0,0 +1,44 @@ +get("VPCId"); + } + + /** + * VPCId: VPC资源Id + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } +} diff --git a/src/VPC/Apis/DeleteNATGWPolicyRequest.php b/src/VPC/Apis/DeleteNATGWPolicyRequest.php new file mode 100644 index 00000000..c36c4773 --- /dev/null +++ b/src/VPC/Apis/DeleteNATGWPolicyRequest.php @@ -0,0 +1,112 @@ + "DeleteNATGWPolicy"]); + $this->markRequired("Region"); + $this->markRequired("NATGWId"); + $this->markRequired("PolicyId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * NATGWId: NAT网关Id + * + * @return string|null + */ + public function getNATGWId(): string + { + return $this->get("NATGWId"); + } + + /** + * NATGWId: NAT网关Id + * + * @param string $natgwId + */ + public function setNATGWId(string $natgwId) + { + $this->set("NATGWId", $natgwId); + } + + /** + * PolicyId: 端口转发规则Id + * + * @return string|null + */ + public function getPolicyId(): string + { + return $this->get("PolicyId"); + } + + /** + * PolicyId: 端口转发规则Id + * + * @param string $policyId + */ + public function setPolicyId(string $policyId) + { + $this->set("PolicyId", $policyId); + } +} diff --git a/src/VPC/Apis/DeleteNATGWPolicyResponse.php b/src/VPC/Apis/DeleteNATGWPolicyResponse.php new file mode 100644 index 00000000..a1606397 --- /dev/null +++ b/src/VPC/Apis/DeleteNATGWPolicyResponse.php @@ -0,0 +1,26 @@ + "DeleteNATGW"]); + $this->markRequired("Region"); + $this->markRequired("NATGWId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * NATGWId: NAT网关Id + * + * @return string|null + */ + public function getNATGWId(): string + { + return $this->get("NATGWId"); + } + + /** + * NATGWId: NAT网关Id + * + * @param string $natgwId + */ + public function setNATGWId(string $natgwId) + { + $this->set("NATGWId", $natgwId); + } + + /** + * ReleaseEip: 是否释放绑定的EIP。true:解绑并释放;false:只解绑不释放。默认为false + * + * @return boolean|null + */ + public function getReleaseEip(): bool + { + return $this->get("ReleaseEip"); + } + + /** + * ReleaseEip: 是否释放绑定的EIP。true:解绑并释放;false:只解绑不释放。默认为false + * + * @param boolean $releaseEip + */ + public function setReleaseEip(bool $releaseEip) + { + $this->set("ReleaseEip", $releaseEip); + } +} diff --git a/src/VPC/Apis/DeleteNATGWResponse.php b/src/VPC/Apis/DeleteNATGWResponse.php new file mode 100644 index 00000000..0b1a7779 --- /dev/null +++ b/src/VPC/Apis/DeleteNATGWResponse.php @@ -0,0 +1,26 @@ + "DeleteNetworkAclAssociation"]); + $this->markRequired("Region"); + $this->markRequired("AclId"); + $this->markRequired("SubnetworkId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * AclId: 需要删除的AclId + * + * @return string|null + */ + public function getAclId(): string + { + return $this->get("AclId"); + } + + /** + * AclId: 需要删除的AclId + * + * @param string $aclId + */ + public function setAclId(string $aclId) + { + $this->set("AclId", $aclId); + } + + /** + * SubnetworkId: 绑定的子网ID + * + * @return string|null + */ + public function getSubnetworkId(): string + { + return $this->get("SubnetworkId"); + } + + /** + * SubnetworkId: 绑定的子网ID + * + * @param string $subnetworkId + */ + public function setSubnetworkId(string $subnetworkId) + { + $this->set("SubnetworkId", $subnetworkId); + } +} diff --git a/src/VPC/Apis/DeleteNetworkAclAssociationResponse.php b/src/VPC/Apis/DeleteNetworkAclAssociationResponse.php new file mode 100644 index 00000000..3759f138 --- /dev/null +++ b/src/VPC/Apis/DeleteNetworkAclAssociationResponse.php @@ -0,0 +1,26 @@ + "DeleteNetworkAclEntry"]); + $this->markRequired("Region"); + $this->markRequired("AclId"); + $this->markRequired("EntryId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * AclId: Acl的ID + * + * @return string|null + */ + public function getAclId(): string + { + return $this->get("AclId"); + } + + /** + * AclId: Acl的ID + * + * @param string $aclId + */ + public function setAclId(string $aclId) + { + $this->set("AclId", $aclId); + } + + /** + * EntryId: 需要删除的EntryId + * + * @return string|null + */ + public function getEntryId(): string + { + return $this->get("EntryId"); + } + + /** + * EntryId: 需要删除的EntryId + * + * @param string $entryId + */ + public function setEntryId(string $entryId) + { + $this->set("EntryId", $entryId); + } +} diff --git a/src/VPC/Apis/DeleteNetworkAclEntryResponse.php b/src/VPC/Apis/DeleteNetworkAclEntryResponse.php new file mode 100644 index 00000000..4849d29b --- /dev/null +++ b/src/VPC/Apis/DeleteNetworkAclEntryResponse.php @@ -0,0 +1,26 @@ + "DeleteNetworkAcl"]); + $this->markRequired("Region"); + $this->markRequired("AclId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * AclId: 需要删除的AclId + * + * @return string|null + */ + public function getAclId(): string + { + return $this->get("AclId"); + } + + /** + * AclId: 需要删除的AclId + * + * @param string $aclId + */ + public function setAclId(string $aclId) + { + $this->set("AclId", $aclId); + } +} diff --git a/src/VPC/Apis/DeleteNetworkAclResponse.php b/src/VPC/Apis/DeleteNetworkAclResponse.php new file mode 100644 index 00000000..6169a2cb --- /dev/null +++ b/src/VPC/Apis/DeleteNetworkAclResponse.php @@ -0,0 +1,26 @@ + "DeleteRouteTable"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("RouteTableId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * RouteTableId: 路由表资源ID + * + * @return string|null + */ + public function getRouteTableId(): string + { + return $this->get("RouteTableId"); + } + + /** + * RouteTableId: 路由表资源ID + * + * @param string $routeTableId + */ + public function setRouteTableId(string $routeTableId) + { + $this->set("RouteTableId", $routeTableId); + } +} diff --git a/src/VPC/Apis/DeleteRouteTableResponse.php b/src/VPC/Apis/DeleteRouteTableResponse.php new file mode 100644 index 00000000..455a2995 --- /dev/null +++ b/src/VPC/Apis/DeleteRouteTableResponse.php @@ -0,0 +1,26 @@ + "DeleteSecondaryIp"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ProjectId"); + $this->markRequired("Ip"); + $this->markRequired("Mac"); + $this->markRequired("SubnetId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Ip: ip + * + * @return string|null + */ + public function getIp(): string + { + return $this->get("Ip"); + } + + /** + * Ip: ip + * + * @param string $ip + */ + public function setIp(string $ip) + { + $this->set("Ip", $ip); + } + + /** + * Mac: mac + * + * @return string|null + */ + public function getMac(): string + { + return $this->get("Mac"); + } + + /** + * Mac: mac + * + * @param string $mac + */ + public function setMac(string $mac) + { + $this->set("Mac", $mac); + } + + /** + * SubnetId: 子网Id + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网Id + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * VPCId: VPCId + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPCId + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * ObjectId: 资源Id + * + * @return string|null + */ + public function getObjectId(): string + { + return $this->get("ObjectId"); + } + + /** + * ObjectId: 资源Id + * + * @param string $objectId + */ + public function setObjectId(string $objectId) + { + $this->set("ObjectId", $objectId); + } +} diff --git a/src/VPC/Apis/DeleteSecondaryIpResponse.php b/src/VPC/Apis/DeleteSecondaryIpResponse.php new file mode 100644 index 00000000..d4184765 --- /dev/null +++ b/src/VPC/Apis/DeleteSecondaryIpResponse.php @@ -0,0 +1,26 @@ + "DeleteSnatRule"]); + $this->markRequired("Region"); + $this->markRequired("NATGWId"); + $this->markRequired("SourceIp"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * NATGWId: NAT网关的ID + * + * @return string|null + */ + public function getNATGWId(): string + { + return $this->get("NATGWId"); + } + + /** + * NATGWId: NAT网关的ID + * + * @param string $natgwId + */ + public function setNATGWId(string $natgwId) + { + $this->set("NATGWId", $natgwId); + } + + /** + * SourceIp: 需要出外网的私网IP地址,例如10.9.7.xx + * + * @return string|null + */ + public function getSourceIp(): string + { + return $this->get("SourceIp"); + } + + /** + * SourceIp: 需要出外网的私网IP地址,例如10.9.7.xx + * + * @param string $sourceIp + */ + public function setSourceIp(string $sourceIp) + { + $this->set("SourceIp", $sourceIp); + } +} diff --git a/src/VPC/Apis/DeleteSnatRuleResponse.php b/src/VPC/Apis/DeleteSnatRuleResponse.php new file mode 100644 index 00000000..82cb9705 --- /dev/null +++ b/src/VPC/Apis/DeleteSnatRuleResponse.php @@ -0,0 +1,26 @@ + "DeleteSubnet"]); + $this->markRequired("Region"); + $this->markRequired("SubnetId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SubnetId: 子网ID + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网ID + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } +} diff --git a/src/VPC/Apis/DeleteSubnetResponse.php b/src/VPC/Apis/DeleteSubnetResponse.php new file mode 100644 index 00000000..525f8177 --- /dev/null +++ b/src/VPC/Apis/DeleteSubnetResponse.php @@ -0,0 +1,26 @@ + "DeleteVPCIntercom"]); + $this->markRequired("Region"); + $this->markRequired("VPCId"); + $this->markRequired("DstVPCId"); + } + + + + /** + * Region: 源VPC所在地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 源VPC所在地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 源VPC所在项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 源VPC所在项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VPCId: 源VPC短ID + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: 源VPC短ID + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * DstVPCId: 目的VPC短ID + * + * @return string|null + */ + public function getDstVPCId(): string + { + return $this->get("DstVPCId"); + } + + /** + * DstVPCId: 目的VPC短ID + * + * @param string $dstVPCId + */ + public function setDstVPCId(string $dstVPCId) + { + $this->set("DstVPCId", $dstVPCId); + } + + /** + * DstRegion: 目的VPC所在地域,默认为源VPC所在地域 + * + * @return string|null + */ + public function getDstRegion(): string + { + return $this->get("DstRegion"); + } + + /** + * DstRegion: 目的VPC所在地域,默认为源VPC所在地域 + * + * @param string $dstRegion + */ + public function setDstRegion(string $dstRegion) + { + $this->set("DstRegion", $dstRegion); + } + + /** + * DstProjectId: 目的VPC所在项目ID,默认为源VPC所在项目ID + * + * @return string|null + */ + public function getDstProjectId(): string + { + return $this->get("DstProjectId"); + } + + /** + * DstProjectId: 目的VPC所在项目ID,默认为源VPC所在项目ID + * + * @param string $dstProjectId + */ + public function setDstProjectId(string $dstProjectId) + { + $this->set("DstProjectId", $dstProjectId); + } +} diff --git a/src/VPC/Apis/DeleteVPCIntercomResponse.php b/src/VPC/Apis/DeleteVPCIntercomResponse.php new file mode 100644 index 00000000..9c5d3900 --- /dev/null +++ b/src/VPC/Apis/DeleteVPCIntercomResponse.php @@ -0,0 +1,26 @@ + "DeleteVPC"]); + $this->markRequired("Region"); + $this->markRequired("VPCId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VPCId: VPC资源Id + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPC资源Id + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } +} diff --git a/src/VPC/Apis/DeleteVPCResponse.php b/src/VPC/Apis/DeleteVPCResponse.php new file mode 100644 index 00000000..4f1f1d18 --- /dev/null +++ b/src/VPC/Apis/DeleteVPCResponse.php @@ -0,0 +1,26 @@ + "DeleteWhiteListResource"]); + $this->markRequired("Region"); + $this->markRequired("NATGWId"); + $this->markRequired("ResourceIds"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * NATGWId: NAT网关Id + * + * @return string|null + */ + public function getNATGWId(): string + { + return $this->get("NATGWId"); + } + + /** + * NATGWId: NAT网关Id + * + * @param string $natgwId + */ + public function setNATGWId(string $natgwId) + { + $this->set("NATGWId", $natgwId); + } + + /** + * ResourceIds: 删除白名单的资源Id + * + * @return string[]|null + */ + public function getResourceIds(): array + { + return $this->get("ResourceIds"); + } + + /** + * ResourceIds: 删除白名单的资源Id + * + * @param string[] $resourceIds + */ + public function setResourceIds(array $resourceIds) + { + $this->set("ResourceIds", $resourceIds); + } +} diff --git a/src/VPC/Apis/DeleteWhiteListResourceResponse.php b/src/VPC/Apis/DeleteWhiteListResourceResponse.php new file mode 100644 index 00000000..0127de61 --- /dev/null +++ b/src/VPC/Apis/DeleteWhiteListResourceResponse.php @@ -0,0 +1,26 @@ + "DescribeNATGWPolicy"]); + $this->markRequired("Region"); + $this->markRequired("NATGWId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * NATGWId: NAT网关Id + * + * @return string|null + */ + public function getNATGWId(): string + { + return $this->get("NATGWId"); + } + + /** + * NATGWId: NAT网关Id + * + * @param string $natgwId + */ + public function setNATGWId(string $natgwId) + { + $this->set("NATGWId", $natgwId); + } + + /** + * Limit: 返回数据长度,默认为10000 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数据长度,默认为10000 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * Offset: 列表起始位置偏移量,默认为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 列表起始位置偏移量,默认为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } +} diff --git a/src/VPC/Apis/DescribeNATGWPolicyResponse.php b/src/VPC/Apis/DescribeNATGWPolicyResponse.php new file mode 100644 index 00000000..2d715e2d --- /dev/null +++ b/src/VPC/Apis/DescribeNATGWPolicyResponse.php @@ -0,0 +1,74 @@ +get("TotalCount"); + } + + /** + * TotalCount: 满足条件的转发策略总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * DataSet: 查到的NATGW 转发策略的详细信息 + * + * @return NATGWPolicyDataSet[]|null + */ + public function getDataSet(): array + { + $items = $this->get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new NATGWPolicyDataSet($item)); + } + return $result; + } + + /** + * DataSet: 查到的NATGW 转发策略的详细信息 + * + * @param NATGWPolicyDataSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/VPC/Apis/DescribeNATGWRequest.php b/src/VPC/Apis/DescribeNATGWRequest.php new file mode 100644 index 00000000..ac3a9d47 --- /dev/null +++ b/src/VPC/Apis/DescribeNATGWRequest.php @@ -0,0 +1,130 @@ + "DescribeNATGW"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * NATGWIds: NAT网关Id。默认为该项目下所有NAT网关 + * + * @return string[]|null + */ + public function getNATGWIds(): array + { + return $this->get("NATGWIds"); + } + + /** + * NATGWIds: NAT网关Id。默认为该项目下所有NAT网关 + * + * @param string[] $natgwIds + */ + public function setNATGWIds(array $natgwIds) + { + $this->set("NATGWIds", $natgwIds); + } + + /** + * Offset: 数据偏移量。默认为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 数据偏移量。默认为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 数据分页值。默认为20 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 数据分页值。默认为20 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/VPC/Apis/DescribeNATGWResponse.php b/src/VPC/Apis/DescribeNATGWResponse.php new file mode 100644 index 00000000..b7ec44fe --- /dev/null +++ b/src/VPC/Apis/DescribeNATGWResponse.php @@ -0,0 +1,77 @@ +get("TotalCount"); + } + + /** + * TotalCount: 满足条件的实例的总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * DataSet: 查到的NATGW信息列表 + * + * @return NatGatewayDataSet[]|null + */ + public function getDataSet(): array + { + $items = $this->get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new NatGatewayDataSet($item)); + } + return $result; + } + + /** + * DataSet: 查到的NATGW信息列表 + * + * @param NatGatewayDataSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/VPC/Apis/DescribeNetworkAclAssociationBySubnetRequest.php b/src/VPC/Apis/DescribeNetworkAclAssociationBySubnetRequest.php new file mode 100644 index 00000000..6a6f2231 --- /dev/null +++ b/src/VPC/Apis/DescribeNetworkAclAssociationBySubnetRequest.php @@ -0,0 +1,91 @@ + "DescribeNetworkAclAssociationBySubnet"]); + $this->markRequired("Region"); + $this->markRequired("SubnetworkId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SubnetworkId: 子网的ID + * + * @return string|null + */ + public function getSubnetworkId(): string + { + return $this->get("SubnetworkId"); + } + + /** + * SubnetworkId: 子网的ID + * + * @param string $subnetworkId + */ + public function setSubnetworkId(string $subnetworkId) + { + $this->set("SubnetworkId", $subnetworkId); + } +} diff --git a/src/VPC/Apis/DescribeNetworkAclAssociationBySubnetResponse.php b/src/VPC/Apis/DescribeNetworkAclAssociationBySubnetResponse.php new file mode 100644 index 00000000..05fbc451 --- /dev/null +++ b/src/VPC/Apis/DescribeNetworkAclAssociationBySubnetResponse.php @@ -0,0 +1,45 @@ +get("Association")); + } + + /** + * Association: 绑定信息 + * + * @param AssociationInfo $association + */ + public function setAssociation(AssociationInfo $association) + { + $this->set("Association", $association->getAll()); + } +} diff --git a/src/VPC/Apis/DescribeNetworkAclAssociationRequest.php b/src/VPC/Apis/DescribeNetworkAclAssociationRequest.php new file mode 100644 index 00000000..5a989b33 --- /dev/null +++ b/src/VPC/Apis/DescribeNetworkAclAssociationRequest.php @@ -0,0 +1,131 @@ + "DescribeNetworkAclAssociation"]); + $this->markRequired("Region"); + $this->markRequired("AclId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * AclId: Acl的ID + * + * @return string|null + */ + public function getAclId(): string + { + return $this->get("AclId"); + } + + /** + * AclId: Acl的ID + * + * @param string $aclId + */ + public function setAclId(string $aclId) + { + $this->set("AclId", $aclId); + } + + /** + * Offset: 列表偏移量 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 列表偏移量 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 列表获取的个数限制 + * + * @return string|null + */ + public function getLimit(): string + { + return $this->get("Limit"); + } + + /** + * Limit: 列表获取的个数限制 + * + * @param string $limit + */ + public function setLimit(string $limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/VPC/Apis/DescribeNetworkAclAssociationResponse.php b/src/VPC/Apis/DescribeNetworkAclAssociationResponse.php new file mode 100644 index 00000000..2807199b --- /dev/null +++ b/src/VPC/Apis/DescribeNetworkAclAssociationResponse.php @@ -0,0 +1,54 @@ +get("AssociationList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new AssociationInfo($item)); + } + return $result; + } + + /** + * AssociationList: 绑定信息列表 + * + * @param AssociationInfo[] $associationList + */ + public function setAssociationList(array $associationList) + { + $result = []; + foreach ($associationList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/VPC/Apis/DescribeNetworkAclEntryRequest.php b/src/VPC/Apis/DescribeNetworkAclEntryRequest.php new file mode 100644 index 00000000..d7752bb7 --- /dev/null +++ b/src/VPC/Apis/DescribeNetworkAclEntryRequest.php @@ -0,0 +1,91 @@ + "DescribeNetworkAclEntry"]); + $this->markRequired("Region"); + $this->markRequired("AclId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * AclId: ACL的ID + * + * @return string|null + */ + public function getAclId(): string + { + return $this->get("AclId"); + } + + /** + * AclId: ACL的ID + * + * @param string $aclId + */ + public function setAclId(string $aclId) + { + $this->set("AclId", $aclId); + } +} diff --git a/src/VPC/Apis/DescribeNetworkAclEntryResponse.php b/src/VPC/Apis/DescribeNetworkAclEntryResponse.php new file mode 100644 index 00000000..b478080f --- /dev/null +++ b/src/VPC/Apis/DescribeNetworkAclEntryResponse.php @@ -0,0 +1,55 @@ +get("EntryList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new AclEntryInfo($item)); + } + return $result; + } + + /** + * EntryList: 所有的规则信息 + * + * @param AclEntryInfo[] $entryList + */ + public function setEntryList(array $entryList) + { + $result = []; + foreach ($entryList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/VPC/Apis/DescribeNetworkAclRequest.php b/src/VPC/Apis/DescribeNetworkAclRequest.php new file mode 100644 index 00000000..9f52a944 --- /dev/null +++ b/src/VPC/Apis/DescribeNetworkAclRequest.php @@ -0,0 +1,130 @@ + "DescribeNetworkAcl"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Offset: 列表偏移量 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 列表偏移量 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 列表获取的个数限制 + * + * @return string|null + */ + public function getLimit(): string + { + return $this->get("Limit"); + } + + /** + * Limit: 列表获取的个数限制 + * + * @param string $limit + */ + public function setLimit(string $limit) + { + $this->set("Limit", $limit); + } + + /** + * VpcId: 需要获取的ACL所属的VPC的ID + * + * @return string|null + */ + public function getVpcId(): string + { + return $this->get("VpcId"); + } + + /** + * VpcId: 需要获取的ACL所属的VPC的ID + * + * @param string $vpcId + */ + public function setVpcId(string $vpcId) + { + $this->set("VpcId", $vpcId); + } +} diff --git a/src/VPC/Apis/DescribeNetworkAclResponse.php b/src/VPC/Apis/DescribeNetworkAclResponse.php new file mode 100644 index 00000000..ae4de0cc --- /dev/null +++ b/src/VPC/Apis/DescribeNetworkAclResponse.php @@ -0,0 +1,57 @@ +get("AclList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new AclInfo($item)); + } + return $result; + } + + /** + * AclList: ACL的信息,具体结构见下方AclInfo + * + * @param AclInfo[] $aclList + */ + public function setAclList(array $aclList) + { + $result = []; + foreach ($aclList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/VPC/Apis/DescribeRouteTableRequest.php b/src/VPC/Apis/DescribeRouteTableRequest.php new file mode 100644 index 00000000..ff6a3362 --- /dev/null +++ b/src/VPC/Apis/DescribeRouteTableRequest.php @@ -0,0 +1,170 @@ + "DescribeRouteTable"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VPCId: 所属VPC的资源ID + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: 所属VPC的资源ID + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * RouteTableId: 路由表资源ID + * + * @return string|null + */ + public function getRouteTableId(): string + { + return $this->get("RouteTableId"); + } + + /** + * RouteTableId: 路由表资源ID + * + * @param string $routeTableId + */ + public function setRouteTableId(string $routeTableId) + { + $this->set("RouteTableId", $routeTableId); + } + + /** + * OffSet: 数据偏移量。默认为0 + * + * @return integer|null + */ + public function getOffSet(): int + { + return $this->get("OffSet"); + } + + /** + * OffSet: 数据偏移量。默认为0 + * + * @param int $offSet + */ + public function setOffSet(int $offSet) + { + $this->set("OffSet", $offSet); + } + + /** + * Limit: 数据分页值。默认为20 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 数据分页值。默认为20 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * BusinessId: 业务组ID + * + * @return string|null + */ + public function getBusinessId(): string + { + return $this->get("BusinessId"); + } + + /** + * BusinessId: 业务组ID + * + * @param string $businessId + */ + public function setBusinessId(string $businessId) + { + $this->set("BusinessId", $businessId); + } +} diff --git a/src/VPC/Apis/DescribeRouteTableResponse.php b/src/VPC/Apis/DescribeRouteTableResponse.php new file mode 100644 index 00000000..13de0c09 --- /dev/null +++ b/src/VPC/Apis/DescribeRouteTableResponse.php @@ -0,0 +1,75 @@ +get("RouteTables") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new RouteTableInfo($item)); + } + return $result; + } + + /** + * RouteTables: 路由表信息 + * + * @param RouteTableInfo[] $routeTables + */ + public function setRouteTables(array $routeTables) + { + $result = []; + foreach ($routeTables as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalCount: RouteTables字段的数量 + * + * @return integer|null + */ + public function getTotalCount(): int + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: RouteTables字段的数量 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/VPC/Apis/DescribeSecondaryIpRequest.php b/src/VPC/Apis/DescribeSecondaryIpRequest.php new file mode 100644 index 00000000..161d8f47 --- /dev/null +++ b/src/VPC/Apis/DescribeSecondaryIpRequest.php @@ -0,0 +1,152 @@ + "DescribeSecondaryIp"]); + $this->markRequired("Region"); + $this->markRequired("SubnetId"); + $this->markRequired("VPCId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SubnetId: 子网Id + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网Id + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * VPCId: VPCId + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPCId + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * Ip: Ip + * + * @return string|null + */ + public function getIp(): string + { + return $this->get("Ip"); + } + + /** + * Ip: Ip + * + * @param string $ip + */ + public function setIp(string $ip) + { + $this->set("Ip", $ip); + } + + /** + * Mac: Mac + * + * @return string|null + */ + public function getMac(): string + { + return $this->get("Mac"); + } + + /** + * Mac: Mac + * + * @param string $mac + */ + public function setMac(string $mac) + { + $this->set("Mac", $mac); + } +} diff --git a/src/VPC/Apis/DescribeSecondaryIpResponse.php b/src/VPC/Apis/DescribeSecondaryIpResponse.php new file mode 100644 index 00000000..e4329629 --- /dev/null +++ b/src/VPC/Apis/DescribeSecondaryIpResponse.php @@ -0,0 +1,54 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new IpInfo($item)); + } + return $result; + } + + /** + * DataSet: + * + * @param IpInfo[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/VPC/Apis/DescribeSnatRuleRequest.php b/src/VPC/Apis/DescribeSnatRuleRequest.php new file mode 100644 index 00000000..b138057b --- /dev/null +++ b/src/VPC/Apis/DescribeSnatRuleRequest.php @@ -0,0 +1,171 @@ + "DescribeSnatRule"]); + $this->markRequired("Region"); + $this->markRequired("NATGWId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * NATGWId: NAT网关的ID + * + * @return string|null + */ + public function getNATGWId(): string + { + return $this->get("NATGWId"); + } + + /** + * NATGWId: NAT网关的ID + * + * @param string $natgwId + */ + public function setNATGWId(string $natgwId) + { + $this->set("NATGWId", $natgwId); + } + + /** + * SourceIp: 需要出外网的私网IP地址,例如10.9.7.xx + * + * @return string|null + */ + public function getSourceIp(): string + { + return $this->get("SourceIp"); + } + + /** + * SourceIp: 需要出外网的私网IP地址,例如10.9.7.xx + * + * @param string $sourceIp + */ + public function setSourceIp(string $sourceIp) + { + $this->set("SourceIp", $sourceIp); + } + + /** + * SnatIp: EIP的ip地址,例如106.75.xx.xx + * + * @return string|null + */ + public function getSnatIp(): string + { + return $this->get("SnatIp"); + } + + /** + * SnatIp: EIP的ip地址,例如106.75.xx.xx + * + * @param string $snatIp + */ + public function setSnatIp(string $snatIp) + { + $this->set("SnatIp", $snatIp); + } + + /** + * Offset: 偏移,默认为0 + * + * @return string|null + */ + public function getOffset(): string + { + return $this->get("Offset"); + } + + /** + * Offset: 偏移,默认为0 + * + * @param string $offset + */ + public function setOffset(string $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 分页,默认为20 + * + * @return string|null + */ + public function getLimit(): string + { + return $this->get("Limit"); + } + + /** + * Limit: 分页,默认为20 + * + * @param string $limit + */ + public function setLimit(string $limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/VPC/Apis/DescribeSnatRuleResponse.php b/src/VPC/Apis/DescribeSnatRuleResponse.php new file mode 100644 index 00000000..027e069f --- /dev/null +++ b/src/VPC/Apis/DescribeSnatRuleResponse.php @@ -0,0 +1,74 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new NATGWSnatRule($item)); + } + return $result; + } + + /** + * DataSet: 某个NAT网关的所有Snat规则 + * + * @param NATGWSnatRule[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalCount: 规则数量 + * + * @return integer|null + */ + public function getTotalCount(): int + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 规则数量 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/VPC/Apis/DescribeSubnetRequest.php b/src/VPC/Apis/DescribeSubnetRequest.php new file mode 100644 index 00000000..732288a8 --- /dev/null +++ b/src/VPC/Apis/DescribeSubnetRequest.php @@ -0,0 +1,230 @@ + "DescribeSubnet"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SubnetIds: 子网id数组,适用于一次查询多个子网信息 + * + * @return string[]|null + */ + public function getSubnetIds(): array + { + return $this->get("SubnetIds"); + } + + /** + * SubnetIds: 子网id数组,适用于一次查询多个子网信息 + * + * @param string[] $subnetIds + */ + public function setSubnetIds(array $subnetIds) + { + $this->set("SubnetIds", $subnetIds); + } + + /** + * SubnetId: 子网id,适用于一次查询一个子网信息 + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网id,适用于一次查询一个子网信息 + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * RouteTableId: 路由表Id + * + * @return string|null + */ + public function getRouteTableId(): string + { + return $this->get("RouteTableId"); + } + + /** + * RouteTableId: 路由表Id + * + * @param string $routeTableId + */ + public function setRouteTableId(string $routeTableId) + { + $this->set("RouteTableId", $routeTableId); + } + + /** + * VPCId: VPC资源id + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPC资源id + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * Tag: 业务组名称,默认为Default + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组名称,默认为Default + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Offset: 偏移量,默认为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 偏移量,默认为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 列表长度,默认为20 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 列表长度,默认为20 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * ShowAvailableIPs: 是否返回子网的可用IP数,true为是,false为否,默认不返回 + * + * @return boolean|null + */ + public function getShowAvailableIPs(): bool + { + return $this->get("ShowAvailableIPs"); + } + + /** + * ShowAvailableIPs: 是否返回子网的可用IP数,true为是,false为否,默认不返回 + * + * @param boolean $showAvailableIPs + */ + public function setShowAvailableIPs(bool $showAvailableIPs) + { + $this->set("ShowAvailableIPs", $showAvailableIPs); + } +} diff --git a/src/VPC/Apis/DescribeSubnetResourceRequest.php b/src/VPC/Apis/DescribeSubnetResourceRequest.php new file mode 100644 index 00000000..3f35d895 --- /dev/null +++ b/src/VPC/Apis/DescribeSubnetResourceRequest.php @@ -0,0 +1,151 @@ + "DescribeSubnetResource"]); + $this->markRequired("Region"); + $this->markRequired("SubnetId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SubnetId: 子网id + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网id + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * ResourceType: 资源类型,默认为全部资源类型。枚举值为:UHOST,云主机;PHOST,物理云主机;ULB,负载均衡;UHADOOP_HOST,hadoop节点;UFORTRESS_HOST,堡垒机;UNATGW,NAT网关;UKAFKA,Kafka消息队列;UMEM,内存存储;DOCKER,容器集群;UDB,数据库;UDW,数据仓库;VIP,内网VIP. + * + * @return string|null + */ + public function getResourceType(): string + { + return $this->get("ResourceType"); + } + + /** + * ResourceType: 资源类型,默认为全部资源类型。枚举值为:UHOST,云主机;PHOST,物理云主机;ULB,负载均衡;UHADOOP_HOST,hadoop节点;UFORTRESS_HOST,堡垒机;UNATGW,NAT网关;UKAFKA,Kafka消息队列;UMEM,内存存储;DOCKER,容器集群;UDB,数据库;UDW,数据仓库;VIP,内网VIP. + * + * @param string $resourceType + */ + public function setResourceType(string $resourceType) + { + $this->set("ResourceType", $resourceType); + } + + /** + * Offset: 列表起始位置偏移量,默认为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 列表起始位置偏移量,默认为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 单页返回数据长度,默认为20 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 单页返回数据长度,默认为20 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/VPC/Apis/DescribeSubnetResourceResponse.php b/src/VPC/Apis/DescribeSubnetResourceResponse.php new file mode 100644 index 00000000..f35dc269 --- /dev/null +++ b/src/VPC/Apis/DescribeSubnetResourceResponse.php @@ -0,0 +1,74 @@ +get("TotalCount"); + } + + /** + * TotalCount: 总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * DataSet: 返回数据集,请见SubnetResource + * + * @return SubnetResource[]|null + */ + public function getDataSet(): array + { + $items = $this->get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new SubnetResource($item)); + } + return $result; + } + + /** + * DataSet: 返回数据集,请见SubnetResource + * + * @param SubnetResource[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/VPC/Apis/DescribeSubnetResponse.php b/src/VPC/Apis/DescribeSubnetResponse.php new file mode 100644 index 00000000..ae2cd29d --- /dev/null +++ b/src/VPC/Apis/DescribeSubnetResponse.php @@ -0,0 +1,74 @@ +get("TotalCount"); + } + + /** + * TotalCount: 子网总数量 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * DataSet: 子网信息数组,具体资源见下方SubnetInfo + * + * @return SubnetInfo[]|null + */ + public function getDataSet(): array + { + $items = $this->get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new SubnetInfo($item)); + } + return $result; + } + + /** + * DataSet: 子网信息数组,具体资源见下方SubnetInfo + * + * @param SubnetInfo[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/VPC/Apis/DescribeVIPRequest.php b/src/VPC/Apis/DescribeVIPRequest.php new file mode 100644 index 00000000..d8a8e761 --- /dev/null +++ b/src/VPC/Apis/DescribeVIPRequest.php @@ -0,0 +1,191 @@ + "DescribeVIP"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VPCId: vpc的id,指定SubnetId时必填 + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: vpc的id,指定SubnetId时必填 + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: 子网id,不指定则获取VPCId下的所有vip + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网id,不指定则获取VPCId下的所有vip + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * VIPId: VIP ID + * + * @return string|null + */ + public function getVIPId(): string + { + return $this->get("VIPId"); + } + + /** + * VIPId: VIP ID + * + * @param string $vipId + */ + public function setVIPId(string $vipId) + { + $this->set("VIPId", $vipId); + } + + /** + * Tag: 业务组名称, 默认为 Default + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组名称, 默认为 Default + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * BusinessId: 业务组 + * + * @return string|null + */ + public function getBusinessId(): string + { + return $this->get("BusinessId"); + } + + /** + * BusinessId: 业务组 + * + * @param string $businessId + */ + public function setBusinessId(string $businessId) + { + $this->set("BusinessId", $businessId); + } +} diff --git a/src/VPC/Apis/DescribeVIPResponse.php b/src/VPC/Apis/DescribeVIPResponse.php new file mode 100644 index 00000000..1ac18b52 --- /dev/null +++ b/src/VPC/Apis/DescribeVIPResponse.php @@ -0,0 +1,94 @@ +get("VIPSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new VIPDetailSet($item)); + } + return $result; + } + + /** + * VIPSet: 内网VIP详情,请见VIPDetailSet + * + * @param VIPDetailSet[] $vipSet + */ + public function setVIPSet(array $vipSet) + { + $result = []; + foreach ($vipSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * DataSet: 内网VIP地址列表 + * + * @return string[]|null + */ + public function getDataSet(): array + { + return $this->get("DataSet"); + } + + /** + * DataSet: 内网VIP地址列表 + * + * @param string[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $this->set("DataSet", $dataSet); + } + + /** + * TotalCount: vip数量 + * + * @return integer|null + */ + public function getTotalCount(): int + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: vip数量 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/VPC/Apis/DescribeVPCIntercomRequest.php b/src/VPC/Apis/DescribeVPCIntercomRequest.php new file mode 100644 index 00000000..9cb95c46 --- /dev/null +++ b/src/VPC/Apis/DescribeVPCIntercomRequest.php @@ -0,0 +1,131 @@ + "DescribeVPCIntercom"]); + $this->markRequired("Region"); + $this->markRequired("VPCId"); + } + + + + /** + * Region: 源VPC所在地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 源VPC所在地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 源VPC所在项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 源VPC所在项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VPCId: VPC短ID + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPC短ID + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * DstRegion: 目的VPC所在地域,默认为全部地域 + * + * @return string|null + */ + public function getDstRegion(): string + { + return $this->get("DstRegion"); + } + + /** + * DstRegion: 目的VPC所在地域,默认为全部地域 + * + * @param string $dstRegion + */ + public function setDstRegion(string $dstRegion) + { + $this->set("DstRegion", $dstRegion); + } + + /** + * DstProjectId: 目的项目ID,默认为全部项目 + * + * @return string|null + */ + public function getDstProjectId(): string + { + return $this->get("DstProjectId"); + } + + /** + * DstProjectId: 目的项目ID,默认为全部项目 + * + * @param string $dstProjectId + */ + public function setDstProjectId(string $dstProjectId) + { + $this->set("DstProjectId", $dstProjectId); + } +} diff --git a/src/VPC/Apis/DescribeVPCIntercomResponse.php b/src/VPC/Apis/DescribeVPCIntercomResponse.php new file mode 100644 index 00000000..38b8de6b --- /dev/null +++ b/src/VPC/Apis/DescribeVPCIntercomResponse.php @@ -0,0 +1,54 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new VPCIntercomInfo($item)); + } + return $result; + } + + /** + * DataSet: 联通VPC信息数组 + * + * @param VPCIntercomInfo[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/VPC/Apis/DescribeVPCRequest.php b/src/VPC/Apis/DescribeVPCRequest.php new file mode 100644 index 00000000..7c6fba2b --- /dev/null +++ b/src/VPC/Apis/DescribeVPCRequest.php @@ -0,0 +1,151 @@ + "DescribeVPC"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VPCIds: VPCId + * + * @return string[]|null + */ + public function getVPCIds(): array + { + return $this->get("VPCIds"); + } + + /** + * VPCIds: VPCId + * + * @param string[] $vpcIds + */ + public function setVPCIds(array $vpcIds) + { + $this->set("VPCIds", $vpcIds); + } + + /** + * Tag: 业务组名称 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组名称 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Offset: + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/VPC/Apis/DescribeVPCResponse.php b/src/VPC/Apis/DescribeVPCResponse.php new file mode 100644 index 00000000..879848ad --- /dev/null +++ b/src/VPC/Apis/DescribeVPCResponse.php @@ -0,0 +1,55 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new VPCInfo($item)); + } + return $result; + } + + /** + * DataSet: vpc信息,具体结构见下方VPCInfo + * + * @param VPCInfo[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/VPC/Apis/DescribeWhiteListResourceRequest.php b/src/VPC/Apis/DescribeWhiteListResourceRequest.php new file mode 100644 index 00000000..480f3c95 --- /dev/null +++ b/src/VPC/Apis/DescribeWhiteListResourceRequest.php @@ -0,0 +1,132 @@ + "DescribeWhiteListResource"]); + $this->markRequired("ProjectId"); + $this->markRequired("Region"); + $this->markRequired("NATGWIds"); + } + + + + /** + * ProjectId: 项目id + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目id + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * NATGWIds: NAT网关的Id + * + * @return string[]|null + */ + public function getNATGWIds(): array + { + return $this->get("NATGWIds"); + } + + /** + * NATGWIds: NAT网关的Id + * + * @param string[] $natgwIds + */ + public function setNATGWIds(array $natgwIds) + { + $this->set("NATGWIds", $natgwIds); + } + + /** + * Offset: 数据偏移量, 默认为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 数据偏移量, 默认为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 数据分页值, 默认为20 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 数据分页值, 默认为20 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/VPC/Apis/DescribeWhiteListResourceResponse.php b/src/VPC/Apis/DescribeWhiteListResourceResponse.php new file mode 100644 index 00000000..98609be3 --- /dev/null +++ b/src/VPC/Apis/DescribeWhiteListResourceResponse.php @@ -0,0 +1,75 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new NatGWWhitelistDataSet($item)); + } + return $result; + } + + /** + * DataSet: 白名单资源的详细信息,详见DescribeResourceWhiteListDataSet + * + * @param NatGWWhitelistDataSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalCount: 上述DataSet总数量 + * + * @return integer|null + */ + public function getTotalCount(): int + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 上述DataSet总数量 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/VPC/Apis/EnableWhiteListRequest.php b/src/VPC/Apis/EnableWhiteListRequest.php new file mode 100644 index 00000000..f34a532e --- /dev/null +++ b/src/VPC/Apis/EnableWhiteListRequest.php @@ -0,0 +1,112 @@ + "EnableWhiteList"]); + $this->markRequired("Region"); + $this->markRequired("NATGWId"); + $this->markRequired("IfOpen"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * NATGWId: NAT网关Id + * + * @return string|null + */ + public function getNATGWId(): string + { + return $this->get("NATGWId"); + } + + /** + * NATGWId: NAT网关Id + * + * @param string $natgwId + */ + public function setNATGWId(string $natgwId) + { + $this->set("NATGWId", $natgwId); + } + + /** + * IfOpen: 白名单开关标记。0:关闭;1:开启。默认为0 + * + * @return integer|null + */ + public function getIfOpen(): int + { + return $this->get("IfOpen"); + } + + /** + * IfOpen: 白名单开关标记。0:关闭;1:开启。默认为0 + * + * @param int $ifOpen + */ + public function setIfOpen(int $ifOpen) + { + $this->set("IfOpen", $ifOpen); + } +} diff --git a/src/VPC/Apis/EnableWhiteListResponse.php b/src/VPC/Apis/EnableWhiteListResponse.php new file mode 100644 index 00000000..c1f378eb --- /dev/null +++ b/src/VPC/Apis/EnableWhiteListResponse.php @@ -0,0 +1,26 @@ + "GetAvailableResourceForPolicy"]); + $this->markRequired("Region"); + $this->markRequired("NATGWId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * NATGWId: NAT网关Id + * + * @return string|null + */ + public function getNATGWId(): string + { + return $this->get("NATGWId"); + } + + /** + * NATGWId: NAT网关Id + * + * @param string $natgwId + */ + public function setNATGWId(string $natgwId) + { + $this->set("NATGWId", $natgwId); + } + + /** + * Limit: 返回数据长度,默认为20 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数据长度,默认为20 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } + + /** + * Offset: 列表起始位置偏移量,默认为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 列表起始位置偏移量,默认为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } +} diff --git a/src/VPC/Apis/GetAvailableResourceForPolicyResponse.php b/src/VPC/Apis/GetAvailableResourceForPolicyResponse.php new file mode 100644 index 00000000..e18402e6 --- /dev/null +++ b/src/VPC/Apis/GetAvailableResourceForPolicyResponse.php @@ -0,0 +1,54 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new GetAvailableResourceForPolicyDataSet($item)); + } + return $result; + } + + /** + * DataSet: 支持资源类型的信息 + * + * @param GetAvailableResourceForPolicyDataSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/VPC/Apis/GetAvailableResourceForSnatRuleRequest.php b/src/VPC/Apis/GetAvailableResourceForSnatRuleRequest.php new file mode 100644 index 00000000..a5018149 --- /dev/null +++ b/src/VPC/Apis/GetAvailableResourceForSnatRuleRequest.php @@ -0,0 +1,132 @@ + "GetAvailableResourceForSnatRule"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("NATGWId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * NATGWId: NAT网关Id + * + * @return string|null + */ + public function getNATGWId(): string + { + return $this->get("NATGWId"); + } + + /** + * NATGWId: NAT网关Id + * + * @param string $natgwId + */ + public function setNATGWId(string $natgwId) + { + $this->set("NATGWId", $natgwId); + } + + /** + * Offset: 数据偏移量, 默认为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 数据偏移量, 默认为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 数据分页值, 默认为20 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 数据分页值, 默认为20 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/VPC/Apis/GetAvailableResourceForSnatRuleResponse.php b/src/VPC/Apis/GetAvailableResourceForSnatRuleResponse.php new file mode 100644 index 00000000..7750d771 --- /dev/null +++ b/src/VPC/Apis/GetAvailableResourceForSnatRuleResponse.php @@ -0,0 +1,74 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new GetAvailableResourceForSnatRuleDataSet($item)); + } + return $result; + } + + /** + * DataSet: 返回的资源详细信息 + * + * @param GetAvailableResourceForSnatRuleDataSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalCount: 总数 + * + * @return integer|null + */ + public function getTotalCount(): int + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/VPC/Apis/GetAvailableResourceForWhiteListRequest.php b/src/VPC/Apis/GetAvailableResourceForWhiteListRequest.php new file mode 100644 index 00000000..6e0115a9 --- /dev/null +++ b/src/VPC/Apis/GetAvailableResourceForWhiteListRequest.php @@ -0,0 +1,131 @@ + "GetAvailableResourceForWhiteList"]); + $this->markRequired("Region"); + $this->markRequired("NATGWId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * NATGWId: NAT网关Id + * + * @return string|null + */ + public function getNATGWId(): string + { + return $this->get("NATGWId"); + } + + /** + * NATGWId: NAT网关Id + * + * @param string $natgwId + */ + public function setNATGWId(string $natgwId) + { + $this->set("NATGWId", $natgwId); + } + + /** + * Offset: 数据偏移量, 默认为0 + * + * @return integer|null + */ + public function getOffset(): int + { + return $this->get("Offset"); + } + + /** + * Offset: 数据偏移量, 默认为0 + * + * @param int $offset + */ + public function setOffset(int $offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 数据分页值, 默认为20 + * + * @return integer|null + */ + public function getLimit(): int + { + return $this->get("Limit"); + } + + /** + * Limit: 数据分页值, 默认为20 + * + * @param int $limit + */ + public function setLimit(int $limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/VPC/Apis/GetAvailableResourceForWhiteListResponse.php b/src/VPC/Apis/GetAvailableResourceForWhiteListResponse.php new file mode 100644 index 00000000..8c9da588 --- /dev/null +++ b/src/VPC/Apis/GetAvailableResourceForWhiteListResponse.php @@ -0,0 +1,74 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new GetAvailableResourceForWhiteListDataSet($item)); + } + return $result; + } + + /** + * DataSet: 返回白名单列表的详细信息 + * + * @param GetAvailableResourceForWhiteListDataSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalCount: 白名单资源列表的总的个数 + * + * @return integer|null + */ + public function getTotalCount(): int + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 白名单资源列表的总的个数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/VPC/Apis/GetNetworkAclTargetResourceRequest.php b/src/VPC/Apis/GetNetworkAclTargetResourceRequest.php new file mode 100644 index 00000000..024bbbaa --- /dev/null +++ b/src/VPC/Apis/GetNetworkAclTargetResourceRequest.php @@ -0,0 +1,91 @@ + "GetNetworkAclTargetResource"]); + $this->markRequired("Region"); + $this->markRequired("SubnetworkId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SubnetworkId: 子网ID。 + * + * @return string[]|null + */ + public function getSubnetworkId(): array + { + return $this->get("SubnetworkId"); + } + + /** + * SubnetworkId: 子网ID。 + * + * @param string[] $subnetworkId + */ + public function setSubnetworkId(array $subnetworkId) + { + $this->set("SubnetworkId", $subnetworkId); + } +} diff --git a/src/VPC/Apis/GetNetworkAclTargetResourceResponse.php b/src/VPC/Apis/GetNetworkAclTargetResourceResponse.php new file mode 100644 index 00000000..8896a2c5 --- /dev/null +++ b/src/VPC/Apis/GetNetworkAclTargetResourceResponse.php @@ -0,0 +1,74 @@ +get("TargetResourceList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new TargetResourceInfo($item)); + } + return $result; + } + + /** + * TargetResourceList: ACL规则应用目标资源列表,具体结构见下方TargetResourceInfo + * + * @param TargetResourceInfo[] $targetResourceList + */ + public function setTargetResourceList(array $targetResourceList) + { + $result = []; + foreach ($targetResourceList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalCount: ACL规则应用目标资源总数 + * + * @return integer|null + */ + public function getTotalCount(): int + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: ACL规则应用目标资源总数 + * + * @param int $totalCount + */ + public function setTotalCount(int $totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/VPC/Apis/ListSubnetForNATGWRequest.php b/src/VPC/Apis/ListSubnetForNATGWRequest.php new file mode 100644 index 00000000..3474b0bc --- /dev/null +++ b/src/VPC/Apis/ListSubnetForNATGWRequest.php @@ -0,0 +1,90 @@ + "ListSubnetForNATGW"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VPCId: NAT网关所属VPC Id。默认值为Default VPC Id + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: NAT网关所属VPC Id。默认值为Default VPC Id + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } +} diff --git a/src/VPC/Apis/ListSubnetForNATGWResponse.php b/src/VPC/Apis/ListSubnetForNATGWResponse.php new file mode 100644 index 00000000..62e5ef43 --- /dev/null +++ b/src/VPC/Apis/ListSubnetForNATGWResponse.php @@ -0,0 +1,54 @@ +get("DataSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new NatgwSubnetDataSet($item)); + } + return $result; + } + + /** + * DataSet: 具体参数请见NatgwSubnetDataSet + * + * @param NatgwSubnetDataSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/VPC/Apis/ModifyRouteRuleRequest.php b/src/VPC/Apis/ModifyRouteRuleRequest.php new file mode 100644 index 00000000..97f68624 --- /dev/null +++ b/src/VPC/Apis/ModifyRouteRuleRequest.php @@ -0,0 +1,113 @@ + "ModifyRouteRule"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("RouteTableId"); + $this->markRequired("RouteRule"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * RouteTableId: 通过DescribeRouteTable拿到 + * + * @return string|null + */ + public function getRouteTableId(): string + { + return $this->get("RouteTableId"); + } + + /** + * RouteTableId: 通过DescribeRouteTable拿到 + * + * @param string $routeTableId + */ + public function setRouteTableId(string $routeTableId) + { + $this->set("RouteTableId", $routeTableId); + } + + /** + * RouteRule: 格式: RouteRuleId | 目的网段 | 下一跳类型(支持INSTANCE、VIP) | 下一跳 |优先级(保留字段,填写0即可)| 备注 | 增、删、改标志(add/delete/update) 。"添加"示例: test_id | 10.8.0.0/16 | instance | uhost-xd8ja | 0 | Default Route Rule| add (添加的RouteRuleId填任意非空字符串) 。"删除"示例: routerule-xk3jxa | 10.8.0.0/16 | instance | uhost-xd8ja | 0 | Default Route Rule| delete (RouteRuleId来自DescribeRouteTable中) 。“修改”示例: routerule-xk3jxa | 10.8.0.0/16 | instance | uhost-cjksa2 | 0 | Default Route Rule| update (RouteRuleId来自DescribeRouteTable中) + * + * @return string[]|null + */ + public function getRouteRule(): array + { + return $this->get("RouteRule"); + } + + /** + * RouteRule: 格式: RouteRuleId | 目的网段 | 下一跳类型(支持INSTANCE、VIP) | 下一跳 |优先级(保留字段,填写0即可)| 备注 | 增、删、改标志(add/delete/update) 。"添加"示例: test_id | 10.8.0.0/16 | instance | uhost-xd8ja | 0 | Default Route Rule| add (添加的RouteRuleId填任意非空字符串) 。"删除"示例: routerule-xk3jxa | 10.8.0.0/16 | instance | uhost-xd8ja | 0 | Default Route Rule| delete (RouteRuleId来自DescribeRouteTable中) 。“修改”示例: routerule-xk3jxa | 10.8.0.0/16 | instance | uhost-cjksa2 | 0 | Default Route Rule| update (RouteRuleId来自DescribeRouteTable中) + * + * @param string[] $routeRule + */ + public function setRouteRule(array $routeRule) + { + $this->set("RouteRule", $routeRule); + } +} diff --git a/src/VPC/Apis/ModifyRouteRuleResponse.php b/src/VPC/Apis/ModifyRouteRuleResponse.php new file mode 100644 index 00000000..14f333b0 --- /dev/null +++ b/src/VPC/Apis/ModifyRouteRuleResponse.php @@ -0,0 +1,26 @@ + "MoveSecondaryIPMac"]); + $this->markRequired("Region"); + $this->markRequired("Ip"); + $this->markRequired("OldMac"); + $this->markRequired("NewMac"); + $this->markRequired("SubnetId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Ip: Secondary IP + * + * @return string|null + */ + public function getIp(): string + { + return $this->get("Ip"); + } + + /** + * Ip: Secondary IP + * + * @param string $ip + */ + public function setIp(string $ip) + { + $this->set("Ip", $ip); + } + + /** + * OldMac: 旧 Mac。Secondary IP 当前所绑定的 Mac + * + * @return string|null + */ + public function getOldMac(): string + { + return $this->get("OldMac"); + } + + /** + * OldMac: 旧 Mac。Secondary IP 当前所绑定的 Mac + * + * @param string $oldMac + */ + public function setOldMac(string $oldMac) + { + $this->set("OldMac", $oldMac); + } + + /** + * NewMac: 新 Mac。Secondary IP 迁移的目的 Mac + * + * @return string|null + */ + public function getNewMac(): string + { + return $this->get("NewMac"); + } + + /** + * NewMac: 新 Mac。Secondary IP 迁移的目的 Mac + * + * @param string $newMac + */ + public function setNewMac(string $newMac) + { + $this->set("NewMac", $newMac); + } + + /** + * SubnetId: 子网 ID。IP/OldMac/NewMac 三者必须在同一子网 + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网 ID。IP/OldMac/NewMac 三者必须在同一子网 + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } +} diff --git a/src/VPC/Apis/MoveSecondaryIPMacResponse.php b/src/VPC/Apis/MoveSecondaryIPMacResponse.php new file mode 100644 index 00000000..2c29dc2f --- /dev/null +++ b/src/VPC/Apis/MoveSecondaryIPMacResponse.php @@ -0,0 +1,26 @@ + "ReleaseVIP"]); + $this->markRequired("Region"); + $this->markRequired("VIPId"); + } + + + + /** + * Region: 地域 + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域 + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区 + * + * @return string|null + */ + public function getZone(): string + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区 + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写 + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写 + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VIPId: 内网VIP的id + * + * @return string|null + */ + public function getVIPId(): string + { + return $this->get("VIPId"); + } + + /** + * VIPId: 内网VIP的id + * + * @param string $vipId + */ + public function setVIPId(string $vipId) + { + $this->set("VIPId", $vipId); + } +} diff --git a/src/VPC/Apis/ReleaseVIPResponse.php b/src/VPC/Apis/ReleaseVIPResponse.php new file mode 100644 index 00000000..b5aed27c --- /dev/null +++ b/src/VPC/Apis/ReleaseVIPResponse.php @@ -0,0 +1,26 @@ + "SetGwDefaultExport"]); + $this->markRequired("Region"); + $this->markRequired("NATGWId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * NATGWId: NAT网关Id + * + * @return string|null + */ + public function getNATGWId(): string + { + return $this->get("NATGWId"); + } + + /** + * NATGWId: NAT网关Id + * + * @param string $natgwId + */ + public function setNATGWId(string $natgwId) + { + $this->set("NATGWId", $natgwId); + } + + /** + * ExportIp: NAT网关绑定的EIP。ExportIp和ExportEipId必填一个 + * + * @return string|null + */ + public function getExportIp(): string + { + return $this->get("ExportIp"); + } + + /** + * ExportIp: NAT网关绑定的EIP。ExportIp和ExportEipId必填一个 + * + * @param string $exportIp + */ + public function setExportIp(string $exportIp) + { + $this->set("ExportIp", $exportIp); + } + + /** + * ExportEipId: NAT网关绑定的EIP Id。ExportIp和ExportEipId必填一个 + * + * @return string|null + */ + public function getExportEipId(): string + { + return $this->get("ExportEipId"); + } + + /** + * ExportEipId: NAT网关绑定的EIP Id。ExportIp和ExportEipId必填一个 + * + * @param string $exportEipId + */ + public function setExportEipId(string $exportEipId) + { + $this->set("ExportEipId", $exportEipId); + } +} diff --git a/src/VPC/Apis/SetGwDefaultExportResponse.php b/src/VPC/Apis/SetGwDefaultExportResponse.php new file mode 100644 index 00000000..4be92ea8 --- /dev/null +++ b/src/VPC/Apis/SetGwDefaultExportResponse.php @@ -0,0 +1,26 @@ + "UpdateNATGWPolicy"]); + $this->markRequired("Region"); + $this->markRequired("NATGWId"); + $this->markRequired("PolicyId"); + $this->markRequired("Protocol"); + $this->markRequired("SrcEIPId"); + $this->markRequired("SrcPort"); + $this->markRequired("DstIP"); + $this->markRequired("DstPort"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * NATGWId: NAT网关Id + * + * @return string|null + */ + public function getNATGWId(): string + { + return $this->get("NATGWId"); + } + + /** + * NATGWId: NAT网关Id + * + * @param string $natgwId + */ + public function setNATGWId(string $natgwId) + { + $this->set("NATGWId", $natgwId); + } + + /** + * PolicyId: 转发策略Id + * + * @return string|null + */ + public function getPolicyId(): string + { + return $this->get("PolicyId"); + } + + /** + * PolicyId: 转发策略Id + * + * @param string $policyId + */ + public function setPolicyId(string $policyId) + { + $this->set("PolicyId", $policyId); + } + + /** + * Protocol: 协议类型。枚举值为:TCP 、 UDP + * + * @return string|null + */ + public function getProtocol(): string + { + return $this->get("Protocol"); + } + + /** + * Protocol: 协议类型。枚举值为:TCP 、 UDP + * + * @param string $protocol + */ + public function setProtocol(string $protocol) + { + $this->set("Protocol", $protocol); + } + + /** + * SrcEIPId: 源IP。填写对应的EIP Id + * + * @return string|null + */ + public function getSrcEIPId(): string + { + return $this->get("SrcEIPId"); + } + + /** + * SrcEIPId: 源IP。填写对应的EIP Id + * + * @param string $srcEIPId + */ + public function setSrcEIPId(string $srcEIPId) + { + $this->set("SrcEIPId", $srcEIPId); + } + + /** + * SrcPort: 源端口。可填写固定端口,也可填写端口范围。支持的端口范围为1-6553 + * + * @return string|null + */ + public function getSrcPort(): string + { + return $this->get("SrcPort"); + } + + /** + * SrcPort: 源端口。可填写固定端口,也可填写端口范围。支持的端口范围为1-6553 + * + * @param string $srcPort + */ + public function setSrcPort(string $srcPort) + { + $this->set("SrcPort", $srcPort); + } + + /** + * DstIP: 目标IP。填写对应的目标IP地址 + * + * @return string|null + */ + public function getDstIP(): string + { + return $this->get("DstIP"); + } + + /** + * DstIP: 目标IP。填写对应的目标IP地址 + * + * @param string $dstIP + */ + public function setDstIP(string $dstIP) + { + $this->set("DstIP", $dstIP); + } + + /** + * DstPort: 目标端口。可填写固定端口,也可填写端口范围。支持的端口范围为1-65535 + * + * @return string|null + */ + public function getDstPort(): string + { + return $this->get("DstPort"); + } + + /** + * DstPort: 目标端口。可填写固定端口,也可填写端口范围。支持的端口范围为1-65535 + * + * @param string $dstPort + */ + public function setDstPort(string $dstPort) + { + $this->set("DstPort", $dstPort); + } + + /** + * PolicyName: 转发策略名称。默认为空 + * + * @return string|null + */ + public function getPolicyName(): string + { + return $this->get("PolicyName"); + } + + /** + * PolicyName: 转发策略名称。默认为空 + * + * @param string $policyName + */ + public function setPolicyName(string $policyName) + { + $this->set("PolicyName", $policyName); + } +} diff --git a/src/VPC/Apis/UpdateNATGWPolicyResponse.php b/src/VPC/Apis/UpdateNATGWPolicyResponse.php new file mode 100644 index 00000000..d53a5831 --- /dev/null +++ b/src/VPC/Apis/UpdateNATGWPolicyResponse.php @@ -0,0 +1,26 @@ + "UpdateNATGWSubnet"]); + $this->markRequired("Region"); + $this->markRequired("NATGWId"); + $this->markRequired("SubnetworkIds"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * NATGWId: NAT网关Id + * + * @return string|null + */ + public function getNATGWId(): string + { + return $this->get("NATGWId"); + } + + /** + * NATGWId: NAT网关Id + * + * @param string $natgwId + */ + public function setNATGWId(string $natgwId) + { + $this->set("NATGWId", $natgwId); + } + + /** + * SubnetworkIds: NAT网关绑定的子网Id + * + * @return string[]|null + */ + public function getSubnetworkIds(): array + { + return $this->get("SubnetworkIds"); + } + + /** + * SubnetworkIds: NAT网关绑定的子网Id + * + * @param string[] $subnetworkIds + */ + public function setSubnetworkIds(array $subnetworkIds) + { + $this->set("SubnetworkIds", $subnetworkIds); + } +} diff --git a/src/VPC/Apis/UpdateNATGWSubnetResponse.php b/src/VPC/Apis/UpdateNATGWSubnetResponse.php new file mode 100644 index 00000000..1a44a2c6 --- /dev/null +++ b/src/VPC/Apis/UpdateNATGWSubnetResponse.php @@ -0,0 +1,26 @@ + "UpdateNetworkAclEntry"]); + $this->markRequired("Region"); + $this->markRequired("AclId"); + $this->markRequired("EntryId"); + $this->markRequired("Priority"); + $this->markRequired("Direction"); + $this->markRequired("IpProtocol"); + $this->markRequired("CidrBlock"); + $this->markRequired("PortRange"); + $this->markRequired("EntryAction"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * AclId: ACL的ID + * + * @return string|null + */ + public function getAclId(): string + { + return $this->get("AclId"); + } + + /** + * AclId: ACL的ID + * + * @param string $aclId + */ + public function setAclId(string $aclId) + { + $this->set("AclId", $aclId); + } + + /** + * EntryId: 需要更新的Entry Id + * + * @return string|null + */ + public function getEntryId(): string + { + return $this->get("EntryId"); + } + + /** + * EntryId: 需要更新的Entry Id + * + * @param string $entryId + */ + public function setEntryId(string $entryId) + { + $this->set("EntryId", $entryId); + } + + /** + * Priority: Entry的优先级,对于同样的Direction来说,不能重复 + * + * @return integer|null + */ + public function getPriority(): int + { + return $this->get("Priority"); + } + + /** + * Priority: Entry的优先级,对于同样的Direction来说,不能重复 + * + * @param int $priority + */ + public function setPriority(int $priority) + { + $this->set("Priority", $priority); + } + + /** + * Direction: 出向或者入向(“Ingress”, "Egress") + * + * @return string|null + */ + public function getDirection(): string + { + return $this->get("Direction"); + } + + /** + * Direction: 出向或者入向(“Ingress”, "Egress") + * + * @param string $direction + */ + public function setDirection(string $direction) + { + $this->set("Direction", $direction); + } + + /** + * IpProtocol: 针对的协议规则 + * + * @return string|null + */ + public function getIpProtocol(): string + { + return $this->get("IpProtocol"); + } + + /** + * IpProtocol: 针对的协议规则 + * + * @param string $ipProtocol + */ + public function setIpProtocol(string $ipProtocol) + { + $this->set("IpProtocol", $ipProtocol); + } + + /** + * CidrBlock: IPv4段的CIDR表示 + * + * @return string|null + */ + public function getCidrBlock(): string + { + return $this->get("CidrBlock"); + } + + /** + * CidrBlock: IPv4段的CIDR表示 + * + * @param string $cidrBlock + */ + public function setCidrBlock(string $cidrBlock) + { + $this->set("CidrBlock", $cidrBlock); + } + + /** + * PortRange: 针对的端口范围 + * + * @return string|null + */ + public function getPortRange(): string + { + return $this->get("PortRange"); + } + + /** + * PortRange: 针对的端口范围 + * + * @param string $portRange + */ + public function setPortRange(string $portRange) + { + $this->set("PortRange", $portRange); + } + + /** + * EntryAction: 规则的行为("Accept", "Reject") + * + * @return string|null + */ + public function getEntryAction(): string + { + return $this->get("EntryAction"); + } + + /** + * EntryAction: 规则的行为("Accept", "Reject") + * + * @param string $entryAction + */ + public function setEntryAction(string $entryAction) + { + $this->set("EntryAction", $entryAction); + } + + /** + * Description: 描述 + * + * @return string|null + */ + public function getDescription(): string + { + return $this->get("Description"); + } + + /** + * Description: 描述 + * + * @param string $description + */ + public function setDescription(string $description) + { + $this->set("Description", $description); + } + + /** + * TargetType: 应用目标类型。0代表“子网内全部资源”, 1代表“子网内指定资源”。默认为0 + * + * @return integer|null + */ + public function getTargetType(): int + { + return $this->get("TargetType"); + } + + /** + * TargetType: 应用目标类型。0代表“子网内全部资源”, 1代表“子网内指定资源”。默认为0 + * + * @param int $targetType + */ + public function setTargetType(int $targetType) + { + $this->set("TargetType", $targetType); + } + + /** + * TargetResourceIds: 应用目标资源列表。默认为全部资源生效。TargetType为0时不用填写该值 + * + * @return string[]|null + */ + public function getTargetResourceIds(): array + { + return $this->get("TargetResourceIds"); + } + + /** + * TargetResourceIds: 应用目标资源列表。默认为全部资源生效。TargetType为0时不用填写该值 + * + * @param string[] $targetResourceIds + */ + public function setTargetResourceIds(array $targetResourceIds) + { + $this->set("TargetResourceIds", $targetResourceIds); + } +} diff --git a/src/VPC/Apis/UpdateNetworkAclEntryResponse.php b/src/VPC/Apis/UpdateNetworkAclEntryResponse.php new file mode 100644 index 00000000..1f61f211 --- /dev/null +++ b/src/VPC/Apis/UpdateNetworkAclEntryResponse.php @@ -0,0 +1,26 @@ + "UpdateNetworkAcl"]); + $this->markRequired("Region"); + $this->markRequired("AclName"); + $this->markRequired("AclId"); + $this->markRequired("Description"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * AclName: Acl的名称 + * + * @return string|null + */ + public function getAclName(): string + { + return $this->get("AclName"); + } + + /** + * AclName: Acl的名称 + * + * @param string $aclName + */ + public function setAclName(string $aclName) + { + $this->set("AclName", $aclName); + } + + /** + * AclId: 需要更改的ACL ID + * + * @return string|null + */ + public function getAclId(): string + { + return $this->get("AclId"); + } + + /** + * AclId: 需要更改的ACL ID + * + * @param string $aclId + */ + public function setAclId(string $aclId) + { + $this->set("AclId", $aclId); + } + + /** + * Description: 描述 + * + * @return string|null + */ + public function getDescription(): string + { + return $this->get("Description"); + } + + /** + * Description: 描述 + * + * @param string $description + */ + public function setDescription(string $description) + { + $this->set("Description", $description); + } +} diff --git a/src/VPC/Apis/UpdateNetworkAclResponse.php b/src/VPC/Apis/UpdateNetworkAclResponse.php new file mode 100644 index 00000000..bb18deef --- /dev/null +++ b/src/VPC/Apis/UpdateNetworkAclResponse.php @@ -0,0 +1,26 @@ + "UpdateRouteTableAttribute"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("RouteTableId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * RouteTableId: 路由表ID + * + * @return string|null + */ + public function getRouteTableId(): string + { + return $this->get("RouteTableId"); + } + + /** + * RouteTableId: 路由表ID + * + * @param string $routeTableId + */ + public function setRouteTableId(string $routeTableId) + { + $this->set("RouteTableId", $routeTableId); + } + + /** + * Name: 名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } + + /** + * Tag: 业务组名称 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组名称 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } +} diff --git a/src/VPC/Apis/UpdateRouteTableAttributeResponse.php b/src/VPC/Apis/UpdateRouteTableAttributeResponse.php new file mode 100644 index 00000000..f355d2ff --- /dev/null +++ b/src/VPC/Apis/UpdateRouteTableAttributeResponse.php @@ -0,0 +1,26 @@ + "UpdateSnatRule"]); + $this->markRequired("Region"); + $this->markRequired("NATGWId"); + $this->markRequired("SourceIp"); + $this->markRequired("SnatIp"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * NATGWId: NAT网关的ID, + * + * @return string|null + */ + public function getNATGWId(): string + { + return $this->get("NATGWId"); + } + + /** + * NATGWId: NAT网关的ID, + * + * @param string $natgwId + */ + public function setNATGWId(string $natgwId) + { + $this->set("NATGWId", $natgwId); + } + + /** + * SourceIp: 需要出外网的私网IP地址,例如10.9.7.xx + * + * @return string|null + */ + public function getSourceIp(): string + { + return $this->get("SourceIp"); + } + + /** + * SourceIp: 需要出外网的私网IP地址,例如10.9.7.xx + * + * @param string $sourceIp + */ + public function setSourceIp(string $sourceIp) + { + $this->set("SourceIp", $sourceIp); + } + + /** + * SnatIp: EIP的ip地址,例如106.75.xx.xx + * + * @return string|null + */ + public function getSnatIp(): string + { + return $this->get("SnatIp"); + } + + /** + * SnatIp: EIP的ip地址,例如106.75.xx.xx + * + * @param string $snatIp + */ + public function setSnatIp(string $snatIp) + { + $this->set("SnatIp", $snatIp); + } + + /** + * Name: snat名称,即出口规则名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: snat名称,即出口规则名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } +} diff --git a/src/VPC/Apis/UpdateSnatRuleResponse.php b/src/VPC/Apis/UpdateSnatRuleResponse.php new file mode 100644 index 00000000..5fc80b72 --- /dev/null +++ b/src/VPC/Apis/UpdateSnatRuleResponse.php @@ -0,0 +1,26 @@ + "UpdateSubnetAttribute"]); + $this->markRequired("Region"); + $this->markRequired("SubnetId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * SubnetId: 子网ID + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网ID + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * Name: 子网名称(如果Name不填写,Tag必须填写) + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 子网名称(如果Name不填写,Tag必须填写) + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Tag: 业务组名称(如果Tag不填写,Name必须填写) + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组名称(如果Tag不填写,Name必须填写) + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } +} diff --git a/src/VPC/Apis/UpdateSubnetAttributeResponse.php b/src/VPC/Apis/UpdateSubnetAttributeResponse.php new file mode 100644 index 00000000..935fbb6f --- /dev/null +++ b/src/VPC/Apis/UpdateSubnetAttributeResponse.php @@ -0,0 +1,26 @@ + "UpdateVIPAttribute"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("VIPId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VIPId: 内网VIP的资源Id + * + * @return string|null + */ + public function getVIPId(): string + { + return $this->get("VIPId"); + } + + /** + * VIPId: 内网VIP的资源Id + * + * @param string $vipId + */ + public function setVIPId(string $vipId) + { + $this->set("VIPId", $vipId); + } + + /** + * Remark: 内网VIP的备注 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 内网VIP的备注 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } + + /** + * Name: 内网VIP的名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: 内网VIP的名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Tag: 内网VIP所属的业务组 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 内网VIP所属的业务组 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } +} diff --git a/src/VPC/Apis/UpdateVIPAttributeResponse.php b/src/VPC/Apis/UpdateVIPAttributeResponse.php new file mode 100644 index 00000000..09025b89 --- /dev/null +++ b/src/VPC/Apis/UpdateVIPAttributeResponse.php @@ -0,0 +1,26 @@ + "UpdateVPCNetwork"]); + $this->markRequired("Region"); + $this->markRequired("ProjectId"); + $this->markRequired("VPCId"); + $this->markRequired("Network"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion(): string + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion(string $region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId(): string + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VPCId: VPC的ID + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPC的ID + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * Network: 需要保留的VPC网段。当前仅支持删除VPC网段,添加网段请参考[AddVPCNetwork](https://docs.ucloud.cn/api/vpc2.0-api/add_vpc_network) + * + * @return string[]|null + */ + public function getNetwork(): array + { + return $this->get("Network"); + } + + /** + * Network: 需要保留的VPC网段。当前仅支持删除VPC网段,添加网段请参考[AddVPCNetwork](https://docs.ucloud.cn/api/vpc2.0-api/add_vpc_network) + * + * @param string[] $network + */ + public function setNetwork(array $network) + { + $this->set("Network", $network); + } +} diff --git a/src/VPC/Apis/UpdateVPCNetworkResponse.php b/src/VPC/Apis/UpdateVPCNetworkResponse.php new file mode 100644 index 00000000..9be36898 --- /dev/null +++ b/src/VPC/Apis/UpdateVPCNetworkResponse.php @@ -0,0 +1,26 @@ +get("EntryId"); + } + + /** + * EntryId: Entry的ID + * + * @param string $entryId + */ + public function setEntryId(string $entryId) + { + $this->set("EntryId", $entryId); + } + + /** + * Priority: 优先级 + * + * @return string|null + */ + public function getPriority(): string + { + return $this->get("Priority"); + } + + /** + * Priority: 优先级 + * + * @param string $priority + */ + public function setPriority(string $priority) + { + $this->set("Priority", $priority); + } + + /** + * Direction: 出向或者入向 + * + * @return string|null + */ + public function getDirection(): string + { + return $this->get("Direction"); + } + + /** + * Direction: 出向或者入向 + * + * @param string $direction + */ + public function setDirection(string $direction) + { + $this->set("Direction", $direction); + } + + /** + * IpProtocol: 针对的IP协议 + * + * @return string|null + */ + public function getIpProtocol(): string + { + return $this->get("IpProtocol"); + } + + /** + * IpProtocol: 针对的IP协议 + * + * @param string $ipProtocol + */ + public function setIpProtocol(string $ipProtocol) + { + $this->set("IpProtocol", $ipProtocol); + } + + /** + * CidrBlock: IP段的CIDR信息 + * + * @return string|null + */ + public function getCidrBlock(): string + { + return $this->get("CidrBlock"); + } + + /** + * CidrBlock: IP段的CIDR信息 + * + * @param string $cidrBlock + */ + public function setCidrBlock(string $cidrBlock) + { + $this->set("CidrBlock", $cidrBlock); + } + + /** + * PortRange: Port的段信息 + * + * @return string|null + */ + public function getPortRange(): string + { + return $this->get("PortRange"); + } + + /** + * PortRange: Port的段信息 + * + * @param string $portRange + */ + public function setPortRange(string $portRange) + { + $this->set("PortRange", $portRange); + } + + /** + * EntryAction: 匹配规则的动作 + * + * @return string|null + */ + public function getEntryAction(): string + { + return $this->get("EntryAction"); + } + + /** + * EntryAction: 匹配规则的动作 + * + * @param string $entryAction + */ + public function setEntryAction(string $entryAction) + { + $this->set("EntryAction", $entryAction); + } + + /** + * TargetType: 应用目标类型。 0代表“子网内全部资源” ,1代表“子网内指定资源” 。 + * + * @return integer|null + */ + public function getTargetType(): int + { + return $this->get("TargetType"); + } + + /** + * TargetType: 应用目标类型。 0代表“子网内全部资源” ,1代表“子网内指定资源” 。 + * + * @param int $targetType + */ + public function setTargetType(int $targetType) + { + $this->set("TargetType", $targetType); + } + + /** + * CreateTime: 创建的Unix时间戳 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建的Unix时间戳 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * UpdateTime: 更改的Unix时间戳 + * + * @return integer|null + */ + public function getUpdateTime(): int + { + return $this->get("UpdateTime"); + } + + /** + * UpdateTime: 更改的Unix时间戳 + * + * @param int $updateTime + */ + public function setUpdateTime(int $updateTime) + { + $this->set("UpdateTime", $updateTime); + } + + /** + * TargetResourceList: 应用目标资源信息。TargetType为0时不返回该值。具体结构见下方TargetResourceInfo + * + * @return TargetResourceInfo[]|null + */ + public function getTargetResourceList(): array + { + $items = $this->get("TargetResourceList") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new TargetResourceInfo($item)); + } + return $result; + } + + /** + * TargetResourceList: 应用目标资源信息。TargetType为0时不返回该值。具体结构见下方TargetResourceInfo + * + * @param TargetResourceInfo[] $targetResourceList + */ + public function setTargetResourceList(array $targetResourceList) + { + $result = []; + foreach ($targetResourceList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TargetResourceCount: 应用目标资源数量。TargetType为0时不返回该值。 + * + * @return integer|null + */ + public function getTargetResourceCount(): int + { + return $this->get("TargetResourceCount"); + } + + /** + * TargetResourceCount: 应用目标资源数量。TargetType为0时不返回该值。 + * + * @param int $targetResourceCount + */ + public function setTargetResourceCount(int $targetResourceCount) + { + $this->set("TargetResourceCount", $targetResourceCount); + } +} diff --git a/src/VPC/Models/AclInfo.php b/src/VPC/Models/AclInfo.php new file mode 100644 index 00000000..8548a779 --- /dev/null +++ b/src/VPC/Models/AclInfo.php @@ -0,0 +1,202 @@ +get("VpcId"); + } + + /** + * VpcId: ACL所属的VPC ID + * + * @param string $vpcId + */ + public function setVpcId(string $vpcId) + { + $this->set("VpcId", $vpcId); + } + + /** + * AclId: ACL的ID + * + * @return string|null + */ + public function getAclId(): string + { + return $this->get("AclId"); + } + + /** + * AclId: ACL的ID + * + * @param string $aclId + */ + public function setAclId(string $aclId) + { + $this->set("AclId", $aclId); + } + + /** + * AclName: 名称 + * + * @return string|null + */ + public function getAclName(): string + { + return $this->get("AclName"); + } + + /** + * AclName: 名称 + * + * @param string $aclName + */ + public function setAclName(string $aclName) + { + $this->set("AclName", $aclName); + } + + /** + * Description: 描述 + * + * @return string|null + */ + public function getDescription(): string + { + return $this->get("Description"); + } + + /** + * Description: 描述 + * + * @param string $description + */ + public function setDescription(string $description) + { + $this->set("Description", $description); + } + + /** + * Entries: 所有的规则 + * + * @return AclEntryInfo[]|null + */ + public function getEntries(): array + { + $items = $this->get("Entries") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new AclEntryInfo($item)); + } + return $result; + } + + /** + * Entries: 所有的规则 + * + * @param AclEntryInfo[] $entries + */ + public function setEntries(array $entries) + { + $result = []; + foreach ($entries as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * Associations: 所有的绑定关系,具体结构见下方AssociationInfo + * + * @return AssociationInfo[]|null + */ + public function getAssociations(): array + { + $items = $this->get("Associations") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new AssociationInfo($item)); + } + return $result; + } + + /** + * Associations: 所有的绑定关系,具体结构见下方AssociationInfo + * + * @param AssociationInfo[] $associations + */ + public function setAssociations(array $associations) + { + $result = []; + foreach ($associations as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * CreateTime: 创建的Unix时间戳 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建的Unix时间戳 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * UpdateTime: 更改的Unix时间戳 + * + * @return integer|null + */ + public function getUpdateTime(): int + { + return $this->get("UpdateTime"); + } + + /** + * UpdateTime: 更改的Unix时间戳 + * + * @param int $updateTime + */ + public function setUpdateTime(int $updateTime) + { + $this->set("UpdateTime", $updateTime); + } +} diff --git a/src/VPC/Models/AssociationInfo.php b/src/VPC/Models/AssociationInfo.php new file mode 100644 index 00000000..2801893d --- /dev/null +++ b/src/VPC/Models/AssociationInfo.php @@ -0,0 +1,104 @@ +get("AssociationId"); + } + + /** + * AssociationId: 绑定ID + * + * @param string $associationId + */ + public function setAssociationId(string $associationId) + { + $this->set("AssociationId", $associationId); + } + + /** + * AclId: ACL的ID + * + * @return string|null + */ + public function getAclId(): string + { + return $this->get("AclId"); + } + + /** + * AclId: ACL的ID + * + * @param string $aclId + */ + public function setAclId(string $aclId) + { + $this->set("AclId", $aclId); + } + + /** + * SubnetworkId: 绑定的子网ID + * + * @return string|null + */ + public function getSubnetworkId(): string + { + return $this->get("SubnetworkId"); + } + + /** + * SubnetworkId: 绑定的子网ID + * + * @param string $subnetworkId + */ + public function setSubnetworkId(string $subnetworkId) + { + $this->set("SubnetworkId", $subnetworkId); + } + + /** + * CreateTime: 创建的Unix时间戳 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建的Unix时间戳 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } +} diff --git a/src/VPC/Models/DescribeWhiteListResourceObjectIPInfo.php b/src/VPC/Models/DescribeWhiteListResourceObjectIPInfo.php new file mode 100644 index 00000000..1285420e --- /dev/null +++ b/src/VPC/Models/DescribeWhiteListResourceObjectIPInfo.php @@ -0,0 +1,204 @@ +get("GwType"); + } + + /** + * GwType: natgw字符串 + * + * @param string $gwType + */ + public function setGwType(string $gwType) + { + $this->set("GwType", $gwType); + } + + /** + * PrivateIP: 白名单资源的内网IP + * + * @return string|null + */ + public function getPrivateIP(): string + { + return $this->get("PrivateIP"); + } + + /** + * PrivateIP: 白名单资源的内网IP + * + * @param string $privateIP + */ + public function setPrivateIP(string $privateIP) + { + $this->set("PrivateIP", $privateIP); + } + + /** + * ResourceId: 白名单资源Id信息 + * + * @return string|null + */ + public function getResourceId(): string + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: 白名单资源Id信息 + * + * @param string $resourceId + */ + public function setResourceId(string $resourceId) + { + $this->set("ResourceId", $resourceId); + } + + /** + * ResourceName: 白名单资源名称 + * + * @return string|null + */ + public function getResourceName(): string + { + return $this->get("ResourceName"); + } + + /** + * ResourceName: 白名单资源名称 + * + * @param string $resourceName + */ + public function setResourceName(string $resourceName) + { + $this->set("ResourceName", $resourceName); + } + + /** + * ResourceType: 白名单资源类型 + * + * @return string|null + */ + public function getResourceType(): string + { + return $this->get("ResourceType"); + } + + /** + * ResourceType: 白名单资源类型 + * + * @param string $resourceType + */ + public function setResourceType(string $resourceType) + { + $this->set("ResourceType", $resourceType); + } + + /** + * SubResourceId: 资源绑定的虚拟网卡的实例ID + * + * @return string|null + */ + public function getSubResourceId(): string + { + return $this->get("SubResourceId"); + } + + /** + * SubResourceId: 资源绑定的虚拟网卡的实例ID + * + * @param string $subResourceId + */ + public function setSubResourceId(string $subResourceId) + { + $this->set("SubResourceId", $subResourceId); + } + + /** + * SubResourceName: 资源绑定的虚拟网卡的实例名称 + * + * @return string|null + */ + public function getSubResourceName(): string + { + return $this->get("SubResourceName"); + } + + /** + * SubResourceName: 资源绑定的虚拟网卡的实例名称 + * + * @param string $subResourceName + */ + public function setSubResourceName(string $subResourceName) + { + $this->set("SubResourceName", $subResourceName); + } + + /** + * SubResourceType: 资源绑定的虚拟网卡的类型 + * + * @return string|null + */ + public function getSubResourceType(): string + { + return $this->get("SubResourceType"); + } + + /** + * SubResourceType: 资源绑定的虚拟网卡的类型 + * + * @param string $subResourceType + */ + public function setSubResourceType(string $subResourceType) + { + $this->set("SubResourceType", $subResourceType); + } + + /** + * VPCId: 白名单资源所属VPCId + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: 白名单资源所属VPCId + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } +} diff --git a/src/VPC/Models/GetAvailableResourceForPolicyDataSet.php b/src/VPC/Models/GetAvailableResourceForPolicyDataSet.php new file mode 100644 index 00000000..f7634e10 --- /dev/null +++ b/src/VPC/Models/GetAvailableResourceForPolicyDataSet.php @@ -0,0 +1,84 @@ +get("ResourceId"); + } + + /** + * ResourceId: 资源的Id + * + * @param string $resourceId + */ + public function setResourceId(string $resourceId) + { + $this->set("ResourceId", $resourceId); + } + + /** + * PrivateIP: 资源对应的内网Ip + * + * @return string|null + */ + public function getPrivateIP(): string + { + return $this->get("PrivateIP"); + } + + /** + * PrivateIP: 资源对应的内网Ip + * + * @param string $privateIP + */ + public function setPrivateIP(string $privateIP) + { + $this->set("PrivateIP", $privateIP); + } + + /** + * ResourceType: 资源类型。"uhost":云主机; "upm",物理云主机; "hadoophost":hadoop节点; "fortresshost":堡垒机: "udockhost",容器 + * + * @return string|null + */ + public function getResourceType(): string + { + return $this->get("ResourceType"); + } + + /** + * ResourceType: 资源类型。"uhost":云主机; "upm",物理云主机; "hadoophost":hadoop节点; "fortresshost":堡垒机: "udockhost",容器 + * + * @param string $resourceType + */ + public function setResourceType(string $resourceType) + { + $this->set("ResourceType", $resourceType); + } +} diff --git a/src/VPC/Models/GetAvailableResourceForSnatRuleDataSet.php b/src/VPC/Models/GetAvailableResourceForSnatRuleDataSet.php new file mode 100644 index 00000000..1fe3bb2e --- /dev/null +++ b/src/VPC/Models/GetAvailableResourceForSnatRuleDataSet.php @@ -0,0 +1,144 @@ +get("ResourceId"); + } + + /** + * ResourceId: 资源ID + * + * @param string $resourceId + */ + public function setResourceId(string $resourceId) + { + $this->set("ResourceId", $resourceId); + } + + /** + * ResourceName: 资源名称 + * + * @return string|null + */ + public function getResourceName(): string + { + return $this->get("ResourceName"); + } + + /** + * ResourceName: 资源名称 + * + * @param string $resourceName + */ + public function setResourceName(string $resourceName) + { + $this->set("ResourceName", $resourceName); + } + + /** + * PrivateIP: 资源内网IP + * + * @return string|null + */ + public function getPrivateIP(): string + { + return $this->get("PrivateIP"); + } + + /** + * PrivateIP: 资源内网IP + * + * @param string $privateIP + */ + public function setPrivateIP(string $privateIP) + { + $this->set("PrivateIP", $privateIP); + } + + /** + * ResourceType: 资源类型 + * + * @return string|null + */ + public function getResourceType(): string + { + return $this->get("ResourceType"); + } + + /** + * ResourceType: 资源类型 + * + * @param string $resourceType + */ + public function setResourceType(string $resourceType) + { + $this->set("ResourceType", $resourceType); + } + + /** + * SubnetworkId: 资源所属VPC的ID + * + * @return string|null + */ + public function getSubnetworkId(): string + { + return $this->get("SubnetworkId"); + } + + /** + * SubnetworkId: 资源所属VPC的ID + * + * @param string $subnetworkId + */ + public function setSubnetworkId(string $subnetworkId) + { + $this->set("SubnetworkId", $subnetworkId); + } + + /** + * VPCId: 资源所属子网的ID + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: 资源所属子网的ID + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } +} diff --git a/src/VPC/Models/GetAvailableResourceForWhiteListDataSet.php b/src/VPC/Models/GetAvailableResourceForWhiteListDataSet.php new file mode 100644 index 00000000..4d9cee82 --- /dev/null +++ b/src/VPC/Models/GetAvailableResourceForWhiteListDataSet.php @@ -0,0 +1,204 @@ +get("ResourceId"); + } + + /** + * ResourceId: 资源类型Id + * + * @param string $resourceId + */ + public function setResourceId(string $resourceId) + { + $this->set("ResourceId", $resourceId); + } + + /** + * ResourceName: 资源名称 + * + * @return string|null + */ + public function getResourceName(): string + { + return $this->get("ResourceName"); + } + + /** + * ResourceName: 资源名称 + * + * @param string $resourceName + */ + public function setResourceName(string $resourceName) + { + $this->set("ResourceName", $resourceName); + } + + /** + * PrivateIP: 资源的内网Ip + * + * @return string|null + */ + public function getPrivateIP(): string + { + return $this->get("PrivateIP"); + } + + /** + * PrivateIP: 资源的内网Ip + * + * @param string $privateIP + */ + public function setPrivateIP(string $privateIP) + { + $this->set("PrivateIP", $privateIP); + } + + /** + * ResourceType: 资源类型。"uhost":云主机; "upm",物理云主机; "hadoophost":hadoop节点; "fortresshost":堡垒机: "udockhost",容器 + * + * @return string|null + */ + public function getResourceType(): string + { + return $this->get("ResourceType"); + } + + /** + * ResourceType: 资源类型。"uhost":云主机; "upm",物理云主机; "hadoophost":hadoop节点; "fortresshost":堡垒机: "udockhost",容器 + * + * @param string $resourceType + */ + public function setResourceType(string $resourceType) + { + $this->set("ResourceType", $resourceType); + } + + /** + * SubResourceName: 资源绑定的虚拟网卡的实例名称 + * + * @return string|null + */ + public function getSubResourceName(): string + { + return $this->get("SubResourceName"); + } + + /** + * SubResourceName: 资源绑定的虚拟网卡的实例名称 + * + * @param string $subResourceName + */ + public function setSubResourceName(string $subResourceName) + { + $this->set("SubResourceName", $subResourceName); + } + + /** + * VPCId: 资源所属VPCId + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: 资源所属VPCId + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetworkId: 资源所属子网Id + * + * @return string|null + */ + public function getSubnetworkId(): string + { + return $this->get("SubnetworkId"); + } + + /** + * SubnetworkId: 资源所属子网Id + * + * @param string $subnetworkId + */ + public function setSubnetworkId(string $subnetworkId) + { + $this->set("SubnetworkId", $subnetworkId); + } + + /** + * SubResourceId: 资源绑定的虚拟网卡的实例ID + * + * @return string|null + */ + public function getSubResourceId(): string + { + return $this->get("SubResourceId"); + } + + /** + * SubResourceId: 资源绑定的虚拟网卡的实例ID + * + * @param string $subResourceId + */ + public function setSubResourceId(string $subResourceId) + { + $this->set("SubResourceId", $subResourceId); + } + + /** + * SubResourceType: 资源绑定的虚拟网卡的实例类型 + * + * @return string|null + */ + public function getSubResourceType(): string + { + return $this->get("SubResourceType"); + } + + /** + * SubResourceType: 资源绑定的虚拟网卡的实例类型 + * + * @param string $subResourceType + */ + public function setSubResourceType(string $subResourceType) + { + $this->set("SubResourceType", $subResourceType); + } +} diff --git a/src/VPC/Models/IpInfo.php b/src/VPC/Models/IpInfo.php new file mode 100644 index 00000000..6ff629b0 --- /dev/null +++ b/src/VPC/Models/IpInfo.php @@ -0,0 +1,144 @@ +get("Ip"); + } + + /** + * Ip: + * + * @param string $ip + */ + public function setIp(string $ip) + { + $this->set("Ip", $ip); + } + + /** + * Mask: + * + * @return string|null + */ + public function getMask(): string + { + return $this->get("Mask"); + } + + /** + * Mask: + * + * @param string $mask + */ + public function setMask(string $mask) + { + $this->set("Mask", $mask); + } + + /** + * Gateway: + * + * @return string|null + */ + public function getGateway(): string + { + return $this->get("Gateway"); + } + + /** + * Gateway: + * + * @param string $gateway + */ + public function setGateway(string $gateway) + { + $this->set("Gateway", $gateway); + } + + /** + * Mac: + * + * @return string|null + */ + public function getMac(): string + { + return $this->get("Mac"); + } + + /** + * Mac: + * + * @param string $mac + */ + public function setMac(string $mac) + { + $this->set("Mac", $mac); + } + + /** + * SubnetId: + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * VPCId: + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } +} diff --git a/src/VPC/Models/NATGWPolicyDataSet.php b/src/VPC/Models/NATGWPolicyDataSet.php new file mode 100644 index 00000000..7bc6d545 --- /dev/null +++ b/src/VPC/Models/NATGWPolicyDataSet.php @@ -0,0 +1,204 @@ +get("NATGWId"); + } + + /** + * NATGWId: NAT网关Id + * + * @param string $natgwId + */ + public function setNATGWId(string $natgwId) + { + $this->set("NATGWId", $natgwId); + } + + /** + * PolicyId: 转发策略Id + * + * @return string|null + */ + public function getPolicyId(): string + { + return $this->get("PolicyId"); + } + + /** + * PolicyId: 转发策略Id + * + * @param string $policyId + */ + public function setPolicyId(string $policyId) + { + $this->set("PolicyId", $policyId); + } + + /** + * Protocol: 协议类型 + * + * @return string|null + */ + public function getProtocol(): string + { + return $this->get("Protocol"); + } + + /** + * Protocol: 协议类型 + * + * @param string $protocol + */ + public function setProtocol(string $protocol) + { + $this->set("Protocol", $protocol); + } + + /** + * SrcEIP: 端口转发前端EIP + * + * @return string|null + */ + public function getSrcEIP(): string + { + return $this->get("SrcEIP"); + } + + /** + * SrcEIP: 端口转发前端EIP + * + * @param string $srcEIP + */ + public function setSrcEIP(string $srcEIP) + { + $this->set("SrcEIP", $srcEIP); + } + + /** + * SrcEIPId: 端口转发前端EIP Id + * + * @return string|null + */ + public function getSrcEIPId(): string + { + return $this->get("SrcEIPId"); + } + + /** + * SrcEIPId: 端口转发前端EIP Id + * + * @param string $srcEIPId + */ + public function setSrcEIPId(string $srcEIPId) + { + $this->set("SrcEIPId", $srcEIPId); + } + + /** + * SrcPort: 源端口 + * + * @return string|null + */ + public function getSrcPort(): string + { + return $this->get("SrcPort"); + } + + /** + * SrcPort: 源端口 + * + * @param string $srcPort + */ + public function setSrcPort(string $srcPort) + { + $this->set("SrcPort", $srcPort); + } + + /** + * DstIP: 目的地址 + * + * @return string|null + */ + public function getDstIP(): string + { + return $this->get("DstIP"); + } + + /** + * DstIP: 目的地址 + * + * @param string $dstIP + */ + public function setDstIP(string $dstIP) + { + $this->set("DstIP", $dstIP); + } + + /** + * DstPort: 目的端口 + * + * @return string|null + */ + public function getDstPort(): string + { + return $this->get("DstPort"); + } + + /** + * DstPort: 目的端口 + * + * @param string $dstPort + */ + public function setDstPort(string $dstPort) + { + $this->set("DstPort", $dstPort); + } + + /** + * PolicyName: 转发策略名称 + * + * @return string|null + */ + public function getPolicyName(): string + { + return $this->get("PolicyName"); + } + + /** + * PolicyName: 转发策略名称 + * + * @param string $policyName + */ + public function setPolicyName(string $policyName) + { + $this->set("PolicyName", $policyName); + } +} diff --git a/src/VPC/Models/NATGWSnatRule.php b/src/VPC/Models/NATGWSnatRule.php new file mode 100644 index 00000000..4fb1539f --- /dev/null +++ b/src/VPC/Models/NATGWSnatRule.php @@ -0,0 +1,104 @@ +get("SnatIp"); + } + + /** + * SnatIp: EIP地址,如106.76.xx.xx + * + * @param string $snatIp + */ + public function setSnatIp(string $snatIp) + { + $this->set("SnatIp", $snatIp); + } + + /** + * SourceIp: 资源的内网IP地址 + * + * @return string|null + */ + public function getSourceIp(): string + { + return $this->get("SourceIp"); + } + + /** + * SourceIp: 资源的内网IP地址 + * + * @param string $sourceIp + */ + public function setSourceIp(string $sourceIp) + { + $this->set("SourceIp", $sourceIp); + } + + /** + * SubnetworkId: SourceIp所属的子网id + * + * @return string|null + */ + public function getSubnetworkId(): string + { + return $this->get("SubnetworkId"); + } + + /** + * SubnetworkId: SourceIp所属的子网id + * + * @param string $subnetworkId + */ + public function setSubnetworkId(string $subnetworkId) + { + $this->set("SubnetworkId", $subnetworkId); + } + + /** + * Name: snat规则名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: snat规则名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } +} diff --git a/src/VPC/Models/NatGWIPResInfo.php b/src/VPC/Models/NatGWIPResInfo.php new file mode 100644 index 00000000..389515b7 --- /dev/null +++ b/src/VPC/Models/NatGWIPResInfo.php @@ -0,0 +1,64 @@ +get("OperatorName"); + } + + /** + * OperatorName: IP的运营商信息 + * + * @param string $operatorName + */ + public function setOperatorName(string $operatorName) + { + $this->set("OperatorName", $operatorName); + } + + /** + * EIP: 外网IP + * + * @return string|null + */ + public function getEIP(): string + { + return $this->get("EIP"); + } + + /** + * EIP: 外网IP + * + * @param string $eip + */ + public function setEIP(string $eip) + { + $this->set("EIP", $eip); + } +} diff --git a/src/VPC/Models/NatGWWhitelistDataSet.php b/src/VPC/Models/NatGWWhitelistDataSet.php new file mode 100644 index 00000000..fddb75eb --- /dev/null +++ b/src/VPC/Models/NatGWWhitelistDataSet.php @@ -0,0 +1,93 @@ +get("NATGWId"); + } + + /** + * NATGWId: NATGateWay Id + * + * @param string $natgwId + */ + public function setNATGWId(string $natgwId) + { + $this->set("NATGWId", $natgwId); + } + + /** + * IfOpen: 白名单开关标记 + * + * @return integer|null + */ + public function getIfOpen(): int + { + return $this->get("IfOpen"); + } + + /** + * IfOpen: 白名单开关标记 + * + * @param int $ifOpen + */ + public function setIfOpen(int $ifOpen) + { + $this->set("IfOpen", $ifOpen); + } + + /** + * ObjectIPInfo: 白名单详情 + * + * @return DescribeWhiteListResourceObjectIPInfo[]|null + */ + public function getObjectIPInfo(): array + { + $items = $this->get("ObjectIPInfo") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new DescribeWhiteListResourceObjectIPInfo($item)); + } + return $result; + } + + /** + * ObjectIPInfo: 白名单详情 + * + * @param DescribeWhiteListResourceObjectIPInfo[] $objectIPInfo + */ + public function setObjectIPInfo(array $objectIPInfo) + { + $result = []; + foreach ($objectIPInfo as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/VPC/Models/NatGatewayDataSet.php b/src/VPC/Models/NatGatewayDataSet.php new file mode 100644 index 00000000..7ca65aa2 --- /dev/null +++ b/src/VPC/Models/NatGatewayDataSet.php @@ -0,0 +1,242 @@ +get("NATGWId"); + } + + /** + * NATGWId: natgw id + * + * @param string $natgwId + */ + public function setNATGWId(string $natgwId) + { + $this->set("NATGWId", $natgwId); + } + + /** + * NATGWName: natgw名称 + * + * @return string|null + */ + public function getNATGWName(): string + { + return $this->get("NATGWName"); + } + + /** + * NATGWName: natgw名称 + * + * @param string $natgwName + */ + public function setNATGWName(string $natgwName) + { + $this->set("NATGWName", $natgwName); + } + + /** + * CreateTime: natgw创建时间 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: natgw创建时间 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * Tag: 业务组 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } + + /** + * FirewallId: 绑定的防火墙Id + * + * @return string|null + */ + public function getFirewallId(): string + { + return $this->get("FirewallId"); + } + + /** + * FirewallId: 绑定的防火墙Id + * + * @param string $firewallId + */ + public function setFirewallId(string $firewallId) + { + $this->set("FirewallId", $firewallId); + } + + /** + * VPCId: 所属VPC Id + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: 所属VPC Id + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetSet: 子网 Id + * + * @return NatGatewaySubnetSet[]|null + */ + public function getSubnetSet(): array + { + $items = $this->get("SubnetSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new NatGatewaySubnetSet($item)); + } + return $result; + } + + /** + * SubnetSet: 子网 Id + * + * @param NatGatewaySubnetSet[] $subnetSet + */ + public function setSubnetSet(array $subnetSet) + { + $result = []; + foreach ($subnetSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * IPSet: 绑定的EIP 信息 + * + * @return NatGatewayIPSet[]|null + */ + public function getIPSet(): array + { + $items = $this->get("IPSet") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new NatGatewayIPSet($item)); + } + return $result; + } + + /** + * IPSet: 绑定的EIP 信息 + * + * @param NatGatewayIPSet[] $ipSet + */ + public function setIPSet(array $ipSet) + { + $result = []; + foreach ($ipSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * PolicyId: 转发策略Id + * + * @return string[]|null + */ + public function getPolicyId(): array + { + return $this->get("PolicyId"); + } + + /** + * PolicyId: 转发策略Id + * + * @param string[] $policyId + */ + public function setPolicyId(array $policyId) + { + $this->set("PolicyId", $policyId); + } +} diff --git a/src/VPC/Models/NatGatewayIPSet.php b/src/VPC/Models/NatGatewayIPSet.php new file mode 100644 index 00000000..942bcdbe --- /dev/null +++ b/src/VPC/Models/NatGatewayIPSet.php @@ -0,0 +1,133 @@ +get("EIPId"); + } + + /** + * EIPId: 外网IP的 EIPId + * + * @param string $eipId + */ + public function setEIPId(string $eipId) + { + $this->set("EIPId", $eipId); + } + + /** + * Weight: 权重为100的为出口 + * + * @return integer|null + */ + public function getWeight(): int + { + return $this->get("Weight"); + } + + /** + * Weight: 权重为100的为出口 + * + * @param int $weight + */ + public function setWeight(int $weight) + { + $this->set("Weight", $weight); + } + + /** + * BandwidthType: EIP带宽类型 + * + * @return string|null + */ + public function getBandwidthType(): string + { + return $this->get("BandwidthType"); + } + + /** + * BandwidthType: EIP带宽类型 + * + * @param string $bandwidthType + */ + public function setBandwidthType(string $bandwidthType) + { + $this->set("BandwidthType", $bandwidthType); + } + + /** + * Bandwidth: 带宽 + * + * @return integer|null + */ + public function getBandwidth(): int + { + return $this->get("Bandwidth"); + } + + /** + * Bandwidth: 带宽 + * + * @param int $bandwidth + */ + public function setBandwidth(int $bandwidth) + { + $this->set("Bandwidth", $bandwidth); + } + + /** + * IPResInfo: 外网IP信息 + * + * @return NatGWIPResInfo[]|null + */ + public function getIPResInfo(): array + { + $items = $this->get("IPResInfo") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new NatGWIPResInfo($item)); + } + return $result; + } + + /** + * IPResInfo: 外网IP信息 + * + * @param NatGWIPResInfo[] $ipResInfo + */ + public function setIPResInfo(array $ipResInfo) + { + $result = []; + foreach ($ipResInfo as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/VPC/Models/NatGatewaySubnetSet.php b/src/VPC/Models/NatGatewaySubnetSet.php new file mode 100644 index 00000000..4d75c02e --- /dev/null +++ b/src/VPC/Models/NatGatewaySubnetSet.php @@ -0,0 +1,84 @@ +get("SubnetworkId"); + } + + /** + * SubnetworkId: 子网id + * + * @param string $subnetworkId + */ + public function setSubnetworkId(string $subnetworkId) + { + $this->set("SubnetworkId", $subnetworkId); + } + + /** + * Subnet: 子网网段 + * + * @return string|null + */ + public function getSubnet(): string + { + return $this->get("Subnet"); + } + + /** + * Subnet: 子网网段 + * + * @param string $subnet + */ + public function setSubnet(string $subnet) + { + $this->set("Subnet", $subnet); + } + + /** + * SubnetName: 子网名字 + * + * @return string|null + */ + public function getSubnetName(): string + { + return $this->get("SubnetName"); + } + + /** + * SubnetName: 子网名字 + * + * @param string $subnetName + */ + public function setSubnetName(string $subnetName) + { + $this->set("SubnetName", $subnetName); + } +} diff --git a/src/VPC/Models/NatgwSubnetDataSet.php b/src/VPC/Models/NatgwSubnetDataSet.php new file mode 100644 index 00000000..60735112 --- /dev/null +++ b/src/VPC/Models/NatgwSubnetDataSet.php @@ -0,0 +1,124 @@ +get("SubnetId"); + } + + /** + * SubnetId: 子网id + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * Subnet: 子网网段 + * + * @return string|null + */ + public function getSubnet(): string + { + return $this->get("Subnet"); + } + + /** + * Subnet: 子网网段 + * + * @param string $subnet + */ + public function setSubnet(string $subnet) + { + $this->set("Subnet", $subnet); + } + + /** + * Netmask: 掩码 + * + * @return string|null + */ + public function getNetmask(): string + { + return $this->get("Netmask"); + } + + /** + * Netmask: 掩码 + * + * @param string $netmask + */ + public function setNetmask(string $netmask) + { + $this->set("Netmask", $netmask); + } + + /** + * SubnetName: 子网名字 + * + * @return string|null + */ + public function getSubnetName(): string + { + return $this->get("SubnetName"); + } + + /** + * SubnetName: 子网名字 + * + * @param string $subnetName + */ + public function setSubnetName(string $subnetName) + { + $this->set("SubnetName", $subnetName); + } + + /** + * HasNATGW: 是否绑定NATGW + * + * @return boolean|null + */ + public function getHasNATGW(): bool + { + return $this->get("HasNATGW"); + } + + /** + * HasNATGW: 是否绑定NATGW + * + * @param boolean $hasNATGW + */ + public function setHasNATGW(bool $hasNATGW) + { + $this->set("HasNATGW", $hasNATGW); + } +} diff --git a/src/VPC/Models/RouteRuleInfo.php b/src/VPC/Models/RouteRuleInfo.php new file mode 100644 index 00000000..47c92114 --- /dev/null +++ b/src/VPC/Models/RouteRuleInfo.php @@ -0,0 +1,304 @@ +get("AccountId"); + } + + /** + * AccountId: 项目ID信息 + * + * @param int $accountId + */ + public function setAccountId(int $accountId) + { + $this->set("AccountId", $accountId); + } + + /** + * DstAddr: 目的地址 + * + * @return string|null + */ + public function getDstAddr(): string + { + return $this->get("DstAddr"); + } + + /** + * DstAddr: 目的地址 + * + * @param string $dstAddr + */ + public function setDstAddr(string $dstAddr) + { + $this->set("DstAddr", $dstAddr); + } + + /** + * DstPort: 保留字段,暂未使用 + * + * @return integer|null + */ + public function getDstPort(): int + { + return $this->get("DstPort"); + } + + /** + * DstPort: 保留字段,暂未使用 + * + * @param int $dstPort + */ + public function setDstPort(int $dstPort) + { + $this->set("DstPort", $dstPort); + } + + /** + * NexthopId: 路由下一跳资源ID + * + * @return string|null + */ + public function getNexthopId(): string + { + return $this->get("NexthopId"); + } + + /** + * NexthopId: 路由下一跳资源ID + * + * @param string $nexthopId + */ + public function setNexthopId(string $nexthopId) + { + $this->set("NexthopId", $nexthopId); + } + + /** + * NexthopType: 路由表下一跳类型。LOCAL,本VPC内部通信路由;PUBLIC,公共服务路由;CNAT,外网路由;UDPN,跨域高速通道路由;HYBRIDGW,混合云路由;INSTANCE,实例路由;VNET,VPC联通路由;IPSEC VPN,指向VPN网关的路由。 + * + * @return string|null + */ + public function getNexthopType(): string + { + return $this->get("NexthopType"); + } + + /** + * NexthopType: 路由表下一跳类型。LOCAL,本VPC内部通信路由;PUBLIC,公共服务路由;CNAT,外网路由;UDPN,跨域高速通道路由;HYBRIDGW,混合云路由;INSTANCE,实例路由;VNET,VPC联通路由;IPSEC VPN,指向VPN网关的路由。 + * + * @param string $nexthopType + */ + public function setNexthopType(string $nexthopType) + { + $this->set("NexthopType", $nexthopType); + } + + /** + * OriginAddr: 保留字段,暂未使用 + * + * @return string|null + */ + public function getOriginAddr(): string + { + return $this->get("OriginAddr"); + } + + /** + * OriginAddr: 保留字段,暂未使用 + * + * @param string $originAddr + */ + public function setOriginAddr(string $originAddr) + { + $this->set("OriginAddr", $originAddr); + } + + /** + * Priority: 保留字段,暂未使用 + * + * @return integer|null + */ + public function getPriority(): int + { + return $this->get("Priority"); + } + + /** + * Priority: 保留字段,暂未使用 + * + * @param int $priority + */ + public function setPriority(int $priority) + { + $this->set("Priority", $priority); + } + + /** + * Remark: 路由规则备注 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 路由规则备注 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } + + /** + * RouteRuleId: 规则ID + * + * @return string|null + */ + public function getRouteRuleId(): string + { + return $this->get("RouteRuleId"); + } + + /** + * RouteRuleId: 规则ID + * + * @param string $routeRuleId + */ + public function setRouteRuleId(string $routeRuleId) + { + $this->set("RouteRuleId", $routeRuleId); + } + + /** + * RouteTableId: 路由表资源ID + * + * @return string|null + */ + public function getRouteTableId(): string + { + return $this->get("RouteTableId"); + } + + /** + * RouteTableId: 路由表资源ID + * + * @param string $routeTableId + */ + public function setRouteTableId(string $routeTableId) + { + $this->set("RouteTableId", $routeTableId); + } + + /** + * RuleType: 路由规则类型。0,系统路由规则;1,自定义路由规则 + * + * @return integer|null + */ + public function getRuleType(): int + { + return $this->get("RuleType"); + } + + /** + * RuleType: 路由规则类型。0,系统路由规则;1,自定义路由规则 + * + * @param int $ruleType + */ + public function setRuleType(int $ruleType) + { + $this->set("RuleType", $ruleType); + } + + /** + * SrcAddr: 保留字段,暂未使用 + * + * @return string|null + */ + public function getSrcAddr(): string + { + return $this->get("SrcAddr"); + } + + /** + * SrcAddr: 保留字段,暂未使用 + * + * @param string $srcAddr + */ + public function setSrcAddr(string $srcAddr) + { + $this->set("SrcAddr", $srcAddr); + } + + /** + * SrcPort: 保留字段,暂未使用 + * + * @return integer|null + */ + public function getSrcPort(): int + { + return $this->get("SrcPort"); + } + + /** + * SrcPort: 保留字段,暂未使用 + * + * @param int $srcPort + */ + public function setSrcPort(int $srcPort) + { + $this->set("SrcPort", $srcPort); + } + + /** + * VNetId: 所属的VPC + * + * @return string|null + */ + public function getVNetId(): string + { + return $this->get("VNetId"); + } + + /** + * VNetId: 所属的VPC + * + * @param string $vNetId + */ + public function setVNetId(string $vNetId) + { + $this->set("VNetId", $vNetId); + } +} diff --git a/src/VPC/Models/RouteTableInfo.php b/src/VPC/Models/RouteTableInfo.php new file mode 100644 index 00000000..d1a10b64 --- /dev/null +++ b/src/VPC/Models/RouteTableInfo.php @@ -0,0 +1,213 @@ +get("RouteTableId"); + } + + /** + * RouteTableId: 路由表资源ID + * + * @param string $routeTableId + */ + public function setRouteTableId(string $routeTableId) + { + $this->set("RouteTableId", $routeTableId); + } + + /** + * RouteTableType: 路由表类型。1为默认路由表,0为自定义路由表 + * + * @return integer|null + */ + public function getRouteTableType(): int + { + return $this->get("RouteTableType"); + } + + /** + * RouteTableType: 路由表类型。1为默认路由表,0为自定义路由表 + * + * @param int $routeTableType + */ + public function setRouteTableType(int $routeTableType) + { + $this->set("RouteTableType", $routeTableType); + } + + /** + * SubnetCount: 绑定该路由表的子网数量 + * + * @return integer|null + */ + public function getSubnetCount(): int + { + return $this->get("SubnetCount"); + } + + /** + * SubnetCount: 绑定该路由表的子网数量 + * + * @param int $subnetCount + */ + public function setSubnetCount(int $subnetCount) + { + $this->set("SubnetCount", $subnetCount); + } + + /** + * VPCId: 路由表所属的VPC资源ID + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: 路由表所属的VPC资源ID + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * VPCName: 路由表所属的VPC资源名称 + * + * @return string|null + */ + public function getVPCName(): string + { + return $this->get("VPCName"); + } + + /** + * VPCName: 路由表所属的VPC资源名称 + * + * @param string $vpcName + */ + public function setVPCName(string $vpcName) + { + $this->set("VPCName", $vpcName); + } + + /** + * Tag: 路由表所属业务组 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 路由表所属业务组 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Remark: 路由表备注 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 路由表备注 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } + + /** + * CreateTime: 创建时间戳 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间戳 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * RouteRules: 路由规则 + * + * @return RouteRuleInfo[]|null + */ + public function getRouteRules(): array + { + $items = $this->get("RouteRules") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new RouteRuleInfo($item)); + } + return $result; + } + + /** + * RouteRules: 路由规则 + * + * @param RouteRuleInfo[] $routeRules + */ + public function setRouteRules(array $routeRules) + { + $result = []; + foreach ($routeRules as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/VPC/Models/SubnetInfo.php b/src/VPC/Models/SubnetInfo.php new file mode 100644 index 00000000..ae67a458 --- /dev/null +++ b/src/VPC/Models/SubnetInfo.php @@ -0,0 +1,344 @@ +get("Zone"); + } + + /** + * Zone: 可用区名称 + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * IPv6Network: 子网关联的IPv6网段 + * + * @return string|null + */ + public function getIPv6Network(): string + { + return $this->get("IPv6Network"); + } + + /** + * IPv6Network: 子网关联的IPv6网段 + * + * @param string $iPv6Network + */ + public function setIPv6Network(string $iPv6Network) + { + $this->set("IPv6Network", $iPv6Network); + } + + /** + * VPCId: VPCId + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPCId + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * VPCName: VPC名称 + * + * @return string|null + */ + public function getVPCName(): string + { + return $this->get("VPCName"); + } + + /** + * VPCName: VPC名称 + * + * @param string $vpcName + */ + public function setVPCName(string $vpcName) + { + $this->set("VPCName", $vpcName); + } + + /** + * SubnetId: 子网Id + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网Id + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * SubnetName: 子网名称 + * + * @return string|null + */ + public function getSubnetName(): string + { + return $this->get("SubnetName"); + } + + /** + * SubnetName: 子网名称 + * + * @param string $subnetName + */ + public function setSubnetName(string $subnetName) + { + $this->set("SubnetName", $subnetName); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } + + /** + * Tag: 业务组 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * SubnetType: 子网类型 + * + * @return integer|null + */ + public function getSubnetType(): int + { + return $this->get("SubnetType"); + } + + /** + * SubnetType: 子网类型 + * + * @param int $subnetType + */ + public function setSubnetType(int $subnetType) + { + $this->set("SubnetType", $subnetType); + } + + /** + * Subnet: 子网网段 + * + * @return string|null + */ + public function getSubnet(): string + { + return $this->get("Subnet"); + } + + /** + * Subnet: 子网网段 + * + * @param string $subnet + */ + public function setSubnet(string $subnet) + { + $this->set("Subnet", $subnet); + } + + /** + * Netmask: 子网掩码 + * + * @return string|null + */ + public function getNetmask(): string + { + return $this->get("Netmask"); + } + + /** + * Netmask: 子网掩码 + * + * @param string $netmask + */ + public function setNetmask(string $netmask) + { + $this->set("Netmask", $netmask); + } + + /** + * Gateway: 子网网关 + * + * @return string|null + */ + public function getGateway(): string + { + return $this->get("Gateway"); + } + + /** + * Gateway: 子网网关 + * + * @param string $gateway + */ + public function setGateway(string $gateway) + { + $this->set("Gateway", $gateway); + } + + /** + * CreateTime: 创建时间 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * HasNATGW: 是否有natgw + * + * @return boolean|null + */ + public function getHasNATGW(): bool + { + return $this->get("HasNATGW"); + } + + /** + * HasNATGW: 是否有natgw + * + * @param boolean $hasNATGW + */ + public function setHasNATGW(bool $hasNATGW) + { + $this->set("HasNATGW", $hasNATGW); + } + + /** + * RouteTableId: 路由表Id + * + * @return string|null + */ + public function getRouteTableId(): string + { + return $this->get("RouteTableId"); + } + + /** + * RouteTableId: 路由表Id + * + * @param string $routeTableId + */ + public function setRouteTableId(string $routeTableId) + { + $this->set("RouteTableId", $routeTableId); + } + + /** + * AvailableIPs: 可用IP数量 + * + * @return integer|null + */ + public function getAvailableIPs(): int + { + return $this->get("AvailableIPs"); + } + + /** + * AvailableIPs: 可用IP数量 + * + * @param int $availableIPs + */ + public function setAvailableIPs(int $availableIPs) + { + $this->set("AvailableIPs", $availableIPs); + } +} diff --git a/src/VPC/Models/SubnetResource.php b/src/VPC/Models/SubnetResource.php new file mode 100644 index 00000000..8a63e003 --- /dev/null +++ b/src/VPC/Models/SubnetResource.php @@ -0,0 +1,104 @@ +get("Name"); + } + + /** + * Name: 名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * ResourceId: 资源Id + * + * @return string|null + */ + public function getResourceId(): string + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: 资源Id + * + * @param string $resourceId + */ + public function setResourceId(string $resourceId) + { + $this->set("ResourceId", $resourceId); + } + + /** + * ResourceType: 资源类型。对应的资源类型:UHOST,云主机;PHOST,物理云主机;ULB,负载均衡;UHADOOP_HOST,hadoop节点;UFORTRESS_HOST,堡垒机;UNATGW,NAT网关;UKAFKA,分布式消息系统;UMEM,内存存储;DOCKER,容器集群;UDB,数据库;UDW,数据仓库;VIP,内网VIP. + * + * @return string|null + */ + public function getResourceType(): string + { + return $this->get("ResourceType"); + } + + /** + * ResourceType: 资源类型。对应的资源类型:UHOST,云主机;PHOST,物理云主机;ULB,负载均衡;UHADOOP_HOST,hadoop节点;UFORTRESS_HOST,堡垒机;UNATGW,NAT网关;UKAFKA,分布式消息系统;UMEM,内存存储;DOCKER,容器集群;UDB,数据库;UDW,数据仓库;VIP,内网VIP. + * + * @param string $resourceType + */ + public function setResourceType(string $resourceType) + { + $this->set("ResourceType", $resourceType); + } + + /** + * IP: 资源ip + * + * @return string|null + */ + public function getIP(): string + { + return $this->get("IP"); + } + + /** + * IP: 资源ip + * + * @param string $ip + */ + public function setIP(string $ip) + { + $this->set("IP", $ip); + } +} diff --git a/src/VPC/Models/TargetResourceInfo.php b/src/VPC/Models/TargetResourceInfo.php new file mode 100644 index 00000000..395c5605 --- /dev/null +++ b/src/VPC/Models/TargetResourceInfo.php @@ -0,0 +1,184 @@ +get("SubnetworkId"); + } + + /** + * SubnetworkId: 子网ID + * + * @param string $subnetworkId + */ + public function setSubnetworkId(string $subnetworkId) + { + $this->set("SubnetworkId", $subnetworkId); + } + + /** + * ResourceName: 资源名称 + * + * @return string|null + */ + public function getResourceName(): string + { + return $this->get("ResourceName"); + } + + /** + * ResourceName: 资源名称 + * + * @param string $resourceName + */ + public function setResourceName(string $resourceName) + { + $this->set("ResourceName", $resourceName); + } + + /** + * ResourceId: 资源ID + * + * @return string|null + */ + public function getResourceId(): string + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: 资源ID + * + * @param string $resourceId + */ + public function setResourceId(string $resourceId) + { + $this->set("ResourceId", $resourceId); + } + + /** + * ResourceType: 资源类型 + * + * @return integer|null + */ + public function getResourceType(): int + { + return $this->get("ResourceType"); + } + + /** + * ResourceType: 资源类型 + * + * @param int $resourceType + */ + public function setResourceType(int $resourceType) + { + $this->set("ResourceType", $resourceType); + } + + /** + * SubResourceName: 资源绑定的虚拟网卡的名称 + * + * @return string|null + */ + public function getSubResourceName(): string + { + return $this->get("SubResourceName"); + } + + /** + * SubResourceName: 资源绑定的虚拟网卡的名称 + * + * @param string $subResourceName + */ + public function setSubResourceName(string $subResourceName) + { + $this->set("SubResourceName", $subResourceName); + } + + /** + * SubResourceId: 资源绑定的虚拟网卡的ID + * + * @return string|null + */ + public function getSubResourceId(): string + { + return $this->get("SubResourceId"); + } + + /** + * SubResourceId: 资源绑定的虚拟网卡的ID + * + * @param string $subResourceId + */ + public function setSubResourceId(string $subResourceId) + { + $this->set("SubResourceId", $subResourceId); + } + + /** + * SubResourceType: 资源绑定虚拟网卡的类型 + * + * @return integer|null + */ + public function getSubResourceType(): int + { + return $this->get("SubResourceType"); + } + + /** + * SubResourceType: 资源绑定虚拟网卡的类型 + * + * @param int $subResourceType + */ + public function setSubResourceType(int $subResourceType) + { + $this->set("SubResourceType", $subResourceType); + } + + /** + * PrivateIp: 资源内网IP + * + * @return string|null + */ + public function getPrivateIp(): string + { + return $this->get("PrivateIp"); + } + + /** + * PrivateIp: 资源内网IP + * + * @param string $privateIp + */ + public function setPrivateIp(string $privateIp) + { + $this->set("PrivateIp", $privateIp); + } +} diff --git a/src/VPC/Models/VIPDetailSet.php b/src/VPC/Models/VIPDetailSet.php new file mode 100644 index 00000000..52fc999f --- /dev/null +++ b/src/VPC/Models/VIPDetailSet.php @@ -0,0 +1,224 @@ +get("Zone"); + } + + /** + * Zone: 地域 + * + * @param string $zone + */ + public function setZone(string $zone) + { + $this->set("Zone", $zone); + } + + /** + * VIPId: 虚拟ip id + * + * @return string|null + */ + public function getVIPId(): string + { + return $this->get("VIPId"); + } + + /** + * VIPId: 虚拟ip id + * + * @param string $vipId + */ + public function setVIPId(string $vipId) + { + $this->set("VIPId", $vipId); + } + + /** + * CreateTime: 创建时间 + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * RealIp: 真实主机ip + * + * @return string|null + */ + public function getRealIp(): string + { + return $this->get("RealIp"); + } + + /** + * RealIp: 真实主机ip + * + * @param string $realIp + */ + public function setRealIp(string $realIp) + { + $this->set("RealIp", $realIp); + } + + /** + * VIP: 虚拟ip + * + * @return string|null + */ + public function getVIP(): string + { + return $this->get("VIP"); + } + + /** + * VIP: 虚拟ip + * + * @param string $vip + */ + public function setVIP(string $vip) + { + $this->set("VIP", $vip); + } + + /** + * SubnetId: 子网id + * + * @return string|null + */ + public function getSubnetId(): string + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网id + * + * @param string $subnetId + */ + public function setSubnetId(string $subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * VPCId: VPC id + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPC id + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * Name: VIP名称 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: VIP名称 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * Remark: VIP备注 + * + * @return string|null + */ + public function getRemark(): string + { + return $this->get("Remark"); + } + + /** + * Remark: VIP备注 + * + * @param string $remark + */ + public function setRemark(string $remark) + { + $this->set("Remark", $remark); + } + + /** + * Tag: VIP所属业务组 + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: VIP所属业务组 + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } +} diff --git a/src/VPC/Models/VIPSet.php b/src/VPC/Models/VIPSet.php new file mode 100644 index 00000000..a8e12232 --- /dev/null +++ b/src/VPC/Models/VIPSet.php @@ -0,0 +1,84 @@ +get("VIP"); + } + + /** + * VIP: 虚拟ip + * + * @param string $vip + */ + public function setVIP(string $vip) + { + $this->set("VIP", $vip); + } + + /** + * VIPId: 虚拟ip id + * + * @return string|null + */ + public function getVIPId(): string + { + return $this->get("VIPId"); + } + + /** + * VIPId: 虚拟ip id + * + * @param string $vipId + */ + public function setVIPId(string $vipId) + { + $this->set("VIPId", $vipId); + } + + /** + * VPCId: VPC id + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPC id + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } +} diff --git a/src/VPC/Models/VPCInfo.php b/src/VPC/Models/VPCInfo.php new file mode 100644 index 00000000..fbd9c8c7 --- /dev/null +++ b/src/VPC/Models/VPCInfo.php @@ -0,0 +1,233 @@ +get("NetworkInfo") ?? []; + $result = []; + foreach ($items as $i => $item) { + array_push($result, new VPCNetworkInfo($item)); + } + return $result; + } + + /** + * NetworkInfo: + * + * @param VPCNetworkInfo[] $networkInfo + */ + public function setNetworkInfo(array $networkInfo) + { + $result = []; + foreach ($networkInfo as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * SubnetCount: + * + * @return integer|null + */ + public function getSubnetCount(): int + { + return $this->get("SubnetCount"); + } + + /** + * SubnetCount: + * + * @param int $subnetCount + */ + public function setSubnetCount(int $subnetCount) + { + $this->set("SubnetCount", $subnetCount); + } + + /** + * CreateTime: + * + * @return integer|null + */ + public function getCreateTime(): int + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: + * + * @param int $createTime + */ + public function setCreateTime(int $createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * UpdateTime: + * + * @return integer|null + */ + public function getUpdateTime(): int + { + return $this->get("UpdateTime"); + } + + /** + * UpdateTime: + * + * @param int $updateTime + */ + public function setUpdateTime(int $updateTime) + { + $this->set("UpdateTime", $updateTime); + } + + /** + * Tag: + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } + + /** + * Name: + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * VPCId: VPCId + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPCId + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * Network: + * + * @return string[]|null + */ + public function getNetwork(): array + { + return $this->get("Network"); + } + + /** + * Network: + * + * @param string[] $network + */ + public function setNetwork(array $network) + { + $this->set("Network", $network); + } + + /** + * IPv6Network: VPC关联的IPv6网段 + * + * @return string|null + */ + public function getIPv6Network(): string + { + return $this->get("IPv6Network"); + } + + /** + * IPv6Network: VPC关联的IPv6网段 + * + * @param string $iPv6Network + */ + public function setIPv6Network(string $iPv6Network) + { + $this->set("IPv6Network", $iPv6Network); + } + + /** + * OperatorName: VPC关联的IPv6网段所属运营商 + * + * @return string|null + */ + public function getOperatorName(): string + { + return $this->get("OperatorName"); + } + + /** + * OperatorName: VPC关联的IPv6网段所属运营商 + * + * @param string $operatorName + */ + public function setOperatorName(string $operatorName) + { + $this->set("OperatorName", $operatorName); + } +} diff --git a/src/VPC/Models/VPCIntercomInfo.php b/src/VPC/Models/VPCIntercomInfo.php new file mode 100644 index 00000000..a748d2c7 --- /dev/null +++ b/src/VPC/Models/VPCIntercomInfo.php @@ -0,0 +1,184 @@ +get("ProjectId"); + } + + /** + * ProjectId: 项目Id + * + * @param string $projectId + */ + public function setProjectId(string $projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * VPCType: vpc类型(1表示托管VPC,0表示公有云VPC) + * + * @return integer|null + */ + public function getVPCType(): int + { + return $this->get("VPCType"); + } + + /** + * VPCType: vpc类型(1表示托管VPC,0表示公有云VPC) + * + * @param int $vpcType + */ + public function setVPCType(int $vpcType) + { + $this->set("VPCType", $vpcType); + } + + /** + * AccountId: 项目Id(数字) + * + * @return integer|null + */ + public function getAccountId(): int + { + return $this->get("AccountId"); + } + + /** + * AccountId: 项目Id(数字) + * + * @param int $accountId + */ + public function setAccountId(int $accountId) + { + $this->set("AccountId", $accountId); + } + + /** + * Network: VPC的地址空间 + * + * @return string[]|null + */ + public function getNetwork(): array + { + return $this->get("Network"); + } + + /** + * Network: VPC的地址空间 + * + * @param string[] $network + */ + public function setNetwork(array $network) + { + $this->set("Network", $network); + } + + /** + * DstRegion: 所属地域 + * + * @return string|null + */ + public function getDstRegion(): string + { + return $this->get("DstRegion"); + } + + /** + * DstRegion: 所属地域 + * + * @param string $dstRegion + */ + public function setDstRegion(string $dstRegion) + { + $this->set("DstRegion", $dstRegion); + } + + /** + * Name: VPC名字 + * + * @return string|null + */ + public function getName(): string + { + return $this->get("Name"); + } + + /** + * Name: VPC名字 + * + * @param string $name + */ + public function setName(string $name) + { + $this->set("Name", $name); + } + + /** + * VPCId: VPCId + * + * @return string|null + */ + public function getVPCId(): string + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPCId + * + * @param string $vpcId + */ + public function setVPCId(string $vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * Tag: 业务组(未分组显示为 Default) + * + * @return string|null + */ + public function getTag(): string + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组(未分组显示为 Default) + * + * @param string $tag + */ + public function setTag(string $tag) + { + $this->set("Tag", $tag); + } +} diff --git a/src/VPC/Models/VPCNetworkInfo.php b/src/VPC/Models/VPCNetworkInfo.php new file mode 100644 index 00000000..424bbf4b --- /dev/null +++ b/src/VPC/Models/VPCNetworkInfo.php @@ -0,0 +1,64 @@ +get("Network"); + } + + /** + * Network: vpc地址空间 + * + * @param string $network + */ + public function setNetwork(string $network) + { + $this->set("Network", $network); + } + + /** + * SubnetCount: 地址空间中子网数量 + * + * @return integer|null + */ + public function getSubnetCount(): int + { + return $this->get("SubnetCount"); + } + + /** + * SubnetCount: 地址空间中子网数量 + * + * @param int $subnetCount + */ + public function setSubnetCount(int $subnetCount) + { + $this->set("SubnetCount", $subnetCount); + } +} diff --git a/src/VPC/VPCClient.php b/src/VPC/VPCClient.php new file mode 100644 index 00000000..6de02656 --- /dev/null +++ b/src/VPC/VPCClient.php @@ -0,0 +1,2288 @@ + (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "NATGWId" => (string) NAT网关的ID + * "SourceIp" => (string) 需要出外网的私网IP地址,例如10.9.7.xx + * "SnatIp" => (string) EIP的ip地址,例如106.75.xx.xx + * "Name" => (string) snat规则名称,默认为“出口规则” + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function addSnatRule(AddSnatRuleRequest $request = null): AddSnatRuleResponse + { + $resp = $this->invoke($request); + return new AddSnatRuleResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * AddVPCNetwork - 添加VPC网段 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/add_vpc_network + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "VPCId" => (string) 源VPC短ID + * "Network" => (array) 增加网段 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function addVPCNetwork(AddVPCNetworkRequest $request = null): AddVPCNetworkResponse + { + $resp = $this->invoke($request); + return new AddVPCNetworkResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * AddWhiteListResource - 添加NAT网关白名单 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/add_white_list_resource + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "NATGWId" => (string) NAT网关Id + * "ResourceIds" => (array) 可添加白名单的资源Id + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function addWhiteListResource(AddWhiteListResourceRequest $request = null): AddWhiteListResourceResponse + { + $resp = $this->invoke($request); + return new AddWhiteListResourceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * AllocateSecondaryIp - 分配ip(用于uk8s使用) + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/allocate_secondary_ip + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Mac" => (string) 节点mac + * "ObjectId" => (string) 资源Id + * "SubnetId" => (string) 子网Id(若未指定,则根据zone获取默认子网进行创建) + * "VPCId" => (string) vpcId + * "Ip" => (string) 指定Ip分配 + * ] + * + * Outputs: + * + * $outputs = [ + * "IpInfo" => (object) [ + * "Ip" => (string) + * "Mask" => (string) + * "Gateway" => (string) + * "Mac" => (string) + * "SubnetId" => (string) + * "VPCId" => (string) + * ] + * ] + * + * @throws UCloudException + */ + public function allocateSecondaryIp(AllocateSecondaryIpRequest $request = null): AllocateSecondaryIpResponse + { + $resp = $this->invoke($request); + return new AllocateSecondaryIpResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * AllocateVIP - 根据提供信息,申请内网VIP(Virtual IP),多用于高可用程序作为漂移IP。 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/allocate_vip + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域 + * "Zone" => (string) 可用区 + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "VPCId" => (string) 指定vip所属的VPC + * "SubnetId" => (string) 子网id + * "Ip" => (string) 指定ip + * "Count" => (integer) 申请数量,默认: 1 + * "Name" => (string) vip名,默认:VIP + * "Tag" => (string) 业务组名称,默认为Default + * "Remark" => (string) 备注 + * "BusinessId" => (string) 业务组 + * ] + * + * Outputs: + * + * $outputs = [ + * "VIPSet" => (array) 申请到的VIP资源相关信息[ + * [ + * "VIP" => (string) 虚拟ip + * "VIPId" => (string) 虚拟ip id + * "VPCId" => (string) VPC id + * ] + * ] + * "DataSet" => (array) 申请到的VIP地址 + * ] + * + * @throws UCloudException + */ + public function allocateVIP(AllocateVIPRequest $request = null): AllocateVIPResponse + { + $resp = $this->invoke($request); + return new AllocateVIPResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * AssociateRouteTable - 绑定子网的路由表 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/associate_route_table + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "SubnetId" => (string) 子网ID + * "RouteTableId" => (string) 路由表资源ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function associateRouteTable(AssociateRouteTableRequest $request = null): AssociateRouteTableResponse + { + $resp = $this->invoke($request); + return new AssociateRouteTableResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CloneRouteTable - 将现有的路由表复制为一张新的路由表 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/clone_route_table + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "RouteTableId" => (string) 被克隆的路由表ID + * ] + * + * Outputs: + * + * $outputs = [ + * "RouteTableId" => (string) 复制后新的路由表资源ID + * ] + * + * @throws UCloudException + */ + public function cloneRouteTable(CloneRouteTableRequest $request = null): CloneRouteTableResponse + { + $resp = $this->invoke($request); + return new CloneRouteTableResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateNATGW - 创建NAT网关 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/create_natgw + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "NATGWName" => (string) NAT网关名称 + * "EIPIds" => (array) NAT网关绑定的EIPId + * "FirewallId" => (string) NAT网关绑定的防火墙Id + * "SubnetworkIds" => (array) NAT网关绑定的子网Id,默认为空。 + * "VPCId" => (string) NAT网关所属的VPC Id。默认为Default VPC Id + * "IfOpen" => (integer) 白名单开关标记。0表示关闭,1表示开启。默认为0 + * "Tag" => (string) 业务组。默认为空 + * "Remark" => (string) 备注。默认为空 + * ] + * + * Outputs: + * + * $outputs = [ + * "NATGWId" => (string) 申请到的NATGateWay Id + * ] + * + * @throws UCloudException + */ + public function createNATGW(CreateNATGWRequest $request = null): CreateNATGWResponse + { + $resp = $this->invoke($request); + return new CreateNATGWResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateNATGWPolicy - 添加NAT网关端口转发规则 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/create_natgw_policy + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "NATGWId" => (string) NAT网关Id + * "Protocol" => (string) 协议类型。枚举值为:TCP、UDP + * "SrcEIPId" => (string) 源IP。填写对应的EIP Id + * "SrcPort" => (string) 源端口。可填写固定端口,也可填写端口范围。支持的端口范围为1-65535 + * "DstIP" => (string) 目标IP。填写对应的目标IP地址 + * "DstPort" => (string) 目标端口。可填写固定端口,也可填写端口范围。支持的端口范围为1-65535 + * "PolicyName" => (string) 转发策略名称。默认为空 + * ] + * + * Outputs: + * + * $outputs = [ + * "PolicyId" => (string) 创建时分配的策略Id + * ] + * + * @throws UCloudException + */ + public function createNATGWPolicy(CreateNATGWPolicyRequest $request = null): CreateNATGWPolicyResponse + { + $resp = $this->invoke($request); + return new CreateNATGWPolicyResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateNetworkAcl - 创建网络ACL + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/create_network_acl + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "VpcId" => (string) 将要创建的ACL所属VPC的ID + * "AclName" => (string) ACL的名称 + * "Description" => (string) ACL的描述 + * ] + * + * Outputs: + * + * $outputs = [ + * "AclId" => (string) 创建的ACL的ID + * ] + * + * @throws UCloudException + */ + public function createNetworkAcl(CreateNetworkAclRequest $request = null): CreateNetworkAclResponse + { + $resp = $this->invoke($request); + return new CreateNetworkAclResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateNetworkAclAssociation - 创建ACL的绑定关系 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/create_network_acl_association + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "AclId" => (string) ACL的ID + * "SubnetworkId" => (string) 需要绑定的子网ID + * ] + * + * Outputs: + * + * $outputs = [ + * "AssociationId" => (string) 创建的绑定关系的ID + * "PrevAssociation" => (object) 该子网之前的绑定关系信息[ + * "AssociationId" => (string) 绑定ID + * "AclId" => (string) ACL的ID + * "SubnetworkId" => (string) 绑定的子网ID + * "CreateTime" => (integer) 创建的Unix时间戳 + * ] + * ] + * + * @throws UCloudException + */ + public function createNetworkAclAssociation(CreateNetworkAclAssociationRequest $request = null): CreateNetworkAclAssociationResponse + { + $resp = $this->invoke($request); + return new CreateNetworkAclAssociationResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateNetworkAclEntry - 创建ACL的规则 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/create_network_acl_entry + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "AclId" => (string) ACL的ID + * "Priority" => (integer) Entry的优先级,对于同样的Direction来说,不能重复 + * "Direction" => (string) 出向或者入向(“Ingress”, "Egress") + * "IpProtocol" => (string) 协议规则描述 + * "CidrBlock" => (string) IPv4段的CIDR表示 + * "PortRange" => (string) 针对的端口范围 + * "EntryAction" => (string) 规则的行为("Accept", "Reject") + * "Description" => (string) 描述。长度限制为不超过32字节。 + * "TargetType" => (integer) 应用目标类型。0代表“子网内全部资源”,1代表“子网内指定资源”,默认为0 + * "TargetResourceIds" => (array) 应用目标资源列表。默认为全部资源生效。TargetType为0时不用填写该值。 + * ] + * + * Outputs: + * + * $outputs = [ + * "EntryId" => (string) 创建的Entry的ID + * ] + * + * @throws UCloudException + */ + public function createNetworkAclEntry(CreateNetworkAclEntryRequest $request = null): CreateNetworkAclEntryResponse + { + $resp = $this->invoke($request); + return new CreateNetworkAclEntryResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateRouteTable - 创建路由表 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/create_route_table + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "VPCId" => (string) 所属的VPC资源ID + * "Name" => (string) 路由表名称。默认为RouteTable + * "Tag" => (string) 路由表所属业务组 + * "Remark" => (string) 备注 + * ] + * + * Outputs: + * + * $outputs = [ + * "RouteTableId" => (string) 路由表ID + * ] + * + * @throws UCloudException + */ + public function createRouteTable(CreateRouteTableRequest $request = null): CreateRouteTableResponse + { + $resp = $this->invoke($request); + return new CreateRouteTableResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateSubnet - 创建子网 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/create_subnet + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "VPCId" => (string) VPC资源ID + * "Subnet" => (string) 子网网络地址,例如192.168.0.0 + * "Netmask" => (integer) 子网网络号位数,默认为24 + * "SubnetName" => (string) 子网名称,默认为Subnet + * "Tag" => (string) 业务组名称,默认为Default + * "Remark" => (string) 备注 + * ] + * + * Outputs: + * + * $outputs = [ + * "SubnetId" => (string) 子网ID + * ] + * + * @throws UCloudException + */ + public function createSubnet(CreateSubnetRequest $request = null): CreateSubnetResponse + { + $resp = $this->invoke($request); + return new CreateSubnetResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateVPC - 创建VPC + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/create_vpc + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Name" => (string) VPC名称 + * "Network" => (array) VPC网段 + * "Tag" => (string) 业务组名称 + * "Remark" => (string) 备注 + * ] + * + * Outputs: + * + * $outputs = [ + * "VPCId" => (string) VPC资源Id + * ] + * + * @throws UCloudException + */ + public function createVPC(CreateVPCRequest $request = null): CreateVPCResponse + { + $resp = $this->invoke($request); + return new CreateVPCResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateVPCIntercom - 新建VPC互通关系 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/create_vpc_intercom + * + * Arguments: + * + * $args = [ + * "Region" => (string) 源VPC所在地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 源VPC所在项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "VPCId" => (string) 源VPC短ID + * "DstVPCId" => (string) 目的VPC短ID + * "DstRegion" => (string) 目的VPC所在地域,默认与源VPC同地域。 + * "DstProjectId" => (string) 目的VPC项目ID。默认与源VPC同项目。 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function createVPCIntercom(CreateVPCIntercomRequest $request = null): CreateVPCIntercomResponse + { + $resp = $this->invoke($request); + return new CreateVPCIntercomResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteNATGW - 删除NAT网关 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/delete_natgw + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "NATGWId" => (string) NAT网关Id + * "ReleaseEip" => (boolean) 是否释放绑定的EIP。true:解绑并释放;false:只解绑不释放。默认为false + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteNATGW(DeleteNATGWRequest $request = null): DeleteNATGWResponse + { + $resp = $this->invoke($request); + return new DeleteNATGWResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteNATGWPolicy - 删除NAT网关端口转发规则 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/delete_natgw_policy + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "NATGWId" => (string) NAT网关Id + * "PolicyId" => (string) 端口转发规则Id + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteNATGWPolicy(DeleteNATGWPolicyRequest $request = null): DeleteNATGWPolicyResponse + { + $resp = $this->invoke($request); + return new DeleteNATGWPolicyResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteNetworkAcl - 删除网络ACL + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/delete_network_acl + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "AclId" => (string) 需要删除的AclId + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteNetworkAcl(DeleteNetworkAclRequest $request = null): DeleteNetworkAclResponse + { + $resp = $this->invoke($request); + return new DeleteNetworkAclResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteNetworkAclAssociation - 删除网络ACL绑定关系 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/delete_network_acl_association + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "AclId" => (string) 需要删除的AclId + * "SubnetworkId" => (string) 绑定的子网ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteNetworkAclAssociation(DeleteNetworkAclAssociationRequest $request = null): DeleteNetworkAclAssociationResponse + { + $resp = $this->invoke($request); + return new DeleteNetworkAclAssociationResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteNetworkAclEntry - 删除ACL的规则 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/delete_network_acl_entry + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "AclId" => (string) Acl的ID + * "EntryId" => (string) 需要删除的EntryId + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteNetworkAclEntry(DeleteNetworkAclEntryRequest $request = null): DeleteNetworkAclEntryResponse + { + $resp = $this->invoke($request); + return new DeleteNetworkAclEntryResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteRouteTable - 删除自定义路由表 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/delete_route_table + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "RouteTableId" => (string) 路由表资源ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteRouteTable(DeleteRouteTableRequest $request = null): DeleteRouteTableResponse + { + $resp = $this->invoke($request); + return new DeleteRouteTableResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteSecondaryIp - 删除ip(用于uk8s使用) + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/delete_secondary_ip + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "Ip" => (string) ip + * "Mac" => (string) mac + * "SubnetId" => (string) 子网Id + * "VPCId" => (string) VPCId + * "ObjectId" => (string) 资源Id + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteSecondaryIp(DeleteSecondaryIpRequest $request = null): DeleteSecondaryIpResponse + { + $resp = $this->invoke($request); + return new DeleteSecondaryIpResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteSnatRule - 删除指定的出口规则(SNAT规则) + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/delete_snat_rule + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "NATGWId" => (string) NAT网关的ID + * "SourceIp" => (string) 需要出外网的私网IP地址,例如10.9.7.xx + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteSnatRule(DeleteSnatRuleRequest $request = null): DeleteSnatRuleResponse + { + $resp = $this->invoke($request); + return new DeleteSnatRuleResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteSubnet - 删除子网 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/delete_subnet + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "SubnetId" => (string) 子网ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteSubnet(DeleteSubnetRequest $request = null): DeleteSubnetResponse + { + $resp = $this->invoke($request); + return new DeleteSubnetResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteVPC - 删除VPC + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/delete_vpc + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "VPCId" => (string) VPC资源Id + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteVPC(DeleteVPCRequest $request = null): DeleteVPCResponse + { + $resp = $this->invoke($request); + return new DeleteVPCResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteVPCIntercom - 删除VPC互通关系 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/delete_vpc_intercom + * + * Arguments: + * + * $args = [ + * "Region" => (string) 源VPC所在地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 源VPC所在项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "VPCId" => (string) 源VPC短ID + * "DstVPCId" => (string) 目的VPC短ID + * "DstRegion" => (string) 目的VPC所在地域,默认为源VPC所在地域 + * "DstProjectId" => (string) 目的VPC所在项目ID,默认为源VPC所在项目ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteVPCIntercom(DeleteVPCIntercomRequest $request = null): DeleteVPCIntercomResponse + { + $resp = $this->invoke($request); + return new DeleteVPCIntercomResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteWhiteListResource - 删除NAT网关白名单列表 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/delete_white_list_resource + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "NATGWId" => (string) NAT网关Id + * "ResourceIds" => (array) 删除白名单的资源Id + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function deleteWhiteListResource(DeleteWhiteListResourceRequest $request = null): DeleteWhiteListResourceResponse + { + $resp = $this->invoke($request); + return new DeleteWhiteListResourceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeNATGW - 获取NAT网关信息 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/describe_natgw + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "NATGWIds" => (array) NAT网关Id。默认为该项目下所有NAT网关 + * "Offset" => (integer) 数据偏移量。默认为0 + * "Limit" => (integer) 数据分页值。默认为20 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 满足条件的实例的总数 + * "DataSet" => (array) 查到的NATGW信息列表[ + * [ + * "NATGWId" => (string) natgw id + * "NATGWName" => (string) natgw名称 + * "CreateTime" => (integer) natgw创建时间 + * "Tag" => (string) 业务组 + * "Remark" => (string) 备注 + * "FirewallId" => (string) 绑定的防火墙Id + * "VPCId" => (string) 所属VPC Id + * "SubnetSet" => (array) 子网 Id[ + * [ + * "SubnetworkId" => (string) 子网id + * "Subnet" => (string) 子网网段 + * "SubnetName" => (string) 子网名字 + * ] + * ] + * "IPSet" => (array) 绑定的EIP 信息[ + * [ + * "EIPId" => (string) 外网IP的 EIPId + * "Weight" => (integer) 权重为100的为出口 + * "BandwidthType" => (string) EIP带宽类型 + * "Bandwidth" => (integer) 带宽 + * "IPResInfo" => (array) 外网IP信息[ + * [ + * "OperatorName" => (string) IP的运营商信息 + * "EIP" => (string) 外网IP + * ] + * ] + * ] + * ] + * "PolicyId" => (array) 转发策略Id + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeNATGW(DescribeNATGWRequest $request = null): DescribeNATGWResponse + { + $resp = $this->invoke($request); + return new DescribeNATGWResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeNATGWPolicy - 展示NAT网关端口转发规则 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/describe_natgw_policy + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "NATGWId" => (string) NAT网关Id + * "Limit" => (integer) 返回数据长度,默认为10000 + * "Offset" => (integer) 列表起始位置偏移量,默认为0 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 满足条件的转发策略总数 + * "DataSet" => (array) 查到的NATGW 转发策略的详细信息[ + * [ + * "NATGWId" => (string) NAT网关Id + * "PolicyId" => (string) 转发策略Id + * "Protocol" => (string) 协议类型 + * "SrcEIP" => (string) 端口转发前端EIP + * "SrcEIPId" => (string) 端口转发前端EIP Id + * "SrcPort" => (string) 源端口 + * "DstIP" => (string) 目的地址 + * "DstPort" => (string) 目的端口 + * "PolicyName" => (string) 转发策略名称 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeNATGWPolicy(DescribeNATGWPolicyRequest $request = null): DescribeNATGWPolicyResponse + { + $resp = $this->invoke($request); + return new DescribeNATGWPolicyResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeNetworkAcl - 获取网络ACL + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/describe_network_acl + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Offset" => (integer) 列表偏移量 + * "Limit" => (string) 列表获取的个数限制 + * "VpcId" => (string) 需要获取的ACL所属的VPC的ID + * ] + * + * Outputs: + * + * $outputs = [ + * "AclList" => (array) ACL的信息,具体结构见下方AclInfo[ + * [ + * "VpcId" => (string) ACL所属的VPC ID + * "AclId" => (string) ACL的ID + * "AclName" => (string) 名称 + * "Description" => (string) 描述 + * "Entries" => (array) 所有的规则[ + * [ + * "EntryId" => (string) Entry的ID + * "Priority" => (string) 优先级 + * "Direction" => (string) 出向或者入向 + * "IpProtocol" => (string) 针对的IP协议 + * "CidrBlock" => (string) IP段的CIDR信息 + * "PortRange" => (string) Port的段信息 + * "EntryAction" => (string) 匹配规则的动作 + * "TargetType" => (integer) 应用目标类型。 0代表“子网内全部资源” ,1代表“子网内指定资源” 。 + * "CreateTime" => (integer) 创建的Unix时间戳 + * "UpdateTime" => (integer) 更改的Unix时间戳 + * "TargetResourceList" => (array) 应用目标资源信息。TargetType为0时不返回该值。具体结构见下方TargetResourceInfo[ + * [ + * "SubnetworkId" => (string) 子网ID + * "ResourceName" => (string) 资源名称 + * "ResourceId" => (string) 资源ID + * "ResourceType" => (integer) 资源类型 + * "SubResourceName" => (string) 资源绑定的虚拟网卡的名称 + * "SubResourceId" => (string) 资源绑定的虚拟网卡的ID + * "SubResourceType" => (integer) 资源绑定虚拟网卡的类型 + * "PrivateIp" => (string) 资源内网IP + * ] + * ] + * "TargetResourceCount" => (integer) 应用目标资源数量。TargetType为0时不返回该值。 + * ] + * ] + * "Associations" => (array) 所有的绑定关系,具体结构见下方AssociationInfo[ + * [ + * "AssociationId" => (string) 绑定ID + * "AclId" => (string) ACL的ID + * "SubnetworkId" => (string) 绑定的子网ID + * "CreateTime" => (integer) 创建的Unix时间戳 + * ] + * ] + * "CreateTime" => (integer) 创建的Unix时间戳 + * "UpdateTime" => (integer) 更改的Unix时间戳 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeNetworkAcl(DescribeNetworkAclRequest $request = null): DescribeNetworkAclResponse + { + $resp = $this->invoke($request); + return new DescribeNetworkAclResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeNetworkAclAssociation - 获取网络ACL的绑定关系列表 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/describe_network_acl_association + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "AclId" => (string) Acl的ID + * "Offset" => (integer) 列表偏移量 + * "Limit" => (string) 列表获取的个数限制 + * ] + * + * Outputs: + * + * $outputs = [ + * "AssociationList" => (array) 绑定信息列表[ + * [ + * "AssociationId" => (string) 绑定ID + * "AclId" => (string) ACL的ID + * "SubnetworkId" => (string) 绑定的子网ID + * "CreateTime" => (integer) 创建的Unix时间戳 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeNetworkAclAssociation(DescribeNetworkAclAssociationRequest $request = null): DescribeNetworkAclAssociationResponse + { + $resp = $this->invoke($request); + return new DescribeNetworkAclAssociationResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeNetworkAclAssociationBySubnet - 获取子网的ACL绑定信息 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/describe_network_acl_association_by_subnet + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "SubnetworkId" => (string) 子网的ID + * ] + * + * Outputs: + * + * $outputs = [ + * "Association" => (object) 绑定信息[ + * "AssociationId" => (string) 绑定ID + * "AclId" => (string) ACL的ID + * "SubnetworkId" => (string) 绑定的子网ID + * "CreateTime" => (integer) 创建的Unix时间戳 + * ] + * ] + * + * @throws UCloudException + */ + public function describeNetworkAclAssociationBySubnet(DescribeNetworkAclAssociationBySubnetRequest $request = null): DescribeNetworkAclAssociationBySubnetResponse + { + $resp = $this->invoke($request); + return new DescribeNetworkAclAssociationBySubnetResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeNetworkAclEntry - 获取ACL的规则信息 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/describe_network_acl_entry + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "AclId" => (string) ACL的ID + * ] + * + * Outputs: + * + * $outputs = [ + * "EntryList" => (array) 所有的规则信息[ + * [ + * "EntryId" => (string) Entry的ID + * "Priority" => (string) 优先级 + * "Direction" => (string) 出向或者入向 + * "IpProtocol" => (string) 针对的IP协议 + * "CidrBlock" => (string) IP段的CIDR信息 + * "PortRange" => (string) Port的段信息 + * "EntryAction" => (string) 匹配规则的动作 + * "TargetType" => (integer) 应用目标类型。 0代表“子网内全部资源” ,1代表“子网内指定资源” 。 + * "CreateTime" => (integer) 创建的Unix时间戳 + * "UpdateTime" => (integer) 更改的Unix时间戳 + * "TargetResourceList" => (array) 应用目标资源信息。TargetType为0时不返回该值。具体结构见下方TargetResourceInfo[ + * [ + * "SubnetworkId" => (string) 子网ID + * "ResourceName" => (string) 资源名称 + * "ResourceId" => (string) 资源ID + * "ResourceType" => (integer) 资源类型 + * "SubResourceName" => (string) 资源绑定的虚拟网卡的名称 + * "SubResourceId" => (string) 资源绑定的虚拟网卡的ID + * "SubResourceType" => (integer) 资源绑定虚拟网卡的类型 + * "PrivateIp" => (string) 资源内网IP + * ] + * ] + * "TargetResourceCount" => (integer) 应用目标资源数量。TargetType为0时不返回该值。 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeNetworkAclEntry(DescribeNetworkAclEntryRequest $request = null): DescribeNetworkAclEntryResponse + { + $resp = $this->invoke($request); + return new DescribeNetworkAclEntryResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeRouteTable - 获取路由表详细信息(包括路由策略) + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/describe_route_table + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "VPCId" => (string) 所属VPC的资源ID + * "RouteTableId" => (string) 路由表资源ID + * "OffSet" => (integer) 数据偏移量。默认为0 + * "Limit" => (integer) 数据分页值。默认为20 + * "BusinessId" => (string) 业务组ID + * ] + * + * Outputs: + * + * $outputs = [ + * "RouteTables" => (array) 路由表信息[ + * [ + * "RouteTableId" => (string) 路由表资源ID + * "RouteTableType" => (integer) 路由表类型。1为默认路由表,0为自定义路由表 + * "SubnetCount" => (integer) 绑定该路由表的子网数量 + * "VPCId" => (string) 路由表所属的VPC资源ID + * "VPCName" => (string) 路由表所属的VPC资源名称 + * "Tag" => (string) 路由表所属业务组 + * "Remark" => (string) 路由表备注 + * "CreateTime" => (integer) 创建时间戳 + * "RouteRules" => (array) 路由规则[ + * [ + * "AccountId" => (integer) 项目ID信息 + * "DstAddr" => (string) 目的地址 + * "DstPort" => (integer) 保留字段,暂未使用 + * "NexthopId" => (string) 路由下一跳资源ID + * "NexthopType" => (string) 路由表下一跳类型。LOCAL,本VPC内部通信路由;PUBLIC,公共服务路由;CNAT,外网路由;UDPN,跨域高速通道路由;HYBRIDGW,混合云路由;INSTANCE,实例路由;VNET,VPC联通路由;IPSEC VPN,指向VPN网关的路由。 + * "OriginAddr" => (string) 保留字段,暂未使用 + * "Priority" => (integer) 保留字段,暂未使用 + * "Remark" => (string) 路由规则备注 + * "RouteRuleId" => (string) 规则ID + * "RouteTableId" => (string) 路由表资源ID + * "RuleType" => (integer) 路由规则类型。0,系统路由规则;1,自定义路由规则 + * "SrcAddr" => (string) 保留字段,暂未使用 + * "SrcPort" => (integer) 保留字段,暂未使用 + * "VNetId" => (string) 所属的VPC + * ] + * ] + * ] + * ] + * "TotalCount" => (integer) RouteTables字段的数量 + * ] + * + * @throws UCloudException + */ + public function describeRouteTable(DescribeRouteTableRequest $request = null): DescribeRouteTableResponse + { + $resp = $this->invoke($request); + return new DescribeRouteTableResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeSecondaryIp - 查询SecondaryIp(uk8s使用) + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/describe_secondary_ip + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "SubnetId" => (string) 子网Id + * "VPCId" => (string) VPCId + * "Ip" => (string) Ip + * "Mac" => (string) Mac + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) [ + * [ + * "Ip" => (string) + * "Mask" => (string) + * "Gateway" => (string) + * "Mac" => (string) + * "SubnetId" => (string) + * "VPCId" => (string) + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeSecondaryIp(DescribeSecondaryIpRequest $request = null): DescribeSecondaryIpResponse + { + $resp = $this->invoke($request); + return new DescribeSecondaryIpResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeSnatRule - 获取Nat网关的出口规则(SNAT规则) + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/describe_snat_rule + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "NATGWId" => (string) NAT网关的ID + * "SourceIp" => (string) 需要出外网的私网IP地址,例如10.9.7.xx + * "SnatIp" => (string) EIP的ip地址,例如106.75.xx.xx + * "Offset" => (string) 偏移,默认为0 + * "Limit" => (string) 分页,默认为20 + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 某个NAT网关的所有Snat规则[ + * [ + * "SnatIp" => (string) EIP地址,如106.76.xx.xx + * "SourceIp" => (string) 资源的内网IP地址 + * "SubnetworkId" => (string) SourceIp所属的子网id + * "Name" => (string) snat规则名称 + * ] + * ] + * "TotalCount" => (integer) 规则数量 + * ] + * + * @throws UCloudException + */ + public function describeSnatRule(DescribeSnatRuleRequest $request = null): DescribeSnatRuleResponse + { + $resp = $this->invoke($request); + return new DescribeSnatRuleResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeSubnet - 获取子网信息 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/describe_subnet + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "SubnetIds" => (array) 子网id数组,适用于一次查询多个子网信息 + * "SubnetId" => (string) 子网id,适用于一次查询一个子网信息 + * "RouteTableId" => (string) 路由表Id + * "VPCId" => (string) VPC资源id + * "Tag" => (string) 业务组名称,默认为Default + * "Offset" => (integer) 偏移量,默认为0 + * "Limit" => (integer) 列表长度,默认为20 + * "ShowAvailableIPs" => (boolean) 是否返回子网的可用IP数,true为是,false为否,默认不返回 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 子网总数量 + * "DataSet" => (array) 子网信息数组,具体资源见下方SubnetInfo[ + * [ + * "Zone" => (string) 可用区名称 + * "IPv6Network" => (string) 子网关联的IPv6网段 + * "VPCId" => (string) VPCId + * "VPCName" => (string) VPC名称 + * "SubnetId" => (string) 子网Id + * "SubnetName" => (string) 子网名称 + * "Remark" => (string) 备注 + * "Tag" => (string) 业务组 + * "SubnetType" => (integer) 子网类型 + * "Subnet" => (string) 子网网段 + * "Netmask" => (string) 子网掩码 + * "Gateway" => (string) 子网网关 + * "CreateTime" => (integer) 创建时间 + * "HasNATGW" => (boolean) 是否有natgw + * "RouteTableId" => (string) 路由表Id + * "AvailableIPs" => (integer) 可用IP数量 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeSubnet(DescribeSubnetRequest $request = null): DescribeSubnetResponse + { + $resp = $this->invoke($request); + return new DescribeSubnetResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeSubnetResource - 展示子网资源 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/describe_subnet_resource + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "SubnetId" => (string) 子网id + * "ResourceType" => (string) 资源类型,默认为全部资源类型。枚举值为:UHOST,云主机;PHOST,物理云主机;ULB,负载均衡;UHADOOP_HOST,hadoop节点;UFORTRESS_HOST,堡垒机;UNATGW,NAT网关;UKAFKA,Kafka消息队列;UMEM,内存存储;DOCKER,容器集群;UDB,数据库;UDW,数据仓库;VIP,内网VIP. + * "Offset" => (integer) 列表起始位置偏移量,默认为0 + * "Limit" => (integer) 单页返回数据长度,默认为20 + * ] + * + * Outputs: + * + * $outputs = [ + * "TotalCount" => (integer) 总数 + * "DataSet" => (array) 返回数据集,请见SubnetResource[ + * [ + * "Name" => (string) 名称 + * "ResourceId" => (string) 资源Id + * "ResourceType" => (string) 资源类型。对应的资源类型:UHOST,云主机;PHOST,物理云主机;ULB,负载均衡;UHADOOP_HOST,hadoop节点;UFORTRESS_HOST,堡垒机;UNATGW,NAT网关;UKAFKA,分布式消息系统;UMEM,内存存储;DOCKER,容器集群;UDB,数据库;UDW,数据仓库;VIP,内网VIP. + * "IP" => (string) 资源ip + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeSubnetResource(DescribeSubnetResourceRequest $request = null): DescribeSubnetResourceResponse + { + $resp = $this->invoke($request); + return new DescribeSubnetResourceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeVIP - 获取内网VIP详细信息 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/describe_vip + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "VPCId" => (string) vpc的id,指定SubnetId时必填 + * "SubnetId" => (string) 子网id,不指定则获取VPCId下的所有vip + * "VIPId" => (string) VIP ID + * "Tag" => (string) 业务组名称, 默认为 Default + * "BusinessId" => (string) 业务组 + * ] + * + * Outputs: + * + * $outputs = [ + * "VIPSet" => (array) 内网VIP详情,请见VIPDetailSet[ + * [ + * "Zone" => (string) 地域 + * "VIPId" => (string) 虚拟ip id + * "CreateTime" => (integer) 创建时间 + * "RealIp" => (string) 真实主机ip + * "VIP" => (string) 虚拟ip + * "SubnetId" => (string) 子网id + * "VPCId" => (string) VPC id + * "Name" => (string) VIP名称 + * "Remark" => (string) VIP备注 + * "Tag" => (string) VIP所属业务组 + * ] + * ] + * "DataSet" => (array) 内网VIP地址列表 + * "TotalCount" => (integer) vip数量 + * ] + * + * @throws UCloudException + */ + public function describeVIP(DescribeVIPRequest $request = null): DescribeVIPResponse + { + $resp = $this->invoke($request); + return new DescribeVIPResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeVPC - 获取VPC信息 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/describe_vpc + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "VPCIds" => (array) VPCId + * "Tag" => (string) 业务组名称 + * "Offset" => (integer) + * "Limit" => (integer) + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) vpc信息,具体结构见下方VPCInfo[ + * [ + * "NetworkInfo" => (array) [ + * [ + * "Network" => (string) vpc地址空间 + * "SubnetCount" => (integer) 地址空间中子网数量 + * ] + * ] + * "SubnetCount" => (integer) + * "CreateTime" => (integer) + * "UpdateTime" => (integer) + * "Tag" => (string) + * "Name" => (string) + * "VPCId" => (string) VPCId + * "Network" => (array) + * "IPv6Network" => (string) VPC关联的IPv6网段 + * "OperatorName" => (string) VPC关联的IPv6网段所属运营商 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeVPC(DescribeVPCRequest $request = null): DescribeVPCResponse + { + $resp = $this->invoke($request); + return new DescribeVPCResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeVPCIntercom - 获取VPC互通信息 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/describe_vpc_intercom + * + * Arguments: + * + * $args = [ + * "Region" => (string) 源VPC所在地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 源VPC所在项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "VPCId" => (string) VPC短ID + * "DstRegion" => (string) 目的VPC所在地域,默认为全部地域 + * "DstProjectId" => (string) 目的项目ID,默认为全部项目 + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 联通VPC信息数组[ + * [ + * "ProjectId" => (string) 项目Id + * "VPCType" => (integer) vpc类型(1表示托管VPC,0表示公有云VPC) + * "AccountId" => (integer) 项目Id(数字) + * "Network" => (array) VPC的地址空间 + * "DstRegion" => (string) 所属地域 + * "Name" => (string) VPC名字 + * "VPCId" => (string) VPCId + * "Tag" => (string) 业务组(未分组显示为 Default) + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function describeVPCIntercom(DescribeVPCIntercomRequest $request = null): DescribeVPCIntercomResponse + { + $resp = $this->invoke($request); + return new DescribeVPCIntercomResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeWhiteListResource - 展示NAT网关白名单资源列表 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/describe_white_list_resource + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目id + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "NATGWIds" => (array) NAT网关的Id + * "Offset" => (integer) 数据偏移量, 默认为0 + * "Limit" => (integer) 数据分页值, 默认为20 + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 白名单资源的详细信息,详见DescribeResourceWhiteListDataSet[ + * [ + * "NATGWId" => (string) NATGateWay Id + * "IfOpen" => (integer) 白名单开关标记 + * "ObjectIPInfo" => (array) 白名单详情[ + * [ + * "GwType" => (string) natgw字符串 + * "PrivateIP" => (string) 白名单资源的内网IP + * "ResourceId" => (string) 白名单资源Id信息 + * "ResourceName" => (string) 白名单资源名称 + * "ResourceType" => (string) 白名单资源类型 + * "SubResourceId" => (string) 资源绑定的虚拟网卡的实例ID + * "SubResourceName" => (string) 资源绑定的虚拟网卡的实例名称 + * "SubResourceType" => (string) 资源绑定的虚拟网卡的类型 + * "VPCId" => (string) 白名单资源所属VPCId + * ] + * ] + * ] + * ] + * "TotalCount" => (integer) 上述DataSet总数量 + * ] + * + * @throws UCloudException + */ + public function describeWhiteListResource(DescribeWhiteListResourceRequest $request = null): DescribeWhiteListResourceResponse + { + $resp = $this->invoke($request); + return new DescribeWhiteListResourceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * EnableWhiteList - 修改NAT网关白名单开关 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/enable_white_list + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "NATGWId" => (string) NAT网关Id + * "IfOpen" => (integer) 白名单开关标记。0:关闭;1:开启。默认为0 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function enableWhiteList(EnableWhiteListRequest $request = null): EnableWhiteListResponse + { + $resp = $this->invoke($request); + return new EnableWhiteListResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetAvailableResourceForPolicy - 获取NAT网关可配置端口转发规则的资源信息 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/get_available_resource_for_policy + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "NATGWId" => (string) NAT网关Id + * "Limit" => (integer) 返回数据长度,默认为20 + * "Offset" => (integer) 列表起始位置偏移量,默认为0 + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 支持资源类型的信息[ + * [ + * "ResourceId" => (string) 资源的Id + * "PrivateIP" => (string) 资源对应的内网Ip + * "ResourceType" => (string) 资源类型。"uhost":云主机; "upm",物理云主机; "hadoophost":hadoop节点; "fortresshost":堡垒机: "udockhost",容器 + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function getAvailableResourceForPolicy(GetAvailableResourceForPolicyRequest $request = null): GetAvailableResourceForPolicyResponse + { + $resp = $this->invoke($request); + return new GetAvailableResourceForPolicyResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetAvailableResourceForSnatRule - 获取可用于添加snat规则(出口规则)的资源列表 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/get_available_resource_for_snat_rule + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "NATGWId" => (string) NAT网关Id + * "Offset" => (integer) 数据偏移量, 默认为0 + * "Limit" => (integer) 数据分页值, 默认为20 + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 返回的资源详细信息[ + * [ + * "ResourceId" => (string) 资源ID + * "ResourceName" => (string) 资源名称 + * "PrivateIP" => (string) 资源内网IP + * "ResourceType" => (string) 资源类型 + * "SubnetworkId" => (string) 资源所属VPC的ID + * "VPCId" => (string) 资源所属子网的ID + * ] + * ] + * "TotalCount" => (integer) 总数 + * ] + * + * @throws UCloudException + */ + public function getAvailableResourceForSnatRule(GetAvailableResourceForSnatRuleRequest $request = null): GetAvailableResourceForSnatRuleResponse + { + $resp = $this->invoke($request); + return new GetAvailableResourceForSnatRuleResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetAvailableResourceForWhiteList - 获取NAT网关可添加白名单的资源 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/get_available_resource_for_white_list + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "NATGWId" => (string) NAT网关Id + * "Offset" => (integer) 数据偏移量, 默认为0 + * "Limit" => (integer) 数据分页值, 默认为20 + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 返回白名单列表的详细信息[ + * [ + * "ResourceId" => (string) 资源类型Id + * "ResourceName" => (string) 资源名称 + * "PrivateIP" => (string) 资源的内网Ip + * "ResourceType" => (string) 资源类型。"uhost":云主机; "upm",物理云主机; "hadoophost":hadoop节点; "fortresshost":堡垒机: "udockhost",容器 + * "SubResourceName" => (string) 资源绑定的虚拟网卡的实例名称 + * "VPCId" => (string) 资源所属VPCId + * "SubnetworkId" => (string) 资源所属子网Id + * "SubResourceId" => (string) 资源绑定的虚拟网卡的实例ID + * "SubResourceType" => (string) 资源绑定的虚拟网卡的实例类型 + * ] + * ] + * "TotalCount" => (integer) 白名单资源列表的总的个数 + * ] + * + * @throws UCloudException + */ + public function getAvailableResourceForWhiteList(GetAvailableResourceForWhiteListRequest $request = null): GetAvailableResourceForWhiteListResponse + { + $resp = $this->invoke($request); + return new GetAvailableResourceForWhiteListResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetNetworkAclTargetResource - 获取ACL规则应用目标列表 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/get_network_acl_target_resource + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "SubnetworkId" => (array) 子网ID。 + * ] + * + * Outputs: + * + * $outputs = [ + * "TargetResourceList" => (array) ACL规则应用目标资源列表,具体结构见下方TargetResourceInfo[ + * [ + * "SubnetworkId" => (string) 子网ID + * "ResourceName" => (string) 资源名称 + * "ResourceId" => (string) 资源ID + * "ResourceType" => (integer) 资源类型 + * "SubResourceName" => (string) 资源绑定的虚拟网卡的名称 + * "SubResourceId" => (string) 资源绑定的虚拟网卡的ID + * "SubResourceType" => (integer) 资源绑定虚拟网卡的类型 + * "PrivateIp" => (string) 资源内网IP + * ] + * ] + * "TotalCount" => (integer) ACL规则应用目标资源总数 + * ] + * + * @throws UCloudException + */ + public function getNetworkAclTargetResource(GetNetworkAclTargetResourceRequest $request = null): GetNetworkAclTargetResourceResponse + { + $resp = $this->invoke($request); + return new GetNetworkAclTargetResourceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListSubnetForNATGW - 展示NAT网关可绑定的子网列表 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/list_subnet_for_natgw + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "VPCId" => (string) NAT网关所属VPC Id。默认值为Default VPC Id + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 具体参数请见NatgwSubnetDataSet[ + * [ + * "SubnetId" => (string) 子网id + * "Subnet" => (string) 子网网段 + * "Netmask" => (string) 掩码 + * "SubnetName" => (string) 子网名字 + * "HasNATGW" => (boolean) 是否绑定NATGW + * ] + * ] + * ] + * + * @throws UCloudException + */ + public function listSubnetForNATGW(ListSubnetForNATGWRequest $request = null): ListSubnetForNATGWResponse + { + $resp = $this->invoke($request); + return new ListSubnetForNATGWResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyRouteRule - 路由策略增、删、改 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/modify_route_rule + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "RouteTableId" => (string) 通过DescribeRouteTable拿到 + * "RouteRule" => (array) 格式: RouteRuleId | 目的网段 | 下一跳类型(支持INSTANCE、VIP) | 下一跳 |优先级(保留字段,填写0即可)| 备注 | 增、删、改标志(add/delete/update) 。"添加"示例: test_id | 10.8.0.0/16 | instance | uhost-xd8ja | 0 | Default Route Rule| add (添加的RouteRuleId填任意非空字符串) 。"删除"示例: routerule-xk3jxa | 10.8.0.0/16 | instance | uhost-xd8ja | 0 | Default Route Rule| delete (RouteRuleId来自DescribeRouteTable中) 。“修改”示例: routerule-xk3jxa | 10.8.0.0/16 | instance | uhost-cjksa2 | 0 | Default Route Rule| update (RouteRuleId来自DescribeRouteTable中) + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function modifyRouteRule(ModifyRouteRuleRequest $request = null): ModifyRouteRuleResponse + { + $resp = $this->invoke($request); + return new ModifyRouteRuleResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * MoveSecondaryIPMac - 把 Secondary IP 从旧 MAC 迁移到新 MAC + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/move_secondary_ip_mac + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Ip" => (string) Secondary IP + * "OldMac" => (string) 旧 Mac。Secondary IP 当前所绑定的 Mac + * "NewMac" => (string) 新 Mac。Secondary IP 迁移的目的 Mac + * "SubnetId" => (string) 子网 ID。IP/OldMac/NewMac 三者必须在同一子网 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function moveSecondaryIPMac(MoveSecondaryIPMacRequest $request = null): MoveSecondaryIPMacResponse + { + $resp = $this->invoke($request); + return new MoveSecondaryIPMacResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ReleaseVIP - 释放VIP资源 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/release_vip + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域 + * "Zone" => (string) 可用区 + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写 + * "VIPId" => (string) 内网VIP的id + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function releaseVIP(ReleaseVIPRequest $request = null): ReleaseVIPResponse + { + $resp = $this->invoke($request); + return new ReleaseVIPResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * SetGwDefaultExport - 设置NAT网关的默认出口 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/set_gw_default_export + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "NATGWId" => (string) NAT网关Id + * "ExportIp" => (string) NAT网关绑定的EIP。ExportIp和ExportEipId必填一个 + * "ExportEipId" => (string) NAT网关绑定的EIP Id。ExportIp和ExportEipId必填一个 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function setGwDefaultExport(SetGwDefaultExportRequest $request = null): SetGwDefaultExportResponse + { + $resp = $this->invoke($request); + return new SetGwDefaultExportResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateNATGWPolicy - 更新NAT网关端口转发规则 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/update_natgw_policy + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "NATGWId" => (string) NAT网关Id + * "PolicyId" => (string) 转发策略Id + * "Protocol" => (string) 协议类型。枚举值为:TCP 、 UDP + * "SrcEIPId" => (string) 源IP。填写对应的EIP Id + * "SrcPort" => (string) 源端口。可填写固定端口,也可填写端口范围。支持的端口范围为1-6553 + * "DstIP" => (string) 目标IP。填写对应的目标IP地址 + * "DstPort" => (string) 目标端口。可填写固定端口,也可填写端口范围。支持的端口范围为1-65535 + * "PolicyName" => (string) 转发策略名称。默认为空 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function updateNATGWPolicy(UpdateNATGWPolicyRequest $request = null): UpdateNATGWPolicyResponse + { + $resp = $this->invoke($request); + return new UpdateNATGWPolicyResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateNATGWSubnet - 更新NAT网关绑定的子网 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/update_natgw_subnet + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目Id。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "NATGWId" => (string) NAT网关Id + * "SubnetworkIds" => (array) NAT网关绑定的子网Id + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function updateNATGWSubnet(UpdateNATGWSubnetRequest $request = null): UpdateNATGWSubnetResponse + { + $resp = $this->invoke($request); + return new UpdateNATGWSubnetResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateNetworkAcl - 更改ACL + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/update_network_acl + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "AclName" => (string) Acl的名称 + * "AclId" => (string) 需要更改的ACL ID + * "Description" => (string) 描述 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function updateNetworkAcl(UpdateNetworkAclRequest $request = null): UpdateNetworkAclResponse + { + $resp = $this->invoke($request); + return new UpdateNetworkAclResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateNetworkAclEntry - 更新ACL的规则 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/update_network_acl_entry + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "AclId" => (string) ACL的ID + * "EntryId" => (string) 需要更新的Entry Id + * "Priority" => (integer) Entry的优先级,对于同样的Direction来说,不能重复 + * "Direction" => (string) 出向或者入向(“Ingress”, "Egress") + * "IpProtocol" => (string) 针对的协议规则 + * "CidrBlock" => (string) IPv4段的CIDR表示 + * "PortRange" => (string) 针对的端口范围 + * "EntryAction" => (string) 规则的行为("Accept", "Reject") + * "Description" => (string) 描述 + * "TargetType" => (integer) 应用目标类型。0代表“子网内全部资源”, 1代表“子网内指定资源”。默认为0 + * "TargetResourceIds" => (array) 应用目标资源列表。默认为全部资源生效。TargetType为0时不用填写该值 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function updateNetworkAclEntry(UpdateNetworkAclEntryRequest $request = null): UpdateNetworkAclEntryResponse + { + $resp = $this->invoke($request); + return new UpdateNetworkAclEntryResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateRouteTableAttribute - 更新路由表基本信息 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/update_route_table_attribute + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "RouteTableId" => (string) 路由表ID + * "Name" => (string) 名称 + * "Remark" => (string) 备注 + * "Tag" => (string) 业务组名称 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function updateRouteTableAttribute(UpdateRouteTableAttributeRequest $request = null): UpdateRouteTableAttributeResponse + { + $resp = $this->invoke($request); + return new UpdateRouteTableAttributeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateSnatRule - 更新指定的出口规则(SNAT规则) + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/update_snat_rule + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "NATGWId" => (string) NAT网关的ID, + * "SourceIp" => (string) 需要出外网的私网IP地址,例如10.9.7.xx + * "SnatIp" => (string) EIP的ip地址,例如106.75.xx.xx + * "Name" => (string) snat名称,即出口规则名称 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function updateSnatRule(UpdateSnatRuleRequest $request = null): UpdateSnatRuleResponse + { + $resp = $this->invoke($request); + return new UpdateSnatRuleResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateSubnetAttribute - 更新子网信息 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/update_subnet_attribute + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "SubnetId" => (string) 子网ID + * "Name" => (string) 子网名称(如果Name不填写,Tag必须填写) + * "Tag" => (string) 业务组名称(如果Tag不填写,Name必须填写) + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function updateSubnetAttribute(UpdateSubnetAttributeRequest $request = null): UpdateSubnetAttributeResponse + { + $resp = $this->invoke($request); + return new UpdateSubnetAttributeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateVIPAttribute - 更新VIP信息 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/update_vip_attribute + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "VIPId" => (string) 内网VIP的资源Id + * "Remark" => (string) 内网VIP的备注 + * "Name" => (string) 内网VIP的名称 + * "Tag" => (string) 内网VIP所属的业务组 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function updateVIPAttribute(UpdateVIPAttributeRequest $request = null): UpdateVIPAttributeResponse + { + $resp = $this->invoke($request); + return new UpdateVIPAttributeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateVPCNetwork - 更新VPC网段 + * + * See also: https://docs.ucloud.cn/api/VPC2.0-api/update_vpc_network + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "VPCId" => (string) VPC的ID + * "Network" => (array) 需要保留的VPC网段。当前仅支持删除VPC网段,添加网段请参考[AddVPCNetwork](https://docs.ucloud.cn/api/vpc2.0-api/add_vpc_network) + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @throws UCloudException + */ + public function updateVPCNetwork(UpdateVPCNetworkRequest $request = null): UpdateVPCNetworkResponse + { + $resp = $this->invoke($request); + return new UpdateVPCNetworkResponse($resp->toArray(), $resp->getRequestId()); + } +} diff --git a/tests/ClientTest.php b/tests/ClientTest.php new file mode 100644 index 00000000..a2e0a8b3 --- /dev/null +++ b/tests/ClientTest.php @@ -0,0 +1,134 @@ + [ + "Action" => "GetRegion", + ], + "resp" => [ + "RetCode" => 0, + "DataSet" => [["Region" => "cn-bj2"]] + ], + "has_exception" => false, + ], + [ + "req" => [ + "Action" => "NotFound", + ], + "resp" => [ + "RetCode" => 161, + "Message" => "Action [NotFound] not found" + ], + "has_exception" => true, + ], + [ + "req" => [ + "Action" => "GetRegion", + ], + "resp" => new RequestException('Error Communicating with Server', new HttpRequest('GET', 'test')), + "has_exception" => true, + ], + + ]; + + $ua = "UnitTest"; + $client = new Client([ + "publicKey" => getenv("UCLOUD_PUBLIC_KEY"), + "privateKey" => getenv("UCLOUD_PRIVATE_KEY"), + "projectId" => getenv("UCLOUD_PROJECT_ID"), + "userAgent" => $ua, + ]); + + foreach ($cases as $i => $case) { + // mock with response + $mock = $case["resp"]; + if (!($mock instanceof HttpResponse || $mock instanceof RequestException)) { + $mock = new HttpResponse(200, ['Content-Type' => 'application/json'], json_encode($mock)); + } + $handlerStack = HandlerStack::create(new MockHandler([$mock])); + $client->setTransport(new Transport( + $client->getConfig()->getBaseUrl(), $ua, + ['handler' => $handlerStack], + )); + + // invoke action + try { + $resp = $client->invoke(new Request($case["req"])); + } catch (UCloudException $e) { + $this->assertEquals(True, $case["has_exception"]); + continue; + } + + $this->assertEquals(False, $case["has_exception"]); + $this->assertNotEmpty($resp); + } + } + + public function testMiddleware() + { + $client = new Client([ + "publicKey" => getenv("UCLOUD_PUBLIC_KEY"), + "privateKey" => getenv("UCLOUD_PRIVATE_KEY"), + "projectId" => getenv("UCLOUD_PROJECT_ID"), + "logger" => new DisabledLogger(), + "region" => "cn-bj2", + ]); + $client->setTransport(new Transport( + $client->getConfig()->getBaseUrl(), "UnitTest", + ['handler' => HandlerStack::create(new MockHandler([ + new RequestException('Error Communicating with Server', new HttpRequest('GET', 'test')), + ]))], + )); + $m = new DummyMiddleware(); + $client->useMiddleware($m); + + $req = new Request([]); + $req->setAction("Foo"); + $this->assertEquals("Foo", $req->getAction()); + + try { + $client->invoke($req); + } catch (UCloudException $e) { + // do nothing + } + $this->assertEquals(True, $m->flag); + } +} + +class DummyMiddleware extends Middleware +{ + /** @var bool */ + public bool $flag; + + public function handleException(Context $ctx) + { + $this->flag = True; + } +} \ No newline at end of file diff --git a/tests/CredentialTest.php b/tests/CredentialTest.php new file mode 100644 index 00000000..457e0908 --- /dev/null +++ b/tests/CredentialTest.php @@ -0,0 +1,34 @@ + "ucloudsomeone@example.com1296235120854146120", + "privateKey" => "46f09bb9fab4f12dfc160dae12273d5332b5debe", + ]); + + $args = [ + "Action" => "DescribeUHostInstance", + "Region" => "cn-bj2", + "Limit" => 10, + ]; + + $this->assertEquals( + 'cba5cf5ec4d4233d206b1b54951e3787350a642f', + $cred->verifyAc($args) + ); + } +} diff --git a/tests/ObjectTest.php b/tests/ObjectTest.php new file mode 100644 index 00000000..9bbfdf1d --- /dev/null +++ b/tests/ObjectTest.php @@ -0,0 +1,76 @@ + "foo", + "CPU" => 1, + "Size" => 42.0, + "UHostIds" => ["uhost-xxx", "uhost-yyy"], + "Led" => [ + "Enabled" => true, + ], + "NetworkInterface" => [ + [ + "Bandwidth" => 42, + ], + ] + ]; + + $req = new Request($args); + + try { + $req->validate(); + } catch (UCloudException $e) { + $this->assertEmpty($e, "must no exception at here"); + } + + $req->markRequired("Region"); + $req->markRequired("Name"); + try { + $req->validate(); + } catch (UCloudException $e) { + $this->assertNotEmpty($e); + } + + $this->assertEquals($args, $req->getAll()); + $this->assertEquals([ + "Name" => "foo", + "CPU" => 1, + "Size" => 42.0, + "UHostIds.0" => "uhost-xxx", + "UHostIds.1" => "uhost-yyy", + "Led.Enabled" => true, + "NetworkInterface.0.Bandwidth" => 42, + ], $req->toArray()); + + $req->set("foo", "bar"); + $this->assertEquals("bar", $req->get("foo")); + } + + public function testResponse() { + $resp = new Response([]); + $resp->set("foo", 42); + $this->assertEquals(42, $resp->get("foo")); + } + + public function testLogger() + { + $logger = new DefaultLogger(); + $logger->info("foo"); + $logger->info("bar", ["foo" => "bar"]); + $this->assertNotEmpty($logger); + } +}