diff --git a/VERSION b/VERSION index 0b69c00..9e29e10 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.14 +0.3.15 diff --git a/src/UClickhouse/Apis/CreateUClickhouseClusterRequest.php b/src/UClickhouse/Apis/CreateUClickhouseClusterRequest.php new file mode 100644 index 0000000..bc3f6e0 --- /dev/null +++ b/src/UClickhouse/Apis/CreateUClickhouseClusterRequest.php @@ -0,0 +1,529 @@ + "CreateUClickhouseCluster"]); + $this->markRequired("Region"); + $this->markRequired("ClickhouseMachineTypeId"); + $this->markRequired("DataDiskType"); + $this->markRequired("ClickhouseVersion"); + $this->markRequired("VPCId"); + $this->markRequired("SubnetId"); + $this->markRequired("AdminPassword"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ClickhouseMachineTypeId: 集群机型,可通过GetUClickhouseClusterCreateOption接口获取具体值 + * + * @return string|null + */ + public function getClickhouseMachineTypeId() + { + return $this->get("ClickhouseMachineTypeId"); + } + + /** + * ClickhouseMachineTypeId: 集群机型,可通过GetUClickhouseClusterCreateOption接口获取具体值 + * + * @param string $clickhouseMachineTypeId + */ + public function setClickhouseMachineTypeId($clickhouseMachineTypeId) + { + $this->set("ClickhouseMachineTypeId", $clickhouseMachineTypeId); + } + + /** + * DataDiskType: 数据盘类型,可通过GetUClickhouseClusterCreateOption接口获取具体值 + * + * @return string|null + */ + public function getDataDiskType() + { + return $this->get("DataDiskType"); + } + + /** + * DataDiskType: 数据盘类型,可通过GetUClickhouseClusterCreateOption接口获取具体值 + * + * @param string $dataDiskType + */ + public function setDataDiskType($dataDiskType) + { + $this->set("DataDiskType", $dataDiskType); + } + + /** + * ClickhouseVersion: Clickhouse版本,可通过GetUClickhouseClusterCreateOption接口获取具体版本 + * + * @return string|null + */ + public function getClickhouseVersion() + { + return $this->get("ClickhouseVersion"); + } + + /** + * ClickhouseVersion: Clickhouse版本,可通过GetUClickhouseClusterCreateOption接口获取具体版本 + * + * @param string $clickhouseVersion + */ + public function setClickhouseVersion($clickhouseVersion) + { + $this->set("ClickhouseVersion", $clickhouseVersion); + } + + /** + * VPCId: VPC ID + * + * @return string|null + */ + public function getVPCId() + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPC ID + * + * @param string $vpcId + */ + public function setVPCId($vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: 子网ID + * + * @return string|null + */ + public function getSubnetId() + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网ID + * + * @param string $subnetId + */ + public function setSubnetId($subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * AdminPassword: 集群管理员密码,密码规则:1.密码长度限8-32个字符2.不能包含[A-Z],[a-z],[0-9]和[@#%^*+=_;:,?!&()-]之外的字符3.需要同时包含两项或以上(大写字母/小写字母/数字/特殊符号) + * + * @return string|null + */ + public function getAdminPassword() + { + return $this->get("AdminPassword"); + } + + /** + * AdminPassword: 集群管理员密码,密码规则:1.密码长度限8-32个字符2.不能包含[A-Z],[a-z],[0-9]和[@#%^*+=_;:,?!&()-]之外的字符3.需要同时包含两项或以上(大写字母/小写字母/数字/特殊符号) + * + * @param string $adminPassword + */ + public function setAdminPassword($adminPassword) + { + $this->set("AdminPassword", $adminPassword); + } + + /** + * ShardCount: 分片数量,若传递,则至少1个分片,默认值为1 + * + * @return integer|null + */ + public function getShardCount() + { + return $this->get("ShardCount"); + } + + /** + * ShardCount: 分片数量,若传递,则至少1个分片,默认值为1 + * + * @param int $shardCount + */ + public function setShardCount($shardCount) + { + $this->set("ShardCount", $shardCount); + } + + /** + * ReplicateCount: 副本数量,取值为1或2,1为单副本(非高可用),2为双副本(高可用),默认值为高可用(即为2) + * + * @return integer|null + */ + public function getReplicateCount() + { + return $this->get("ReplicateCount"); + } + + /** + * ReplicateCount: 副本数量,取值为1或2,1为单副本(非高可用),2为双副本(高可用),默认值为高可用(即为2) + * + * @param int $replicateCount + */ + public function setReplicateCount($replicateCount) + { + $this->set("ReplicateCount", $replicateCount); + } + + /** + * DataDiskSize: 数据盘大小,最小100,步长为50,默认值为100,单位GB + * + * @return integer|null + */ + public function getDataDiskSize() + { + return $this->get("DataDiskSize"); + } + + /** + * DataDiskSize: 数据盘大小,最小100,步长为50,默认值为100,单位GB + * + * @param int $dataDiskSize + */ + public function setDataDiskSize($dataDiskSize) + { + $this->set("DataDiskSize", $dataDiskSize); + } + + /** + * ChargeType: 付费类型,枚举值:Year(年付),Month(月付),Dynamic(时付),默认值为Month,月付 + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费类型,枚举值:Year(年付),Month(月付),Dynamic(时付),默认值为Month,月付 + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时长,默认值为1。月付时,此参数传0,代表购买至月末 + * + * @return integer|null + */ + public function getQuantity() + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长,默认值为1。月付时,此参数传0,代表购买至月末 + * + * @param int $quantity + */ + public function setQuantity($quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * BackupId: 备份任务ID,从备份恢复时,该字段必传,此值为备份任务ID,可以从原集群备份任务列表(ListUClickhouseBackups)获取 + * + * @return string|null + */ + public function getBackupId() + { + return $this->get("BackupId"); + } + + /** + * BackupId: 备份任务ID,从备份恢复时,该字段必传,此值为备份任务ID,可以从原集群备份任务列表(ListUClickhouseBackups)获取 + * + * @param string $backupId + */ + public function setBackupId($backupId) + { + $this->set("BackupId", $backupId); + } + + /** + * ClusterName: 实例名称名称规则:1.长度为1-50位的字符2.不能包含_,中文,[A-Z],[a-z],[0-9]之外的非法字符,集群名称默认为clickhouse + * + * @return string|null + */ + public function getClusterName() + { + return $this->get("ClusterName"); + } + + /** + * ClusterName: 实例名称名称规则:1.长度为1-50位的字符2.不能包含_,中文,[A-Z],[a-z],[0-9]之外的非法字符,集群名称默认为clickhouse + * + * @param string $clusterName + */ + public function setClusterName($clusterName) + { + $this->set("ClusterName", $clusterName); + } + + /** + * IsZookeeperHA: 是否Zookeeper高可用,true为zookeeper高可用,false为非高可用,默认为true,高可用 + * + * @return boolean|null + */ + public function getIsZookeeperHA() + { + return $this->get("IsZookeeperHA"); + } + + /** + * IsZookeeperHA: 是否Zookeeper高可用,true为zookeeper高可用,false为非高可用,默认为true,高可用 + * + * @param boolean $isZookeeperHA + */ + public function setIsZookeeperHA($isZookeeperHA) + { + $this->set("IsZookeeperHA", $isZookeeperHA); + } + + /** + * IsSecGroup: 是否开启安全组,true为开启,false为不开启,默认为false,不开启安全组 + * + * @return string|null + */ + public function getIsSecGroup() + { + return $this->get("IsSecGroup"); + } + + /** + * IsSecGroup: 是否开启安全组,true为开启,false为不开启,默认为false,不开启安全组 + * + * @param string $isSecGroup + */ + public function setIsSecGroup($isSecGroup) + { + $this->set("IsSecGroup", $isSecGroup); + } + + /** + * IsMultiZone: 是否多可用区,默认为false + * + * @return string|null + */ + public function getIsMultiZone() + { + return $this->get("IsMultiZone"); + } + + /** + * IsMultiZone: 是否多可用区,默认为false + * + * @param string $isMultiZone + */ + public function setIsMultiZone($isMultiZone) + { + $this->set("IsMultiZone", $isMultiZone); + } + + /** + * ZookeeperMachineTypeId: Zookeeper机型ID,IsZookeeperHA为true时,必传,可通过GetUClickhouseClusterCreateOption接口获取具体值 + * + * @return string|null + */ + public function getZookeeperMachineTypeId() + { + return $this->get("ZookeeperMachineTypeId"); + } + + /** + * ZookeeperMachineTypeId: Zookeeper机型ID,IsZookeeperHA为true时,必传,可通过GetUClickhouseClusterCreateOption接口获取具体值 + * + * @param string $zookeeperMachineTypeId + */ + public function setZookeeperMachineTypeId($zookeeperMachineTypeId) + { + $this->set("ZookeeperMachineTypeId", $zookeeperMachineTypeId); + } + + /** + * ZookeeperDataDiskType: Zookeeper数据盘类型,IsZookeeperHA为true时,必传,可通过GetUClickhouseClusterCreateOption接口获取具体值 + * + * @return string|null + */ + public function getZookeeperDataDiskType() + { + return $this->get("ZookeeperDataDiskType"); + } + + /** + * ZookeeperDataDiskType: Zookeeper数据盘类型,IsZookeeperHA为true时,必传,可通过GetUClickhouseClusterCreateOption接口获取具体值 + * + * @param string $zookeeperDataDiskType + */ + public function setZookeeperDataDiskType($zookeeperDataDiskType) + { + $this->set("ZookeeperDataDiskType", $zookeeperDataDiskType); + } + + /** + * ZookeeperDataDiskSize: Zookeeper数据盘大小,IsZookeeperHA为true时,必传,最小100,步长为50 + * + * @return string|null + */ + public function getZookeeperDataDiskSize() + { + return $this->get("ZookeeperDataDiskSize"); + } + + /** + * ZookeeperDataDiskSize: Zookeeper数据盘大小,IsZookeeperHA为true时,必传,最小100,步长为50 + * + * @param string $zookeeperDataDiskSize + */ + public function setZookeeperDataDiskSize($zookeeperDataDiskSize) + { + $this->set("ZookeeperDataDiskSize", $zookeeperDataDiskSize); + } + + /** + * SecGroupIds: 安全组ID,IsSecGroup为true时,必传 + * + * @return string|null + */ + public function getSecGroupIds() + { + return $this->get("SecGroupIds"); + } + + /** + * SecGroupIds: 安全组ID,IsSecGroup为true时,必传 + * + * @param string $secGroupIds + */ + public function setSecGroupIds($secGroupIds) + { + $this->set("SecGroupIds", $secGroupIds); + } + + /** + * MultiZones: 【数组】可用区名称,IsMultiZone为true时,必传,可通过ListUClickhouseAvailableZone获取支持的可用区 + * + * @return string[]|null + */ + public function getMultiZones() + { + return $this->get("MultiZones"); + } + + /** + * MultiZones: 【数组】可用区名称,IsMultiZone为true时,必传,可通过ListUClickhouseAvailableZone获取支持的可用区 + * + * @param string[] $multiZones + */ + public function setMultiZones(array $multiZones) + { + $this->set("MultiZones", $multiZones); + } + + /** + * Labels: + * + * @return CreateUClickhouseClusterParamLabels[]|null + */ + public function getLabels() + { + $items = $this->get("Labels"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateUClickhouseClusterParamLabels($item)); + } + return $result; + } + + /** + * Labels: + * + * @param CreateUClickhouseClusterParamLabels[] $labels + */ + public function setLabels(array $labels) + { + $result = []; + foreach ($labels as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UClickhouse/Apis/CreateUClickhouseClusterResponse.php b/src/UClickhouse/Apis/CreateUClickhouseClusterResponse.php new file mode 100644 index 0000000..df22e52 --- /dev/null +++ b/src/UClickhouse/Apis/CreateUClickhouseClusterResponse.php @@ -0,0 +1,45 @@ +get("Data")); + } + + /** + * Data: 返回数据 + * + * @param CreateUClickhouseClusterResponseData $data + */ + public function setData(array $data) + { + $this->set("Data", $data->getAll()); + } +} diff --git a/src/UClickhouse/Apis/DescribeUClickhouseClusterRequest.php b/src/UClickhouse/Apis/DescribeUClickhouseClusterRequest.php new file mode 100644 index 0000000..58932bb --- /dev/null +++ b/src/UClickhouse/Apis/DescribeUClickhouseClusterRequest.php @@ -0,0 +1,91 @@ + "DescribeUClickhouseCluster"]); + $this->markRequired("Region"); + $this->markRequired("ClusterId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ClusterId: 集群ID + * + * @return string|null + */ + public function getClusterId() + { + return $this->get("ClusterId"); + } + + /** + * ClusterId: 集群ID + * + * @param string $clusterId + */ + public function setClusterId($clusterId) + { + $this->set("ClusterId", $clusterId); + } +} diff --git a/src/UClickhouse/Apis/DescribeUClickhouseClusterResponse.php b/src/UClickhouse/Apis/DescribeUClickhouseClusterResponse.php new file mode 100644 index 0000000..eccfe6d --- /dev/null +++ b/src/UClickhouse/Apis/DescribeUClickhouseClusterResponse.php @@ -0,0 +1,49 @@ +get("Data")); + } + + /** + * Data: 返回数据 + * + * @param DescribeUClickhouseClusterResponseData $data + */ + public function setData(array $data) + { + $this->set("Data", $data->getAll()); + } +} diff --git a/src/UClickhouse/Apis/DestroyUClickhouseClusterRequest.php b/src/UClickhouse/Apis/DestroyUClickhouseClusterRequest.php new file mode 100644 index 0000000..c30b54d --- /dev/null +++ b/src/UClickhouse/Apis/DestroyUClickhouseClusterRequest.php @@ -0,0 +1,91 @@ + "DestroyUClickhouseCluster"]); + $this->markRequired("Region"); + $this->markRequired("ClusterId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ClusterId: 集群ID + * + * @return string|null + */ + public function getClusterId() + { + return $this->get("ClusterId"); + } + + /** + * ClusterId: 集群ID + * + * @param string $clusterId + */ + public function setClusterId($clusterId) + { + $this->set("ClusterId", $clusterId); + } +} diff --git a/src/UClickhouse/Apis/DestroyUClickhouseClusterResponse.php b/src/UClickhouse/Apis/DestroyUClickhouseClusterResponse.php new file mode 100644 index 0000000..3d13349 --- /dev/null +++ b/src/UClickhouse/Apis/DestroyUClickhouseClusterResponse.php @@ -0,0 +1,26 @@ + "ExpandUClickhouseCluster"]); + $this->markRequired("Region"); + $this->markRequired("ClusterId"); + $this->markRequired("TotalNodeCount"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ClusterId: 集群ID + * + * @return string|null + */ + public function getClusterId() + { + return $this->get("ClusterId"); + } + + /** + * ClusterId: 集群ID + * + * @param string $clusterId + */ + public function setClusterId($clusterId) + { + $this->set("ClusterId", $clusterId); + } + + /** + * TotalNodeCount: 扩容后集群的节点数量,集群为高可用时,需要传入偶数个节点 + * + * @return integer|null + */ + public function getTotalNodeCount() + { + return $this->get("TotalNodeCount"); + } + + /** + * TotalNodeCount: 扩容后集群的节点数量,集群为高可用时,需要传入偶数个节点 + * + * @param int $totalNodeCount + */ + public function setTotalNodeCount($totalNodeCount) + { + $this->set("TotalNodeCount", $totalNodeCount); + } + + /** + * SyncNodeId: 水平扩容时,选择某一个原节点的ID,用于同步表结构/用户信息。不传递时,表示不同步表结构/用户信息,仅水平扩容节点数量 + * + * @return string|null + */ + public function getSyncNodeId() + { + return $this->get("SyncNodeId"); + } + + /** + * SyncNodeId: 水平扩容时,选择某一个原节点的ID,用于同步表结构/用户信息。不传递时,表示不同步表结构/用户信息,仅水平扩容节点数量 + * + * @param string $syncNodeId + */ + public function setSyncNodeId($syncNodeId) + { + $this->set("SyncNodeId", $syncNodeId); + } +} diff --git a/src/UClickhouse/Apis/ExpandUClickhouseClusterResponse.php b/src/UClickhouse/Apis/ExpandUClickhouseClusterResponse.php new file mode 100644 index 0000000..a1fb293 --- /dev/null +++ b/src/UClickhouse/Apis/ExpandUClickhouseClusterResponse.php @@ -0,0 +1,26 @@ + "GetUClickhouseClusterCreateOption"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目Id + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目Id + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } +} diff --git a/src/UClickhouse/Apis/GetUClickhouseClusterCreateOptionResponse.php b/src/UClickhouse/Apis/GetUClickhouseClusterCreateOptionResponse.php new file mode 100644 index 0000000..77930e4 --- /dev/null +++ b/src/UClickhouse/Apis/GetUClickhouseClusterCreateOptionResponse.php @@ -0,0 +1,52 @@ +get("Data")); + } + + /** + * Data: 数据 + * + * @param GetCreateUClickhouseClusterOptionResponseData $data + */ + public function setData(array $data) + { + $this->set("Data", $data->getAll()); + } +} diff --git a/src/UClickhouse/Apis/ListUClickhouseClusterRequest.php b/src/UClickhouse/Apis/ListUClickhouseClusterRequest.php new file mode 100644 index 0000000..36b5b22 --- /dev/null +++ b/src/UClickhouse/Apis/ListUClickhouseClusterRequest.php @@ -0,0 +1,70 @@ + "ListUClickhouseCluster"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } +} diff --git a/src/UClickhouse/Apis/ListUClickhouseClusterResponse.php b/src/UClickhouse/Apis/ListUClickhouseClusterResponse.php new file mode 100644 index 0000000..db85f88 --- /dev/null +++ b/src/UClickhouse/Apis/ListUClickhouseClusterResponse.php @@ -0,0 +1,46 @@ +get("Data")); + } + + /** + * Data: 返回数据 + * + * @param ListUClickhouseClusterResponseData $data + */ + public function setData(array $data) + { + $this->set("Data", $data->getAll()); + } +} diff --git a/src/UClickhouse/Apis/ResizeUClickhouseClusterRequest.php b/src/UClickhouse/Apis/ResizeUClickhouseClusterRequest.php new file mode 100644 index 0000000..5e22fa9 --- /dev/null +++ b/src/UClickhouse/Apis/ResizeUClickhouseClusterRequest.php @@ -0,0 +1,151 @@ + "ResizeUClickhouseCluster"]); + $this->markRequired("Region"); + $this->markRequired("ClusterId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ClusterId: 集群ID + * + * @return string|null + */ + public function getClusterId() + { + return $this->get("ClusterId"); + } + + /** + * ClusterId: 集群ID + * + * @param string $clusterId + */ + public function setClusterId($clusterId) + { + $this->set("ClusterId", $clusterId); + } + + /** + * TargetMachineTypeId: 目标机型ID,可通过GetUClickhouseClusterCreateOption接口获取具体值,与TargetDataDiskSize不能同时为空 + * + * @return string|null + */ + public function getTargetMachineTypeId() + { + return $this->get("TargetMachineTypeId"); + } + + /** + * TargetMachineTypeId: 目标机型ID,可通过GetUClickhouseClusterCreateOption接口获取具体值,与TargetDataDiskSize不能同时为空 + * + * @param string $targetMachineTypeId + */ + public function setTargetMachineTypeId($targetMachineTypeId) + { + $this->set("TargetMachineTypeId", $targetMachineTypeId); + } + + /** + * TargetDataDiskSize: 目标磁盘大小,单位GB,只能扩容,与TargetMachineTypeId不能同时为空 + * + * @return integer|null + */ + public function getTargetDataDiskSize() + { + return $this->get("TargetDataDiskSize"); + } + + /** + * TargetDataDiskSize: 目标磁盘大小,单位GB,只能扩容,与TargetMachineTypeId不能同时为空 + * + * @param int $targetDataDiskSize + */ + public function setTargetDataDiskSize($targetDataDiskSize) + { + $this->set("TargetDataDiskSize", $targetDataDiskSize); + } + + /** + * IsZooKeeperNode: 是否为zookeeper节点,为true时表示升级zookeeper节点规格,为false时表示升级clickhouse节点规格,默认为false + * + * @return boolean|null + */ + public function getIsZooKeeperNode() + { + return $this->get("IsZooKeeperNode"); + } + + /** + * IsZooKeeperNode: 是否为zookeeper节点,为true时表示升级zookeeper节点规格,为false时表示升级clickhouse节点规格,默认为false + * + * @param boolean $isZooKeeperNode + */ + public function setIsZooKeeperNode($isZooKeeperNode) + { + $this->set("IsZooKeeperNode", $isZooKeeperNode); + } +} diff --git a/src/UClickhouse/Apis/ResizeUClickhouseClusterResponse.php b/src/UClickhouse/Apis/ResizeUClickhouseClusterResponse.php new file mode 100644 index 0000000..d821f44 --- /dev/null +++ b/src/UClickhouse/Apis/ResizeUClickhouseClusterResponse.php @@ -0,0 +1,26 @@ + "RestartUClickhouseClusterService"]); + $this->markRequired("Region"); + $this->markRequired("ClusterId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ClusterId: 集群ID + * + * @return string|null + */ + public function getClusterId() + { + return $this->get("ClusterId"); + } + + /** + * ClusterId: 集群ID + * + * @param string $clusterId + */ + public function setClusterId($clusterId) + { + $this->set("ClusterId", $clusterId); + } +} diff --git a/src/UClickhouse/Apis/RestartUClickhouseClusterServiceResponse.php b/src/UClickhouse/Apis/RestartUClickhouseClusterServiceResponse.php new file mode 100644 index 0000000..8136ebc --- /dev/null +++ b/src/UClickhouse/Apis/RestartUClickhouseClusterServiceResponse.php @@ -0,0 +1,26 @@ +get("ClusterId"); + } + + /** + * ClusterId: 集群ID + * + * @param string $clusterId + */ + public function setClusterId($clusterId) + { + $this->set("ClusterId", $clusterId); + } + + /** + * TopOrganizationId: 公司ID + * + * @return integer|null + */ + public function getTopOrganizationId() + { + return $this->get("TopOrganizationId"); + } + + /** + * TopOrganizationId: 公司ID + * + * @param int $topOrganizationId + */ + public function setTopOrganizationId($topOrganizationId) + { + $this->set("TopOrganizationId", $topOrganizationId); + } + + /** + * OrganizationId: 项目ID + * + * @return integer|null + */ + public function getOrganizationId() + { + return $this->get("OrganizationId"); + } + + /** + * OrganizationId: 项目ID + * + * @param int $organizationId + */ + public function setOrganizationId($organizationId) + { + $this->set("OrganizationId", $organizationId); + } + + /** + * ClusterName: 集群名称 + * + * @return string|null + */ + public function getClusterName() + { + return $this->get("ClusterName"); + } + + /** + * ClusterName: 集群名称 + * + * @param string $clusterName + */ + public function setClusterName($clusterName) + { + $this->set("ClusterName", $clusterName); + } + + /** + * VPCId: VPCID + * + * @return string|null + */ + public function getVPCId() + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPCID + * + * @param string $vpcId + */ + public function setVPCId($vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: 子网ID + * + * @return string|null + */ + public function getSubnetId() + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网ID + * + * @param string $subnetId + */ + public function setSubnetId($subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * ClickhouseVersion: 集群版本 + * + * @return string|null + */ + public function getClickhouseVersion() + { + return $this->get("ClickhouseVersion"); + } + + /** + * ClickhouseVersion: 集群版本 + * + * @param string $clickhouseVersion + */ + public function setClickhouseVersion($clickhouseVersion) + { + $this->set("ClickhouseVersion", $clickhouseVersion); + } + + /** + * ZookeeperVersion: Zookeeper版本 + * + * @return string|null + */ + public function getZookeeperVersion() + { + return $this->get("ZookeeperVersion"); + } + + /** + * ZookeeperVersion: Zookeeper版本 + * + * @param string $zookeeperVersion + */ + public function setZookeeperVersion($zookeeperVersion) + { + $this->set("ZookeeperVersion", $zookeeperVersion); + } + + /** + * MachineType: 机型 + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 机型 + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * Status: 集群状态:CREATING(创建中)、RUNNING(运行中)、RESIZING(变配中)、RESTARTING(重启中)、UPGRADING(升级中)、DESTROYING(销毁中)、DESTROYED(已删除)、CREATE_FAILED(创建失败)、RESTART_FAILED(重启失败)、DESTROY_FAILED(删除失败)、RESIZE_FAILED(变配失败)、BACKUP_RESTORING(备份恢复中)、BACKUP_RESTORE_FAILED(备份恢复失败)、EXPANDING(扩容中)、EXPAND_FAILED(扩容失败) + * + * @return string|null + */ + public function getStatus() + { + return $this->get("Status"); + } + + /** + * Status: 集群状态:CREATING(创建中)、RUNNING(运行中)、RESIZING(变配中)、RESTARTING(重启中)、UPGRADING(升级中)、DESTROYING(销毁中)、DESTROYED(已删除)、CREATE_FAILED(创建失败)、RESTART_FAILED(重启失败)、DESTROY_FAILED(删除失败)、RESIZE_FAILED(变配失败)、BACKUP_RESTORING(备份恢复中)、BACKUP_RESTORE_FAILED(备份恢复失败)、EXPANDING(扩容中)、EXPAND_FAILED(扩容失败) + * + * @param string $status + */ + public function setStatus($status) + { + $this->set("Status", $status); + } + + /** + * ShardCount: 分片数 + * + * @return integer|null + */ + public function getShardCount() + { + return $this->get("ShardCount"); + } + + /** + * ShardCount: 分片数 + * + * @param int $shardCount + */ + public function setShardCount($shardCount) + { + $this->set("ShardCount", $shardCount); + } + + /** + * ReplicateCount: 副本数 + * + * @return integer|null + */ + public function getReplicateCount() + { + return $this->get("ReplicateCount"); + } + + /** + * ReplicateCount: 副本数 + * + * @param int $replicateCount + */ + public function setReplicateCount($replicateCount) + { + $this->set("ReplicateCount", $replicateCount); + } + + /** + * CreateTimestamp: 集群创建时间 + * + * @return integer|null + */ + public function getCreateTimestamp() + { + return $this->get("CreateTimestamp"); + } + + /** + * CreateTimestamp: 集群创建时间 + * + * @param int $createTimestamp + */ + public function setCreateTimestamp($createTimestamp) + { + $this->set("CreateTimestamp", $createTimestamp); + } + + /** + * ClickhouseMachineTypeId: Clickhouse机型ID + * + * @return string|null + */ + public function getClickhouseMachineTypeId() + { + return $this->get("ClickhouseMachineTypeId"); + } + + /** + * ClickhouseMachineTypeId: Clickhouse机型ID + * + * @param string $clickhouseMachineTypeId + */ + public function setClickhouseMachineTypeId($clickhouseMachineTypeId) + { + $this->set("ClickhouseMachineTypeId", $clickhouseMachineTypeId); + } + + /** + * ClickhouseMachineTypeName: Clickhouse机型名称 + * + * @return string|null + */ + public function getClickhouseMachineTypeName() + { + return $this->get("ClickhouseMachineTypeName"); + } + + /** + * ClickhouseMachineTypeName: Clickhouse机型名称 + * + * @param string $clickhouseMachineTypeName + */ + public function setClickhouseMachineTypeName($clickhouseMachineTypeName) + { + $this->set("ClickhouseMachineTypeName", $clickhouseMachineTypeName); + } + + /** + * RegionId: 地域ID + * + * @return integer|null + */ + public function getRegionId() + { + return $this->get("RegionId"); + } + + /** + * RegionId: 地域ID + * + * @param int $regionId + */ + public function setRegionId($regionId) + { + $this->set("RegionId", $regionId); + } + + /** + * ZookeeperMachineTypeId: Zookeeper机型ID + * + * @return string|null + */ + public function getZookeeperMachineTypeId() + { + return $this->get("ZookeeperMachineTypeId"); + } + + /** + * ZookeeperMachineTypeId: Zookeeper机型ID + * + * @param string $zookeeperMachineTypeId + */ + public function setZookeeperMachineTypeId($zookeeperMachineTypeId) + { + $this->set("ZookeeperMachineTypeId", $zookeeperMachineTypeId); + } + + /** + * ZookeeperMachineTypeName: Zookeeper机型名称 + * + * @return string|null + */ + public function getZookeeperMachineTypeName() + { + return $this->get("ZookeeperMachineTypeName"); + } + + /** + * ZookeeperMachineTypeName: Zookeeper机型名称 + * + * @param string $zookeeperMachineTypeName + */ + public function setZookeeperMachineTypeName($zookeeperMachineTypeName) + { + $this->set("ZookeeperMachineTypeName", $zookeeperMachineTypeName); + } + + /** + * ClickhouseDataDiskType: Clickhouse数据盘类型 + * + * @return string|null + */ + public function getClickhouseDataDiskType() + { + return $this->get("ClickhouseDataDiskType"); + } + + /** + * ClickhouseDataDiskType: Clickhouse数据盘类型 + * + * @param string $clickhouseDataDiskType + */ + public function setClickhouseDataDiskType($clickhouseDataDiskType) + { + $this->set("ClickhouseDataDiskType", $clickhouseDataDiskType); + } + + /** + * ClickhouseDataDiskSize: Clickhouse数据盘大小 + * + * @return integer|null + */ + public function getClickhouseDataDiskSize() + { + return $this->get("ClickhouseDataDiskSize"); + } + + /** + * ClickhouseDataDiskSize: Clickhouse数据盘大小 + * + * @param int $clickhouseDataDiskSize + */ + public function setClickhouseDataDiskSize($clickhouseDataDiskSize) + { + $this->set("ClickhouseDataDiskSize", $clickhouseDataDiskSize); + } + + /** + * ZookeeperDataDiskType: Zookeeper数据盘类型 + * + * @return string|null + */ + public function getZookeeperDataDiskType() + { + return $this->get("ZookeeperDataDiskType"); + } + + /** + * ZookeeperDataDiskType: Zookeeper数据盘类型 + * + * @param string $zookeeperDataDiskType + */ + public function setZookeeperDataDiskType($zookeeperDataDiskType) + { + $this->set("ZookeeperDataDiskType", $zookeeperDataDiskType); + } + + /** + * ZookeeperDataDiskSize: Zookeeper数据盘大小 + * + * @return integer|null + */ + public function getZookeeperDataDiskSize() + { + return $this->get("ZookeeperDataDiskSize"); + } + + /** + * ZookeeperDataDiskSize: Zookeeper数据盘大小 + * + * @param int $zookeeperDataDiskSize + */ + public function setZookeeperDataDiskSize($zookeeperDataDiskSize) + { + $this->set("ZookeeperDataDiskSize", $zookeeperDataDiskSize); + } + + /** + * ClickhouseNodeCPU: Clickhouse节点CPU + * + * @return integer|null + */ + public function getClickhouseNodeCPU() + { + return $this->get("ClickhouseNodeCPU"); + } + + /** + * ClickhouseNodeCPU: Clickhouse节点CPU + * + * @param int $clickhouseNodeCPU + */ + public function setClickhouseNodeCPU($clickhouseNodeCPU) + { + $this->set("ClickhouseNodeCPU", $clickhouseNodeCPU); + } + + /** + * ClickhouseNodeMemory: Clickhouse内存 + * + * @return integer|null + */ + public function getClickhouseNodeMemory() + { + return $this->get("ClickhouseNodeMemory"); + } + + /** + * ClickhouseNodeMemory: Clickhouse内存 + * + * @param int $clickhouseNodeMemory + */ + public function setClickhouseNodeMemory($clickhouseNodeMemory) + { + $this->set("ClickhouseNodeMemory", $clickhouseNodeMemory); + } + + /** + * ZookeeperNodeCPU: Zookeeper节点CPU + * + * @return integer|null + */ + public function getZookeeperNodeCPU() + { + return $this->get("ZookeeperNodeCPU"); + } + + /** + * ZookeeperNodeCPU: Zookeeper节点CPU + * + * @param int $zookeeperNodeCPU + */ + public function setZookeeperNodeCPU($zookeeperNodeCPU) + { + $this->set("ZookeeperNodeCPU", $zookeeperNodeCPU); + } + + /** + * ZookeeperNodeMemory: Zookeeper节点内存 + * + * @return integer|null + */ + public function getZookeeperNodeMemory() + { + return $this->get("ZookeeperNodeMemory"); + } + + /** + * ZookeeperNodeMemory: Zookeeper节点内存 + * + * @param int $zookeeperNodeMemory + */ + public function setZookeeperNodeMemory($zookeeperNodeMemory) + { + $this->set("ZookeeperNodeMemory", $zookeeperNodeMemory); + } + + /** + * IsZookeeperHA: Zookeeper是否高可用 + * + * @return string|null + */ + public function getIsZookeeperHA() + { + return $this->get("IsZookeeperHA"); + } + + /** + * IsZookeeperHA: Zookeeper是否高可用 + * + * @param string $isZookeeperHA + */ + public function setIsZookeeperHA($isZookeeperHA) + { + $this->set("IsZookeeperHA", $isZookeeperHA); + } + + /** + * IsSecgroup: 实例是否开启安全组 + * + * @return string|null + */ + public function getIsSecgroup() + { + return $this->get("IsSecgroup"); + } + + /** + * IsSecgroup: 实例是否开启安全组 + * + * @param string $isSecgroup + */ + public function setIsSecgroup($isSecgroup) + { + $this->set("IsSecgroup", $isSecgroup); + } + + /** + * IsBackup: 实例是否开启备份 + * + * @return string|null + */ + public function getIsBackup() + { + return $this->get("IsBackup"); + } + + /** + * IsBackup: 实例是否开启备份 + * + * @param string $isBackup + */ + public function setIsBackup($isBackup) + { + $this->set("IsBackup", $isBackup); + } + + /** + * IsTieredStorage: 实例是否开启冷热分层 + * + * @return string|null + */ + public function getIsTieredStorage() + { + return $this->get("IsTieredStorage"); + } + + /** + * IsTieredStorage: 实例是否开启冷热分层 + * + * @param string $isTieredStorage + */ + public function setIsTieredStorage($isTieredStorage) + { + $this->set("IsTieredStorage", $isTieredStorage); + } + + /** + * MultiZones: 实例所在可用区 + * + * @return string[]|null + */ + public function getMultiZones() + { + return $this->get("MultiZones"); + } + + /** + * MultiZones: 实例所在可用区 + * + * @param string[] $multiZones + */ + public function setMultiZones(array $multiZones) + { + $this->set("MultiZones", $multiZones); + } + + /** + * ExpireTimestamp: 实例过期时间 + * + * @return float|null + */ + public function getExpireTimestamp() + { + return $this->get("ExpireTimestamp"); + } + + /** + * ExpireTimestamp: 实例过期时间 + * + * @param float $expireTimestamp + */ + public function setExpireTimestamp($expireTimestamp) + { + $this->set("ExpireTimestamp", $expireTimestamp); + } +} diff --git a/src/UClickhouse/Models/ClickhouseDataDisk.php b/src/UClickhouse/Models/ClickhouseDataDisk.php new file mode 100644 index 0000000..336406f --- /dev/null +++ b/src/UClickhouse/Models/ClickhouseDataDisk.php @@ -0,0 +1,124 @@ +get("DiskType"); + } + + /** + * DiskType: 磁盘类型 + * + * @param string $diskType + */ + public function setDiskType($diskType) + { + $this->set("DiskType", $diskType); + } + + /** + * MinDiskSize: 最小值,GB + * + * @return integer|null + */ + public function getMinDiskSize() + { + return $this->get("MinDiskSize"); + } + + /** + * MinDiskSize: 最小值,GB + * + * @param int $minDiskSize + */ + public function setMinDiskSize($minDiskSize) + { + $this->set("MinDiskSize", $minDiskSize); + } + + /** + * MaxDiskSize: 最大值,GB + * + * @return integer|null + */ + public function getMaxDiskSize() + { + return $this->get("MaxDiskSize"); + } + + /** + * MaxDiskSize: 最大值,GB + * + * @param int $maxDiskSize + */ + public function setMaxDiskSize($maxDiskSize) + { + $this->set("MaxDiskSize", $maxDiskSize); + } + + /** + * DefaultDataDiskSize: 默认大小,GB + * + * @return integer|null + */ + public function getDefaultDataDiskSize() + { + return $this->get("DefaultDataDiskSize"); + } + + /** + * DefaultDataDiskSize: 默认大小,GB + * + * @param int $defaultDataDiskSize + */ + public function setDefaultDataDiskSize($defaultDataDiskSize) + { + $this->set("DefaultDataDiskSize", $defaultDataDiskSize); + } + + /** + * Step: 步长,GB + * + * @return integer|null + */ + public function getStep() + { + return $this->get("Step"); + } + + /** + * Step: 步长,GB + * + * @param int $step + */ + public function setStep($step) + { + $this->set("Step", $step); + } +} diff --git a/src/UClickhouse/Models/ClickhouseMachineType.php b/src/UClickhouse/Models/ClickhouseMachineType.php new file mode 100644 index 0000000..ef817f0 --- /dev/null +++ b/src/UClickhouse/Models/ClickhouseMachineType.php @@ -0,0 +1,96 @@ +get("ClickhouseMachineTypeName"); + } + + /** + * ClickhouseMachineTypeName: CK机型名称 + * + * @param string $clickhouseMachineTypeName + */ + public function setClickhouseMachineTypeName($clickhouseMachineTypeName) + { + $this->set("ClickhouseMachineTypeName", $clickhouseMachineTypeName); + } + + /** + * ClickhouseMachineTypeOptions: CK机型可选项 + * + * @return ClickhouseMachineTypeOption[]|null + */ + public function getClickhouseMachineTypeOptions() + { + $items = $this->get("ClickhouseMachineTypeOptions"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ClickhouseMachineTypeOption($item)); + } + return $result; + } + + /** + * ClickhouseMachineTypeOptions: CK机型可选项 + * + * @param ClickhouseMachineTypeOption[] $clickhouseMachineTypeOptions + */ + public function setClickhouseMachineTypeOptions(array $clickhouseMachineTypeOptions) + { + $result = []; + foreach ($clickhouseMachineTypeOptions as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * IsSecgroupMachineType: 机型是否支持安全组 + * + * @return string|null + */ + public function getIsSecgroupMachineType() + { + return $this->get("IsSecgroupMachineType"); + } + + /** + * IsSecgroupMachineType: 机型是否支持安全组 + * + * @param string $isSecgroupMachineType + */ + public function setIsSecgroupMachineType($isSecgroupMachineType) + { + $this->set("IsSecgroupMachineType", $isSecgroupMachineType); + } +} diff --git a/src/UClickhouse/Models/ClickhouseMachineTypeOption.php b/src/UClickhouse/Models/ClickhouseMachineTypeOption.php new file mode 100644 index 0000000..a976902 --- /dev/null +++ b/src/UClickhouse/Models/ClickhouseMachineTypeOption.php @@ -0,0 +1,156 @@ +get("ClickhouseMachineTypeId"); + } + + /** + * ClickhouseMachineTypeId: Clickhouse机型ID + * + * @param string $clickhouseMachineTypeId + */ + public function setClickhouseMachineTypeId($clickhouseMachineTypeId) + { + $this->set("ClickhouseMachineTypeId", $clickhouseMachineTypeId); + } + + /** + * MachineType: 机型 + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 机型 + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * CPU: CPU大小 + * + * @return integer|null + */ + public function getCPU() + { + return $this->get("CPU"); + } + + /** + * CPU: CPU大小 + * + * @param int $cpu + */ + public function setCPU($cpu) + { + $this->set("CPU", $cpu); + } + + /** + * Memory: 内存大小,GB + * + * @return integer|null + */ + public function getMemory() + { + return $this->get("Memory"); + } + + /** + * Memory: 内存大小,GB + * + * @param int $memory + */ + public function setMemory($memory) + { + $this->set("Memory", $memory); + } + + /** + * DataDisks: 数据盘列表 + * + * @return ClickhouseDataDisk[]|null + */ + public function getDataDisks() + { + $items = $this->get("DataDisks"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ClickhouseDataDisk($item)); + } + return $result; + } + + /** + * DataDisks: 数据盘列表 + * + * @param ClickhouseDataDisk[] $dataDisks + */ + public function setDataDisks(array $dataDisks) + { + $result = []; + foreach ($dataDisks as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * NodeCounts: 允许创建的节点个数 + * + * @return int[]|null + */ + public function getNodeCounts() + { + return $this->get("NodeCounts"); + } + + /** + * NodeCounts: 允许创建的节点个数 + * + * @param int[] $nodeCounts + */ + public function setNodeCounts(array $nodeCounts) + { + $this->set("NodeCounts", $nodeCounts); + } +} diff --git a/src/UClickhouse/Models/ClickhouseNode.php b/src/UClickhouse/Models/ClickhouseNode.php new file mode 100644 index 0000000..624dc50 --- /dev/null +++ b/src/UClickhouse/Models/ClickhouseNode.php @@ -0,0 +1,344 @@ +get("Zone"); + } + + /** + * Zone: 可用区名称 + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * NodeId: 节点ID + * + * @return string|null + */ + public function getNodeId() + { + return $this->get("NodeId"); + } + + /** + * NodeId: 节点ID + * + * @param string $nodeId + */ + public function setNodeId($nodeId) + { + $this->set("NodeId", $nodeId); + } + + /** + * ClusterId: 集群ID + * + * @return string|null + */ + public function getClusterId() + { + return $this->get("ClusterId"); + } + + /** + * ClusterId: 集群ID + * + * @param string $clusterId + */ + public function setClusterId($clusterId) + { + $this->set("ClusterId", $clusterId); + } + + /** + * NodeName: 节点名称 + * + * @return string|null + */ + public function getNodeName() + { + return $this->get("NodeName"); + } + + /** + * NodeName: 节点名称 + * + * @param string $nodeName + */ + public function setNodeName($nodeName) + { + $this->set("NodeName", $nodeName); + } + + /** + * CPU: CPU大小 + * + * @return integer|null + */ + public function getCPU() + { + return $this->get("CPU"); + } + + /** + * CPU: CPU大小 + * + * @param int $cpu + */ + public function setCPU($cpu) + { + $this->set("CPU", $cpu); + } + + /** + * Memory: 内存,GB + * + * @return integer|null + */ + public function getMemory() + { + return $this->get("Memory"); + } + + /** + * Memory: 内存,GB + * + * @param int $memory + */ + public function setMemory($memory) + { + $this->set("Memory", $memory); + } + + /** + * SysDiskSize: 系统盘大小,GB + * + * @return integer|null + */ + public function getSysDiskSize() + { + return $this->get("SysDiskSize"); + } + + /** + * SysDiskSize: 系统盘大小,GB + * + * @param int $sysDiskSize + */ + public function setSysDiskSize($sysDiskSize) + { + $this->set("SysDiskSize", $sysDiskSize); + } + + /** + * SysDiskType: 系统盘类型 + * + * @return string|null + */ + public function getSysDiskType() + { + return $this->get("SysDiskType"); + } + + /** + * SysDiskType: 系统盘类型 + * + * @param string $sysDiskType + */ + public function setSysDiskType($sysDiskType) + { + $this->set("SysDiskType", $sysDiskType); + } + + /** + * DataDiskSize: 数据盘大小,GB + * + * @return integer|null + */ + public function getDataDiskSize() + { + return $this->get("DataDiskSize"); + } + + /** + * DataDiskSize: 数据盘大小,GB + * + * @param int $dataDiskSize + */ + public function setDataDiskSize($dataDiskSize) + { + $this->set("DataDiskSize", $dataDiskSize); + } + + /** + * DataDiskType: 数据盘类型 + * + * @return string|null + */ + public function getDataDiskType() + { + return $this->get("DataDiskType"); + } + + /** + * DataDiskType: 数据盘类型 + * + * @param string $dataDiskType + */ + public function setDataDiskType($dataDiskType) + { + $this->set("DataDiskType", $dataDiskType); + } + + /** + * IPv4: ipv4 + * + * @return string|null + */ + public function getIPv4() + { + return $this->get("IPv4"); + } + + /** + * IPv4: ipv4 + * + * @param string $iPv4 + */ + public function setIPv4($iPv4) + { + $this->set("IPv4", $iPv4); + } + + /** + * CreateTimestamp: 创建时间 + * + * @return integer|null + */ + public function getCreateTimestamp() + { + return $this->get("CreateTimestamp"); + } + + /** + * CreateTimestamp: 创建时间 + * + * @param int $createTimestamp + */ + public function setCreateTimestamp($createTimestamp) + { + $this->set("CreateTimestamp", $createTimestamp); + } + + /** + * MachineType: 机型 + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 机型 + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * ShardGroup: 分片组 + * + * @return string|null + */ + public function getShardGroup() + { + return $this->get("ShardGroup"); + } + + /** + * ShardGroup: 分片组 + * + * @param string $shardGroup + */ + public function setShardGroup($shardGroup) + { + $this->set("ShardGroup", $shardGroup); + } + + /** + * ServiceStatus: 服务状态:RUNNING(运行中)、STARTING(启动中)、STOPPED(已停止)、RESTARTING(重启中) + * + * @return string|null + */ + public function getServiceStatus() + { + return $this->get("ServiceStatus"); + } + + /** + * ServiceStatus: 服务状态:RUNNING(运行中)、STARTING(启动中)、STOPPED(已停止)、RESTARTING(重启中) + * + * @param string $serviceStatus + */ + public function setServiceStatus($serviceStatus) + { + $this->set("ServiceStatus", $serviceStatus); + } + + /** + * ResourceId: 资源ID + * + * @return string|null + */ + public function getResourceId() + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: 资源ID + * + * @param string $resourceId + */ + public function setResourceId($resourceId) + { + $this->set("ResourceId", $resourceId); + } +} diff --git a/src/UClickhouse/Models/ClickhouseVersion.php b/src/UClickhouse/Models/ClickhouseVersion.php new file mode 100644 index 0000000..a812007 --- /dev/null +++ b/src/UClickhouse/Models/ClickhouseVersion.php @@ -0,0 +1,64 @@ +get("Version"); + } + + /** + * Version: 版本号 + * + * @param string $version + */ + public function setVersion($version) + { + $this->set("Version", $version); + } + + /** + * VersionName: 版本名称 + * + * @return string|null + */ + public function getVersionName() + { + return $this->get("VersionName"); + } + + /** + * VersionName: 版本名称 + * + * @param string $versionName + */ + public function setVersionName($versionName) + { + $this->set("VersionName", $versionName); + } +} diff --git a/src/UClickhouse/Models/CreateUClickhouseClusterResponseData.php b/src/UClickhouse/Models/CreateUClickhouseClusterResponseData.php new file mode 100644 index 0000000..51bcf60 --- /dev/null +++ b/src/UClickhouse/Models/CreateUClickhouseClusterResponseData.php @@ -0,0 +1,44 @@ +get("ClusterId"); + } + + /** + * ClusterId: 集群ID + * + * @param string $clusterId + */ + public function setClusterId($clusterId) + { + $this->set("ClusterId", $clusterId); + } +} diff --git a/src/UClickhouse/Models/DescribeUClickhouseClusterResponseData.php b/src/UClickhouse/Models/DescribeUClickhouseClusterResponseData.php new file mode 100644 index 0000000..189b642 --- /dev/null +++ b/src/UClickhouse/Models/DescribeUClickhouseClusterResponseData.php @@ -0,0 +1,128 @@ +get("ZookeeperNodes"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ZookeeperNode($item)); + } + return $result; + } + + /** + * ZookeeperNodes: Zookeeper节点列表,为空时,说明该集群没有zookeeper集群 + * + * @param ZookeeperNode[] $zookeeperNodes + */ + public function setZookeeperNodes(array $zookeeperNodes) + { + $result = []; + foreach ($zookeeperNodes as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * ClickhouseNodes: Clickhouse节点列表 + * + * @return ClickhouseNode[]|null + */ + public function getClickhouseNodes() + { + $items = $this->get("ClickhouseNodes"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ClickhouseNode($item)); + } + return $result; + } + + /** + * ClickhouseNodes: Clickhouse节点列表 + * + * @param ClickhouseNode[] $clickhouseNodes + */ + public function setClickhouseNodes(array $clickhouseNodes) + { + $result = []; + foreach ($clickhouseNodes as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * Payment: 支付信息 + * + * @return Payment|null + */ + public function getPayment() + { + return new Payment($this->get("Payment")); + } + + /** + * Payment: 支付信息 + * + * @param Payment $payment + */ + public function setPayment(array $payment) + { + $this->set("Payment", $payment->getAll()); + } + + /** + * Cluster: 集群信息 + * + * @return ClickhouseCluster|null + */ + public function getCluster() + { + return new ClickhouseCluster($this->get("Cluster")); + } + + /** + * Cluster: 集群信息 + * + * @param ClickhouseCluster $cluster + */ + public function setCluster(array $cluster) + { + $this->set("Cluster", $cluster->getAll()); + } +} diff --git a/src/UClickhouse/Models/GetCreateUClickhouseClusterOptionResponseData.php b/src/UClickhouse/Models/GetCreateUClickhouseClusterOptionResponseData.php new file mode 100644 index 0000000..fd0c4be --- /dev/null +++ b/src/UClickhouse/Models/GetCreateUClickhouseClusterOptionResponseData.php @@ -0,0 +1,140 @@ +get("ClickhouseVersions"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ClickhouseVersion($item)); + } + return $result; + } + + /** + * ClickhouseVersions: 支持的CK版本 + * + * @param ClickhouseVersion[] $clickhouseVersions + */ + public function setClickhouseVersions(array $clickhouseVersions) + { + $result = []; + foreach ($clickhouseVersions as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * ClickhouseMachineTypes: 支持的CK机型 + * + * @return ClickhouseMachineType[]|null + */ + public function getClickhouseMachineTypes() + { + $items = $this->get("ClickhouseMachineTypes"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ClickhouseMachineType($item)); + } + return $result; + } + + /** + * ClickhouseMachineTypes: 支持的CK机型 + * + * @param ClickhouseMachineType[] $clickhouseMachineTypes + */ + public function setClickhouseMachineTypes(array $clickhouseMachineTypes) + { + $result = []; + foreach ($clickhouseMachineTypes as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * MaxNodeCount: 实例可创建的最大节点数量 + * + * @return integer|null + */ + public function getMaxNodeCount() + { + return $this->get("MaxNodeCount"); + } + + /** + * MaxNodeCount: 实例可创建的最大节点数量 + * + * @param int $maxNodeCount + */ + public function setMaxNodeCount($maxNodeCount) + { + $this->set("MaxNodeCount", $maxNodeCount); + } + + /** + * ZookeeperMachineTypes: 支持的Zookeeper机型 + * + * @return ClickhouseMachineType[]|null + */ + public function getZookeeperMachineTypes() + { + $items = $this->get("ZookeeperMachineTypes"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ClickhouseMachineType($item)); + } + return $result; + } + + /** + * ZookeeperMachineTypes: 支持的Zookeeper机型 + * + * @param ClickhouseMachineType[] $zookeeperMachineTypes + */ + public function setZookeeperMachineTypes(array $zookeeperMachineTypes) + { + $result = []; + foreach ($zookeeperMachineTypes as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UClickhouse/Models/ListUClickhouseClusterResponseData.php b/src/UClickhouse/Models/ListUClickhouseClusterResponseData.php new file mode 100644 index 0000000..e89f544 --- /dev/null +++ b/src/UClickhouse/Models/ListUClickhouseClusterResponseData.php @@ -0,0 +1,64 @@ +get("Clusters")); + } + + /** + * Clusters: 集群列表 + * + * @param ClickhouseCluster $clusters + */ + public function setClusters(array $clusters) + { + $this->set("Clusters", $clusters->getAll()); + } + + /** + * TotalCount: 集群总数 + * + * @return integer|null + */ + public function getTotalCount() + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 集群总数 + * + * @param int $totalCount + */ + public function setTotalCount($totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/UClickhouse/Models/Payment.php b/src/UClickhouse/Models/Payment.php new file mode 100644 index 0000000..9cb7c00 --- /dev/null +++ b/src/UClickhouse/Models/Payment.php @@ -0,0 +1,144 @@ +get("CreateTimestamp"); + } + + /** + * CreateTimestamp: 创建时间 + * + * @param int $createTimestamp + */ + public function setCreateTimestamp($createTimestamp) + { + $this->set("CreateTimestamp", $createTimestamp); + } + + /** + * ExpireTimestamp: 过期时间 + * + * @return integer|null + */ + public function getExpireTimestamp() + { + return $this->get("ExpireTimestamp"); + } + + /** + * ExpireTimestamp: 过期时间 + * + * @param int $expireTimestamp + */ + public function setExpireTimestamp($expireTimestamp) + { + $this->set("ExpireTimestamp", $expireTimestamp); + } + + /** + * ChargeType: 支付类型 + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 支付类型 + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Price: 价格 + * + * @return integer|null + */ + public function getPrice() + { + return $this->get("Price"); + } + + /** + * Price: 价格 + * + * @param int $price + */ + public function setPrice($price) + { + $this->set("Price", $price); + } + + /** + * OriginalPrice: 原始价格 + * + * @return integer|null + */ + public function getOriginalPrice() + { + return $this->get("OriginalPrice"); + } + + /** + * OriginalPrice: 原始价格 + * + * @param int $originalPrice + */ + public function setOriginalPrice($originalPrice) + { + $this->set("OriginalPrice", $originalPrice); + } + + /** + * ResourceId: 资源ID + * + * @return string|null + */ + public function getResourceId() + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: 资源ID + * + * @param string $resourceId + */ + public function setResourceId($resourceId) + { + $this->set("ResourceId", $resourceId); + } +} diff --git a/src/UClickhouse/Models/ZookeeperNode.php b/src/UClickhouse/Models/ZookeeperNode.php new file mode 100644 index 0000000..f59065e --- /dev/null +++ b/src/UClickhouse/Models/ZookeeperNode.php @@ -0,0 +1,324 @@ +get("Zone"); + } + + /** + * Zone: 可用区名称 + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * NodeId: 节点ID + * + * @return string|null + */ + public function getNodeId() + { + return $this->get("NodeId"); + } + + /** + * NodeId: 节点ID + * + * @param string $nodeId + */ + public function setNodeId($nodeId) + { + $this->set("NodeId", $nodeId); + } + + /** + * ClusterId: 集群ID + * + * @return string|null + */ + public function getClusterId() + { + return $this->get("ClusterId"); + } + + /** + * ClusterId: 集群ID + * + * @param string $clusterId + */ + public function setClusterId($clusterId) + { + $this->set("ClusterId", $clusterId); + } + + /** + * NodeName: 节点名称 + * + * @return string|null + */ + public function getNodeName() + { + return $this->get("NodeName"); + } + + /** + * NodeName: 节点名称 + * + * @param string $nodeName + */ + public function setNodeName($nodeName) + { + $this->set("NodeName", $nodeName); + } + + /** + * CPU: CPU + * + * @return integer|null + */ + public function getCPU() + { + return $this->get("CPU"); + } + + /** + * CPU: CPU + * + * @param int $cpu + */ + public function setCPU($cpu) + { + $this->set("CPU", $cpu); + } + + /** + * Memory: 内存 + * + * @return integer|null + */ + public function getMemory() + { + return $this->get("Memory"); + } + + /** + * Memory: 内存 + * + * @param int $memory + */ + public function setMemory($memory) + { + $this->set("Memory", $memory); + } + + /** + * SysDiskSize: 系统盘大小 + * + * @return integer|null + */ + public function getSysDiskSize() + { + return $this->get("SysDiskSize"); + } + + /** + * SysDiskSize: 系统盘大小 + * + * @param int $sysDiskSize + */ + public function setSysDiskSize($sysDiskSize) + { + $this->set("SysDiskSize", $sysDiskSize); + } + + /** + * SysDiskType: 系统盘类型 + * + * @return string|null + */ + public function getSysDiskType() + { + return $this->get("SysDiskType"); + } + + /** + * SysDiskType: 系统盘类型 + * + * @param string $sysDiskType + */ + public function setSysDiskType($sysDiskType) + { + $this->set("SysDiskType", $sysDiskType); + } + + /** + * DataDiskSize: 数据盘大小 + * + * @return integer|null + */ + public function getDataDiskSize() + { + return $this->get("DataDiskSize"); + } + + /** + * DataDiskSize: 数据盘大小 + * + * @param int $dataDiskSize + */ + public function setDataDiskSize($dataDiskSize) + { + $this->set("DataDiskSize", $dataDiskSize); + } + + /** + * DataDiskType: 数据盘类型 + * + * @return string|null + */ + public function getDataDiskType() + { + return $this->get("DataDiskType"); + } + + /** + * DataDiskType: 数据盘类型 + * + * @param string $dataDiskType + */ + public function setDataDiskType($dataDiskType) + { + $this->set("DataDiskType", $dataDiskType); + } + + /** + * CreateTimestamp: 创建时间 + * + * @return integer|null + */ + public function getCreateTimestamp() + { + return $this->get("CreateTimestamp"); + } + + /** + * CreateTimestamp: 创建时间 + * + * @param int $createTimestamp + */ + public function setCreateTimestamp($createTimestamp) + { + $this->set("CreateTimestamp", $createTimestamp); + } + + /** + * MachineType: 机型 + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 机型 + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * ZookeeperMyId: zookeeper的myid + * + * @return string|null + */ + public function getZookeeperMyId() + { + return $this->get("ZookeeperMyId"); + } + + /** + * ZookeeperMyId: zookeeper的myid + * + * @param string $zookeeperMyId + */ + public function setZookeeperMyId($zookeeperMyId) + { + $this->set("ZookeeperMyId", $zookeeperMyId); + } + + /** + * ServiceStatus: 服务状态:RUNNING(运行中)、STARTING(启动中)、STOPPED(已停止)、RESTARTING(重启中) + * + * @return string|null + */ + public function getServiceStatus() + { + return $this->get("ServiceStatus"); + } + + /** + * ServiceStatus: 服务状态:RUNNING(运行中)、STARTING(启动中)、STOPPED(已停止)、RESTARTING(重启中) + * + * @param string $serviceStatus + */ + public function setServiceStatus($serviceStatus) + { + $this->set("ServiceStatus", $serviceStatus); + } + + /** + * ResourceId: 资源ID + * + * @return string|null + */ + public function getResourceId() + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: 资源ID + * + * @param string $resourceId + */ + public function setResourceId($resourceId) + { + $this->set("ResourceId", $resourceId); + } +} diff --git a/src/UClickhouse/Params/CreateUClickhouseClusterParamLabels.php b/src/UClickhouse/Params/CreateUClickhouseClusterParamLabels.php new file mode 100644 index 0000000..27c7885 --- /dev/null +++ b/src/UClickhouse/Params/CreateUClickhouseClusterParamLabels.php @@ -0,0 +1,64 @@ +get("Key"); + } + + /** + * Key: 标签的key + * + * @param string $key + */ + public function setKey($key) + { + $this->set("Key", $key); + } + + /** + * Value: 标签的value + * + * @return string|null + */ + public function getValue() + { + return $this->get("Value"); + } + + /** + * Value: 标签的value + * + * @param string $value + */ + public function setValue($value) + { + $this->set("Value", $value); + } +} diff --git a/src/UClickhouse/UClickhouseClient.php b/src/UClickhouse/UClickhouseClient.php new file mode 100644 index 0000000..6372083 --- /dev/null +++ b/src/UClickhouse/UClickhouseClient.php @@ -0,0 +1,468 @@ + (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "ClickhouseMachineTypeId" => (string) 集群机型,可通过GetUClickhouseClusterCreateOption接口获取具体值 + * "DataDiskType" => (string) 数据盘类型,可通过GetUClickhouseClusterCreateOption接口获取具体值 + * "ClickhouseVersion" => (string) Clickhouse版本,可通过GetUClickhouseClusterCreateOption接口获取具体版本 + * "VPCId" => (string) VPC ID + * "SubnetId" => (string) 子网ID + * "AdminPassword" => (string) 集群管理员密码,密码规则:1.密码长度限8-32个字符2.不能包含[A-Z],[a-z],[0-9]和[@#%^*+=_;:,?!&()-]之外的字符3.需要同时包含两项或以上(大写字母/小写字母/数字/特殊符号) + * "ShardCount" => (integer) 分片数量,若传递,则至少1个分片,默认值为1 + * "ReplicateCount" => (integer) 副本数量,取值为1或2,1为单副本(非高可用),2为双副本(高可用),默认值为高可用(即为2) + * "DataDiskSize" => (integer) 数据盘大小,最小100,步长为50,默认值为100,单位GB + * "ChargeType" => (string) 付费类型,枚举值:Year(年付),Month(月付),Dynamic(时付),默认值为Month,月付 + * "Quantity" => (integer) 购买时长,默认值为1。月付时,此参数传0,代表购买至月末 + * "BackupId" => (string) 备份任务ID,从备份恢复时,该字段必传,此值为备份任务ID,可以从原集群备份任务列表(ListUClickhouseBackups)获取 + * "ClusterName" => (string) 实例名称名称规则:1.长度为1-50位的字符2.不能包含_,中文,[A-Z],[a-z],[0-9]之外的非法字符,集群名称默认为clickhouse + * "IsZookeeperHA" => (boolean) 是否Zookeeper高可用,true为zookeeper高可用,false为非高可用,默认为true,高可用 + * "IsSecGroup" => (string) 是否开启安全组,true为开启,false为不开启,默认为false,不开启安全组 + * "IsMultiZone" => (string) 是否多可用区,默认为false + * "ZookeeperMachineTypeId" => (string) Zookeeper机型ID,IsZookeeperHA为true时,必传,可通过GetUClickhouseClusterCreateOption接口获取具体值 + * "ZookeeperDataDiskType" => (string) Zookeeper数据盘类型,IsZookeeperHA为true时,必传,可通过GetUClickhouseClusterCreateOption接口获取具体值 + * "ZookeeperDataDiskSize" => (string) Zookeeper数据盘大小,IsZookeeperHA为true时,必传,最小100,步长为50 + * "SecGroupIds" => (string) 安全组ID,IsSecGroup为true时,必传 + * "MultiZones" => (array) 【数组】可用区名称,IsMultiZone为true时,必传,可通过ListUClickhouseAvailableZone获取支持的可用区 + * "Labels" => (array) [ + * [ + * "Key" => (string) 标签的key + * "Value" => (string) 标签的value + * ] + * ] + * ] + * + * Outputs: + * + * $outputs = [ + * "Data" => (object) 返回数据[ + * "ClusterId" => (string) 集群ID + * ] + * ] + * + * @return CreateUClickhouseClusterResponse + * @throws UCloudException + */ + public function createUClickhouseCluster(CreateUClickhouseClusterRequest $request = null) + { + $resp = $this->invoke($request); + return new CreateUClickhouseClusterResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUClickhouseCluster - 获取集群信息 + * + * See also: https://docs.ucloud.cn/api/uclickhouse-api/describe_u_clickhouse_cluster + * + * 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) 集群ID + * ] + * + * Outputs: + * + * $outputs = [ + * "Data" => (object) 返回数据[ + * "ZookeeperNodes" => (array) Zookeeper节点列表,为空时,说明该集群没有zookeeper集群[ + * [ + * "Zone" => (string) 可用区名称 + * "NodeId" => (string) 节点ID + * "ClusterId" => (string) 集群ID + * "NodeName" => (string) 节点名称 + * "CPU" => (integer) CPU + * "Memory" => (integer) 内存 + * "SysDiskSize" => (integer) 系统盘大小 + * "SysDiskType" => (string) 系统盘类型 + * "DataDiskSize" => (integer) 数据盘大小 + * "DataDiskType" => (string) 数据盘类型 + * "CreateTimestamp" => (integer) 创建时间 + * "MachineType" => (string) 机型 + * "ZookeeperMyId" => (string) zookeeper的myid + * "ServiceStatus" => (string) 服务状态:RUNNING(运行中)、STARTING(启动中)、STOPPED(已停止)、RESTARTING(重启中) + * "ResourceId" => (string) 资源ID + * ] + * ] + * "ClickhouseNodes" => (array) Clickhouse节点列表[ + * [ + * "Zone" => (string) 可用区名称 + * "NodeId" => (string) 节点ID + * "ClusterId" => (string) 集群ID + * "NodeName" => (string) 节点名称 + * "CPU" => (integer) CPU大小 + * "Memory" => (integer) 内存,GB + * "SysDiskSize" => (integer) 系统盘大小,GB + * "SysDiskType" => (string) 系统盘类型 + * "DataDiskSize" => (integer) 数据盘大小,GB + * "DataDiskType" => (string) 数据盘类型 + * "IPv4" => (string) ipv4 + * "CreateTimestamp" => (integer) 创建时间 + * "MachineType" => (string) 机型 + * "ShardGroup" => (string) 分片组 + * "ServiceStatus" => (string) 服务状态:RUNNING(运行中)、STARTING(启动中)、STOPPED(已停止)、RESTARTING(重启中) + * "ResourceId" => (string) 资源ID + * ] + * ] + * "Payment" => (object) 支付信息[ + * "CreateTimestamp" => (integer) 创建时间 + * "ExpireTimestamp" => (integer) 过期时间 + * "ChargeType" => (string) 支付类型 + * "Price" => (integer) 价格 + * "OriginalPrice" => (integer) 原始价格 + * "ResourceId" => (string) 资源ID + * ] + * "Cluster" => (object) 集群信息[ + * "ClusterId" => (string) 集群ID + * "TopOrganizationId" => (integer) 公司ID + * "OrganizationId" => (integer) 项目ID + * "ClusterName" => (string) 集群名称 + * "VPCId" => (string) VPCID + * "SubnetId" => (string) 子网ID + * "ClickhouseVersion" => (string) 集群版本 + * "ZookeeperVersion" => (string) Zookeeper版本 + * "MachineType" => (string) 机型 + * "Status" => (string) 集群状态:CREATING(创建中)、RUNNING(运行中)、RESIZING(变配中)、RESTARTING(重启中)、UPGRADING(升级中)、DESTROYING(销毁中)、DESTROYED(已删除)、CREATE_FAILED(创建失败)、RESTART_FAILED(重启失败)、DESTROY_FAILED(删除失败)、RESIZE_FAILED(变配失败)、BACKUP_RESTORING(备份恢复中)、BACKUP_RESTORE_FAILED(备份恢复失败)、EXPANDING(扩容中)、EXPAND_FAILED(扩容失败) + * "ShardCount" => (integer) 分片数 + * "ReplicateCount" => (integer) 副本数 + * "CreateTimestamp" => (integer) 集群创建时间 + * "ClickhouseMachineTypeId" => (string) Clickhouse机型ID + * "ClickhouseMachineTypeName" => (string) Clickhouse机型名称 + * "RegionId" => (integer) 地域ID + * "ZookeeperMachineTypeId" => (string) Zookeeper机型ID + * "ZookeeperMachineTypeName" => (string) Zookeeper机型名称 + * "ClickhouseDataDiskType" => (string) Clickhouse数据盘类型 + * "ClickhouseDataDiskSize" => (integer) Clickhouse数据盘大小 + * "ZookeeperDataDiskType" => (string) Zookeeper数据盘类型 + * "ZookeeperDataDiskSize" => (integer) Zookeeper数据盘大小 + * "ClickhouseNodeCPU" => (integer) Clickhouse节点CPU + * "ClickhouseNodeMemory" => (integer) Clickhouse内存 + * "ZookeeperNodeCPU" => (integer) Zookeeper节点CPU + * "ZookeeperNodeMemory" => (integer) Zookeeper节点内存 + * "IsZookeeperHA" => (string) Zookeeper是否高可用 + * "IsSecgroup" => (string) 实例是否开启安全组 + * "IsBackup" => (string) 实例是否开启备份 + * "IsTieredStorage" => (string) 实例是否开启冷热分层 + * "MultiZones" => (array) 实例所在可用区 + * "ExpireTimestamp" => (number) 实例过期时间 + * ] + * ] + * ] + * + * @return DescribeUClickhouseClusterResponse + * @throws UCloudException + */ + public function describeUClickhouseCluster(DescribeUClickhouseClusterRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeUClickhouseClusterResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DestroyUClickhouseCluster - 删除CK集群 + * + * See also: https://docs.ucloud.cn/api/uclickhouse-api/destroy_u_clickhouse_cluster + * + * 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) 集群ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return DestroyUClickhouseClusterResponse + * @throws UCloudException + */ + public function destroyUClickhouseCluster(DestroyUClickhouseClusterRequest $request = null) + { + $resp = $this->invoke($request); + return new DestroyUClickhouseClusterResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ExpandUClickhouseCluster - 集群水平扩容 + * + * See also: https://docs.ucloud.cn/api/uclickhouse-api/expand_u_clickhouse_cluster + * + * 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) 集群ID + * "TotalNodeCount" => (integer) 扩容后集群的节点数量,集群为高可用时,需要传入偶数个节点 + * "SyncNodeId" => (string) 水平扩容时,选择某一个原节点的ID,用于同步表结构/用户信息。不传递时,表示不同步表结构/用户信息,仅水平扩容节点数量 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return ExpandUClickhouseClusterResponse + * @throws UCloudException + */ + public function expandUClickhouseCluster(ExpandUClickhouseClusterRequest $request = null) + { + $resp = $this->invoke($request); + return new ExpandUClickhouseClusterResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUClickhouseClusterCreateOption - 获取Clickhouse的创建配置项 + * + * See also: https://docs.ucloud.cn/api/uclickhouse-api/get_u_clickhouse_cluster_create_option + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目Id + * ] + * + * Outputs: + * + * $outputs = [ + * "Data" => (object) 数据[ + * "ClickhouseVersions" => (array) 支持的CK版本[ + * [ + * "Version" => (string) 版本号 + * "VersionName" => (string) 版本名称 + * ] + * ] + * "ClickhouseMachineTypes" => (array) 支持的CK机型[ + * [ + * "ClickhouseMachineTypeName" => (string) CK机型名称 + * "ClickhouseMachineTypeOptions" => (array) CK机型可选项[ + * [ + * "ClickhouseMachineTypeId" => (string) Clickhouse机型ID + * "MachineType" => (string) 机型 + * "CPU" => (integer) CPU大小 + * "Memory" => (integer) 内存大小,GB + * "DataDisks" => (array) 数据盘列表[ + * [ + * "DiskType" => (string) 磁盘类型 + * "MinDiskSize" => (integer) 最小值,GB + * "MaxDiskSize" => (integer) 最大值,GB + * "DefaultDataDiskSize" => (integer) 默认大小,GB + * "Step" => (integer) 步长,GB + * ] + * ] + * "NodeCounts" => (array) 允许创建的节点个数 + * ] + * ] + * "IsSecgroupMachineType" => (string) 机型是否支持安全组 + * ] + * ] + * "MaxNodeCount" => (integer) 实例可创建的最大节点数量 + * "ZookeeperMachineTypes" => (array) 支持的Zookeeper机型[ + * [ + * "ClickhouseMachineTypeName" => (string) CK机型名称 + * "ClickhouseMachineTypeOptions" => (array) CK机型可选项[ + * [ + * "ClickhouseMachineTypeId" => (string) Clickhouse机型ID + * "MachineType" => (string) 机型 + * "CPU" => (integer) CPU大小 + * "Memory" => (integer) 内存大小,GB + * "DataDisks" => (array) 数据盘列表[ + * [ + * "DiskType" => (string) 磁盘类型 + * "MinDiskSize" => (integer) 最小值,GB + * "MaxDiskSize" => (integer) 最大值,GB + * "DefaultDataDiskSize" => (integer) 默认大小,GB + * "Step" => (integer) 步长,GB + * ] + * ] + * "NodeCounts" => (array) 允许创建的节点个数 + * ] + * ] + * "IsSecgroupMachineType" => (string) 机型是否支持安全组 + * ] + * ] + * ] + * ] + * + * @return GetUClickhouseClusterCreateOptionResponse + * @throws UCloudException + */ + public function getUClickhouseClusterCreateOption(GetUClickhouseClusterCreateOptionRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUClickhouseClusterCreateOptionResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListUClickhouseCluster - 获取UClickhouse集群列表 + * + * See also: https://docs.ucloud.cn/api/uclickhouse-api/list_u_clickhouse_cluster + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * ] + * + * Outputs: + * + * $outputs = [ + * "Data" => (object) 返回数据[ + * "Clusters" => (object) 集群列表[ + * "ClusterId" => (string) 集群ID + * "TopOrganizationId" => (integer) 公司ID + * "OrganizationId" => (integer) 项目ID + * "ClusterName" => (string) 集群名称 + * "VPCId" => (string) VPCID + * "SubnetId" => (string) 子网ID + * "ClickhouseVersion" => (string) 集群版本 + * "ZookeeperVersion" => (string) Zookeeper版本 + * "MachineType" => (string) 机型 + * "Status" => (string) 集群状态:CREATING(创建中)、RUNNING(运行中)、RESIZING(变配中)、RESTARTING(重启中)、UPGRADING(升级中)、DESTROYING(销毁中)、DESTROYED(已删除)、CREATE_FAILED(创建失败)、RESTART_FAILED(重启失败)、DESTROY_FAILED(删除失败)、RESIZE_FAILED(变配失败)、BACKUP_RESTORING(备份恢复中)、BACKUP_RESTORE_FAILED(备份恢复失败)、EXPANDING(扩容中)、EXPAND_FAILED(扩容失败) + * "ShardCount" => (integer) 分片数 + * "ReplicateCount" => (integer) 副本数 + * "CreateTimestamp" => (integer) 集群创建时间 + * "ClickhouseMachineTypeId" => (string) Clickhouse机型ID + * "ClickhouseMachineTypeName" => (string) Clickhouse机型名称 + * "RegionId" => (integer) 地域ID + * "ZookeeperMachineTypeId" => (string) Zookeeper机型ID + * "ZookeeperMachineTypeName" => (string) Zookeeper机型名称 + * "ClickhouseDataDiskType" => (string) Clickhouse数据盘类型 + * "ClickhouseDataDiskSize" => (integer) Clickhouse数据盘大小 + * "ZookeeperDataDiskType" => (string) Zookeeper数据盘类型 + * "ZookeeperDataDiskSize" => (integer) Zookeeper数据盘大小 + * "ClickhouseNodeCPU" => (integer) Clickhouse节点CPU + * "ClickhouseNodeMemory" => (integer) Clickhouse内存 + * "ZookeeperNodeCPU" => (integer) Zookeeper节点CPU + * "ZookeeperNodeMemory" => (integer) Zookeeper节点内存 + * "IsZookeeperHA" => (string) Zookeeper是否高可用 + * "IsSecgroup" => (string) 实例是否开启安全组 + * "IsBackup" => (string) 实例是否开启备份 + * "IsTieredStorage" => (string) 实例是否开启冷热分层 + * "MultiZones" => (array) 实例所在可用区 + * "ExpireTimestamp" => (number) 实例过期时间 + * ] + * "TotalCount" => (integer) 集群总数 + * ] + * ] + * + * @return ListUClickhouseClusterResponse + * @throws UCloudException + */ + public function listUClickhouseCluster(ListUClickhouseClusterRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUClickhouseClusterResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ResizeUClickhouseCluster - 集群改配 + * + * See also: https://docs.ucloud.cn/api/uclickhouse-api/resize_u_clickhouse_cluster + * + * 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) 集群ID + * "TargetMachineTypeId" => (string) 目标机型ID,可通过GetUClickhouseClusterCreateOption接口获取具体值,与TargetDataDiskSize不能同时为空 + * "TargetDataDiskSize" => (integer) 目标磁盘大小,单位GB,只能扩容,与TargetMachineTypeId不能同时为空 + * "IsZooKeeperNode" => (boolean) 是否为zookeeper节点,为true时表示升级zookeeper节点规格,为false时表示升级clickhouse节点规格,默认为false + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return ResizeUClickhouseClusterResponse + * @throws UCloudException + */ + public function resizeUClickhouseCluster(ResizeUClickhouseClusterRequest $request = null) + { + $resp = $this->invoke($request); + return new ResizeUClickhouseClusterResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * RestartUClickhouseClusterService - 重启集群的UClickhouse服务 + * + * See also: https://docs.ucloud.cn/api/uclickhouse-api/restart_u_clickhouse_cluster_service + * + * 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) 集群ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return RestartUClickhouseClusterServiceResponse + * @throws UCloudException + */ + public function restartUClickhouseClusterService(RestartUClickhouseClusterServiceRequest $request = null) + { + $resp = $this->invoke($request); + return new RestartUClickhouseClusterServiceResponse($resp->toArray(), $resp->getRequestId()); + } +} diff --git a/src/UES/Apis/CreateUESInstanceRequest.php b/src/UES/Apis/CreateUESInstanceRequest.php new file mode 100644 index 0000000..8fe0f6b --- /dev/null +++ b/src/UES/Apis/CreateUESInstanceRequest.php @@ -0,0 +1,599 @@ + "CreateUESInstance"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("InstanceName"); + $this->markRequired("NodeConf"); + $this->markRequired("VPCId"); + $this->markRequired("SubnetId"); + $this->markRequired("KibanaNodeConf"); + $this->markRequired("KibanaNodeDiskConf"); + $this->markRequired("AppVersion"); + $this->markRequired("NodeDiskConf"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * InstanceName: 实例名称 + * + * @return string|null + */ + public function getInstanceName() + { + return $this->get("InstanceName"); + } + + /** + * InstanceName: 实例名称 + * + * @param string $instanceName + */ + public function setInstanceName($instanceName) + { + $this->set("InstanceName", $instanceName); + } + + /** + * NodeConf: 节点配置标识, 支持的机型可通过GetUESNodeConf NodeConfList[].NodeConf + * + * @return string|null + */ + public function getNodeConf() + { + return $this->get("NodeConf"); + } + + /** + * NodeConf: 节点配置标识, 支持的机型可通过GetUESNodeConf NodeConfList[].NodeConf + * + * @param string $nodeConf + */ + public function setNodeConf($nodeConf) + { + $this->set("NodeConf", $nodeConf); + } + + /** + * VPCId: VPCID标识 + * + * @return string|null + */ + public function getVPCId() + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPCID标识 + * + * @param string $vpcId + */ + public function setVPCId($vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: 子网ID标识 + * + * @return string|null + */ + public function getSubnetId() + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网ID标识 + * + * @param string $subnetId + */ + public function setSubnetId($subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * KibanaNodeConf: Kibana节点配置, 支持的机型可通过GetUESNodeConf NodeConfList[].NodeConf + * + * @return string|null + */ + public function getKibanaNodeConf() + { + return $this->get("KibanaNodeConf"); + } + + /** + * KibanaNodeConf: Kibana节点配置, 支持的机型可通过GetUESNodeConf NodeConfList[].NodeConf + * + * @param string $kibanaNodeConf + */ + public function setKibanaNodeConf($kibanaNodeConf) + { + $this->set("KibanaNodeConf", $kibanaNodeConf); + } + + /** + * KibanaNodeDiskConf: Kibana节点磁盘类型 + * + * @return string|null + */ + public function getKibanaNodeDiskConf() + { + return $this->get("KibanaNodeDiskConf"); + } + + /** + * KibanaNodeDiskConf: Kibana节点磁盘类型 + * + * @param string $kibanaNodeDiskConf + */ + public function setKibanaNodeDiskConf($kibanaNodeDiskConf) + { + $this->set("KibanaNodeDiskConf", $kibanaNodeDiskConf); + } + + /** + * AppVersion: 应用服务版本号,支持的类型通过GetUESAppVersion AppVersionList[].AppVersion + * + * @return string|null + */ + public function getAppVersion() + { + return $this->get("AppVersion"); + } + + /** + * AppVersion: 应用服务版本号,支持的类型通过GetUESAppVersion AppVersionList[].AppVersion + * + * @param string $appVersion + */ + public function setAppVersion($appVersion) + { + $this->set("AppVersion", $appVersion); + } + + /** + * NodeDiskConf: 磁盘类型 + * + * @return string|null + */ + public function getNodeDiskConf() + { + return $this->get("NodeDiskConf"); + } + + /** + * NodeDiskConf: 磁盘类型 + * + * @param string $nodeDiskConf + */ + public function setNodeDiskConf($nodeDiskConf) + { + $this->set("NodeDiskConf", $nodeDiskConf); + } + + /** + * NodeSize: 节点个数,默认数目为3 + * + * @return integer|null + */ + public function getNodeSize() + { + return $this->get("NodeSize"); + } + + /** + * NodeSize: 节点个数,默认数目为3 + * + * @param int $nodeSize + */ + public function setNodeSize($nodeSize) + { + $this->set("NodeSize", $nodeSize); + } + + /** + * NodeDiskSize: 节点磁盘大小,默认为100G + * + * @return integer|null + */ + public function getNodeDiskSize() + { + return $this->get("NodeDiskSize"); + } + + /** + * NodeDiskSize: 节点磁盘大小,默认为100G + * + * @param int $nodeDiskSize + */ + public function setNodeDiskSize($nodeDiskSize) + { + $this->set("NodeDiskSize", $nodeDiskSize); + } + + /** + * ServiceUserName: elasticsearch 服务用户名称,默认为elastic;OpenSearch 服务用户名称,固定为admin + * + * @return string|null + */ + public function getServiceUserName() + { + return $this->get("ServiceUserName"); + } + + /** + * ServiceUserName: elasticsearch 服务用户名称,默认为elastic;OpenSearch 服务用户名称,固定为admin + * + * @param string $serviceUserName + */ + public function setServiceUserName($serviceUserName) + { + $this->set("ServiceUserName", $serviceUserName); + } + + /** + * ServicePasswd: 服务用户密码,默认为changeme + * + * @return string|null + */ + public function getServicePasswd() + { + return $this->get("ServicePasswd"); + } + + /** + * ServicePasswd: 服务用户密码,默认为changeme + * + * @param string $servicePasswd + */ + public function setServicePasswd($servicePasswd) + { + $this->set("ServicePasswd", $servicePasswd); + } + + /** + * AppName: 应用名称,支持的类型通过GetUESAppVersion AppVersionList[].AppName, 默认为elasticsearch + * + * @return string|null + */ + public function getAppName() + { + return $this->get("AppName"); + } + + /** + * AppName: 应用名称,支持的类型通过GetUESAppVersion AppVersionList[].AppName, 默认为elasticsearch + * + * @param string $appName + */ + public function setAppName($appName) + { + $this->set("AppName", $appName); + } + + /** + * Remark: 备注,默认为空 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 备注,默认为空 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * ChargeType: 计费类型,默认为Month + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费类型,默认为Month + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 计费长度,默认为1 + * + * @return integer|null + */ + public function getQuantity() + { + return $this->get("Quantity"); + } + + /** + * Quantity: 计费长度,默认为1 + * + * @param int $quantity + */ + public function setQuantity($quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * MasterConf: 主节点类型标示,支持的机型可通过GetUESNodeConf NodeConfList[].NodeConf, 默认为空 + * + * @return string|null + */ + public function getMasterConf() + { + return $this->get("MasterConf"); + } + + /** + * MasterConf: 主节点类型标示,支持的机型可通过GetUESNodeConf NodeConfList[].NodeConf, 默认为空 + * + * @param string $masterConf + */ + public function setMasterConf($masterConf) + { + $this->set("MasterConf", $masterConf); + } + + /** + * BusinessId: 业务组ID标识 + * + * @return string|null + */ + public function getBusinessId() + { + return $this->get("BusinessId"); + } + + /** + * BusinessId: 业务组ID标识 + * + * @param string $businessId + */ + public function setBusinessId($businessId) + { + $this->set("BusinessId", $businessId); + } + + /** + * CoordinatingNodeConf: Coordinating节点机型配置,, 支持的机型可通过GetUESNodeConf NodeConfList[].NodeConf, 默认为空 + * + * @return string|null + */ + public function getCoordinatingNodeConf() + { + return $this->get("CoordinatingNodeConf"); + } + + /** + * CoordinatingNodeConf: Coordinating节点机型配置,, 支持的机型可通过GetUESNodeConf NodeConfList[].NodeConf, 默认为空 + * + * @param string $coordinatingNodeConf + */ + public function setCoordinatingNodeConf($coordinatingNodeConf) + { + $this->set("CoordinatingNodeConf", $coordinatingNodeConf); + } + + /** + * CoordinatingNodeSize: Coordinating节点数量 + * + * @return integer|null + */ + public function getCoordinatingNodeSize() + { + return $this->get("CoordinatingNodeSize"); + } + + /** + * CoordinatingNodeSize: Coordinating节点数量 + * + * @param int $coordinatingNodeSize + */ + public function setCoordinatingNodeSize($coordinatingNodeSize) + { + $this->set("CoordinatingNodeSize", $coordinatingNodeSize); + } + + /** + * CoordinatingNodeDiskConf: Coordinating节点磁盘类型 + * + * @return string|null + */ + public function getCoordinatingNodeDiskConf() + { + return $this->get("CoordinatingNodeDiskConf"); + } + + /** + * CoordinatingNodeDiskConf: Coordinating节点磁盘类型 + * + * @param string $coordinatingNodeDiskConf + */ + public function setCoordinatingNodeDiskConf($coordinatingNodeDiskConf) + { + $this->set("CoordinatingNodeDiskConf", $coordinatingNodeDiskConf); + } + + /** + * IsSecGroup: 是否开启安全组,默认为false + * + * @return boolean|null + */ + public function getIsSecGroup() + { + return $this->get("IsSecGroup"); + } + + /** + * IsSecGroup: 是否开启安全组,默认为false + * + * @param boolean $isSecGroup + */ + public function setIsSecGroup($isSecGroup) + { + $this->set("IsSecGroup", $isSecGroup); + } + + /** + * SecGroupIds: 安全组ID,开启安全组必填,至多可以同时绑定5个安全组 + * + * @return string[]|null + */ + public function getSecGroupIds() + { + return $this->get("SecGroupIds"); + } + + /** + * SecGroupIds: 安全组ID,开启安全组必填,至多可以同时绑定5个安全组 + * + * @param string[] $secGroupIds + */ + public function setSecGroupIds(array $secGroupIds) + { + $this->set("SecGroupIds", $secGroupIds); + } + + /** + * IsMultiZone: 是否为多可用区,默认为false + * + * @return boolean|null + */ + public function getIsMultiZone() + { + return $this->get("IsMultiZone"); + } + + /** + * IsMultiZone: 是否为多可用区,默认为false + * + * @param boolean $isMultiZone + */ + public function setIsMultiZone($isMultiZone) + { + $this->set("IsMultiZone", $isMultiZone); + } + + /** + * MultiZones: 多可用区名称,默认空数组 [] + * + * @return string[]|null + */ + public function getMultiZones() + { + return $this->get("MultiZones"); + } + + /** + * MultiZones: 多可用区名称,默认空数组 [] + * + * @param string[] $multiZones + */ + public function setMultiZones(array $multiZones) + { + $this->set("MultiZones", $multiZones); + } +} diff --git a/src/UES/Apis/CreateUESInstanceResponse.php b/src/UES/Apis/CreateUESInstanceResponse.php new file mode 100644 index 0000000..0fb625f --- /dev/null +++ b/src/UES/Apis/CreateUESInstanceResponse.php @@ -0,0 +1,44 @@ +get("InstanceId"); + } + + /** + * InstanceId: 实例ID + * + * @param string $instanceId + */ + public function setInstanceId($instanceId) + { + $this->set("InstanceId", $instanceId); + } +} diff --git a/src/UES/Apis/DeleteUESInstanceRequest.php b/src/UES/Apis/DeleteUESInstanceRequest.php new file mode 100644 index 0000000..f61f14a --- /dev/null +++ b/src/UES/Apis/DeleteUESInstanceRequest.php @@ -0,0 +1,112 @@ + "DeleteUESInstance"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("InstanceId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * InstanceId: 实例ID + * + * @return string|null + */ + public function getInstanceId() + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 实例ID + * + * @param string $instanceId + */ + public function setInstanceId($instanceId) + { + $this->set("InstanceId", $instanceId); + } +} diff --git a/src/UES/Apis/DeleteUESInstanceResponse.php b/src/UES/Apis/DeleteUESInstanceResponse.php new file mode 100644 index 0000000..d38cb14 --- /dev/null +++ b/src/UES/Apis/DeleteUESInstanceResponse.php @@ -0,0 +1,26 @@ + "DescribeUESInstanceV2"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("InstanceId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * InstanceId: 集群实例ID + * + * @return string|null + */ + public function getInstanceId() + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 集群实例ID + * + * @param string $instanceId + */ + public function setInstanceId($instanceId) + { + $this->set("InstanceId", $instanceId); + } +} diff --git a/src/UES/Apis/DescribeUESInstanceV2Response.php b/src/UES/Apis/DescribeUESInstanceV2Response.php new file mode 100644 index 0000000..f255f8e --- /dev/null +++ b/src/UES/Apis/DescribeUESInstanceV2Response.php @@ -0,0 +1,47 @@ +get("Result")); + } + + /** + * Result: 返回结果 + * + * @param ClusterNodeV2Info $result + */ + public function setResult(array $result) + { + $this->set("Result", $result->getAll()); + } +} diff --git a/src/UES/Apis/ExpandUESInstanceRequest.php b/src/UES/Apis/ExpandUESInstanceRequest.php new file mode 100644 index 0000000..7f90c13 --- /dev/null +++ b/src/UES/Apis/ExpandUESInstanceRequest.php @@ -0,0 +1,154 @@ + "ExpandUESInstance"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("InstanceId"); + $this->markRequired("NodeCount"); + $this->markRequired("NodeRole"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * InstanceId: 实例ID + * + * @return string|null + */ + public function getInstanceId() + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 实例ID + * + * @param string $instanceId + */ + public function setInstanceId($instanceId) + { + $this->set("InstanceId", $instanceId); + } + + /** + * NodeCount: 扩容后对应类型节点的数目 + * + * @return integer|null + */ + public function getNodeCount() + { + return $this->get("NodeCount"); + } + + /** + * NodeCount: 扩容后对应类型节点的数目 + * + * @param int $nodeCount + */ + public function setNodeCount($nodeCount) + { + $this->set("NodeCount", $nodeCount); + } + + /** + * NodeRole: 节点类型(compute、coordinating) + * + * @return string|null + */ + public function getNodeRole() + { + return $this->get("NodeRole"); + } + + /** + * NodeRole: 节点类型(compute、coordinating) + * + * @param string $nodeRole + */ + public function setNodeRole($nodeRole) + { + $this->set("NodeRole", $nodeRole); + } +} diff --git a/src/UES/Apis/ExpandUESInstanceResponse.php b/src/UES/Apis/ExpandUESInstanceResponse.php new file mode 100644 index 0000000..81db56c --- /dev/null +++ b/src/UES/Apis/ExpandUESInstanceResponse.php @@ -0,0 +1,26 @@ + "GetUESAppVersion"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } +} diff --git a/src/UES/Apis/GetUESAppVersionResponse.php b/src/UES/Apis/GetUESAppVersionResponse.php new file mode 100644 index 0000000..62a2c3d --- /dev/null +++ b/src/UES/Apis/GetUESAppVersionResponse.php @@ -0,0 +1,77 @@ +get("TotalCount"); + } + + /** + * TotalCount: 服务应用版本个数 + * + * @param int $totalCount + */ + public function setTotalCount($totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * AppVersionList: 服务应用版本列表 + * + * @return AppVersion[]|null + */ + public function getAppVersionList() + { + $items = $this->get("AppVersionList"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new AppVersion($item)); + } + return $result; + } + + /** + * AppVersionList: 服务应用版本列表 + * + * @param AppVersion[] $appVersionList + */ + public function setAppVersionList(array $appVersionList) + { + $result = []; + foreach ($appVersionList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UES/Apis/GetUESDiskSizeLimitationRequest.php b/src/UES/Apis/GetUESDiskSizeLimitationRequest.php new file mode 100644 index 0000000..9d9e6fc --- /dev/null +++ b/src/UES/Apis/GetUESDiskSizeLimitationRequest.php @@ -0,0 +1,91 @@ + "GetUESDiskSizeLimitation"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } +} diff --git a/src/UES/Apis/GetUESDiskSizeLimitationResponse.php b/src/UES/Apis/GetUESDiskSizeLimitationResponse.php new file mode 100644 index 0000000..853f141 --- /dev/null +++ b/src/UES/Apis/GetUESDiskSizeLimitationResponse.php @@ -0,0 +1,57 @@ +get("DiskSizeLimitationSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new DiskSizeLimitation($item)); + } + return $result; + } + + /** + * DiskSizeLimitationSet: 各磁盘类型容量限制列表 + * + * @param DiskSizeLimitation[] $diskSizeLimitationSet + */ + public function setDiskSizeLimitationSet(array $diskSizeLimitationSet) + { + $result = []; + foreach ($diskSizeLimitationSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UES/Apis/GetUESNodeConfRequest.php b/src/UES/Apis/GetUESNodeConfRequest.php new file mode 100644 index 0000000..997d5ef --- /dev/null +++ b/src/UES/Apis/GetUESNodeConfRequest.php @@ -0,0 +1,91 @@ + "GetUESNodeConf"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } +} diff --git a/src/UES/Apis/GetUESNodeConfResponse.php b/src/UES/Apis/GetUESNodeConfResponse.php new file mode 100644 index 0000000..ac51c7e --- /dev/null +++ b/src/UES/Apis/GetUESNodeConfResponse.php @@ -0,0 +1,77 @@ +get("TotalCount"); + } + + /** + * TotalCount: 所有节点配置信息的个数 + * + * @param int $totalCount + */ + public function setTotalCount($totalCount) + { + $this->set("TotalCount", $totalCount); + } + + /** + * NodeConfList: 服务节点配置信息列表 + * + * @return NodeConf[]|null + */ + public function getNodeConfList() + { + $items = $this->get("NodeConfList"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new NodeConf($item)); + } + return $result; + } + + /** + * NodeConfList: 服务节点配置信息列表 + * + * @param NodeConf[] $nodeConfList + */ + public function setNodeConfList(array $nodeConfList) + { + $result = []; + foreach ($nodeConfList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UES/Apis/ListUESInstanceRequest.php b/src/UES/Apis/ListUESInstanceRequest.php new file mode 100644 index 0000000..599024c --- /dev/null +++ b/src/UES/Apis/ListUESInstanceRequest.php @@ -0,0 +1,130 @@ + "ListUESInstance"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Offset: 数据偏移量, 默认为0 + * + * @return integer|null + */ + public function getOffset() + { + return $this->get("Offset"); + } + + /** + * Offset: 数据偏移量, 默认为0 + * + * @param int $offset + */ + public function setOffset($offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 返回数据长度, 默认为30 + * + * @return integer|null + */ + public function getLimit() + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数据长度, 默认为30 + * + * @param int $limit + */ + public function setLimit($limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/UES/Apis/ListUESInstanceResponse.php b/src/UES/Apis/ListUESInstanceResponse.php new file mode 100644 index 0000000..a263dbc --- /dev/null +++ b/src/UES/Apis/ListUESInstanceResponse.php @@ -0,0 +1,77 @@ +get("ClusterSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ClusterInfo($item)); + } + return $result; + } + + /** + * ClusterSet: 实例信息列表 + * + * @param ClusterInfo[] $clusterSet + */ + public function setClusterSet(array $clusterSet) + { + $result = []; + foreach ($clusterSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalCount: 实例个数 + * + * @return integer|null + */ + public function getTotalCount() + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 实例个数 + * + * @param int $totalCount + */ + public function setTotalCount($totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/UES/Apis/ResizeUESInstanceRequest.php b/src/UES/Apis/ResizeUESInstanceRequest.php new file mode 100644 index 0000000..950f9e5 --- /dev/null +++ b/src/UES/Apis/ResizeUESInstanceRequest.php @@ -0,0 +1,193 @@ + "ResizeUESInstance"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("InstanceId"); + $this->markRequired("NodeRole"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * InstanceId: 实例ID + * + * @return string|null + */ + public function getInstanceId() + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 实例ID + * + * @param string $instanceId + */ + public function setInstanceId($instanceId) + { + $this->set("InstanceId", $instanceId); + } + + /** + * NodeRole: 节点类型(compute、master、coordinating、kibana、dashboard) + * + * @return string|null + */ + public function getNodeRole() + { + return $this->get("NodeRole"); + } + + /** + * NodeRole: 节点类型(compute、master、coordinating、kibana、dashboard) + * + * @param string $nodeRole + */ + public function setNodeRole($nodeRole) + { + $this->set("NodeRole", $nodeRole); + } + + /** + * NodeConf: 改配节点类型,NodeDiskSize为0,基于NodeRole 进行改配 + * + * @return string|null + */ + public function getNodeConf() + { + return $this->get("NodeConf"); + } + + /** + * NodeConf: 改配节点类型,NodeDiskSize为0,基于NodeRole 进行改配 + * + * @param string $nodeConf + */ + public function setNodeConf($nodeConf) + { + $this->set("NodeConf", $nodeConf); + } + + /** + * NodeDiskSize: 改配节点磁盘大小,NodeConf 为空字符串,基于NodeRole 进行改配 + * + * @return integer|null + */ + public function getNodeDiskSize() + { + return $this->get("NodeDiskSize"); + } + + /** + * NodeDiskSize: 改配节点磁盘大小,NodeConf 为空字符串,基于NodeRole 进行改配 + * + * @param int $nodeDiskSize + */ + public function setNodeDiskSize($nodeDiskSize) + { + $this->set("NodeDiskSize", $nodeDiskSize); + } + + /** + * ForceResizing: 进行改配操作是否强制检查集群健康状态,默认为false + * + * @return boolean|null + */ + public function getForceResizing() + { + return $this->get("ForceResizing"); + } + + /** + * ForceResizing: 进行改配操作是否强制检查集群健康状态,默认为false + * + * @param boolean $forceResizing + */ + public function setForceResizing($forceResizing) + { + $this->set("ForceResizing", $forceResizing); + } +} diff --git a/src/UES/Apis/ResizeUESInstanceResponse.php b/src/UES/Apis/ResizeUESInstanceResponse.php new file mode 100644 index 0000000..4abc05e --- /dev/null +++ b/src/UES/Apis/ResizeUESInstanceResponse.php @@ -0,0 +1,26 @@ + "RestartUESInstance"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("InstanceId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * InstanceId: 实例ID + * + * @return string|null + */ + public function getInstanceId() + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 实例ID + * + * @param string $instanceId + */ + public function setInstanceId($instanceId) + { + $this->set("InstanceId", $instanceId); + } +} diff --git a/src/UES/Apis/RestartUESInstanceResponse.php b/src/UES/Apis/RestartUESInstanceResponse.php new file mode 100644 index 0000000..7bae79e --- /dev/null +++ b/src/UES/Apis/RestartUESInstanceResponse.php @@ -0,0 +1,26 @@ +get("AppName"); + } + + /** + * AppName: 应用名称,默认值为elasticsearch + * + * @param string $appName + */ + public function setAppName($appName) + { + $this->set("AppName", $appName); + } + + /** + * AppVersion: 应用版本号 + * + * @return string|null + */ + public function getAppVersion() + { + return $this->get("AppVersion"); + } + + /** + * AppVersion: 应用版本号 + * + * @param string $appVersion + */ + public function setAppVersion($appVersion) + { + $this->set("AppVersion", $appVersion); + } + + /** + * IsMultiZone: 是否支持多区部署,默认为false + * + * @return boolean|null + */ + public function getIsMultiZone() + { + return $this->get("IsMultiZone"); + } + + /** + * IsMultiZone: 是否支持多区部署,默认为false + * + * @param boolean $isMultiZone + */ + public function setIsMultiZone($isMultiZone) + { + $this->set("IsMultiZone", $isMultiZone); + } +} diff --git a/src/UES/Models/ClusterInfo.php b/src/UES/Models/ClusterInfo.php new file mode 100644 index 0000000..ea205a8 --- /dev/null +++ b/src/UES/Models/ClusterInfo.php @@ -0,0 +1,464 @@ +get("Zone"); + } + + /** + * Zone: 可用区 + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * BusinessId: 项目组ID标识 + * + * @return string|null + */ + public function getBusinessId() + { + return $this->get("BusinessId"); + } + + /** + * BusinessId: 项目组ID标识 + * + * @param string $businessId + */ + public function setBusinessId($businessId) + { + $this->set("BusinessId", $businessId); + } + + /** + * ChargeType: 计费类型,默认为Month + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费类型,默认为Month + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * CreateTime: 创建时间 + * + * @return integer|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 创建时间 + * + * @param int $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ExpireTime: 失效时间 + * + * @return integer|null + */ + public function getExpireTime() + { + return $this->get("ExpireTime"); + } + + /** + * ExpireTime: 失效时间 + * + * @param int $expireTime + */ + public function setExpireTime($expireTime) + { + $this->set("ExpireTime", $expireTime); + } + + /** + * NodeCount: 节点个数,默认为集群大小 + * + * @return integer|null + */ + public function getNodeCount() + { + return $this->get("NodeCount"); + } + + /** + * NodeCount: 节点个数,默认为集群大小 + * + * @param int $nodeCount + */ + public function setNodeCount($nodeCount) + { + $this->set("NodeCount", $nodeCount); + } + + /** + * RunTime: 实例运行时长 + * + * @return integer|null + */ + public function getRunTime() + { + return $this->get("RunTime"); + } + + /** + * RunTime: 实例运行时长 + * + * @param int $runTime + */ + public function setRunTime($runTime) + { + $this->set("RunTime", $runTime); + } + + /** + * AppVersion: 应用服务版本号 + * + * @return string|null + */ + public function getAppVersion() + { + return $this->get("AppVersion"); + } + + /** + * AppVersion: 应用服务版本号 + * + * @param string $appVersion + */ + public function setAppVersion($appVersion) + { + $this->set("AppVersion", $appVersion); + } + + /** + * State: 实例状态 + * + * @return string|null + */ + public function getState() + { + return $this->get("State"); + } + + /** + * State: 实例状态 + * + * @param string $state + */ + public function setState($state) + { + $this->set("State", $state); + } + + /** + * InstanceId: 实例资源ID + * + * @return string|null + */ + public function getInstanceId() + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 实例资源ID + * + * @param string $instanceId + */ + public function setInstanceId($instanceId) + { + $this->set("InstanceId", $instanceId); + } + + /** + * InstanceName: 实例名称 + * + * @return string|null + */ + public function getInstanceName() + { + return $this->get("InstanceName"); + } + + /** + * InstanceName: 实例名称 + * + * @param string $instanceName + */ + public function setInstanceName($instanceName) + { + $this->set("InstanceName", $instanceName); + } + + /** + * AppName: 应用名称 + * + * @return string|null + */ + public function getAppName() + { + return $this->get("AppName"); + } + + /** + * AppName: 应用名称 + * + * @param string $appName + */ + public function setAppName($appName) + { + $this->set("AppName", $appName); + } + + /** + * UESInstanceId: 服务集群ID标识(弃用) + * + * @return string|null + */ + public function getUESInstanceId() + { + return $this->get("UESInstanceId"); + } + + /** + * UESInstanceId: 服务集群ID标识(弃用) + * + * @param string $uesInstanceId + */ + public function setUESInstanceId($uesInstanceId) + { + $this->set("UESInstanceId", $uesInstanceId); + } + + /** + * UESInstanceName: 服务集群名称(弃用) + * + * @return string|null + */ + public function getUESInstanceName() + { + return $this->get("UESInstanceName"); + } + + /** + * UESInstanceName: 服务集群名称(弃用) + * + * @param string $uesInstanceName + */ + public function setUESInstanceName($uesInstanceName) + { + $this->set("UESInstanceName", $uesInstanceName); + } + + /** + * ServiceVersion: 服务版本号(弃用) + * + * @return string|null + */ + public function getServiceVersion() + { + return $this->get("ServiceVersion"); + } + + /** + * ServiceVersion: 服务版本号(弃用) + * + * @param string $serviceVersion + */ + public function setServiceVersion($serviceVersion) + { + $this->set("ServiceVersion", $serviceVersion); + } + + /** + * SubnetId: 子网ID标识 + * + * @return string|null + */ + public function getSubnetId() + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网ID标识 + * + * @param string $subnetId + */ + public function setSubnetId($subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * Tag: 业务组 + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 业务组 + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } + + /** + * VPCId: VPCID标识 + * + * @return string|null + */ + public function getVPCId() + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPCID标识 + * + * @param string $vpcId + */ + public function setVPCId($vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * Vip: VIP地址信息 + * + * @return string|null + */ + public function getVip() + { + return $this->get("Vip"); + } + + /** + * Vip: VIP地址信息 + * + * @param string $vip + */ + public function setVip($vip) + { + $this->set("Vip", $vip); + } + + /** + * IsSecGroup: 是否开启安全组 + * + * @return boolean|null + */ + public function getIsSecGroup() + { + return $this->get("IsSecGroup"); + } + + /** + * IsSecGroup: 是否开启安全组 + * + * @param boolean $isSecGroup + */ + public function setIsSecGroup($isSecGroup) + { + $this->set("IsSecGroup", $isSecGroup); + } + + /** + * MultiZones: 多可用区 + * + * @return string[]|null + */ + public function getMultiZones() + { + return $this->get("MultiZones"); + } + + /** + * MultiZones: 多可用区 + * + * @param string[] $multiZones + */ + public function setMultiZones(array $multiZones) + { + $this->set("MultiZones", $multiZones); + } + + /** + * Resizable: 是否支持改配 + * + * @return boolean|null + */ + public function getResizable() + { + return $this->get("Resizable"); + } + + /** + * Resizable: 是否支持改配 + * + * @param boolean $resizable + */ + public function setResizable($resizable) + { + $this->set("Resizable", $resizable); + } +} diff --git a/src/UES/Models/ClusterNodeV2Info.php b/src/UES/Models/ClusterNodeV2Info.php new file mode 100644 index 0000000..1109944 --- /dev/null +++ b/src/UES/Models/ClusterNodeV2Info.php @@ -0,0 +1,96 @@ +get("RequestId"); + } + + /** + * RequestId: + * + * @param string $requestId + */ + public function setRequestId($requestId) + { + $this->set("RequestId", $requestId); + } + + /** + * ClusterInfo: + * + * @return ClusterV2Info|null + */ + public function getClusterInfo() + { + return new ClusterV2Info($this->get("ClusterInfo")); + } + + /** + * ClusterInfo: + * + * @param ClusterV2Info $clusterInfo + */ + public function setClusterInfo(array $clusterInfo) + { + $this->set("ClusterInfo", $clusterInfo->getAll()); + } + + /** + * NodeInfoList: + * + * @return NodeV2Info[]|null + */ + public function getNodeInfoList() + { + $items = $this->get("NodeInfoList"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new NodeV2Info($item)); + } + return $result; + } + + /** + * NodeInfoList: + * + * @param NodeV2Info[] $nodeInfoList + */ + public function setNodeInfoList(array $nodeInfoList) + { + $result = []; + foreach ($nodeInfoList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UES/Models/ClusterV2Info.php b/src/UES/Models/ClusterV2Info.php new file mode 100644 index 0000000..001745d --- /dev/null +++ b/src/UES/Models/ClusterV2Info.php @@ -0,0 +1,224 @@ +get("Region"); + } + + /** + * Region: 地域 + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区 + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区 + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * UESInstanceId: 服务集群ID标识 + * + * @return string|null + */ + public function getUESInstanceId() + { + return $this->get("UESInstanceId"); + } + + /** + * UESInstanceId: 服务集群ID标识 + * + * @param string $uesInstanceId + */ + public function setUESInstanceId($uesInstanceId) + { + $this->set("UESInstanceId", $uesInstanceId); + } + + /** + * UESInstanceName: 服务集群名称 + * + * @return string|null + */ + public function getUESInstanceName() + { + return $this->get("UESInstanceName"); + } + + /** + * UESInstanceName: 服务集群名称 + * + * @param string $uesInstanceName + */ + public function setUESInstanceName($uesInstanceName) + { + $this->set("UESInstanceName", $uesInstanceName); + } + + /** + * ServiceVersion: 服务版本号 + * + * @return string|null + */ + public function getServiceVersion() + { + return $this->get("ServiceVersion"); + } + + /** + * ServiceVersion: 服务版本号 + * + * @param string $serviceVersion + */ + public function setServiceVersion($serviceVersion) + { + $this->set("ServiceVersion", $serviceVersion); + } + + /** + * VPCId: VPCID标识 + * + * @return string|null + */ + public function getVPCId() + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPCID标识 + * + * @param string $vpcId + */ + public function setVPCId($vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * State: 服务集群状态 + * + * @return string|null + */ + public function getState() + { + return $this->get("State"); + } + + /** + * State: 服务集群状态 + * + * @param string $state + */ + public function setState($state) + { + $this->set("State", $state); + } + + /** + * BusinessId: 项目组ID标识 + * + * @return string|null + */ + public function getBusinessId() + { + return $this->get("BusinessId"); + } + + /** + * BusinessId: 项目组ID标识 + * + * @param string $businessId + */ + public function setBusinessId($businessId) + { + $this->set("BusinessId", $businessId); + } + + /** + * SubnetId: 子网ID标识 + * + * @return string|null + */ + public function getSubnetId() + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网ID标识 + * + * @param string $subnetId + */ + public function setSubnetId($subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * Vip: Vip + * + * @return string|null + */ + public function getVip() + { + return $this->get("Vip"); + } + + /** + * Vip: Vip + * + * @param string $vip + */ + public function setVip($vip) + { + $this->set("Vip", $vip); + } +} diff --git a/src/UES/Models/DiskSizeLimitation.php b/src/UES/Models/DiskSizeLimitation.php new file mode 100644 index 0000000..da72562 --- /dev/null +++ b/src/UES/Models/DiskSizeLimitation.php @@ -0,0 +1,84 @@ +get("DiskType"); + } + + /** + * DiskType: 数据盘类别,包含普通云盘|CLOUD_NORMAL、SSD云盘|CLOUD_SSD和RSSD云盘|CLOUD_RSSD。普通本地盘只包含普通本地盘|LOCAL_NORMAL一种。SSD本地盘只包含SSD本地盘|LOCAL_SSD一种。 + * + * @param string $diskType + */ + public function setDiskType($diskType) + { + $this->set("DiskType", $diskType); + } + + /** + * MaxSize: 最大值,单位GB + * + * @return integer|null + */ + public function getMaxSize() + { + return $this->get("MaxSize"); + } + + /** + * MaxSize: 最大值,单位GB + * + * @param int $maxSize + */ + public function setMaxSize($maxSize) + { + $this->set("MaxSize", $maxSize); + } + + /** + * MinSize: 最小值,单位GB + * + * @return integer|null + */ + public function getMinSize() + { + return $this->get("MinSize"); + } + + /** + * MinSize: 最小值,单位GB + * + * @param int $minSize + */ + public function setMinSize($minSize) + { + $this->set("MinSize", $minSize); + } +} diff --git a/src/UES/Models/NodeConf.php b/src/UES/Models/NodeConf.php new file mode 100644 index 0000000..4ec0ceb --- /dev/null +++ b/src/UES/Models/NodeConf.php @@ -0,0 +1,144 @@ +get("Memory"); + } + + /** + * Memory: 内存,单位为GB + * + * @param int $memory + */ + public function setMemory($memory) + { + $this->set("Memory", $memory); + } + + /** + * CPU: CPU数量 + * + * @return integer|null + */ + public function getCPU() + { + return $this->get("CPU"); + } + + /** + * CPU: CPU数量 + * + * @param int $cpu + */ + public function setCPU($cpu) + { + $this->set("CPU", $cpu); + } + + /** + * NodeConf: 节点配置标识 + * + * @return string|null + */ + public function getNodeConf() + { + return $this->get("NodeConf"); + } + + /** + * NodeConf: 节点配置标识 + * + * @param string $nodeConf + */ + public function setNodeConf($nodeConf) + { + $this->set("NodeConf", $nodeConf); + } + + /** + * DiskType: 磁盘类型[RSSD|SSD] + * + * @return string|null + */ + public function getDiskType() + { + return $this->get("DiskType"); + } + + /** + * DiskType: 磁盘类型[RSSD|SSD] + * + * @param string $diskType + */ + public function setDiskType($diskType) + { + $this->set("DiskType", $diskType); + } + + /** + * DiskSize: 磁盘大小,单位为GB + * + * @return integer|null + */ + public function getDiskSize() + { + return $this->get("DiskSize"); + } + + /** + * DiskSize: 磁盘大小,单位为GB + * + * @param int $diskSize + */ + public function setDiskSize($diskSize) + { + $this->set("DiskSize", $diskSize); + } + + /** + * IsSecGroup: 是否支持安全组[true|false] + * + * @return boolean|null + */ + public function getIsSecGroup() + { + return $this->get("IsSecGroup"); + } + + /** + * IsSecGroup: 是否支持安全组[true|false] + * + * @param boolean $isSecGroup + */ + public function setIsSecGroup($isSecGroup) + { + $this->set("IsSecGroup", $isSecGroup); + } +} diff --git a/src/UES/Models/NodeV2Info.php b/src/UES/Models/NodeV2Info.php new file mode 100644 index 0000000..0abe5e9 --- /dev/null +++ b/src/UES/Models/NodeV2Info.php @@ -0,0 +1,224 @@ +get("NodeId"); + } + + /** + * NodeId: 节点ID + * + * @param string $nodeId + */ + public function setNodeId($nodeId) + { + $this->set("NodeId", $nodeId); + } + + /** + * NodeName: 节点名称 + * + * @return string|null + */ + public function getNodeName() + { + return $this->get("NodeName"); + } + + /** + * NodeName: 节点名称 + * + * @param string $nodeName + */ + public function setNodeName($nodeName) + { + $this->set("NodeName", $nodeName); + } + + /** + * NodeRole: 节点类型 + * + * @return string|null + */ + public function getNodeRole() + { + return $this->get("NodeRole"); + } + + /** + * NodeRole: 节点类型 + * + * @param string $nodeRole + */ + public function setNodeRole($nodeRole) + { + $this->set("NodeRole", $nodeRole); + } + + /** + * NodeIP: 节点IP + * + * @return string|null + */ + public function getNodeIP() + { + return $this->get("NodeIP"); + } + + /** + * NodeIP: 节点IP + * + * @param string $nodeIP + */ + public function setNodeIP($nodeIP) + { + $this->set("NodeIP", $nodeIP); + } + + /** + * NodeConf: 节点配置标识 + * + * @return string|null + */ + public function getNodeConf() + { + return $this->get("NodeConf"); + } + + /** + * NodeConf: 节点配置标识 + * + * @param string $nodeConf + */ + public function setNodeConf($nodeConf) + { + $this->set("NodeConf", $nodeConf); + } + + /** + * NodeState: 节点状态 + * + * @return string|null + */ + public function getNodeState() + { + return $this->get("NodeState"); + } + + /** + * NodeState: 节点状态 + * + * @param string $nodeState + */ + public function setNodeState($nodeState) + { + $this->set("NodeState", $nodeState); + } + + /** + * DiskType: 节点磁盘类型 + * + * @return string|null + */ + public function getDiskType() + { + return $this->get("DiskType"); + } + + /** + * DiskType: 节点磁盘类型 + * + * @param string $diskType + */ + public function setDiskType($diskType) + { + $this->set("DiskType", $diskType); + } + + /** + * DiskSize: 节点磁盘大小 + * + * @return integer|null + */ + public function getDiskSize() + { + return $this->get("DiskSize"); + } + + /** + * DiskSize: 节点磁盘大小 + * + * @param int $diskSize + */ + public function setDiskSize($diskSize) + { + $this->set("DiskSize", $diskSize); + } + + /** + * Memory: 节点内存大小 + * + * @return integer|null + */ + public function getMemory() + { + return $this->get("Memory"); + } + + /** + * Memory: 节点内存大小 + * + * @param int $memory + */ + public function setMemory($memory) + { + $this->set("Memory", $memory); + } + + /** + * CPU: 节点cpu数量 + * + * @return integer|null + */ + public function getCPU() + { + return $this->get("CPU"); + } + + /** + * CPU: 节点cpu数量 + * + * @param int $cpu + */ + public function setCPU($cpu) + { + $this->set("CPU", $cpu); + } +} diff --git a/src/UES/UESClient.php b/src/UES/UESClient.php new file mode 100644 index 0000000..bfe2cc9 --- /dev/null +++ b/src/UES/UESClient.php @@ -0,0 +1,438 @@ + (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) + * "InstanceName" => (string) 实例名称 + * "NodeConf" => (string) 节点配置标识, 支持的机型可通过GetUESNodeConf NodeConfList[].NodeConf + * "VPCId" => (string) VPCID标识 + * "SubnetId" => (string) 子网ID标识 + * "KibanaNodeConf" => (string) Kibana节点配置, 支持的机型可通过GetUESNodeConf NodeConfList[].NodeConf + * "KibanaNodeDiskConf" => (string) Kibana节点磁盘类型 + * "AppVersion" => (string) 应用服务版本号,支持的类型通过GetUESAppVersion AppVersionList[].AppVersion + * "NodeDiskConf" => (string) 磁盘类型 + * "NodeSize" => (integer) 节点个数,默认数目为3 + * "NodeDiskSize" => (integer) 节点磁盘大小,默认为100G + * "ServiceUserName" => (string) elasticsearch 服务用户名称,默认为elastic;OpenSearch 服务用户名称,固定为admin + * "ServicePasswd" => (string) 服务用户密码,默认为changeme + * "AppName" => (string) 应用名称,支持的类型通过GetUESAppVersion AppVersionList[].AppName, 默认为elasticsearch + * "Remark" => (string) 备注,默认为空 + * "ChargeType" => (string) 计费类型,默认为Month + * "Quantity" => (integer) 计费长度,默认为1 + * "MasterConf" => (string) 主节点类型标示,支持的机型可通过GetUESNodeConf NodeConfList[].NodeConf, 默认为空 + * "BusinessId" => (string) 业务组ID标识 + * "CoordinatingNodeConf" => (string) Coordinating节点机型配置,, 支持的机型可通过GetUESNodeConf NodeConfList[].NodeConf, 默认为空 + * "CoordinatingNodeSize" => (integer) Coordinating节点数量 + * "CoordinatingNodeDiskConf" => (string) Coordinating节点磁盘类型 + * "IsSecGroup" => (boolean) 是否开启安全组,默认为false + * "SecGroupIds" => (array) 安全组ID,开启安全组必填,至多可以同时绑定5个安全组 + * "IsMultiZone" => (boolean) 是否为多可用区,默认为false + * "MultiZones" => (array) 多可用区名称,默认空数组 [] + * ] + * + * Outputs: + * + * $outputs = [ + * "InstanceId" => (string) 实例ID + * ] + * + * @return CreateUESInstanceResponse + * @throws UCloudException + */ + public function createUESInstance(CreateUESInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new CreateUESInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteUESInstance - 删除实例 + * + * See also: https://docs.ucloud.cn/api/ues-api/delete_ues_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) + * "InstanceId" => (string) 实例ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return DeleteUESInstanceResponse + * @throws UCloudException + */ + public function deleteUESInstance(DeleteUESInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new DeleteUESInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUESInstanceV2 - 查询指定实例详细信息 + * + * See also: https://docs.ucloud.cn/api/ues-api/describe_ues_instance_v2 + * + * 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) + * "InstanceId" => (string) 集群实例ID + * ] + * + * Outputs: + * + * $outputs = [ + * "Result" => (object) 返回结果[ + * "RequestId" => (string) + * "ClusterInfo" => (object) [ + * "Region" => (string) 地域 + * "Zone" => (string) 可用区 + * "UESInstanceId" => (string) 服务集群ID标识 + * "UESInstanceName" => (string) 服务集群名称 + * "ServiceVersion" => (string) 服务版本号 + * "VPCId" => (string) VPCID标识 + * "State" => (string) 服务集群状态 + * "BusinessId" => (string) 项目组ID标识 + * "SubnetId" => (string) 子网ID标识 + * "Vip" => (string) Vip + * ] + * "NodeInfoList" => (array) [ + * [ + * "NodeId" => (string) 节点ID + * "NodeName" => (string) 节点名称 + * "NodeRole" => (string) 节点类型 + * "NodeIP" => (string) 节点IP + * "NodeConf" => (string) 节点配置标识 + * "NodeState" => (string) 节点状态 + * "DiskType" => (string) 节点磁盘类型 + * "DiskSize" => (integer) 节点磁盘大小 + * "Memory" => (integer) 节点内存大小 + * "CPU" => (integer) 节点cpu数量 + * ] + * ] + * ] + * ] + * + * @return DescribeUESInstanceV2Response + * @throws UCloudException + */ + public function describeUESInstanceV2(DescribeUESInstanceV2Request $request = null) + { + $resp = $this->invoke($request); + return new DescribeUESInstanceV2Response($resp->toArray(), $resp->getRequestId()); + } + + /** + * ExpandUESInstance - 扩容实例节点 + * + * See also: https://docs.ucloud.cn/api/ues-api/expand_ues_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) + * "InstanceId" => (string) 实例ID + * "NodeCount" => (integer) 扩容后对应类型节点的数目 + * "NodeRole" => (string) 节点类型(compute、coordinating) + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return ExpandUESInstanceResponse + * @throws UCloudException + */ + public function expandUESInstance(ExpandUESInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new ExpandUESInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUESAppVersion - 获取服务应用版本列表 + * + * See also: https://docs.ucloud.cn/api/ues-api/get_ues_app_version + * + * 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) 服务应用版本个数 + * "AppVersionList" => (array) 服务应用版本列表[ + * [ + * "AppName" => (string) 应用名称,默认值为elasticsearch + * "AppVersion" => (string) 应用版本号 + * "IsMultiZone" => (boolean) 是否支持多区部署,默认为false + * ] + * ] + * ] + * + * @return GetUESAppVersionResponse + * @throws UCloudException + */ + public function getUESAppVersion(GetUESAppVersionRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUESAppVersionResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUESDiskSizeLimitation - 获取磁盘容量限制 + * + * See also: https://docs.ucloud.cn/api/ues-api/get_ues_disk_size_limitation + * + * 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 = [ + * "DiskSizeLimitationSet" => (array) 各磁盘类型容量限制列表[ + * [ + * "DiskType" => (string) 数据盘类别,包含普通云盘|CLOUD_NORMAL、SSD云盘|CLOUD_SSD和RSSD云盘|CLOUD_RSSD。普通本地盘只包含普通本地盘|LOCAL_NORMAL一种。SSD本地盘只包含SSD本地盘|LOCAL_SSD一种。 + * "MaxSize" => (integer) 最大值,单位GB + * "MinSize" => (integer) 最小值,单位GB + * ] + * ] + * ] + * + * @return GetUESDiskSizeLimitationResponse + * @throws UCloudException + */ + public function getUESDiskSizeLimitation(GetUESDiskSizeLimitationRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUESDiskSizeLimitationResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUESNodeConf - 获取节点配置列表 + * + * See also: https://docs.ucloud.cn/api/ues-api/get_ues_node_conf + * + * 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) 所有节点配置信息的个数 + * "NodeConfList" => (array) 服务节点配置信息列表[ + * [ + * "Memory" => (integer) 内存,单位为GB + * "CPU" => (integer) CPU数量 + * "NodeConf" => (string) 节点配置标识 + * "DiskType" => (string) 磁盘类型[RSSD|SSD] + * "DiskSize" => (integer) 磁盘大小,单位为GB + * "IsSecGroup" => (boolean) 是否支持安全组[true|false] + * ] + * ] + * ] + * + * @return GetUESNodeConfResponse + * @throws UCloudException + */ + public function getUESNodeConf(GetUESNodeConfRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUESNodeConfResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListUESInstance - 获取实例列表 + * + * See also: https://docs.ucloud.cn/api/ues-api/list_ues_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) + * "Offset" => (integer) 数据偏移量, 默认为0 + * "Limit" => (integer) 返回数据长度, 默认为30 + * ] + * + * Outputs: + * + * $outputs = [ + * "ClusterSet" => (array) 实例信息列表[ + * [ + * "Zone" => (string) 可用区 + * "BusinessId" => (string) 项目组ID标识 + * "ChargeType" => (string) 计费类型,默认为Month + * "CreateTime" => (integer) 创建时间 + * "ExpireTime" => (integer) 失效时间 + * "NodeCount" => (integer) 节点个数,默认为集群大小 + * "RunTime" => (integer) 实例运行时长 + * "AppVersion" => (string) 应用服务版本号 + * "State" => (string) 实例状态 + * "InstanceId" => (string) 实例资源ID + * "InstanceName" => (string) 实例名称 + * "AppName" => (string) 应用名称 + * "UESInstanceId" => (string) 服务集群ID标识(弃用) + * "UESInstanceName" => (string) 服务集群名称(弃用) + * "ServiceVersion" => (string) 服务版本号(弃用) + * "SubnetId" => (string) 子网ID标识 + * "Tag" => (string) 业务组 + * "VPCId" => (string) VPCID标识 + * "Vip" => (string) VIP地址信息 + * "IsSecGroup" => (boolean) 是否开启安全组 + * "MultiZones" => (array) 多可用区 + * "Resizable" => (boolean) 是否支持改配 + * ] + * ] + * "TotalCount" => (integer) 实例个数 + * ] + * + * @return ListUESInstanceResponse + * @throws UCloudException + */ + public function listUESInstance(ListUESInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUESInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ResizeUESInstance - 改配实例节点配置 + * + * See also: https://docs.ucloud.cn/api/ues-api/resize_ues_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) + * "InstanceId" => (string) 实例ID + * "NodeRole" => (string) 节点类型(compute、master、coordinating、kibana、dashboard) + * "NodeConf" => (string) 改配节点类型,NodeDiskSize为0,基于NodeRole 进行改配 + * "NodeDiskSize" => (integer) 改配节点磁盘大小,NodeConf 为空字符串,基于NodeRole 进行改配 + * "ForceResizing" => (boolean) 进行改配操作是否强制检查集群健康状态,默认为false + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return ResizeUESInstanceResponse + * @throws UCloudException + */ + public function resizeUESInstance(ResizeUESInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new ResizeUESInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * RestartUESInstance - 重启实例 + * + * See also: https://docs.ucloud.cn/api/ues-api/restart_ues_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) + * "InstanceId" => (string) 实例ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return RestartUESInstanceResponse + * @throws UCloudException + */ + public function restartUESInstance(RestartUESInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new RestartUESInstanceResponse($resp->toArray(), $resp->getRequestId()); + } +} diff --git a/src/UKafka/Apis/AddUKafkaInstanceNodeRequest.php b/src/UKafka/Apis/AddUKafkaInstanceNodeRequest.php new file mode 100644 index 0000000..ff6fb5b --- /dev/null +++ b/src/UKafka/Apis/AddUKafkaInstanceNodeRequest.php @@ -0,0 +1,154 @@ + "AddUKafkaInstanceNode"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("InstanceId"); + $this->markRequired("NodeType"); + $this->markRequired("NodeCount"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * InstanceId: 实例ID + * + * @return string|null + */ + public function getInstanceId() + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 实例ID + * + * @param string $instanceId + */ + public function setInstanceId($instanceId) + { + $this->set("InstanceId", $instanceId); + } + + /** + * NodeType: 机型,支持的机型可通过GetUKafkaNodeType 接口返回的InstanceTypeSet[].InstanceTypeName + * + * @return string|null + */ + public function getNodeType() + { + return $this->get("NodeType"); + } + + /** + * NodeType: 机型,支持的机型可通过GetUKafkaNodeType 接口返回的InstanceTypeSet[].InstanceTypeName + * + * @param string $nodeType + */ + public function setNodeType($nodeType) + { + $this->set("NodeType", $nodeType); + } + + /** + * NodeCount: 新添加节点数量 + * + * @return integer|null + */ + public function getNodeCount() + { + return $this->get("NodeCount"); + } + + /** + * NodeCount: 新添加节点数量 + * + * @param int $nodeCount + */ + public function setNodeCount($nodeCount) + { + $this->set("NodeCount", $nodeCount); + } +} diff --git a/src/UKafka/Apis/AddUKafkaInstanceNodeResponse.php b/src/UKafka/Apis/AddUKafkaInstanceNodeResponse.php new file mode 100644 index 0000000..1b62994 --- /dev/null +++ b/src/UKafka/Apis/AddUKafkaInstanceNodeResponse.php @@ -0,0 +1,26 @@ + "CreateUKafkaInstance"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("FrameworkVersion"); + $this->markRequired("VPCId"); + $this->markRequired("SubnetId"); + $this->markRequired("ChargeType"); + $this->markRequired("NodeType"); + $this->markRequired("DiskSize"); + $this->markRequired("InstanceName"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * FrameworkVersion: kafka版本,支持的版本可通过ListUKafkaFrameworkVersion 接口返回字段的FrameworkVersions获取 + * + * @return string|null + */ + public function getFrameworkVersion() + { + return $this->get("FrameworkVersion"); + } + + /** + * FrameworkVersion: kafka版本,支持的版本可通过ListUKafkaFrameworkVersion 接口返回字段的FrameworkVersions获取 + * + * @param string $frameworkVersion + */ + public function setFrameworkVersion($frameworkVersion) + { + $this->set("FrameworkVersion", $frameworkVersion); + } + + /** + * VPCId: VPCID + * + * @return string|null + */ + public function getVPCId() + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPCID + * + * @param string $vpcId + */ + public function setVPCId($vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: 子网 ID + * + * @return string|null + */ + public function getSubnetId() + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 子网 ID + * + * @param string $subnetId + */ + public function setSubnetId($subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * ChargeType: 付费方式 + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费方式 + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * NodeType: 机型,支持的机型可通过GetUKafkaNodeType 接口返回的InstanceTypeSet[].InstanceTypeName + * + * @return string|null + */ + public function getNodeType() + { + return $this->get("NodeType"); + } + + /** + * NodeType: 机型,支持的机型可通过GetUKafkaNodeType 接口返回的InstanceTypeSet[].InstanceTypeName + * + * @param string $nodeType + */ + public function setNodeType($nodeType) + { + $this->set("NodeType", $nodeType); + } + + /** + * DiskSize: 数据盘大小。支持范围根据GetUKafkaNodeType 接口返回的InstanceTypeSet[].MaxDiskSize 和MinDiskSize获取 + * + * @return integer|null + */ + public function getDiskSize() + { + return $this->get("DiskSize"); + } + + /** + * DiskSize: 数据盘大小。支持范围根据GetUKafkaNodeType 接口返回的InstanceTypeSet[].MaxDiskSize 和MinDiskSize获取 + * + * @param int $diskSize + */ + public function setDiskSize($diskSize) + { + $this->set("DiskSize", $diskSize); + } + + /** + * InstanceName: 实例名,可自定义 + * + * @return string|null + */ + public function getInstanceName() + { + return $this->get("InstanceName"); + } + + /** + * InstanceName: 实例名,可自定义 + * + * @param string $instanceName + */ + public function setInstanceName($instanceName) + { + $this->set("InstanceName", $instanceName); + } + + /** + * BusinessId: 业务组,默认Default + * + * @return string|null + */ + public function getBusinessId() + { + return $this->get("BusinessId"); + } + + /** + * BusinessId: 业务组,默认Default + * + * @param string $businessId + */ + public function setBusinessId($businessId) + { + $this->set("BusinessId", $businessId); + } + + /** + * Quantity: 实例数量,默认 1 + * + * @return string|null + */ + public function getQuantity() + { + return $this->get("Quantity"); + } + + /** + * Quantity: 实例数量,默认 1 + * + * @param string $quantity + */ + public function setQuantity($quantity) + { + $this->set("Quantity", $quantity); + } + + /** + * NodeCount: 集群节点数量。默认 3 节点 + * + * @return integer|null + */ + public function getNodeCount() + { + return $this->get("NodeCount"); + } + + /** + * NodeCount: 集群节点数量。默认 3 节点 + * + * @param int $nodeCount + */ + public function setNodeCount($nodeCount) + { + $this->set("NodeCount", $nodeCount); + } + + /** + * LogRetentionHours: kafka 日志保存时间,支持范围[1,240]。默认 72 小时 + * + * @return string|null + */ + public function getLogRetentionHours() + { + return $this->get("LogRetentionHours"); + } + + /** + * LogRetentionHours: kafka 日志保存时间,支持范围[1,240]。默认 72 小时 + * + * @param string $logRetentionHours + */ + public function setLogRetentionHours($logRetentionHours) + { + $this->set("LogRetentionHours", $logRetentionHours); + } + + /** + * DiskControllerType: 磁盘管理方式,支持值:NONE、CLEAN。默认值:NONE + * + * @return string|null + */ + public function getDiskControllerType() + { + return $this->get("DiskControllerType"); + } + + /** + * DiskControllerType: 磁盘管理方式,支持值:NONE、CLEAN。默认值:NONE + * + * @param string $diskControllerType + */ + public function setDiskControllerType($diskControllerType) + { + $this->set("DiskControllerType", $diskControllerType); + } + + /** + * DiskThreshold: 磁盘清理阈值,支持范围[70,90]。DiskControllerType 为CLEAN 时必填。默认值 90 + * + * @return string|null + */ + public function getDiskThreshold() + { + return $this->get("DiskThreshold"); + } + + /** + * DiskThreshold: 磁盘清理阈值,支持范围[70,90]。DiskControllerType 为CLEAN 时必填。默认值 90 + * + * @param string $diskThreshold + */ + public function setDiskThreshold($diskThreshold) + { + $this->set("DiskThreshold", $diskThreshold); + } + + /** + * IsSecurityEnabled: 是否开启安全组,支持"true","false",默认 false + * + * @return string|null + */ + public function getIsSecurityEnabled() + { + return $this->get("IsSecurityEnabled"); + } + + /** + * IsSecurityEnabled: 是否开启安全组,支持"true","false",默认 false + * + * @param string $isSecurityEnabled + */ + public function setIsSecurityEnabled($isSecurityEnabled) + { + $this->set("IsSecurityEnabled", $isSecurityEnabled); + } +} diff --git a/src/UKafka/Apis/CreateUKafkaInstanceResponse.php b/src/UKafka/Apis/CreateUKafkaInstanceResponse.php new file mode 100644 index 0000000..98ea508 --- /dev/null +++ b/src/UKafka/Apis/CreateUKafkaInstanceResponse.php @@ -0,0 +1,44 @@ +get("InstanceId"); + } + + /** + * InstanceId: 实例资源 ID + * + * @param string $instanceId + */ + public function setInstanceId($instanceId) + { + $this->set("InstanceId", $instanceId); + } +} diff --git a/src/UKafka/Apis/DeleteUKafkaInstanceRequest.php b/src/UKafka/Apis/DeleteUKafkaInstanceRequest.php new file mode 100644 index 0000000..46f22e8 --- /dev/null +++ b/src/UKafka/Apis/DeleteUKafkaInstanceRequest.php @@ -0,0 +1,112 @@ + "DeleteUKafkaInstance"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("InstanceId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * InstanceId: 实例ID + * + * @return string|null + */ + public function getInstanceId() + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 实例ID + * + * @param string $instanceId + */ + public function setInstanceId($instanceId) + { + $this->set("InstanceId", $instanceId); + } +} diff --git a/src/UKafka/Apis/DeleteUKafkaInstanceResponse.php b/src/UKafka/Apis/DeleteUKafkaInstanceResponse.php new file mode 100644 index 0000000..9713bce --- /dev/null +++ b/src/UKafka/Apis/DeleteUKafkaInstanceResponse.php @@ -0,0 +1,26 @@ + "DescribeUKafkaConsumer"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ClusterInstanceId"); + $this->markRequired("ConsumerGroup"); + $this->markRequired("Type"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目 ID。不填写为默认项目,子帐号必须填写。 请参考 [GetProjectList 接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目 ID。不填写为默认项目,子帐号必须填写。 请参考 [GetProjectList 接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ClusterInstanceId: Kafka 集群 ID + * + * @return string|null + */ + public function getClusterInstanceId() + { + return $this->get("ClusterInstanceId"); + } + + /** + * ClusterInstanceId: Kafka 集群 ID + * + * @param string $clusterInstanceId + */ + public function setClusterInstanceId($clusterInstanceId) + { + $this->set("ClusterInstanceId", $clusterInstanceId); + } + + /** + * ConsumerGroup: 消费组组名 + * + * @return string|null + */ + public function getConsumerGroup() + { + return $this->get("ConsumerGroup"); + } + + /** + * ConsumerGroup: 消费组组名 + * + * @param string $consumerGroup + */ + public function setConsumerGroup($consumerGroup) + { + $this->set("ConsumerGroup", $consumerGroup); + } + + /** + * Type: 消费者组类型(同消费者组列表返回的类型值) + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 消费者组类型(同消费者组列表返回的类型值) + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } +} diff --git a/src/UKafka/Apis/DescribeUKafkaConsumerResponse.php b/src/UKafka/Apis/DescribeUKafkaConsumerResponse.php new file mode 100644 index 0000000..4e701f7 --- /dev/null +++ b/src/UKafka/Apis/DescribeUKafkaConsumerResponse.php @@ -0,0 +1,84 @@ +get("GroupName"); + } + + /** + * GroupName: 消费者组组名 + * + * @param string $groupName + */ + public function setGroupName($groupName) + { + $this->set("GroupName", $groupName); + } + + /** + * Type: 消费者组类型 + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 消费者组类型 + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * Topics: 消费者组所订阅 topic 信息 + * + * @return string|null + */ + public function getTopics() + { + return $this->get("Topics"); + } + + /** + * Topics: 消费者组所订阅 topic 信息 + * + * @param string $topics + */ + public function setTopics($topics) + { + $this->set("Topics", $topics); + } +} diff --git a/src/UKafka/Apis/DescribeUKafkaInstanceRequest.php b/src/UKafka/Apis/DescribeUKafkaInstanceRequest.php new file mode 100644 index 0000000..4177d69 --- /dev/null +++ b/src/UKafka/Apis/DescribeUKafkaInstanceRequest.php @@ -0,0 +1,112 @@ + "DescribeUKafkaInstance"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ClusterInstanceId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ClusterInstanceId: 实例ID,可以通过ListUKafkaInstance 接口的ClusterSet. ClusterInstanceId 获取 + * + * @return string|null + */ + public function getClusterInstanceId() + { + return $this->get("ClusterInstanceId"); + } + + /** + * ClusterInstanceId: 实例ID,可以通过ListUKafkaInstance 接口的ClusterSet. ClusterInstanceId 获取 + * + * @param string $clusterInstanceId + */ + public function setClusterInstanceId($clusterInstanceId) + { + $this->set("ClusterInstanceId", $clusterInstanceId); + } +} diff --git a/src/UKafka/Apis/DescribeUKafkaInstanceResponse.php b/src/UKafka/Apis/DescribeUKafkaInstanceResponse.php new file mode 100644 index 0000000..fef9439 --- /dev/null +++ b/src/UKafka/Apis/DescribeUKafkaInstanceResponse.php @@ -0,0 +1,64 @@ +get("ClusterSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ClusterInfo($item)); + } + return $result; + } + + /** + * ClusterSet: 集群信息列表 + * + * @param ClusterInfo[] $clusterSet + */ + public function setClusterSet(array $clusterSet) + { + $result = []; + foreach ($clusterSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UKafka/Apis/GetUKafkaNodeTypeRequest.php b/src/UKafka/Apis/GetUKafkaNodeTypeRequest.php new file mode 100644 index 0000000..4b06f4c --- /dev/null +++ b/src/UKafka/Apis/GetUKafkaNodeTypeRequest.php @@ -0,0 +1,111 @@ + "GetUKafkaNodeType"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * NodeType: 传参时返回指定机型信息,参数为空时返回所有机型信息 + * + * @return string|null + */ + public function getNodeType() + { + return $this->get("NodeType"); + } + + /** + * NodeType: 传参时返回指定机型信息,参数为空时返回所有机型信息 + * + * @param string $nodeType + */ + public function setNodeType($nodeType) + { + $this->set("NodeType", $nodeType); + } +} diff --git a/src/UKafka/Apis/GetUKafkaNodeTypeResponse.php b/src/UKafka/Apis/GetUKafkaNodeTypeResponse.php new file mode 100644 index 0000000..946355b --- /dev/null +++ b/src/UKafka/Apis/GetUKafkaNodeTypeResponse.php @@ -0,0 +1,58 @@ +get("NodeTypeSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new InstanceType($item)); + } + return $result; + } + + /** + * NodeTypeSet: 机型信息列表 + * + * @param InstanceType[] $nodeTypeSet + */ + public function setNodeTypeSet(array $nodeTypeSet) + { + $result = []; + foreach ($nodeTypeSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UKafka/Apis/IsUKafkaTopicNameExistRequest.php b/src/UKafka/Apis/IsUKafkaTopicNameExistRequest.php new file mode 100644 index 0000000..5f9aa93 --- /dev/null +++ b/src/UKafka/Apis/IsUKafkaTopicNameExistRequest.php @@ -0,0 +1,133 @@ + "IsUKafkaTopicNameExist"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ClusterInstanceId"); + $this->markRequired("TopicName"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ClusterInstanceId: 集群ID + * + * @return string|null + */ + public function getClusterInstanceId() + { + return $this->get("ClusterInstanceId"); + } + + /** + * ClusterInstanceId: 集群ID + * + * @param string $clusterInstanceId + */ + public function setClusterInstanceId($clusterInstanceId) + { + $this->set("ClusterInstanceId", $clusterInstanceId); + } + + /** + * TopicName: 待检查的topic名称 + * + * @return string|null + */ + public function getTopicName() + { + return $this->get("TopicName"); + } + + /** + * TopicName: 待检查的topic名称 + * + * @param string $topicName + */ + public function setTopicName($topicName) + { + $this->set("TopicName", $topicName); + } +} diff --git a/src/UKafka/Apis/IsUKafkaTopicNameExistResponse.php b/src/UKafka/Apis/IsUKafkaTopicNameExistResponse.php new file mode 100644 index 0000000..adfd9c8 --- /dev/null +++ b/src/UKafka/Apis/IsUKafkaTopicNameExistResponse.php @@ -0,0 +1,44 @@ +get("IsExist"); + } + + /** + * IsExist: 是否已经存在 + * + * @param string $isExist + */ + public function setIsExist($isExist) + { + $this->set("IsExist", $isExist); + } +} diff --git a/src/UKafka/Apis/ListUKafkaConsumersRequest.php b/src/UKafka/Apis/ListUKafkaConsumersRequest.php new file mode 100644 index 0000000..d9fa7db --- /dev/null +++ b/src/UKafka/Apis/ListUKafkaConsumersRequest.php @@ -0,0 +1,112 @@ + "ListUKafkaConsumers"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ClusterInstanceId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目 ID。不填写为默认项目,子帐号必须填写。 请参考 [GetProjectList 接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目 ID。不填写为默认项目,子帐号必须填写。 请参考 [GetProjectList 接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ClusterInstanceId: Kafka 集群 ID + * + * @return string|null + */ + public function getClusterInstanceId() + { + return $this->get("ClusterInstanceId"); + } + + /** + * ClusterInstanceId: Kafka 集群 ID + * + * @param string $clusterInstanceId + */ + public function setClusterInstanceId($clusterInstanceId) + { + $this->set("ClusterInstanceId", $clusterInstanceId); + } +} diff --git a/src/UKafka/Apis/ListUKafkaConsumersResponse.php b/src/UKafka/Apis/ListUKafkaConsumersResponse.php new file mode 100644 index 0000000..6915c99 --- /dev/null +++ b/src/UKafka/Apis/ListUKafkaConsumersResponse.php @@ -0,0 +1,57 @@ +get("Groups"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new Group($item)); + } + return $result; + } + + /** + * Groups: 消费者组列表 + * + * @param Group[] $groups + */ + public function setGroups(array $groups) + { + $result = []; + foreach ($groups as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UKafka/Apis/ListUKafkaFrameworkVersionRequest.php b/src/UKafka/Apis/ListUKafkaFrameworkVersionRequest.php new file mode 100644 index 0000000..8549765 --- /dev/null +++ b/src/UKafka/Apis/ListUKafkaFrameworkVersionRequest.php @@ -0,0 +1,91 @@ + "ListUKafkaFrameworkVersion"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } +} diff --git a/src/UKafka/Apis/ListUKafkaFrameworkVersionResponse.php b/src/UKafka/Apis/ListUKafkaFrameworkVersionResponse.php new file mode 100644 index 0000000..827c1b9 --- /dev/null +++ b/src/UKafka/Apis/ListUKafkaFrameworkVersionResponse.php @@ -0,0 +1,57 @@ +get("FrameworkVersions"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new Version($item)); + } + return $result; + } + + /** + * FrameworkVersions: kafka版本 + * + * @param Version[] $frameworkVersions + */ + public function setFrameworkVersions(array $frameworkVersions) + { + $result = []; + foreach ($frameworkVersions as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UKafka/Apis/ListUKafkaInstanceRequest.php b/src/UKafka/Apis/ListUKafkaInstanceRequest.php new file mode 100644 index 0000000..be5e945 --- /dev/null +++ b/src/UKafka/Apis/ListUKafkaInstanceRequest.php @@ -0,0 +1,230 @@ + "ListUKafkaInstance"]); + $this->markRequired("Region"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Limit: 默认为60 + * + * @return string|null + */ + public function getLimit() + { + return $this->get("Limit"); + } + + /** + * Limit: 默认为60 + * + * @param string $limit + */ + public function setLimit($limit) + { + $this->set("Limit", $limit); + } + + /** + * Offset: 默认为0 + * + * @return string|null + */ + public function getOffset() + { + return $this->get("Offset"); + } + + /** + * Offset: 默认为0 + * + * @param string $offset + */ + public function setOffset($offset) + { + $this->set("Offset", $offset); + } + + /** + * Filter: 是否过滤删除了的节点,默认为‘true’ + * + * @return string|null + */ + public function getFilter() + { + return $this->get("Filter"); + } + + /** + * Filter: 是否过滤删除了的节点,默认为‘true’ + * + * @param string $filter + */ + public function setFilter($filter) + { + $this->set("Filter", $filter); + } + + /** + * VPCId: VPCId + * + * @return string|null + */ + public function getVPCId() + { + return $this->get("VPCId"); + } + + /** + * VPCId: VPCId + * + * @param string $vpcId + */ + public function setVPCId($vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * SubnetId: SubnetId + * + * @return string|null + */ + public function getSubnetId() + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: SubnetId + * + * @param string $subnetId + */ + public function setSubnetId($subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * BusinessId: 业务组 ID + * + * @return string|null + */ + public function getBusinessId() + { + return $this->get("BusinessId"); + } + + /** + * BusinessId: 业务组 ID + * + * @param string $businessId + */ + public function setBusinessId($businessId) + { + $this->set("BusinessId", $businessId); + } + + /** + * ClusterInstanceId: 实例ID + * + * @return string|null + */ + public function getClusterInstanceId() + { + return $this->get("ClusterInstanceId"); + } + + /** + * ClusterInstanceId: 实例ID + * + * @param string $clusterInstanceId + */ + public function setClusterInstanceId($clusterInstanceId) + { + $this->set("ClusterInstanceId", $clusterInstanceId); + } +} diff --git a/src/UKafka/Apis/ListUKafkaInstanceResponse.php b/src/UKafka/Apis/ListUKafkaInstanceResponse.php new file mode 100644 index 0000000..9033f9a --- /dev/null +++ b/src/UKafka/Apis/ListUKafkaInstanceResponse.php @@ -0,0 +1,64 @@ +get("ClusterSet"); + } + + /** + * ClusterSet: 信息 + * + * @param string $clusterSet + */ + public function setClusterSet($clusterSet) + { + $this->set("ClusterSet", $clusterSet); + } + + /** + * TotalCount: 总数 + * + * @return string|null + */ + public function getTotalCount() + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 总数 + * + * @param string $totalCount + */ + public function setTotalCount($totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/UKafka/Apis/ListUKafkaTopicsRequest.php b/src/UKafka/Apis/ListUKafkaTopicsRequest.php new file mode 100644 index 0000000..e42b143 --- /dev/null +++ b/src/UKafka/Apis/ListUKafkaTopicsRequest.php @@ -0,0 +1,112 @@ + "ListUKafkaTopics"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("ClusterInstanceId"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](../summary/regionlist.html) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目 ID。不填写为默认项目,子帐号必须填写。 请参考 [GetProjectList 接口](../summary/get_project_list.html) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目 ID。不填写为默认项目,子帐号必须填写。 请参考 [GetProjectList 接口](../summary/get_project_list.html) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * ClusterInstanceId: 集群资源id + * + * @return string|null + */ + public function getClusterInstanceId() + { + return $this->get("ClusterInstanceId"); + } + + /** + * ClusterInstanceId: 集群资源id + * + * @param string $clusterInstanceId + */ + public function setClusterInstanceId($clusterInstanceId) + { + $this->set("ClusterInstanceId", $clusterInstanceId); + } +} diff --git a/src/UKafka/Apis/ListUKafkaTopicsResponse.php b/src/UKafka/Apis/ListUKafkaTopicsResponse.php new file mode 100644 index 0000000..76f4ed8 --- /dev/null +++ b/src/UKafka/Apis/ListUKafkaTopicsResponse.php @@ -0,0 +1,77 @@ +get("TopicList"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new TopicInfo($item)); + } + return $result; + } + + /** + * TopicList: topic 信息列表 + * + * @param TopicInfo[] $topicList + */ + public function setTopicList(array $topicList) + { + $result = []; + foreach ($topicList as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * Length: 列表长度 + * + * @return integer|null + */ + public function getLength() + { + return $this->get("Length"); + } + + /** + * Length: 列表长度 + * + * @param int $length + */ + public function setLength($length) + { + $this->set("Length", $length); + } +} diff --git a/src/UKafka/Apis/ModifyUKafkaInstanceTypeRequest.php b/src/UKafka/Apis/ModifyUKafkaInstanceTypeRequest.php new file mode 100644 index 0000000..92a6b3c --- /dev/null +++ b/src/UKafka/Apis/ModifyUKafkaInstanceTypeRequest.php @@ -0,0 +1,133 @@ + "ModifyUKafkaInstanceType"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("InstanceId"); + $this->markRequired("NodeType"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * InstanceId: 实例ID + * + * @return string|null + */ + public function getInstanceId() + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 实例ID + * + * @param string $instanceId + */ + public function setInstanceId($instanceId) + { + $this->set("InstanceId", $instanceId); + } + + /** + * NodeType: 目标机型,支持的机型可通过GetUKafkaNodeType 接口返回的InstanceTypeSet[].InstanceTypeName + * + * @return string|null + */ + public function getNodeType() + { + return $this->get("NodeType"); + } + + /** + * NodeType: 目标机型,支持的机型可通过GetUKafkaNodeType 接口返回的InstanceTypeSet[].InstanceTypeName + * + * @param string $nodeType + */ + public function setNodeType($nodeType) + { + $this->set("NodeType", $nodeType); + } +} diff --git a/src/UKafka/Apis/ModifyUKafkaInstanceTypeResponse.php b/src/UKafka/Apis/ModifyUKafkaInstanceTypeResponse.php new file mode 100644 index 0000000..eadcc05 --- /dev/null +++ b/src/UKafka/Apis/ModifyUKafkaInstanceTypeResponse.php @@ -0,0 +1,26 @@ + "ResizeUKafkaDisk"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("InstanceId"); + $this->markRequired("DiskSize"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * InstanceId: 实例ID + * + * @return string|null + */ + public function getInstanceId() + { + return $this->get("InstanceId"); + } + + /** + * InstanceId: 实例ID + * + * @param string $instanceId + */ + public function setInstanceId($instanceId) + { + $this->set("InstanceId", $instanceId); + } + + /** + * DiskSize: 数据盘大小。支持范围根据GetUKafkaNodeType 接口返回的InstanceTypeSet[].MaxDiskSize 和MinDiskSize获取 + * + * @return integer|null + */ + public function getDiskSize() + { + return $this->get("DiskSize"); + } + + /** + * DiskSize: 数据盘大小。支持范围根据GetUKafkaNodeType 接口返回的InstanceTypeSet[].MaxDiskSize 和MinDiskSize获取 + * + * @param int $diskSize + */ + public function setDiskSize($diskSize) + { + $this->set("DiskSize", $diskSize); + } +} diff --git a/src/UKafka/Apis/ResizeUKafkaDiskResponse.php b/src/UKafka/Apis/ResizeUKafkaDiskResponse.php new file mode 100644 index 0000000..fc41a98 --- /dev/null +++ b/src/UKafka/Apis/ResizeUKafkaDiskResponse.php @@ -0,0 +1,26 @@ +get("Endpoints")); + } + + /** + * Endpoints: broker 访问端点 + * + * @param Endpoints $endpoints + */ + public function setEndpoints(array $endpoints) + { + $this->set("Endpoints", $endpoints->getAll()); + } + + /** + * BrokerId: broker id + * + * @return string|null + */ + public function getBrokerId() + { + return $this->get("BrokerId"); + } + + /** + * BrokerId: broker id + * + * @param string $brokerId + */ + public function setBrokerId($brokerId) + { + $this->set("BrokerId", $brokerId); + } + + /** + * BrokerInfo: broker 关联topic 信息 + * + * @return BrokerOfTopicInfo[]|null + */ + public function getBrokerInfo() + { + $items = $this->get("BrokerInfo"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new BrokerOfTopicInfo($item)); + } + return $result; + } + + /** + * BrokerInfo: broker 关联topic 信息 + * + * @param BrokerOfTopicInfo[] $brokerInfo + */ + public function setBrokerInfo(array $brokerInfo) + { + $result = []; + foreach ($brokerInfo as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * CreateTime: broker 创建信息 + * + * @return string|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: broker 创建信息 + * + * @param string $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * DomainName: broker 域名 + * + * @return string|null + */ + public function getDomainName() + { + return $this->get("DomainName"); + } + + /** + * DomainName: broker 域名 + * + * @param string $domainName + */ + public function setDomainName($domainName) + { + $this->set("DomainName", $domainName); + } + + /** + * ExpireTime: broker 过期时间 + * + * @return integer|null + */ + public function getExpireTime() + { + return $this->get("ExpireTime"); + } + + /** + * ExpireTime: broker 过期时间 + * + * @param int $expireTime + */ + public function setExpireTime($expireTime) + { + $this->set("ExpireTime", $expireTime); + } + + /** + * IPSet: broker IP 信息 + * + * @return IP[]|null + */ + public function getIPSet() + { + $items = $this->get("IPSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new IP($item)); + } + return $result; + } + + /** + * IPSet: broker IP 信息 + * + * @param IP[] $ipSet + */ + public function setIPSet(array $ipSet) + { + $result = []; + foreach ($ipSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * InstanceGroupType: broker 机型信息 + * + * @return string|null + */ + public function getInstanceGroupType() + { + return $this->get("InstanceGroupType"); + } + + /** + * InstanceGroupType: broker 机型信息 + * + * @param string $instanceGroupType + */ + public function setInstanceGroupType($instanceGroupType) + { + $this->set("InstanceGroupType", $instanceGroupType); + } + + /** + * KafkaPort: kafka 服务端口 + * + * @return integer|null + */ + public function getKafkaPort() + { + return $this->get("KafkaPort"); + } + + /** + * KafkaPort: kafka 服务端口 + * + * @param int $kafkaPort + */ + public function setKafkaPort($kafkaPort) + { + $this->set("KafkaPort", $kafkaPort); + } + + /** + * Remark: broker 备注信息 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: broker 备注信息 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * ResourceId: broker 注册资源信息 + * + * @return string|null + */ + public function getResourceId() + { + return $this->get("ResourceId"); + } + + /** + * ResourceId: broker 注册资源信息 + * + * @param string $resourceId + */ + public function setResourceId($resourceId) + { + $this->set("ResourceId", $resourceId); + } + + /** + * SecurityGroupId: 安全组 id + * + * @return string|null + */ + public function getSecurityGroupId() + { + return $this->get("SecurityGroupId"); + } + + /** + * SecurityGroupId: 安全组 id + * + * @param string $securityGroupId + */ + public function setSecurityGroupId($securityGroupId) + { + $this->set("SecurityGroupId", $securityGroupId); + } + + /** + * State: broker 当前状态 + * + * @return string|null + */ + public function getState() + { + return $this->get("State"); + } + + /** + * State: broker 当前状态 + * + * @param string $state + */ + public function setState($state) + { + $this->set("State", $state); + } + + /** + * UHostConfig: broker 节点配置 + * + * @return UHostConfig|null + */ + public function getUHostConfig() + { + return new UHostConfig($this->get("UHostConfig")); + } + + /** + * UHostConfig: broker 节点配置 + * + * @param UHostConfig $uHostConfig + */ + public function setUHostConfig(array $uHostConfig) + { + $this->set("UHostConfig", $uHostConfig->getAll()); + } + + /** + * UHostId: 节点 id + * + * @return string|null + */ + public function getUHostId() + { + return $this->get("UHostId"); + } + + /** + * UHostId: 节点 id + * + * @param string $uHostId + */ + public function setUHostId($uHostId) + { + $this->set("UHostId", $uHostId); + } + + /** + * UHostName: 节点名称 + * + * @return string|null + */ + public function getUHostName() + { + return $this->get("UHostName"); + } + + /** + * UHostName: 节点名称 + * + * @param string $uHostName + */ + public function setUHostName($uHostName) + { + $this->set("UHostName", $uHostName); + } + + /** + * UHostRole: 节点类型 + * + * @return string|null + */ + public function getUHostRole() + { + return $this->get("UHostRole"); + } + + /** + * UHostRole: 节点类型 + * + * @param string $uHostRole + */ + public function setUHostRole($uHostRole) + { + $this->set("UHostRole", $uHostRole); + } + + /** + * ZooKeeper: 节点是否部署 zookeeper + * + * @return string|null + */ + public function getZooKeeper() + { + return $this->get("ZooKeeper"); + } + + /** + * ZooKeeper: 节点是否部署 zookeeper + * + * @param string $zooKeeper + */ + public function setZooKeeper($zooKeeper) + { + $this->set("ZooKeeper", $zooKeeper); + } + + /** + * ZooKeeperPort: zookeeper 服务端口 + * + * @return integer|null + */ + public function getZooKeeperPort() + { + return $this->get("ZooKeeperPort"); + } + + /** + * ZooKeeperPort: zookeeper 服务端口 + * + * @param int $zooKeeperPort + */ + public function setZooKeeperPort($zooKeeperPort) + { + $this->set("ZooKeeperPort", $zooKeeperPort); + } +} diff --git a/src/UKafka/Models/BrokerOfTopicInfo.php b/src/UKafka/Models/BrokerOfTopicInfo.php new file mode 100644 index 0000000..104586f --- /dev/null +++ b/src/UKafka/Models/BrokerOfTopicInfo.php @@ -0,0 +1,124 @@ +get("PartitionOnBroker"); + } + + /** + * PartitionOnBroker: topic 在 broker 上分布的 partition 数量 + * + * @param string $partitionOnBroker + */ + public function setPartitionOnBroker($partitionOnBroker) + { + $this->set("PartitionOnBroker", $partitionOnBroker); + } + + /** + * Partitions: topic 在 broker上 partition 列表 + * + * @return string|null + */ + public function getPartitions() + { + return $this->get("Partitions"); + } + + /** + * Partitions: topic 在 broker上 partition 列表 + * + * @param string $partitions + */ + public function setPartitions($partitions) + { + $this->set("Partitions", $partitions); + } + + /** + * Replication: Topic 副本数 + * + * @return integer|null + */ + public function getReplication() + { + return $this->get("Replication"); + } + + /** + * Replication: Topic 副本数 + * + * @param int $replication + */ + public function setReplication($replication) + { + $this->set("Replication", $replication); + } + + /** + * TopicName: topic 名称 + * + * @return string|null + */ + public function getTopicName() + { + return $this->get("TopicName"); + } + + /** + * TopicName: topic 名称 + * + * @param string $topicName + */ + public function setTopicName($topicName) + { + $this->set("TopicName", $topicName); + } + + /** + * TotalPartitions: partition 数量 + * + * @return integer|null + */ + public function getTotalPartitions() + { + return $this->get("TotalPartitions"); + } + + /** + * TotalPartitions: partition 数量 + * + * @param int $totalPartitions + */ + public function setTotalPartitions($totalPartitions) + { + $this->set("TotalPartitions", $totalPartitions); + } +} diff --git a/src/UKafka/Models/ClusterInfo.php b/src/UKafka/Models/ClusterInfo.php new file mode 100644 index 0000000..6aefcc2 --- /dev/null +++ b/src/UKafka/Models/ClusterInfo.php @@ -0,0 +1,456 @@ +get("Zone"); + } + + /** + * Zone: 所属可用区 + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * AutoRenew: 是否开启自动续费 + * + * @return string|null + */ + public function getAutoRenew() + { + return $this->get("AutoRenew"); + } + + /** + * AutoRenew: 是否开启自动续费 + * + * @param string $autoRenew + */ + public function setAutoRenew($autoRenew) + { + $this->set("AutoRenew", $autoRenew); + } + + /** + * BusinessId: 业务组 ID + * + * @return string|null + */ + public function getBusinessId() + { + return $this->get("BusinessId"); + } + + /** + * BusinessId: 业务组 ID + * + * @param string $businessId + */ + public function setBusinessId($businessId) + { + $this->set("BusinessId", $businessId); + } + + /** + * ChargeType: 付费类型 + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 付费类型 + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * ClusterInstanceId: 实例id + * + * @return string|null + */ + public function getClusterInstanceId() + { + return $this->get("ClusterInstanceId"); + } + + /** + * ClusterInstanceId: 实例id + * + * @param string $clusterInstanceId + */ + public function setClusterInstanceId($clusterInstanceId) + { + $this->set("ClusterInstanceId", $clusterInstanceId); + } + + /** + * ClusterInstanceName: 实例名称 + * + * @return string|null + */ + public function getClusterInstanceName() + { + return $this->get("ClusterInstanceName"); + } + + /** + * ClusterInstanceName: 实例名称 + * + * @param string $clusterInstanceName + */ + public function setClusterInstanceName($clusterInstanceName) + { + $this->set("ClusterInstanceName", $clusterInstanceName); + } + + /** + * CreateTime: 实例创建时间 + * + * @return integer|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: 实例创建时间 + * + * @param int $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ExpireTime: 实例过期时间 + * + * @return integer|null + */ + public function getExpireTime() + { + return $this->get("ExpireTime"); + } + + /** + * ExpireTime: 实例过期时间 + * + * @param int $expireTime + */ + public function setExpireTime($expireTime) + { + $this->set("ExpireTime", $expireTime); + } + + /** + * Framework: 实例框架 + * + * @return string|null + */ + public function getFramework() + { + return $this->get("Framework"); + } + + /** + * Framework: 实例框架 + * + * @param string $framework + */ + public function setFramework($framework) + { + $this->set("Framework", $framework); + } + + /** + * FrameworkVersion: 实例框架版本 + * + * @return string|null + */ + public function getFrameworkVersion() + { + return $this->get("FrameworkVersion"); + } + + /** + * FrameworkVersion: 实例框架版本 + * + * @param string $frameworkVersion + */ + public function setFrameworkVersion($frameworkVersion) + { + $this->set("FrameworkVersion", $frameworkVersion); + } + + /** + * NetworkId: 网络 id(已废弃) + * + * @return string|null + */ + public function getNetworkId() + { + return $this->get("NetworkId"); + } + + /** + * NetworkId: 网络 id(已废弃) + * + * @param string $networkId + */ + public function setNetworkId($networkId) + { + $this->set("NetworkId", $networkId); + } + + /** + * Remark: 实例备注 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 实例备注 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * RunningTime: 实例运行时间 + * + * @return integer|null + */ + public function getRunningTime() + { + return $this->get("RunningTime"); + } + + /** + * RunningTime: 实例运行时间 + * + * @param int $runningTime + */ + public function setRunningTime($runningTime) + { + $this->set("RunningTime", $runningTime); + } + + /** + * State: 实例当前状态,实例状态:"Running"| "Abnormal"| "Creating"| "Deleting"| "CreateFailed"| "DeleteFailed"| "Unavailable"| "Deleted"| "Updating"| "Deploying"| "Migrating"| "ExpandFailed" + * + * @return string|null + */ + public function getState() + { + return $this->get("State"); + } + + /** + * State: 实例当前状态,实例状态:"Running"| "Abnormal"| "Creating"| "Deleting"| "CreateFailed"| "DeleteFailed"| "Unavailable"| "Deleted"| "Updating"| "Deploying"| "Migrating"| "ExpandFailed" + * + * @param string $state + */ + public function setState($state) + { + $this->set("State", $state); + } + + /** + * SubnetId: 所属子网 id + * + * @return string|null + */ + public function getSubnetId() + { + return $this->get("SubnetId"); + } + + /** + * SubnetId: 所属子网 id + * + * @param string $subnetId + */ + public function setSubnetId($subnetId) + { + $this->set("SubnetId", $subnetId); + } + + /** + * Tag: 实例标记 + * + * @return string|null + */ + public function getTag() + { + return $this->get("Tag"); + } + + /** + * Tag: 实例标记 + * + * @param string $tag + */ + public function setTag($tag) + { + $this->set("Tag", $tag); + } + + /** + * UHostCount: 实例节点个数 + * + * @return integer|null + */ + public function getUHostCount() + { + return $this->get("UHostCount"); + } + + /** + * UHostCount: 实例节点个数 + * + * @param int $uHostCount + */ + public function setUHostCount($uHostCount) + { + $this->set("UHostCount", $uHostCount); + } + + /** + * UHostSet: 节点信息列表 + * + * @return Broker[]|null + */ + public function getUHostSet() + { + $items = $this->get("UHostSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new Broker($item)); + } + return $result; + } + + /** + * UHostSet: 节点信息列表 + * + * @param Broker[] $uHostSet + */ + public function setUHostSet(array $uHostSet) + { + $result = []; + foreach ($uHostSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * VPCId: 所属 VPC id + * + * @return string|null + */ + public function getVPCId() + { + return $this->get("VPCId"); + } + + /** + * VPCId: 所属 VPC id + * + * @param string $vpcId + */ + public function setVPCId($vpcId) + { + $this->set("VPCId", $vpcId); + } + + /** + * ValidBrokerNum: 可用节点个数 + * + * @return integer|null + */ + public function getValidBrokerNum() + { + return $this->get("ValidBrokerNum"); + } + + /** + * ValidBrokerNum: 可用节点个数 + * + * @param int $validBrokerNum + */ + public function setValidBrokerNum($validBrokerNum) + { + $this->set("ValidBrokerNum", $validBrokerNum); + } + + /** + * IsOpenSecgroup: 是否开启安全组 + * + * @return string|null + */ + public function getIsOpenSecgroup() + { + return $this->get("IsOpenSecgroup"); + } + + /** + * IsOpenSecgroup: 是否开启安全组 + * + * @param string $isOpenSecgroup + */ + public function setIsOpenSecgroup($isOpenSecgroup) + { + $this->set("IsOpenSecgroup", $isOpenSecgroup); + } +} diff --git a/src/UKafka/Models/DiskSet.php b/src/UKafka/Models/DiskSet.php new file mode 100644 index 0000000..2d41c8b --- /dev/null +++ b/src/UKafka/Models/DiskSet.php @@ -0,0 +1,64 @@ +get("Type"); + } + + /** + * Type: 磁盘类型。Boot 表示系统盘,Data 表示数据盘 + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * Size: 磁盘大小 + * + * @return string|null + */ + public function getSize() + { + return $this->get("Size"); + } + + /** + * Size: 磁盘大小 + * + * @param string $size + */ + public function setSize($size) + { + $this->set("Size", $size); + } +} diff --git a/src/UKafka/Models/Endpoints.php b/src/UKafka/Models/Endpoints.php new file mode 100644 index 0000000..426072b --- /dev/null +++ b/src/UKafka/Models/Endpoints.php @@ -0,0 +1,64 @@ +get("PlainText")); + } + + /** + * PlainText: PLAINTEXT 协议访问信息 + * + * @param Url $plainText + */ + public function setPlainText(array $plainText) + { + $this->set("PlainText", $plainText->getAll()); + } + + /** + * SaslPlainText: SASL_PLAINTEXT 协议访问信息 + * + * @return Url|null + */ + public function getSaslPlainText() + { + return new Url($this->get("SaslPlainText")); + } + + /** + * SaslPlainText: SASL_PLAINTEXT 协议访问信息 + * + * @param Url $saslPlainText + */ + public function setSaslPlainText(array $saslPlainText) + { + $this->set("SaslPlainText", $saslPlainText->getAll()); + } +} diff --git a/src/UKafka/Models/Group.php b/src/UKafka/Models/Group.php new file mode 100644 index 0000000..ae8d9d6 --- /dev/null +++ b/src/UKafka/Models/Group.php @@ -0,0 +1,84 @@ +get("GroupName"); + } + + /** + * GroupName: 消费者组组名 + * + * @param string $groupName + */ + public function setGroupName($groupName) + { + $this->set("GroupName", $groupName); + } + + /** + * Type: 消费者组类型 + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: 消费者组类型 + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } + + /** + * NumOfTopics: 订阅 Topic 数量 + * + * @return integer|null + */ + public function getNumOfTopics() + { + return $this->get("NumOfTopics"); + } + + /** + * NumOfTopics: 订阅 Topic 数量 + * + * @param int $numOfTopics + */ + public function setNumOfTopics($numOfTopics) + { + $this->set("NumOfTopics", $numOfTopics); + } +} diff --git a/src/UKafka/Models/IP.php b/src/UKafka/Models/IP.php new file mode 100644 index 0000000..94758f6 --- /dev/null +++ b/src/UKafka/Models/IP.php @@ -0,0 +1,64 @@ +get("IP"); + } + + /** + * IP: IP地址 + * + * @param string $ip + */ + public function setIP($ip) + { + $this->set("IP", $ip); + } + + /** + * Type: IP类型 + * + * @return string|null + */ + public function getType() + { + return $this->get("Type"); + } + + /** + * Type: IP类型 + * + * @param string $type + */ + public function setType($type) + { + $this->set("Type", $type); + } +} diff --git a/src/UKafka/Models/InstanceType.php b/src/UKafka/Models/InstanceType.php new file mode 100644 index 0000000..ed60ce8 --- /dev/null +++ b/src/UKafka/Models/InstanceType.php @@ -0,0 +1,124 @@ +get("DiskSet")); + } + + /** + * DiskSet: 机型磁盘类型信息 + * + * @param DiskSet $diskSet + */ + public function setDiskSet(array $diskSet) + { + $this->set("DiskSet", $diskSet->getAll()); + } + + /** + * CPU: CPU核心数 + * + * @return integer|null + */ + public function getCPU() + { + return $this->get("CPU"); + } + + /** + * CPU: CPU核心数 + * + * @param int $cpu + */ + public function setCPU($cpu) + { + $this->set("CPU", $cpu); + } + + /** + * DiskType: 磁盘类型。RSSD 表示固态云盘,SSD 表示本地固态盘,COMMON 表示本地 SATA 盘 + * + * @return string|null + */ + public function getDiskType() + { + return $this->get("DiskType"); + } + + /** + * DiskType: 磁盘类型。RSSD 表示固态云盘,SSD 表示本地固态盘,COMMON 表示本地 SATA 盘 + * + * @param string $diskType + */ + public function setDiskType($diskType) + { + $this->set("DiskType", $diskType); + } + + /** + * NodeTypeName: 机型名称 + * + * @return string|null + */ + public function getNodeTypeName() + { + return $this->get("NodeTypeName"); + } + + /** + * NodeTypeName: 机型名称 + * + * @param string $nodeTypeName + */ + public function setNodeTypeName($nodeTypeName) + { + $this->set("NodeTypeName", $nodeTypeName); + } + + /** + * Memory: 内存大小(单位 MB) + * + * @return string|null + */ + public function getMemory() + { + return $this->get("Memory"); + } + + /** + * Memory: 内存大小(单位 MB) + * + * @param string $memory + */ + public function setMemory($memory) + { + $this->set("Memory", $memory); + } +} diff --git a/src/UKafka/Models/TopicInfo.php b/src/UKafka/Models/TopicInfo.php new file mode 100644 index 0000000..0c15888 --- /dev/null +++ b/src/UKafka/Models/TopicInfo.php @@ -0,0 +1,144 @@ +get("Topic"); + } + + /** + * Topic: topic 名称 + * + * @param string $topic + */ + public function setTopic($topic) + { + $this->set("Topic", $topic); + } + + /** + * NumOfPartition: 分区数量 + * + * @return integer|null + */ + public function getNumOfPartition() + { + return $this->get("NumOfPartition"); + } + + /** + * NumOfPartition: 分区数量 + * + * @param int $numOfPartition + */ + public function setNumOfPartition($numOfPartition) + { + $this->set("NumOfPartition", $numOfPartition); + } + + /** + * NumOfOccupyBroker: 占用 broker 数量 + * + * @return integer|null + */ + public function getNumOfOccupyBroker() + { + return $this->get("NumOfOccupyBroker"); + } + + /** + * NumOfOccupyBroker: 占用 broker 数量 + * + * @param int $numOfOccupyBroker + */ + public function setNumOfOccupyBroker($numOfOccupyBroker) + { + $this->set("NumOfOccupyBroker", $numOfOccupyBroker); + } + + /** + * NumOfReplica: 副本数量 + * + * @return integer|null + */ + public function getNumOfReplica() + { + return $this->get("NumOfReplica"); + } + + /** + * NumOfReplica: 副本数量 + * + * @param int $numOfReplica + */ + public function setNumOfReplica($numOfReplica) + { + $this->set("NumOfReplica", $numOfReplica); + } + + /** + * UnderReplicasPer: 落后副本占比 + * + * @return float|null + */ + public function getUnderReplicasPer() + { + return $this->get("UnderReplicasPer"); + } + + /** + * UnderReplicasPer: 落后副本占比 + * + * @param float $underReplicasPer + */ + public function setUnderReplicasPer($underReplicasPer) + { + $this->set("UnderReplicasPer", $underReplicasPer); + } + + /** + * Status: topic 状态 + * + * @return string|null + */ + public function getStatus() + { + return $this->get("Status"); + } + + /** + * Status: topic 状态 + * + * @param string $status + */ + public function setStatus($status) + { + $this->set("Status", $status); + } +} diff --git a/src/UKafka/Models/UHostConfig.php b/src/UKafka/Models/UHostConfig.php new file mode 100644 index 0000000..93410a4 --- /dev/null +++ b/src/UKafka/Models/UHostConfig.php @@ -0,0 +1,144 @@ +get("DiskType"); + } + + /** + * DiskType: 节点数据盘类型 + * + * @param string $diskType + */ + public function setDiskType($diskType) + { + $this->set("DiskType", $diskType); + } + + /** + * BootDiskSize: 节点系统盘大小(单位G)【删除】 + * + * @return integer|null + */ + public function getBootDiskSize() + { + return $this->get("BootDiskSize"); + } + + /** + * BootDiskSize: 节点系统盘大小(单位G)【删除】 + * + * @param int $bootDiskSize + */ + public function setBootDiskSize($bootDiskSize) + { + $this->set("BootDiskSize", $bootDiskSize); + } + + /** + * CPU: 节点 CPU 核心数 + * + * @return integer|null + */ + public function getCPU() + { + return $this->get("CPU"); + } + + /** + * CPU: 节点 CPU 核心数 + * + * @param int $cpu + */ + public function setCPU($cpu) + { + $this->set("CPU", $cpu); + } + + /** + * DataDiskSize: 节点数据盘大小(单位G) + * + * @return integer|null + */ + public function getDataDiskSize() + { + return $this->get("DataDiskSize"); + } + + /** + * DataDiskSize: 节点数据盘大小(单位G) + * + * @param int $dataDiskSize + */ + public function setDataDiskSize($dataDiskSize) + { + $this->set("DataDiskSize", $dataDiskSize); + } + + /** + * Memory: 节点内存(单位MB) + * + * @return integer|null + */ + public function getMemory() + { + return $this->get("Memory"); + } + + /** + * Memory: 节点内存(单位MB) + * + * @param int $memory + */ + public function setMemory($memory) + { + $this->set("Memory", $memory); + } + + /** + * OS: 节点内部系统名称【删除】 + * + * @return string|null + */ + public function getOS() + { + return $this->get("OS"); + } + + /** + * OS: 节点内部系统名称【删除】 + * + * @param string $os + */ + public function setOS($os) + { + $this->set("OS", $os); + } +} diff --git a/src/UKafka/Models/Url.php b/src/UKafka/Models/Url.php new file mode 100644 index 0000000..1142e73 --- /dev/null +++ b/src/UKafka/Models/Url.php @@ -0,0 +1,64 @@ +get("Protocal"); + } + + /** + * Protocal: 访问协议 + * + * @param string $protocal + */ + public function setProtocal($protocal) + { + $this->set("Protocal", $protocal); + } + + /** + * Addr: 访问地址 + * + * @return string|null + */ + public function getAddr() + { + return $this->get("Addr"); + } + + /** + * Addr: 访问地址 + * + * @param string $addr + */ + public function setAddr($addr) + { + $this->set("Addr", $addr); + } +} diff --git a/src/UKafka/Models/Version.php b/src/UKafka/Models/Version.php new file mode 100644 index 0000000..23c2482 --- /dev/null +++ b/src/UKafka/Models/Version.php @@ -0,0 +1,64 @@ +get("Version"); + } + + /** + * Version: kafka版本 + * + * @param string $version + */ + public function setVersion($version) + { + $this->set("Version", $version); + } + + /** + * Label: kafka 版本标签。recommend 表示推荐版本,beta 表示公测版本 + * + * @return string|null + */ + public function getLabel() + { + return $this->get("Label"); + } + + /** + * Label: kafka 版本标签。recommend 表示推荐版本,beta 表示公测版本 + * + * @param string $label + */ + public function setLabel($label) + { + $this->set("Label", $label); + } +} diff --git a/src/UKafka/UKafkaClient.php b/src/UKafka/UKafkaClient.php new file mode 100644 index 0000000..59abadb --- /dev/null +++ b/src/UKafka/UKafkaClient.php @@ -0,0 +1,561 @@ + (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) + * "InstanceId" => (string) 实例ID + * "NodeType" => (string) 机型,支持的机型可通过GetUKafkaNodeType 接口返回的InstanceTypeSet[].InstanceTypeName + * "NodeCount" => (integer) 新添加节点数量 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return AddUKafkaInstanceNodeResponse + * @throws UCloudException + */ + public function addUKafkaInstanceNode(AddUKafkaInstanceNodeRequest $request = null) + { + $resp = $this->invoke($request); + return new AddUKafkaInstanceNodeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUKafkaInstance - 创建一个ukafka实例 + * + * See also: https://docs.ucloud.cn/api/ukafka-api/create_ukafka_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) + * "FrameworkVersion" => (string) kafka版本,支持的版本可通过ListUKafkaFrameworkVersion 接口返回字段的FrameworkVersions获取 + * "VPCId" => (string) VPCID + * "SubnetId" => (string) 子网 ID + * "ChargeType" => (string) 付费方式 + * "NodeType" => (string) 机型,支持的机型可通过GetUKafkaNodeType 接口返回的InstanceTypeSet[].InstanceTypeName + * "DiskSize" => (integer) 数据盘大小。支持范围根据GetUKafkaNodeType 接口返回的InstanceTypeSet[].MaxDiskSize 和MinDiskSize获取 + * "InstanceName" => (string) 实例名,可自定义 + * "BusinessId" => (string) 业务组,默认Default + * "Quantity" => (string) 实例数量,默认 1 + * "NodeCount" => (integer) 集群节点数量。默认 3 节点 + * "LogRetentionHours" => (string) kafka 日志保存时间,支持范围[1,240]。默认 72 小时 + * "DiskControllerType" => (string) 磁盘管理方式,支持值:NONE、CLEAN。默认值:NONE + * "DiskThreshold" => (string) 磁盘清理阈值,支持范围[70,90]。DiskControllerType 为CLEAN 时必填。默认值 90 + * "IsSecurityEnabled" => (string) 是否开启安全组,支持"true","false",默认 false + * ] + * + * Outputs: + * + * $outputs = [ + * "InstanceId" => (string) 实例资源 ID + * ] + * + * @return CreateUKafkaInstanceResponse + * @throws UCloudException + */ + public function createUKafkaInstance(CreateUKafkaInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new CreateUKafkaInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteUKafkaInstance - 删除实例 + * + * See also: https://docs.ucloud.cn/api/ukafka-api/delete_ukafka_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) + * "InstanceId" => (string) 实例ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return DeleteUKafkaInstanceResponse + * @throws UCloudException + */ + public function deleteUKafkaInstance(DeleteUKafkaInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new DeleteUKafkaInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUKafkaConsumer - 获取 Kafka 消费组信息 + * + * See also: https://docs.ucloud.cn/api/ukafka-api/describe_ukafka_consumer + * + * 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) + * "ClusterInstanceId" => (string) Kafka 集群 ID + * "ConsumerGroup" => (string) 消费组组名 + * "Type" => (string) 消费者组类型(同消费者组列表返回的类型值) + * ] + * + * Outputs: + * + * $outputs = [ + * "GroupName" => (string) 消费者组组名 + * "Type" => (string) 消费者组类型 + * "Topics" => (string) 消费者组所订阅 topic 信息 + * ] + * + * @return DescribeUKafkaConsumerResponse + * @throws UCloudException + */ + public function describeUKafkaConsumer(DescribeUKafkaConsumerRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeUKafkaConsumerResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DescribeUKafkaInstance - 获取整个集群的信息 + * + * See also: https://docs.ucloud.cn/api/ukafka-api/describe_ukafka_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) + * "ClusterInstanceId" => (string) 实例ID,可以通过ListUKafkaInstance 接口的ClusterSet. ClusterInstanceId 获取 + * ] + * + * Outputs: + * + * $outputs = [ + * "ClusterSet" => (array) 集群信息列表[ + * [ + * "Zone" => (string) 所属可用区 + * "AutoRenew" => (string) 是否开启自动续费 + * "BusinessId" => (string) 业务组 ID + * "ChargeType" => (string) 付费类型 + * "ClusterInstanceId" => (string) 实例id + * "ClusterInstanceName" => (string) 实例名称 + * "CreateTime" => (integer) 实例创建时间 + * "ExpireTime" => (integer) 实例过期时间 + * "Framework" => (string) 实例框架 + * "FrameworkVersion" => (string) 实例框架版本 + * "NetworkId" => (string) 网络 id(已废弃) + * "Remark" => (string) 实例备注 + * "RunningTime" => (integer) 实例运行时间 + * "State" => (string) 实例当前状态,实例状态:"Running"| "Abnormal"| "Creating"| "Deleting"| "CreateFailed"| "DeleteFailed"| "Unavailable"| "Deleted"| "Updating"| "Deploying"| "Migrating"| "ExpandFailed" + * "SubnetId" => (string) 所属子网 id + * "Tag" => (string) 实例标记 + * "UHostCount" => (integer) 实例节点个数 + * "UHostSet" => (array) 节点信息列表[ + * [ + * "Endpoints" => (object) broker 访问端点[ + * "PlainText" => (object) PLAINTEXT 协议访问信息[ + * "Protocal" => (string) 访问协议 + * "Addr" => (string) 访问地址 + * ] + * "SaslPlainText" => (object) SASL_PLAINTEXT 协议访问信息[ + * "Protocal" => (string) 访问协议 + * "Addr" => (string) 访问地址 + * ] + * ] + * "BrokerId" => (string) broker id + * "BrokerInfo" => (array) broker 关联topic 信息[ + * [ + * "PartitionOnBroker" => (string) topic 在 broker 上分布的 partition 数量 + * "Partitions" => (string) topic 在 broker上 partition 列表 + * "Replication" => (integer) Topic 副本数 + * "TopicName" => (string) topic 名称 + * "TotalPartitions" => (integer) partition 数量 + * ] + * ] + * "CreateTime" => (string) broker 创建信息 + * "DomainName" => (string) broker 域名 + * "ExpireTime" => (integer) broker 过期时间 + * "IPSet" => (array) broker IP 信息[ + * [ + * "IP" => (string) IP地址 + * "Type" => (string) IP类型 + * ] + * ] + * "InstanceGroupType" => (string) broker 机型信息 + * "KafkaPort" => (integer) kafka 服务端口 + * "Remark" => (string) broker 备注信息 + * "ResourceId" => (string) broker 注册资源信息 + * "SecurityGroupId" => (string) 安全组 id + * "State" => (string) broker 当前状态 + * "UHostConfig" => (object) broker 节点配置[ + * "DiskType" => (string) 节点数据盘类型 + * "BootDiskSize" => (integer) 节点系统盘大小(单位G)【删除】 + * "CPU" => (integer) 节点 CPU 核心数 + * "DataDiskSize" => (integer) 节点数据盘大小(单位G) + * "Memory" => (integer) 节点内存(单位MB) + * "OS" => (string) 节点内部系统名称【删除】 + * ] + * "UHostId" => (string) 节点 id + * "UHostName" => (string) 节点名称 + * "UHostRole" => (string) 节点类型 + * "ZooKeeper" => (string) 节点是否部署 zookeeper + * "ZooKeeperPort" => (integer) zookeeper 服务端口 + * ] + * ] + * "VPCId" => (string) 所属 VPC id + * "ValidBrokerNum" => (integer) 可用节点个数 + * "IsOpenSecgroup" => (string) 是否开启安全组 + * ] + * ] + * ] + * + * @return DescribeUKafkaInstanceResponse + * @throws UCloudException + */ + public function describeUKafkaInstance(DescribeUKafkaInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new DescribeUKafkaInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUKafkaNodeType - 获取节点机型配置 + * + * See also: https://docs.ucloud.cn/api/ukafka-api/get_ukafka_node_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) + * "NodeType" => (string) 传参时返回指定机型信息,参数为空时返回所有机型信息 + * ] + * + * Outputs: + * + * $outputs = [ + * "NodeTypeSet" => (array) 机型信息列表[ + * [ + * "DiskSet" => (object) 机型磁盘类型信息[ + * "Type" => (string) 磁盘类型。Boot 表示系统盘,Data 表示数据盘 + * "Size" => (string) 磁盘大小 + * ] + * "CPU" => (integer) CPU核心数 + * "DiskType" => (string) 磁盘类型。RSSD 表示固态云盘,SSD 表示本地固态盘,COMMON 表示本地 SATA 盘 + * "NodeTypeName" => (string) 机型名称 + * "Memory" => (string) 内存大小(单位 MB) + * ] + * ] + * ] + * + * @return GetUKafkaNodeTypeResponse + * @throws UCloudException + */ + public function getUKafkaNodeType(GetUKafkaNodeTypeRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUKafkaNodeTypeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * IsUKafkaTopicNameExist - 检查一个topic名称是否已经在集群中了 + * + * See also: https://docs.ucloud.cn/api/ukafka-api/is_ukafka_topic_name_exist + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html) + * "ClusterInstanceId" => (string) 集群ID + * "TopicName" => (string) 待检查的topic名称 + * ] + * + * Outputs: + * + * $outputs = [ + * "IsExist" => (string) 是否已经存在 + * ] + * + * @return IsUKafkaTopicNameExistResponse + * @throws UCloudException + */ + public function isUKafkaTopicNameExist(IsUKafkaTopicNameExistRequest $request = null) + { + $resp = $this->invoke($request); + return new IsUKafkaTopicNameExistResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListUKafkaConsumers - 列出 Kafka 消费组 + * + * See also: https://docs.ucloud.cn/api/ukafka-api/list_ukafka_consumers + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目 ID。不填写为默认项目,子帐号必须填写。 请参考 [GetProjectList 接口](../summary/get_project_list.html) + * "ClusterInstanceId" => (string) Kafka 集群 ID + * ] + * + * Outputs: + * + * $outputs = [ + * "Groups" => (array) 消费者组列表[ + * [ + * "GroupName" => (string) 消费者组组名 + * "Type" => (string) 消费者组类型 + * "NumOfTopics" => (integer) 订阅 Topic 数量 + * ] + * ] + * ] + * + * @return ListUKafkaConsumersResponse + * @throws UCloudException + */ + public function listUKafkaConsumers(ListUKafkaConsumersRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUKafkaConsumersResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListUKafkaFrameworkVersion - 列举ukafka框架版本 + * + * See also: https://docs.ucloud.cn/api/ukafka-api/list_ukafka_framework_version + * + * 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 = [ + * "FrameworkVersions" => (array) kafka版本[ + * [ + * "Version" => (string) kafka版本 + * "Label" => (string) kafka 版本标签。recommend 表示推荐版本,beta 表示公测版本 + * ] + * ] + * ] + * + * @return ListUKafkaFrameworkVersionResponse + * @throws UCloudException + */ + public function listUKafkaFrameworkVersion(ListUKafkaFrameworkVersionRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUKafkaFrameworkVersionResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListUKafkaInstance - 列举集群信息 + * + * See also: https://docs.ucloud.cn/api/ukafka-api/list_ukafka_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) + * "Limit" => (string) 默认为60 + * "Offset" => (string) 默认为0 + * "Filter" => (string) 是否过滤删除了的节点,默认为‘true’ + * "VPCId" => (string) VPCId + * "SubnetId" => (string) SubnetId + * "BusinessId" => (string) 业务组 ID + * "ClusterInstanceId" => (string) 实例ID + * ] + * + * Outputs: + * + * $outputs = [ + * "ClusterSet" => (string) 信息 + * "TotalCount" => (string) 总数 + * ] + * + * @return ListUKafkaInstanceResponse + * @throws UCloudException + */ + public function listUKafkaInstance(ListUKafkaInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUKafkaInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListUKafkaTopics - 展示kafka集群上所有topic + * + * See also: https://docs.ucloud.cn/api/ukafka-api/list_ukafka_topics + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](../summary/regionlist.html) + * "Zone" => (string) 可用区。参见 [可用区列表](../summary/regionlist.html) + * "ProjectId" => (string) 项目 ID。不填写为默认项目,子帐号必须填写。 请参考 [GetProjectList 接口](../summary/get_project_list.html) + * "ClusterInstanceId" => (string) 集群资源id + * ] + * + * Outputs: + * + * $outputs = [ + * "TopicList" => (array) topic 信息列表[ + * [ + * "Topic" => (string) topic 名称 + * "NumOfPartition" => (integer) 分区数量 + * "NumOfOccupyBroker" => (integer) 占用 broker 数量 + * "NumOfReplica" => (integer) 副本数量 + * "UnderReplicasPer" => (number) 落后副本占比 + * "Status" => (string) topic 状态 + * ] + * ] + * "Length" => (integer) 列表长度 + * ] + * + * @return ListUKafkaTopicsResponse + * @throws UCloudException + */ + public function listUKafkaTopics(ListUKafkaTopicsRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUKafkaTopicsResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ModifyUKafkaInstanceType - 规格升降级 + * + * See also: https://docs.ucloud.cn/api/ukafka-api/modify_ukafka_instance_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) + * "InstanceId" => (string) 实例ID + * "NodeType" => (string) 目标机型,支持的机型可通过GetUKafkaNodeType 接口返回的InstanceTypeSet[].InstanceTypeName + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return ModifyUKafkaInstanceTypeResponse + * @throws UCloudException + */ + public function modifyUKafkaInstanceType(ModifyUKafkaInstanceTypeRequest $request = null) + { + $resp = $this->invoke($request); + return new ModifyUKafkaInstanceTypeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ResizeUKafkaDisk - 磁盘扩容 + * + * See also: https://docs.ucloud.cn/api/ukafka-api/resize_ukafka_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) + * "InstanceId" => (string) 实例ID + * "DiskSize" => (integer) 数据盘大小。支持范围根据GetUKafkaNodeType 接口返回的InstanceTypeSet[].MaxDiskSize 和MinDiskSize获取 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return ResizeUKafkaDiskResponse + * @throws UCloudException + */ + public function resizeUKafkaDisk(ResizeUKafkaDiskRequest $request = null) + { + $resp = $this->invoke($request); + return new ResizeUKafkaDiskResponse($resp->toArray(), $resp->getRequestId()); + } +}