diff --git a/VERSION b/VERSION index 6605e91..f0e0b79 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.68 +0.3.69 diff --git a/src/UDBPostgreSQL/Apis/BackupUPgSQLLogRequest.php b/src/UDBPostgreSQL/Apis/BackupUPgSQLLogRequest.php new file mode 100644 index 0000000..6252409 --- /dev/null +++ b/src/UDBPostgreSQL/Apis/BackupUPgSQLLogRequest.php @@ -0,0 +1,196 @@ + "BackupUPgSQLLog"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("BackupName"); + $this->markRequired("InstanceID"); + $this->markRequired("LogType"); + $this->markRequired("BeginTime"); + $this->markRequired("EndTime"); + } + + + + /** + * 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); + } + + /** + * BackupName: 备份导出文件名称 + * + * @return string|null + */ + public function getBackupName() + { + return $this->get("BackupName"); + } + + /** + * BackupName: 备份导出文件名称 + * + * @param string $backupName + */ + public function setBackupName($backupName) + { + $this->set("BackupName", $backupName); + } + + /** + * 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); + } + + /** + * LogType: 日志类型:slowlog(慢日志),errorlog(错误日志),不区分大小写 + * + * @return string|null + */ + public function getLogType() + { + return $this->get("LogType"); + } + + /** + * LogType: 日志类型:slowlog(慢日志),errorlog(错误日志),不区分大小写 + * + * @param string $logType + */ + public function setLogType($logType) + { + $this->set("LogType", $logType); + } + + /** + * BeginTime: 日志开始时间 + * + * @return integer|null + */ + public function getBeginTime() + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 日志开始时间 + * + * @param int $beginTime + */ + public function setBeginTime($beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 日志结束时间 + * + * @return integer|null + */ + public function getEndTime() + { + return $this->get("EndTime"); + } + + /** + * EndTime: 日志结束时间 + * + * @param int $endTime + */ + public function setEndTime($endTime) + { + $this->set("EndTime", $endTime); + } +} diff --git a/src/UDBPostgreSQL/Apis/BackupUPgSQLLogResponse.php b/src/UDBPostgreSQL/Apis/BackupUPgSQLLogResponse.php new file mode 100644 index 0000000..603a7f1 --- /dev/null +++ b/src/UDBPostgreSQL/Apis/BackupUPgSQLLogResponse.php @@ -0,0 +1,26 @@ + "BackupUPgSQL"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("InstanceID"); + $this->markRequired("BackupName"); + $this->markRequired("BackupMethod"); + $this->markRequired("Blacklist"); + } + + + + /** + * 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: DB实例Id + * + * @return string|null + */ + public function getInstanceID() + { + return $this->get("InstanceID"); + } + + /** + * InstanceID: DB实例Id + * + * @param string $instanceID + */ + public function setInstanceID($instanceID) + { + $this->set("InstanceID", $instanceID); + } + + /** + * BackupName: 备份名称 + * + * @return string|null + */ + public function getBackupName() + { + return $this->get("BackupName"); + } + + /** + * BackupName: 备份名称 + * + * @param string $backupName + */ + public function setBackupName($backupName) + { + $this->set("BackupName", $backupName); + } + + /** + * BackupMethod: 使用的备份方式(物理备份,逻辑备份) + * + * @return integer|null + */ + public function getBackupMethod() + { + return $this->get("BackupMethod"); + } + + /** + * BackupMethod: 使用的备份方式(物理备份,逻辑备份) + * + * @param int $backupMethod + */ + public function setBackupMethod($backupMethod) + { + $this->set("BackupMethod", $backupMethod); + } + + /** + * Blacklist: 备份黑名单列表,以“ ;” 分隔。 + * + * @return string|null + */ + public function getBlacklist() + { + return $this->get("Blacklist"); + } + + /** + * Blacklist: 备份黑名单列表,以“ ;” 分隔。 + * + * @param string $blacklist + */ + public function setBlacklist($blacklist) + { + $this->set("Blacklist", $blacklist); + } +} diff --git a/src/UDBPostgreSQL/Apis/BackupUPgSQLResponse.php b/src/UDBPostgreSQL/Apis/BackupUPgSQLResponse.php new file mode 100644 index 0000000..4c997c8 --- /dev/null +++ b/src/UDBPostgreSQL/Apis/BackupUPgSQLResponse.php @@ -0,0 +1,44 @@ +get("BackupID"); + } + + /** + * BackupID: 返回的备份ID + * + * @param string $backupID + */ + public function setBackupID($backupID) + { + $this->set("BackupID", $backupID); + } +} diff --git a/src/UDBPostgreSQL/Apis/CreateUPgSQLInstanceRequest.php b/src/UDBPostgreSQL/Apis/CreateUPgSQLInstanceRequest.php new file mode 100644 index 0000000..d9bfcae --- /dev/null +++ b/src/UDBPostgreSQL/Apis/CreateUPgSQLInstanceRequest.php @@ -0,0 +1,300 @@ + "CreateUPgSQLInstance"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("Name"); + $this->markRequired("DBVersion"); + $this->markRequired("ParamGroupID"); + $this->markRequired("AdminPassword"); + $this->markRequired("Port"); + $this->markRequired("DiskSpace"); + $this->markRequired("MachineType"); + $this->markRequired("SubnetID"); + $this->markRequired("VPCID"); + } + + + + /** + * 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); + } + + /** + * Name: 实例名称,至少6位 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 实例名称,至少6位 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * DBVersion: PostgreSQL的版本,pg10.4:postgresql-10.4,pg13.4:postgresql-13.4 + * + * @return string|null + */ + public function getDBVersion() + { + return $this->get("DBVersion"); + } + + /** + * DBVersion: PostgreSQL的版本,pg10.4:postgresql-10.4,pg13.4:postgresql-13.4 + * + * @param string $dbVersion + */ + public function setDBVersion($dbVersion) + { + $this->set("DBVersion", $dbVersion); + } + + /** + * ParamGroupID: DB实例使用的配置参数组id + * + * @return integer|null + */ + public function getParamGroupID() + { + return $this->get("ParamGroupID"); + } + + /** + * ParamGroupID: DB实例使用的配置参数组id + * + * @param int $paramGroupID + */ + public function setParamGroupID($paramGroupID) + { + $this->set("ParamGroupID", $paramGroupID); + } + + /** + * AdminPassword: 管理员密码 + * + * @return string|null + */ + public function getAdminPassword() + { + return $this->get("AdminPassword"); + } + + /** + * AdminPassword: 管理员密码 + * + * @param string $adminPassword + */ + public function setAdminPassword($adminPassword) + { + $this->set("AdminPassword", $adminPassword); + } + + /** + * Port: 端口默认为5432 + * + * @return integer|null + */ + public function getPort() + { + return $this->get("Port"); + } + + /** + * Port: 端口默认为5432 + * + * @param int $port + */ + public function setPort($port) + { + $this->set("Port", $port); + } + + /** + * DiskSpace: 磁盘空间(GB) + * + * @return string|null + */ + public function getDiskSpace() + { + return $this->get("DiskSpace"); + } + + /** + * DiskSpace: 磁盘空间(GB) + * + * @param string $diskSpace + */ + public function setDiskSpace($diskSpace) + { + $this->set("DiskSpace", $diskSpace); + } + + /** + * MachineType: 机器配置类型,2核4G的机器:o.pgsql2m.medium + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 机器配置类型,2核4G的机器:o.pgsql2m.medium + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * 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); + } + + /** + * 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); + } + + /** + * InstanceMode: UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例 "HA": 高可用版UDB实例 默认是"Normal" + * + * @return string|null + */ + public function getInstanceMode() + { + return $this->get("InstanceMode"); + } + + /** + * InstanceMode: UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例 "HA": 高可用版UDB实例 默认是"Normal" + * + * @param string $instanceMode + */ + public function setInstanceMode($instanceMode) + { + $this->set("InstanceMode", $instanceMode); + } +} diff --git a/src/UDBPostgreSQL/Apis/CreateUPgSQLInstanceResponse.php b/src/UDBPostgreSQL/Apis/CreateUPgSQLInstanceResponse.php new file mode 100644 index 0000000..61db561 --- /dev/null +++ b/src/UDBPostgreSQL/Apis/CreateUPgSQLInstanceResponse.php @@ -0,0 +1,44 @@ +get("InstanceID"); + } + + /** + * InstanceID: 资源ID + * + * @param string $instanceID + */ + public function setInstanceID($instanceID) + { + $this->set("InstanceID", $instanceID); + } +} diff --git a/src/UDBPostgreSQL/Apis/CreateUPgSQLParamTemplateRequest.php b/src/UDBPostgreSQL/Apis/CreateUPgSQLParamTemplateRequest.php new file mode 100644 index 0000000..530bb13 --- /dev/null +++ b/src/UDBPostgreSQL/Apis/CreateUPgSQLParamTemplateRequest.php @@ -0,0 +1,174 @@ + "CreateUPgSQLParamTemplate"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("GroupName"); + $this->markRequired("SrcGroupID"); + $this->markRequired("DBVersion"); + } + + + + /** + * 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); + } + + /** + * GroupName: 模板名称 + * + * @return string|null + */ + public function getGroupName() + { + return $this->get("GroupName"); + } + + /** + * GroupName: 模板名称 + * + * @param string $groupName + */ + public function setGroupName($groupName) + { + $this->set("GroupName", $groupName); + } + + /** + * SrcGroupID: 基准模板 + * + * @return integer|null + */ + public function getSrcGroupID() + { + return $this->get("SrcGroupID"); + } + + /** + * SrcGroupID: 基准模板 + * + * @param int $srcGroupID + */ + public function setSrcGroupID($srcGroupID) + { + $this->set("SrcGroupID", $srcGroupID); + } + + /** + * DBVersion: 什么版本,以及类型的DB + * + * @return string|null + */ + public function getDBVersion() + { + return $this->get("DBVersion"); + } + + /** + * DBVersion: 什么版本,以及类型的DB + * + * @param string $dbVersion + */ + public function setDBVersion($dbVersion) + { + $this->set("DBVersion", $dbVersion); + } + + /** + * Description: 描述信息 + * + * @return string|null + */ + public function getDescription() + { + return $this->get("Description"); + } + + /** + * Description: 描述信息 + * + * @param string $description + */ + public function setDescription($description) + { + $this->set("Description", $description); + } +} diff --git a/src/UDBPostgreSQL/Apis/CreateUPgSQLParamTemplateResponse.php b/src/UDBPostgreSQL/Apis/CreateUPgSQLParamTemplateResponse.php new file mode 100644 index 0000000..80eea99 --- /dev/null +++ b/src/UDBPostgreSQL/Apis/CreateUPgSQLParamTemplateResponse.php @@ -0,0 +1,44 @@ +get("GroupID"); + } + + /** + * GroupID: 创建的模板ID + * + * @param int $groupID + */ + public function setGroupID($groupID) + { + $this->set("GroupID", $groupID); + } +} diff --git a/src/UDBPostgreSQL/Apis/CreateUPgSQLReadonlyRequest.php b/src/UDBPostgreSQL/Apis/CreateUPgSQLReadonlyRequest.php new file mode 100644 index 0000000..5aeb507 --- /dev/null +++ b/src/UDBPostgreSQL/Apis/CreateUPgSQLReadonlyRequest.php @@ -0,0 +1,302 @@ + "CreateUPgSQLReadonly"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("Name"); + $this->markRequired("Port"); + $this->markRequired("DiskSpace"); + $this->markRequired("MachineType"); + $this->markRequired("SrcInstanceID"); + } + + + + /** + * 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); + } + + /** + * Name: Db名称 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: Db名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Port: DB端口 + * + * @return integer|null + */ + public function getPort() + { + return $this->get("Port"); + } + + /** + * Port: DB端口 + * + * @param int $port + */ + public function setPort($port) + { + $this->set("Port", $port); + } + + /** + * DiskSpace: 磁盘空间 + * + * @return integer|null + */ + public function getDiskSpace() + { + return $this->get("DiskSpace"); + } + + /** + * DiskSpace: 磁盘空间 + * + * @param int $diskSpace + */ + public function setDiskSpace($diskSpace) + { + $this->set("DiskSpace", $diskSpace); + } + + /** + * MachineType: 机器配置类型,2核4G的机器:o.pgsql2m.medium + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 机器配置类型,2核4G的机器:o.pgsql2m.medium + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * SrcInstanceID: 同步的源库 + * + * @return string|null + */ + public function getSrcInstanceID() + { + return $this->get("SrcInstanceID"); + } + + /** + * SrcInstanceID: 同步的源库 + * + * @param string $srcInstanceID + */ + public function setSrcInstanceID($srcInstanceID) + { + $this->set("SrcInstanceID", $srcInstanceID); + } + + /** + * 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); + } + + /** + * 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); + } + + /** + * Labels: + * + * @return CreateUPgSQLReadonlyParamLabels[]|null + */ + public function getLabels() + { + $items = $this->get("Labels"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateUPgSQLReadonlyParamLabels($item)); + } + return $result; + } + + /** + * Labels: + * + * @param CreateUPgSQLReadonlyParamLabels[] $labels + */ + public function setLabels(array $labels) + { + $result = []; + foreach ($labels as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * SecGroupId: + * + * @return CreateUPgSQLReadonlyParamSecGroupId[]|null + */ + public function getSecGroupId() + { + $items = $this->get("SecGroupId"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new CreateUPgSQLReadonlyParamSecGroupId($item)); + } + return $result; + } + + /** + * SecGroupId: + * + * @param CreateUPgSQLReadonlyParamSecGroupId[] $secGroupId + */ + public function setSecGroupId(array $secGroupId) + { + $result = []; + foreach ($secGroupId as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UDBPostgreSQL/Apis/CreateUPgSQLReadonlyResponse.php b/src/UDBPostgreSQL/Apis/CreateUPgSQLReadonlyResponse.php new file mode 100644 index 0000000..bb6af0e --- /dev/null +++ b/src/UDBPostgreSQL/Apis/CreateUPgSQLReadonlyResponse.php @@ -0,0 +1,44 @@ +get("InstanceID"); + } + + /** + * InstanceID: 资源ID + * + * @param string $instanceID + */ + public function setInstanceID($instanceID) + { + $this->set("InstanceID", $instanceID); + } +} diff --git a/src/UDBPostgreSQL/Apis/DeleteUPgSQLInstanceRequest.php b/src/UDBPostgreSQL/Apis/DeleteUPgSQLInstanceRequest.php new file mode 100644 index 0000000..cf26062 --- /dev/null +++ b/src/UDBPostgreSQL/Apis/DeleteUPgSQLInstanceRequest.php @@ -0,0 +1,112 @@ + "DeleteUPgSQLInstance"]); + $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/UDBPostgreSQL/Apis/DeleteUPgSQLInstanceResponse.php b/src/UDBPostgreSQL/Apis/DeleteUPgSQLInstanceResponse.php new file mode 100644 index 0000000..baa100a --- /dev/null +++ b/src/UDBPostgreSQL/Apis/DeleteUPgSQLInstanceResponse.php @@ -0,0 +1,26 @@ + "DeleteUPgSQLParamTemplate"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("GroupID"); + } + + + + /** + * 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); + } + + /** + * GroupID: 模板ID + * + * @return integer|null + */ + public function getGroupID() + { + return $this->get("GroupID"); + } + + /** + * GroupID: 模板ID + * + * @param int $groupID + */ + public function setGroupID($groupID) + { + $this->set("GroupID", $groupID); + } +} diff --git a/src/UDBPostgreSQL/Apis/DeleteUPgSQLParamTemplateResponse.php b/src/UDBPostgreSQL/Apis/DeleteUPgSQLParamTemplateResponse.php new file mode 100644 index 0000000..4038f6a --- /dev/null +++ b/src/UDBPostgreSQL/Apis/DeleteUPgSQLParamTemplateResponse.php @@ -0,0 +1,26 @@ + "DownloadUPgSQLParamTemplate"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("GroupID"); + } + + + + /** + * 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); + } + + /** + * GroupID: 参数模板id + * + * @return integer|null + */ + public function getGroupID() + { + return $this->get("GroupID"); + } + + /** + * GroupID: 参数模板id + * + * @param int $groupID + */ + public function setGroupID($groupID) + { + $this->set("GroupID", $groupID); + } +} diff --git a/src/UDBPostgreSQL/Apis/DownloadUPgSQLParamTemplateResponse.php b/src/UDBPostgreSQL/Apis/DownloadUPgSQLParamTemplateResponse.php new file mode 100644 index 0000000..a2d5f47 --- /dev/null +++ b/src/UDBPostgreSQL/Apis/DownloadUPgSQLParamTemplateResponse.php @@ -0,0 +1,44 @@ +get("Content"); + } + + /** + * Content: base64编码过的 + * + * @param string $content + */ + public function setContent($content) + { + $this->set("Content", $content); + } +} diff --git a/src/UDBPostgreSQL/Apis/GetUPgSQLBackupStrategyRequest.php b/src/UDBPostgreSQL/Apis/GetUPgSQLBackupStrategyRequest.php new file mode 100644 index 0000000..2cdf148 --- /dev/null +++ b/src/UDBPostgreSQL/Apis/GetUPgSQLBackupStrategyRequest.php @@ -0,0 +1,112 @@ + "GetUPgSQLBackupStrategy"]); + $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: DB实例Id + * + * @return string|null + */ + public function getInstanceID() + { + return $this->get("InstanceID"); + } + + /** + * InstanceID: DB实例Id + * + * @param string $instanceID + */ + public function setInstanceID($instanceID) + { + $this->set("InstanceID", $instanceID); + } +} diff --git a/src/UDBPostgreSQL/Apis/GetUPgSQLBackupStrategyResponse.php b/src/UDBPostgreSQL/Apis/GetUPgSQLBackupStrategyResponse.php new file mode 100644 index 0000000..d845aba --- /dev/null +++ b/src/UDBPostgreSQL/Apis/GetUPgSQLBackupStrategyResponse.php @@ -0,0 +1,84 @@ +get("BackupTimeRange"); + } + + /** + * BackupTimeRange: 自动备份预计开始时间范围 + * + * @param string $backupTimeRange + */ + public function setBackupTimeRange($backupTimeRange) + { + $this->set("BackupTimeRange", $backupTimeRange); + } + + /** + * BackupWeek: 自动备份预期星期几(1~7)开始 + * + * @return string|null + */ + public function getBackupWeek() + { + return $this->get("BackupWeek"); + } + + /** + * BackupWeek: 自动备份预期星期几(1~7)开始 + * + * @param string $backupWeek + */ + public function setBackupWeek($backupWeek) + { + $this->set("BackupWeek", $backupWeek); + } + + /** + * BackupMethod: 默认的备份方式 + * + * @return string|null + */ + public function getBackupMethod() + { + return $this->get("BackupMethod"); + } + + /** + * BackupMethod: 默认的备份方式 + * + * @param string $backupMethod + */ + public function setBackupMethod($backupMethod) + { + $this->set("BackupMethod", $backupMethod); + } +} diff --git a/src/UDBPostgreSQL/Apis/GetUPgSQLBackupURLRequest.php b/src/UDBPostgreSQL/Apis/GetUPgSQLBackupURLRequest.php new file mode 100644 index 0000000..7c78b80 --- /dev/null +++ b/src/UDBPostgreSQL/Apis/GetUPgSQLBackupURLRequest.php @@ -0,0 +1,133 @@ + "GetUPgSQLBackupURL"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("InstanceID"); + $this->markRequired("BackupID"); + } + + + + /** + * 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: DB实例Id + * + * @return string|null + */ + public function getInstanceID() + { + return $this->get("InstanceID"); + } + + /** + * InstanceID: DB实例Id + * + * @param string $instanceID + */ + public function setInstanceID($instanceID) + { + $this->set("InstanceID", $instanceID); + } + + /** + * BackupID: 备份Id + * + * @return string|null + */ + public function getBackupID() + { + return $this->get("BackupID"); + } + + /** + * BackupID: 备份Id + * + * @param string $backupID + */ + public function setBackupID($backupID) + { + $this->set("BackupID", $backupID); + } +} diff --git a/src/UDBPostgreSQL/Apis/GetUPgSQLBackupURLResponse.php b/src/UDBPostgreSQL/Apis/GetUPgSQLBackupURLResponse.php new file mode 100644 index 0000000..5b37c4f --- /dev/null +++ b/src/UDBPostgreSQL/Apis/GetUPgSQLBackupURLResponse.php @@ -0,0 +1,64 @@ +get("BackupPath"); + } + + /** + * BackupPath: DB实例备份文件公网的地址 + * + * @param string $backupPath + */ + public function setBackupPath($backupPath) + { + $this->set("BackupPath", $backupPath); + } + + /** + * InnerBackupPath: DB实例备份文件内网的地址 + * + * @return string|null + */ + public function getInnerBackupPath() + { + return $this->get("InnerBackupPath"); + } + + /** + * InnerBackupPath: DB实例备份文件内网的地址 + * + * @param string $innerBackupPath + */ + public function setInnerBackupPath($innerBackupPath) + { + $this->set("InnerBackupPath", $innerBackupPath); + } +} diff --git a/src/UDBPostgreSQL/Apis/GetUPgSQLInstanceLogRequest.php b/src/UDBPostgreSQL/Apis/GetUPgSQLInstanceLogRequest.php new file mode 100644 index 0000000..e4a3faa --- /dev/null +++ b/src/UDBPostgreSQL/Apis/GetUPgSQLInstanceLogRequest.php @@ -0,0 +1,216 @@ + "GetUPgSQLInstanceLog"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("LogType"); + $this->markRequired("CompanyID"); + $this->markRequired("AccountID"); + $this->markRequired("BeginTime"); + $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); + } + + /** + * 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); + } + + /** + * 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); + } + + /** + * LogType: 日志类型 + * + * @return string|null + */ + public function getLogType() + { + return $this->get("LogType"); + } + + /** + * LogType: 日志类型 + * + * @param string $logType + */ + public function setLogType($logType) + { + $this->set("LogType", $logType); + } + + /** + * CompanyID: 公司ID + * + * @return integer|null + */ + public function getCompanyID() + { + return $this->get("CompanyID"); + } + + /** + * CompanyID: 公司ID + * + * @param int $companyID + */ + public function setCompanyID($companyID) + { + $this->set("CompanyID", $companyID); + } + + /** + * AccountID: 账户ID + * + * @return integer|null + */ + public function getAccountID() + { + return $this->get("AccountID"); + } + + /** + * AccountID: 账户ID + * + * @param int $accountID + */ + public function setAccountID($accountID) + { + $this->set("AccountID", $accountID); + } + + /** + * BeginTime: 起始时间,需使用时间戳 + * + * @return integer|null + */ + public function getBeginTime() + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 起始时间,需使用时间戳 + * + * @param int $beginTime + */ + public function setBeginTime($beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * 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); + } + + /** + * EndTime: 结束时间,需使用时间戳,结束时间需大于起始时间实时查询的时候不需要传 + * + * @return integer|null + */ + public function getEndTime() + { + return $this->get("EndTime"); + } + + /** + * EndTime: 结束时间,需使用时间戳,结束时间需大于起始时间实时查询的时候不需要传 + * + * @param int $endTime + */ + public function setEndTime($endTime) + { + $this->set("EndTime", $endTime); + } +} diff --git a/src/UDBPostgreSQL/Apis/GetUPgSQLInstanceLogResponse.php b/src/UDBPostgreSQL/Apis/GetUPgSQLInstanceLogResponse.php new file mode 100644 index 0000000..d981ce5 --- /dev/null +++ b/src/UDBPostgreSQL/Apis/GetUPgSQLInstanceLogResponse.php @@ -0,0 +1,44 @@ +get("Log"); + } + + /** + * Log: 返回的日志信息 + * + * @param string $log + */ + public function setLog($log) + { + $this->set("Log", $log); + } +} diff --git a/src/UDBPostgreSQL/Apis/GetUPgSQLInstanceParamRequest.php b/src/UDBPostgreSQL/Apis/GetUPgSQLInstanceParamRequest.php new file mode 100644 index 0000000..cf25af2 --- /dev/null +++ b/src/UDBPostgreSQL/Apis/GetUPgSQLInstanceParamRequest.php @@ -0,0 +1,112 @@ + "GetUPgSQLInstanceParam"]); + $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/UDBPostgreSQL/Apis/GetUPgSQLInstanceParamResponse.php b/src/UDBPostgreSQL/Apis/GetUPgSQLInstanceParamResponse.php new file mode 100644 index 0000000..0ef5636 --- /dev/null +++ b/src/UDBPostgreSQL/Apis/GetUPgSQLInstanceParamResponse.php @@ -0,0 +1,57 @@ +get("Data"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new Param($item)); + } + return $result; + } + + /** + * Data: 参数的键值对信息 + * + * @param Param[] $data + */ + public function setData(array $data) + { + $result = []; + foreach ($data as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UDBPostgreSQL/Apis/GetUPgSQLInstancePriceRequest.php b/src/UDBPostgreSQL/Apis/GetUPgSQLInstancePriceRequest.php new file mode 100644 index 0000000..991abee --- /dev/null +++ b/src/UDBPostgreSQL/Apis/GetUPgSQLInstancePriceRequest.php @@ -0,0 +1,194 @@ + "GetUPgSQLInstancePrice"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("MachineType"); + $this->markRequired("DiskSpace"); + $this->markRequired("InstanceMode"); + } + + + + /** + * 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); + } + + /** + * MachineType: 机器配置类型 参考2C4G机器:o.pgsql2m.medium + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 机器配置类型 参考2C4G机器:o.pgsql2m.medium + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * DiskSpace: 磁盘空间(GB) + * + * @return integer|null + */ + public function getDiskSpace() + { + return $this->get("DiskSpace"); + } + + /** + * DiskSpace: 磁盘空间(GB) + * + * @param int $diskSpace + */ + public function setDiskSpace($diskSpace) + { + $this->set("DiskSpace", $diskSpace); + } + + /** + * InstanceMode: UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例 "HA": 高可用版UDB实例 + * + * @return string|null + */ + public function getInstanceMode() + { + return $this->get("InstanceMode"); + } + + /** + * InstanceMode: UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例 "HA": 高可用版UDB实例 + * + * @param string $instanceMode + */ + public function setInstanceMode($instanceMode) + { + $this->set("InstanceMode", $instanceMode); + } + + /** + * ChargeType: 计费模式。枚举值为: Year,按年付费; Month,按月付费; Dynamic,按小时付费(需开启权限)。默认为月付 + * + * @return string|null + */ + public function getChargeType() + { + return $this->get("ChargeType"); + } + + /** + * ChargeType: 计费模式。枚举值为: Year,按年付费; Month,按月付费; Dynamic,按小时付费(需开启权限)。默认为月付 + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Quantity: 购买时长。默认: 1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 + * + * @return integer|null + */ + public function getQuantity() + { + return $this->get("Quantity"); + } + + /** + * Quantity: 购买时长。默认: 1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 + * + * @param int $quantity + */ + public function setQuantity($quantity) + { + $this->set("Quantity", $quantity); + } +} diff --git a/src/UDBPostgreSQL/Apis/GetUPgSQLInstancePriceResponse.php b/src/UDBPostgreSQL/Apis/GetUPgSQLInstancePriceResponse.php new file mode 100644 index 0000000..bfba5a3 --- /dev/null +++ b/src/UDBPostgreSQL/Apis/GetUPgSQLInstancePriceResponse.php @@ -0,0 +1,57 @@ +get("PriceSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UPgSQLInstancePriceSet($item)); + } + return $result; + } + + /** + * PriceSet: 价格列表 + * + * @param UPgSQLInstancePriceSet[] $priceSet + */ + public function setPriceSet(array $priceSet) + { + $result = []; + foreach ($priceSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UDBPostgreSQL/Apis/GetUPgSQLInstanceRequest.php b/src/UDBPostgreSQL/Apis/GetUPgSQLInstanceRequest.php new file mode 100644 index 0000000..0240002 --- /dev/null +++ b/src/UDBPostgreSQL/Apis/GetUPgSQLInstanceRequest.php @@ -0,0 +1,111 @@ + "GetUPgSQLInstance"]); + $this->markRequired("Region"); + $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/UDBPostgreSQL/Apis/GetUPgSQLInstanceResponse.php b/src/UDBPostgreSQL/Apis/GetUPgSQLInstanceResponse.php new file mode 100644 index 0000000..96d79ff --- /dev/null +++ b/src/UDBPostgreSQL/Apis/GetUPgSQLInstanceResponse.php @@ -0,0 +1,45 @@ +get("DataSet")); + } + + /** + * DataSet: DataSet + * + * @param UDBInstance $dataSet + */ + public function setDataSet(array $dataSet) + { + $this->set("DataSet", $dataSet->getAll()); + } +} diff --git a/src/UDBPostgreSQL/Apis/GetUPgSQLParamTemplateRequest.php b/src/UDBPostgreSQL/Apis/GetUPgSQLParamTemplateRequest.php new file mode 100644 index 0000000..78c8d64 --- /dev/null +++ b/src/UDBPostgreSQL/Apis/GetUPgSQLParamTemplateRequest.php @@ -0,0 +1,112 @@ + "GetUPgSQLParamTemplate"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("GroupID"); + } + + + + /** + * 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); + } + + /** + * GroupID: 模板ID + * + * @return integer|null + */ + public function getGroupID() + { + return $this->get("GroupID"); + } + + /** + * GroupID: 模板ID + * + * @param int $groupID + */ + public function setGroupID($groupID) + { + $this->set("GroupID", $groupID); + } +} diff --git a/src/UDBPostgreSQL/Apis/GetUPgSQLParamTemplateResponse.php b/src/UDBPostgreSQL/Apis/GetUPgSQLParamTemplateResponse.php new file mode 100644 index 0000000..dfa8809 --- /dev/null +++ b/src/UDBPostgreSQL/Apis/GetUPgSQLParamTemplateResponse.php @@ -0,0 +1,57 @@ +get("Data"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new Param($item)); + } + return $result; + } + + /** + * Data: 参数列表 + * + * @param Param[] $data + */ + public function setData(array $data) + { + $result = []; + foreach ($data as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UDBPostgreSQL/Apis/GetUPgSQLUpgradePriceRequest.php b/src/UDBPostgreSQL/Apis/GetUPgSQLUpgradePriceRequest.php new file mode 100644 index 0000000..d566aec --- /dev/null +++ b/src/UDBPostgreSQL/Apis/GetUPgSQLUpgradePriceRequest.php @@ -0,0 +1,174 @@ + "GetUPgSQLUpgradePrice"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("InstanceID"); + $this->markRequired("DiskSpace"); + $this->markRequired("MachineType"); + } + + + + /** + * 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); + } + + /** + * DiskSpace: 磁盘空间(GB) + * + * @return integer|null + */ + public function getDiskSpace() + { + return $this->get("DiskSpace"); + } + + /** + * DiskSpace: 磁盘空间(GB) + * + * @param int $diskSpace + */ + public function setDiskSpace($diskSpace) + { + $this->set("DiskSpace", $diskSpace); + } + + /** + * MachineType: 机器配置类型 + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 机器配置类型 + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * InstanceMode: UDB实例模式类型, 可选值如下: "normal": 普通版UDB实例 "ha": 高可用版UDB实例 默认是"normal" + * + * @return string|null + */ + public function getInstanceMode() + { + return $this->get("InstanceMode"); + } + + /** + * InstanceMode: UDB实例模式类型, 可选值如下: "normal": 普通版UDB实例 "ha": 高可用版UDB实例 默认是"normal" + * + * @param string $instanceMode + */ + public function setInstanceMode($instanceMode) + { + $this->set("InstanceMode", $instanceMode); + } +} diff --git a/src/UDBPostgreSQL/Apis/GetUPgSQLUpgradePriceResponse.php b/src/UDBPostgreSQL/Apis/GetUPgSQLUpgradePriceResponse.php new file mode 100644 index 0000000..ae3e3d9 --- /dev/null +++ b/src/UDBPostgreSQL/Apis/GetUPgSQLUpgradePriceResponse.php @@ -0,0 +1,64 @@ +get("Price"); + } + + /** + * Price: 规格调整差价。精确到小数点后2位。 + * + * @param float $price + */ + public function setPrice($price) + { + $this->set("Price", $price); + } + + /** + * OriginalPrice: 限时优惠的折前原价 + * + * @return float|null + */ + public function getOriginalPrice() + { + return $this->get("OriginalPrice"); + } + + /** + * OriginalPrice: 限时优惠的折前原价 + * + * @param float $originalPrice + */ + public function setOriginalPrice($originalPrice) + { + $this->set("OriginalPrice", $originalPrice); + } +} diff --git a/src/UDBPostgreSQL/Apis/ListUPgSQLBackupRequest.php b/src/UDBPostgreSQL/Apis/ListUPgSQLBackupRequest.php new file mode 100644 index 0000000..9f8004f --- /dev/null +++ b/src/UDBPostgreSQL/Apis/ListUPgSQLBackupRequest.php @@ -0,0 +1,172 @@ + "ListUPgSQLBackup"]); + $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: DB实例Id + * + * @return string|null + */ + public function getInstanceID() + { + return $this->get("InstanceID"); + } + + /** + * InstanceID: DB实例Id + * + * @param string $instanceID + */ + public function setInstanceID($instanceID) + { + $this->set("InstanceID", $instanceID); + } + + /** + * BackupType: 备份类型,默认值是0(0:表示全部,1:自动备份,2:手动备份 + * + * @return integer|null + */ + public function getBackupType() + { + return $this->get("BackupType"); + } + + /** + * BackupType: 备份类型,默认值是0(0:表示全部,1:自动备份,2:手动备份 + * + * @param int $backupType + */ + public function setBackupType($backupType) + { + $this->set("BackupType", $backupType); + } + + /** + * 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: 返回数据长度,默认为20,最大100 + * + * @return integer|null + */ + public function getLimit() + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数据长度,默认为20,最大100 + * + * @param int $limit + */ + public function setLimit($limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/UDBPostgreSQL/Apis/ListUPgSQLBackupResponse.php b/src/UDBPostgreSQL/Apis/ListUPgSQLBackupResponse.php new file mode 100644 index 0000000..052efd3 --- /dev/null +++ b/src/UDBPostgreSQL/Apis/ListUPgSQLBackupResponse.php @@ -0,0 +1,77 @@ +get("DataSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UPgSQLBackup($item)); + } + return $result; + } + + /** + * DataSet: 备份信息列表.修参数 + * + * @param UPgSQLBackup[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalCount: 总个数 + * + * @return integer|null + */ + public function getTotalCount() + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 总个数 + * + * @param int $totalCount + */ + public function setTotalCount($totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/UDBPostgreSQL/Apis/ListUPgSQLInstanceRequest.php b/src/UDBPostgreSQL/Apis/ListUPgSQLInstanceRequest.php new file mode 100644 index 0000000..ff0c985 --- /dev/null +++ b/src/UDBPostgreSQL/Apis/ListUPgSQLInstanceRequest.php @@ -0,0 +1,90 @@ + "ListUPgSQLInstance"]); + $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); + } +} diff --git a/src/UDBPostgreSQL/Apis/ListUPgSQLInstanceResponse.php b/src/UDBPostgreSQL/Apis/ListUPgSQLInstanceResponse.php new file mode 100644 index 0000000..cb7d27e --- /dev/null +++ b/src/UDBPostgreSQL/Apis/ListUPgSQLInstanceResponse.php @@ -0,0 +1,58 @@ +get("DataSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UDBInstanceSet($item)); + } + return $result; + } + + /** + * DataSet: 数据库信息列表 + * + * @param UDBInstanceSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UDBPostgreSQL/Apis/ListUPgSQLLogRequest.php b/src/UDBPostgreSQL/Apis/ListUPgSQLLogRequest.php new file mode 100644 index 0000000..6bbac4b --- /dev/null +++ b/src/UDBPostgreSQL/Apis/ListUPgSQLLogRequest.php @@ -0,0 +1,154 @@ + "ListUPgSQLLog"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("BeginTime"); + $this->markRequired("EndTime"); + $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); + } + + /** + * BeginTime: 查询的日志开始的时间戳 + * + * @return integer|null + */ + public function getBeginTime() + { + return $this->get("BeginTime"); + } + + /** + * BeginTime: 查询的日志开始的时间戳 + * + * @param int $beginTime + */ + public function setBeginTime($beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: 查询日志的结束时间戳 + * + * @return integer|null + */ + public function getEndTime() + { + return $this->get("EndTime"); + } + + /** + * EndTime: 查询日志的结束时间戳 + * + * @param int $endTime + */ + public function setEndTime($endTime) + { + $this->set("EndTime", $endTime); + } + + /** + * 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/UDBPostgreSQL/Apis/ListUPgSQLLogResponse.php b/src/UDBPostgreSQL/Apis/ListUPgSQLLogResponse.php new file mode 100644 index 0000000..e49767e --- /dev/null +++ b/src/UDBPostgreSQL/Apis/ListUPgSQLLogResponse.php @@ -0,0 +1,57 @@ +get("DataSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new LogSet($item)); + } + return $result; + } + + /** + * DataSet: 数据库日志信息列表 + * + * @param LogSet[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UDBPostgreSQL/Apis/ListUPgSQLMachineTypeRequest.php b/src/UDBPostgreSQL/Apis/ListUPgSQLMachineTypeRequest.php new file mode 100644 index 0000000..67a28bc --- /dev/null +++ b/src/UDBPostgreSQL/Apis/ListUPgSQLMachineTypeRequest.php @@ -0,0 +1,91 @@ + "ListUPgSQLMachineType"]); + $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/UDBPostgreSQL/Apis/ListUPgSQLMachineTypeResponse.php b/src/UDBPostgreSQL/Apis/ListUPgSQLMachineTypeResponse.php new file mode 100644 index 0000000..838be95 --- /dev/null +++ b/src/UDBPostgreSQL/Apis/ListUPgSQLMachineTypeResponse.php @@ -0,0 +1,57 @@ +get("DataSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new PgSQLMachineType($item)); + } + return $result; + } + + /** + * DataSet: + * + * @param PgSQLMachineType[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UDBPostgreSQL/Apis/ListUPgSQLParamTemplateRequest.php b/src/UDBPostgreSQL/Apis/ListUPgSQLParamTemplateRequest.php new file mode 100644 index 0000000..8776ce9 --- /dev/null +++ b/src/UDBPostgreSQL/Apis/ListUPgSQLParamTemplateRequest.php @@ -0,0 +1,131 @@ + "ListUPgSQLParamTemplate"]); + $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); + } + + /** + * Offset: 偏移量, 默认是0,100 + * + * @return integer|null + */ + public function getOffset() + { + return $this->get("Offset"); + } + + /** + * Offset: 偏移量, 默认是0,100 + * + * @param int $offset + */ + public function setOffset($offset) + { + $this->set("Offset", $offset); + } + + /** + * Count: 总数 + * + * @return integer|null + */ + public function getCount() + { + return $this->get("Count"); + } + + /** + * Count: 总数 + * + * @param int $count + */ + public function setCount($count) + { + $this->set("Count", $count); + } +} diff --git a/src/UDBPostgreSQL/Apis/ListUPgSQLParamTemplateResponse.php b/src/UDBPostgreSQL/Apis/ListUPgSQLParamTemplateResponse.php new file mode 100644 index 0000000..11d82e5 --- /dev/null +++ b/src/UDBPostgreSQL/Apis/ListUPgSQLParamTemplateResponse.php @@ -0,0 +1,57 @@ +get("Data"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new TemplateGroup($item)); + } + return $result; + } + + /** + * Data: 参数模板信息 + * + * @param TemplateGroup[] $data + */ + public function setData(array $data) + { + $result = []; + foreach ($data as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UDBPostgreSQL/Apis/ListUPgSQLVersionRequest.php b/src/UDBPostgreSQL/Apis/ListUPgSQLVersionRequest.php new file mode 100644 index 0000000..31118a7 --- /dev/null +++ b/src/UDBPostgreSQL/Apis/ListUPgSQLVersionRequest.php @@ -0,0 +1,91 @@ + "ListUPgSQLVersion"]); + $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/UDBPostgreSQL/Apis/ListUPgSQLVersionResponse.php b/src/UDBPostgreSQL/Apis/ListUPgSQLVersionResponse.php new file mode 100644 index 0000000..828c650 --- /dev/null +++ b/src/UDBPostgreSQL/Apis/ListUPgSQLVersionResponse.php @@ -0,0 +1,57 @@ +get("DataSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new PgSQLVersion($item)); + } + return $result; + } + + /** + * DataSet: postgresql版本信息 + * + * @param PgSQLVersion[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UDBPostgreSQL/Apis/RestartUPgSQLInstanceRequest.php b/src/UDBPostgreSQL/Apis/RestartUPgSQLInstanceRequest.php new file mode 100644 index 0000000..ec433ee --- /dev/null +++ b/src/UDBPostgreSQL/Apis/RestartUPgSQLInstanceRequest.php @@ -0,0 +1,152 @@ + "RestartUPgSQLInstance"]); + $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); + } + + /** + * RestartHost: 是否一并重启主机 + * + * @return boolean|null + */ + public function getRestartHost() + { + return $this->get("RestartHost"); + } + + /** + * RestartHost: 是否一并重启主机 + * + * @param boolean $restartHost + */ + public function setRestartHost($restartHost) + { + $this->set("RestartHost", $restartHost); + } + + /** + * ForceToRestart: 是否强制重启 + * + * @return boolean|null + */ + public function getForceToRestart() + { + return $this->get("ForceToRestart"); + } + + /** + * ForceToRestart: 是否强制重启 + * + * @param boolean $forceToRestart + */ + public function setForceToRestart($forceToRestart) + { + $this->set("ForceToRestart", $forceToRestart); + } +} diff --git a/src/UDBPostgreSQL/Apis/RestartUPgSQLInstanceResponse.php b/src/UDBPostgreSQL/Apis/RestartUPgSQLInstanceResponse.php new file mode 100644 index 0000000..06281ae --- /dev/null +++ b/src/UDBPostgreSQL/Apis/RestartUPgSQLInstanceResponse.php @@ -0,0 +1,26 @@ + "StartUPgSQLInstance"]); + $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/UDBPostgreSQL/Apis/StartUPgSQLInstanceResponse.php b/src/UDBPostgreSQL/Apis/StartUPgSQLInstanceResponse.php new file mode 100644 index 0000000..91b0176 --- /dev/null +++ b/src/UDBPostgreSQL/Apis/StartUPgSQLInstanceResponse.php @@ -0,0 +1,26 @@ + "StopUPgSQLCreatingReadonly"]); + $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: 停止创建从库 + * + * @return string|null + */ + public function getInstanceID() + { + return $this->get("InstanceID"); + } + + /** + * InstanceID: 停止创建从库 + * + * @param string $instanceID + */ + public function setInstanceID($instanceID) + { + $this->set("InstanceID", $instanceID); + } +} diff --git a/src/UDBPostgreSQL/Apis/StopUPgSQLCreatingReadonlyResponse.php b/src/UDBPostgreSQL/Apis/StopUPgSQLCreatingReadonlyResponse.php new file mode 100644 index 0000000..6d95b8e --- /dev/null +++ b/src/UDBPostgreSQL/Apis/StopUPgSQLCreatingReadonlyResponse.php @@ -0,0 +1,26 @@ + "StopUPgSQLInstance"]); + $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); + } + + /** + * StopHost: 是否将主机一并关闭 + * + * @return boolean|null + */ + public function getStopHost() + { + return $this->get("StopHost"); + } + + /** + * StopHost: 是否将主机一并关闭 + * + * @param boolean $stopHost + */ + public function setStopHost($stopHost) + { + $this->set("StopHost", $stopHost); + } + + /** + * ForceToStop: 是否强制关闭 + * + * @return boolean|null + */ + public function getForceToStop() + { + return $this->get("ForceToStop"); + } + + /** + * ForceToStop: 是否强制关闭 + * + * @param boolean $forceToStop + */ + public function setForceToStop($forceToStop) + { + $this->set("ForceToStop", $forceToStop); + } +} diff --git a/src/UDBPostgreSQL/Apis/StopUPgSQLInstanceResponse.php b/src/UDBPostgreSQL/Apis/StopUPgSQLInstanceResponse.php new file mode 100644 index 0000000..5ec5b9e --- /dev/null +++ b/src/UDBPostgreSQL/Apis/StopUPgSQLInstanceResponse.php @@ -0,0 +1,26 @@ + "UpdateUPgSQLAttribute"]); + $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: DB实例Id + * + * @return string|null + */ + public function getInstanceID() + { + return $this->get("InstanceID"); + } + + /** + * InstanceID: DB实例Id + * + * @param string $instanceID + */ + public function setInstanceID($instanceID) + { + $this->set("InstanceID", $instanceID); + } + + /** + * Name: 新的db名字(不能为空字符串) + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 新的db名字(不能为空字符串) + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Remark: 新的备注信息 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 新的备注信息 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } +} diff --git a/src/UDBPostgreSQL/Apis/UpdateUPgSQLAttributeResponse.php b/src/UDBPostgreSQL/Apis/UpdateUPgSQLAttributeResponse.php new file mode 100644 index 0000000..09916dd --- /dev/null +++ b/src/UDBPostgreSQL/Apis/UpdateUPgSQLAttributeResponse.php @@ -0,0 +1,26 @@ + "UpdateUPgSQLBackupStrategy"]); + $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: DB实例Id + * + * @return string|null + */ + public function getInstanceID() + { + return $this->get("InstanceID"); + } + + /** + * InstanceID: DB实例Id + * + * @param string $instanceID + */ + public function setInstanceID($instanceID) + { + $this->set("InstanceID", $instanceID); + } + + /** + * BackupTimeRange: 自动备份预计开始时间范围(00:00~23:59),例如:(3:00~4:00) + * + * @return string|null + */ + public function getBackupTimeRange() + { + return $this->get("BackupTimeRange"); + } + + /** + * BackupTimeRange: 自动备份预计开始时间范围(00:00~23:59),例如:(3:00~4:00) + * + * @param string $backupTimeRange + */ + public function setBackupTimeRange($backupTimeRange) + { + $this->set("BackupTimeRange", $backupTimeRange); + } + + /** + * BackupWeek: 自动备份预期星期几(1~7)开始。默认1,2,3,4,5,6,7(星期一到星期日) + * + * @return string|null + */ + public function getBackupWeek() + { + return $this->get("BackupWeek"); + } + + /** + * BackupWeek: 自动备份预期星期几(1~7)开始。默认1,2,3,4,5,6,7(星期一到星期日) + * + * @param string $backupWeek + */ + public function setBackupWeek($backupWeek) + { + $this->set("BackupWeek", $backupWeek); + } + + /** + * BackupMethod: 选择默认的备份方式 + * + * @return string|null + */ + public function getBackupMethod() + { + return $this->get("BackupMethod"); + } + + /** + * BackupMethod: 选择默认的备份方式 + * + * @param string $backupMethod + */ + public function setBackupMethod($backupMethod) + { + $this->set("BackupMethod", $backupMethod); + } +} diff --git a/src/UDBPostgreSQL/Apis/UpdateUPgSQLBackupStrategyResponse.php b/src/UDBPostgreSQL/Apis/UpdateUPgSQLBackupStrategyResponse.php new file mode 100644 index 0000000..5da0445 --- /dev/null +++ b/src/UDBPostgreSQL/Apis/UpdateUPgSQLBackupStrategyResponse.php @@ -0,0 +1,26 @@ + "UpdateUPgSQLPassword"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("InstanceID"); + $this->markRequired("Password"); + } + + + + /** + * 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: DB实例Id + * + * @return string|null + */ + public function getInstanceID() + { + return $this->get("InstanceID"); + } + + /** + * InstanceID: DB实例Id + * + * @param string $instanceID + */ + public function setInstanceID($instanceID) + { + $this->set("InstanceID", $instanceID); + } + + /** + * Password: 新的db用户密码 + * + * @return string|null + */ + public function getPassword() + { + return $this->get("Password"); + } + + /** + * Password: 新的db用户密码 + * + * @param string $password + */ + public function setPassword($password) + { + $this->set("Password", $password); + } + + /** + * Name: 数据库用户的名称。默认是root + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 数据库用户的名称。默认是root + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } +} diff --git a/src/UDBPostgreSQL/Apis/UpdateUPgSQLPasswordResponse.php b/src/UDBPostgreSQL/Apis/UpdateUPgSQLPasswordResponse.php new file mode 100644 index 0000000..f8b6680 --- /dev/null +++ b/src/UDBPostgreSQL/Apis/UpdateUPgSQLPasswordResponse.php @@ -0,0 +1,26 @@ + "UpgradeUPgSQLInstance"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("InstanceID"); + $this->markRequired("DiskSpace"); + $this->markRequired("MachineType"); + $this->markRequired("InstanceMode"); + } + + + + /** + * 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); + } + + /** + * DiskSpace: 磁盘空间(GB) + * + * @return integer|null + */ + public function getDiskSpace() + { + return $this->get("DiskSpace"); + } + + /** + * DiskSpace: 磁盘空间(GB) + * + * @param int $diskSpace + */ + public function setDiskSpace($diskSpace) + { + $this->set("DiskSpace", $diskSpace); + } + + /** + * MachineType: 机器配置类型 + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 机器配置类型 + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * InstanceMode: 数据库类型(ha:高可用类型,normal:普通类型,readonly:从库) + * + * @return string|null + */ + public function getInstanceMode() + { + return $this->get("InstanceMode"); + } + + /** + * InstanceMode: 数据库类型(ha:高可用类型,normal:普通类型,readonly:从库) + * + * @param string $instanceMode + */ + public function setInstanceMode($instanceMode) + { + $this->set("InstanceMode", $instanceMode); + } +} diff --git a/src/UDBPostgreSQL/Apis/UpgradeUPgSQLInstanceResponse.php b/src/UDBPostgreSQL/Apis/UpgradeUPgSQLInstanceResponse.php new file mode 100644 index 0000000..b6a62f3 --- /dev/null +++ b/src/UDBPostgreSQL/Apis/UpgradeUPgSQLInstanceResponse.php @@ -0,0 +1,26 @@ + "UploadUPgSQLParamTemplate"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("GroupName"); + $this->markRequired("DBVersion"); + $this->markRequired("Content"); + } + + + + /** + * 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); + } + + /** + * GroupName: 模板名称 + * + * @return string|null + */ + public function getGroupName() + { + return $this->get("GroupName"); + } + + /** + * GroupName: 模板名称 + * + * @param string $groupName + */ + public function setGroupName($groupName) + { + $this->set("GroupName", $groupName); + } + + /** + * DBVersion: 应用的DB版本 + * + * @return string|null + */ + public function getDBVersion() + { + return $this->get("DBVersion"); + } + + /** + * DBVersion: 应用的DB版本 + * + * @param string $dbVersion + */ + public function setDBVersion($dbVersion) + { + $this->set("DBVersion", $dbVersion); + } + + /** + * Content: base64编码过的 + * + * @return string|null + */ + public function getContent() + { + return $this->get("Content"); + } + + /** + * Content: base64编码过的 + * + * @param string $content + */ + public function setContent($content) + { + $this->set("Content", $content); + } + + /** + * Description: 模板描述 + * + * @return string|null + */ + public function getDescription() + { + return $this->get("Description"); + } + + /** + * Description: 模板描述 + * + * @param string $description + */ + public function setDescription($description) + { + $this->set("Description", $description); + } + + /** + * ParamGroupType: 版本 + * + * @return string|null + */ + public function getParamGroupType() + { + return $this->get("ParamGroupType"); + } + + /** + * ParamGroupType: 版本 + * + * @param string $paramGroupType + */ + public function setParamGroupType($paramGroupType) + { + $this->set("ParamGroupType", $paramGroupType); + } +} diff --git a/src/UDBPostgreSQL/Apis/UploadUPgSQLParamTemplateResponse.php b/src/UDBPostgreSQL/Apis/UploadUPgSQLParamTemplateResponse.php new file mode 100644 index 0000000..ab1ce95 --- /dev/null +++ b/src/UDBPostgreSQL/Apis/UploadUPgSQLParamTemplateResponse.php @@ -0,0 +1,44 @@ +get("GroupID"); + } + + /** + * GroupID: 生成的模板ID + * + * @param int $groupID + */ + public function setGroupID($groupID) + { + $this->set("GroupID", $groupID); + } +} diff --git a/src/UDBPostgreSQL/Models/LogSet.php b/src/UDBPostgreSQL/Models/LogSet.php new file mode 100644 index 0000000..9aa9f94 --- /dev/null +++ b/src/UDBPostgreSQL/Models/LogSet.php @@ -0,0 +1,104 @@ +get("BeginTime"); + } + + /** + * BeginTime: + * + * @param int $beginTime + */ + public function setBeginTime($beginTime) + { + $this->set("BeginTime", $beginTime); + } + + /** + * EndTime: + * + * @return integer|null + */ + public function getEndTime() + { + return $this->get("EndTime"); + } + + /** + * EndTime: + * + * @param int $endTime + */ + public function setEndTime($endTime) + { + $this->set("EndTime", $endTime); + } + + /** + * Name: + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * Size: + * + * @return integer|null + */ + public function getSize() + { + return $this->get("Size"); + } + + /** + * Size: + * + * @param int $size + */ + public function setSize($size) + { + $this->set("Size", $size); + } +} diff --git a/src/UDBPostgreSQL/Models/Param.php b/src/UDBPostgreSQL/Models/Param.php new file mode 100644 index 0000000..6300c00 --- /dev/null +++ b/src/UDBPostgreSQL/Models/Param.php @@ -0,0 +1,164 @@ +get("Key"); + } + + /** + * Key: 参数Key + * + * @param string $key + */ + public function setKey($key) + { + $this->set("Key", $key); + } + + /** + * Value: 参数值 + * + * @return string|null + */ + public function getValue() + { + return $this->get("Value"); + } + + /** + * Value: 参数值 + * + * @param string $value + */ + public function setValue($value) + { + $this->set("Value", $value); + } + + /** + * ValueType: 值类型 + * + * @return integer|null + */ + public function getValueType() + { + return $this->get("ValueType"); + } + + /** + * ValueType: 值类型 + * + * @param int $valueType + */ + public function setValueType($valueType) + { + $this->set("ValueType", $valueType); + } + + /** + * AllowedVal: 允许的值 + * + * @return string|null + */ + public function getAllowedVal() + { + return $this->get("AllowedVal"); + } + + /** + * AllowedVal: 允许的值 + * + * @param string $allowedVal + */ + public function setAllowedVal($allowedVal) + { + $this->set("AllowedVal", $allowedVal); + } + + /** + * ApplyType: 允许类型 + * + * @return integer|null + */ + public function getApplyType() + { + return $this->get("ApplyType"); + } + + /** + * ApplyType: 允许类型 + * + * @param int $applyType + */ + public function setApplyType($applyType) + { + $this->set("ApplyType", $applyType); + } + + /** + * Modifiable: 是否可以修改 + * + * @return boolean|null + */ + public function getModifiable() + { + return $this->get("Modifiable"); + } + + /** + * Modifiable: 是否可以修改 + * + * @param boolean $modifiable + */ + public function setModifiable($modifiable) + { + $this->set("Modifiable", $modifiable); + } + + /** + * FormatType: 参数格式类型 + * + * @return integer|null + */ + public function getFormatType() + { + return $this->get("FormatType"); + } + + /** + * FormatType: 参数格式类型 + * + * @param int $formatType + */ + public function setFormatType($formatType) + { + $this->set("FormatType", $formatType); + } +} diff --git a/src/UDBPostgreSQL/Models/PgSQLMachineType.php b/src/UDBPostgreSQL/Models/PgSQLMachineType.php new file mode 100644 index 0000000..1a36938 --- /dev/null +++ b/src/UDBPostgreSQL/Models/PgSQLMachineType.php @@ -0,0 +1,124 @@ +get("ID"); + } + + /** + * ID: 机器类型ID + * + * @param string $id + */ + public function setID($id) + { + $this->set("ID", $id); + } + + /** + * Description: 格式为nCmG,n代表cpu核数,m代表内存大小(GB) + * + * @return string|null + */ + public function getDescription() + { + return $this->get("Description"); + } + + /** + * Description: 格式为nCmG,n代表cpu核数,m代表内存大小(GB) + * + * @param string $description + */ + public function setDescription($description) + { + $this->set("Description", $description); + } + + /** + * 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); + } + + /** + * Os: 机器类型,N/O + * + * @return string|null + */ + public function getOs() + { + return $this->get("Os"); + } + + /** + * Os: 机器类型,N/O + * + * @param string $os + */ + public function setOs($os) + { + $this->set("Os", $os); + } +} diff --git a/src/UDBPostgreSQL/Models/PgSQLVersion.php b/src/UDBPostgreSQL/Models/PgSQLVersion.php new file mode 100644 index 0000000..3891e5a --- /dev/null +++ b/src/UDBPostgreSQL/Models/PgSQLVersion.php @@ -0,0 +1,64 @@ +get("DBVersion"); + } + + /** + * DBVersion: PgSQL版本 + * + * @param string $dbVersion + */ + public function setDBVersion($dbVersion) + { + $this->set("DBVersion", $dbVersion); + } + + /** + * Available: 2位二进制控制是否开放单点和高可用,前一位控制单点是否开放,后一位控制高可用,例如"01"代表只开放高可用,"10"代表只开放单点,"11"代表全开放 + * + * @return string|null + */ + public function getAvailable() + { + return $this->get("Available"); + } + + /** + * Available: 2位二进制控制是否开放单点和高可用,前一位控制单点是否开放,后一位控制高可用,例如"01"代表只开放高可用,"10"代表只开放单点,"11"代表全开放 + * + * @param string $available + */ + public function setAvailable($available) + { + $this->set("Available", $available); + } +} diff --git a/src/UDBPostgreSQL/Models/TemplateGroup.php b/src/UDBPostgreSQL/Models/TemplateGroup.php new file mode 100644 index 0000000..39c565f --- /dev/null +++ b/src/UDBPostgreSQL/Models/TemplateGroup.php @@ -0,0 +1,144 @@ +get("GroupID"); + } + + /** + * GroupID: 参数模板ID + * + * @param int $groupID + */ + public function setGroupID($groupID) + { + $this->set("GroupID", $groupID); + } + + /** + * GroupName: 参数模板名称 + * + * @return string|null + */ + public function getGroupName() + { + return $this->get("GroupName"); + } + + /** + * GroupName: 参数模板名称 + * + * @param string $groupName + */ + public function setGroupName($groupName) + { + $this->set("GroupName", $groupName); + } + + /** + * DBVersion: 应用的DB版本 + * + * @return string|null + */ + public function getDBVersion() + { + return $this->get("DBVersion"); + } + + /** + * DBVersion: 应用的DB版本 + * + * @param string $dbVersion + */ + public function setDBVersion($dbVersion) + { + $this->set("DBVersion", $dbVersion); + } + + /** + * Description: 描述信息 + * + * @return string|null + */ + public function getDescription() + { + return $this->get("Description"); + } + + /** + * Description: 描述信息 + * + * @param string $description + */ + public function setDescription($description) + { + $this->set("Description", $description); + } + + /** + * Modifiable: 是否可以修改 + * + * @return boolean|null + */ + public function getModifiable() + { + return $this->get("Modifiable"); + } + + /** + * Modifiable: 是否可以修改 + * + * @param boolean $modifiable + */ + public function setModifiable($modifiable) + { + $this->set("Modifiable", $modifiable); + } + + /** + * ParamGroupTypeName: 模板组类型名称 + * + * @return string|null + */ + public function getParamGroupTypeName() + { + return $this->get("ParamGroupTypeName"); + } + + /** + * ParamGroupTypeName: 模板组类型名称 + * + * @param string $paramGroupTypeName + */ + public function setParamGroupTypeName($paramGroupTypeName) + { + $this->set("ParamGroupTypeName", $paramGroupTypeName); + } +} diff --git a/src/UDBPostgreSQL/Models/UDBInstance.php b/src/UDBPostgreSQL/Models/UDBInstance.php new file mode 100644 index 0000000..62274a5 --- /dev/null +++ b/src/UDBPostgreSQL/Models/UDBInstance.php @@ -0,0 +1,624 @@ +get("Zone"); + } + + /** + * Zone: DB实例所在可用区 + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * BackupZone: 备份所在可用区 + * + * @return string|null + */ + public function getBackupZone() + { + return $this->get("BackupZone"); + } + + /** + * BackupZone: 备份所在可用区 + * + * @param string $backupZone + */ + public function setBackupZone($backupZone) + { + $this->set("BackupZone", $backupZone); + } + + /** + * InstanceID: DB实例id + * + * @return string|null + */ + public function getInstanceID() + { + return $this->get("InstanceID"); + } + + /** + * InstanceID: DB实例id + * + * @param string $instanceID + */ + public function setInstanceID($instanceID) + { + $this->set("InstanceID", $instanceID); + } + + /** + * Name: 实例名称 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 实例名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * DBVersion: DB 版本 + * + * @return string|null + */ + public function getDBVersion() + { + return $this->get("DBVersion"); + } + + /** + * DBVersion: DB 版本 + * + * @param string $dbVersion + */ + public function setDBVersion($dbVersion) + { + $this->set("DBVersion", $dbVersion); + } + + /** + * ParamGroupID: DB实例使用的配置参数组id + * + * @return integer|null + */ + public function getParamGroupID() + { + return $this->get("ParamGroupID"); + } + + /** + * ParamGroupID: DB实例使用的配置参数组id + * + * @param int $paramGroupID + */ + public function setParamGroupID($paramGroupID) + { + $this->set("ParamGroupID", $paramGroupID); + } + + /** + * AdminUser: 管理员帐户名,默认root + * + * @return string|null + */ + public function getAdminUser() + { + return $this->get("AdminUser"); + } + + /** + * AdminUser: 管理员帐户名,默认root + * + * @param string $adminUser + */ + public function setAdminUser($adminUser) + { + $this->set("AdminUser", $adminUser); + } + + /** + * IP: DBip + * + * @return string|null + */ + public function getIP() + { + return $this->get("IP"); + } + + /** + * IP: DBip + * + * @param string $ip + */ + public function setIP($ip) + { + $this->set("IP", $ip); + } + + /** + * Port: DB port + * + * @return integer|null + */ + public function getPort() + { + return $this->get("Port"); + } + + /** + * Port: DB port + * + * @param int $port + */ + public function setPort($port) + { + $this->set("Port", $port); + } + + /** + * 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); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * BackupCount: 备份文件保留的数量,默认7次 + * + * @return integer|null + */ + public function getBackupCount() + { + return $this->get("BackupCount"); + } + + /** + * BackupCount: 备份文件保留的数量,默认7次 + * + * @param int $backupCount + */ + public function setBackupCount($backupCount) + { + $this->set("BackupCount", $backupCount); + } + + /** + * BackupBeginTime: 备份开始时间,单位小时计,默认3点 + * + * @return integer|null + */ + public function getBackupBeginTime() + { + return $this->get("BackupBeginTime"); + } + + /** + * BackupBeginTime: 备份开始时间,单位小时计,默认3点 + * + * @param int $backupBeginTime + */ + public function setBackupBeginTime($backupBeginTime) + { + $this->set("BackupBeginTime", $backupBeginTime); + } + + /** + * BackupTimeRange: 备份的时间段,范围[0,23] + * + * @return integer|null + */ + public function getBackupTimeRange() + { + return $this->get("BackupTimeRange"); + } + + /** + * BackupTimeRange: 备份的时间段,范围[0,23] + * + * @param int $backupTimeRange + */ + public function setBackupTimeRange($backupTimeRange) + { + $this->set("BackupTimeRange", $backupTimeRange); + } + + /** + * BackupDate: 用于设置备份策略的备份日期标记位。共7位,每一位为一周中一天的备份情况 0表示关闭当天备份,1表示打开当天备份。最右边的一位 为星期天的备份开关,其余从右到左依次为星期一到星期 六的备份配置开关,每周必须至少设置两天备份。 例如:1100000 表示打开星期六和星期五的自动备份功能 + * + * @return string|null + */ + public function getBackupDate() + { + return $this->get("BackupDate"); + } + + /** + * BackupDate: 用于设置备份策略的备份日期标记位。共7位,每一位为一周中一天的备份情况 0表示关闭当天备份,1表示打开当天备份。最右边的一位 为星期天的备份开关,其余从右到左依次为星期一到星期 六的备份配置开关,每周必须至少设置两天备份。 例如:1100000 表示打开星期六和星期五的自动备份功能 + * + * @param string $backupDate + */ + public function setBackupDate($backupDate) + { + $this->set("BackupDate", $backupDate); + } + + /** + * State: DB状态标记 Init:初始化中,Fail:安装失败,Starting:启动中,Running:运行,Shutdown:关闭中,Shutoff:已关闭,Delete:已删除,Upgrading:升级中,Promoting:提升为独库进行中,Recovering:恢复中,Recover fail:恢复失败 + * + * @return string|null + */ + public function getState() + { + return $this->get("State"); + } + + /** + * State: DB状态标记 Init:初始化中,Fail:安装失败,Starting:启动中,Running:运行,Shutdown:关闭中,Shutoff:已关闭,Delete:已删除,Upgrading:升级中,Promoting:提升为独库进行中,Recovering:恢复中,Recover fail:恢复失败 + * + * @param string $state + */ + public function setState($state) + { + $this->set("State", $state); + } + + /** + * CreateTime: DB实例创建时间,采用UTC计时时间戳 + * + * @return integer|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: DB实例创建时间,采用UTC计时时间戳 + * + * @param int $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ModifyTime: DB实例修改时间,采用UTC计时时间戳 + * + * @return integer|null + */ + public function getModifyTime() + { + return $this->get("ModifyTime"); + } + + /** + * ModifyTime: DB实例修改时间,采用UTC计时时间戳 + * + * @param int $modifyTime + */ + public function setModifyTime($modifyTime) + { + $this->set("ModifyTime", $modifyTime); + } + + /** + * ExpiredTime: DB实例过期时间,采用UTC计时时间戳 + * + * @return integer|null + */ + public function getExpiredTime() + { + return $this->get("ExpiredTime"); + } + + /** + * ExpiredTime: DB实例过期时间,采用UTC计时时间戳 + * + * @param int $expiredTime + */ + public function setExpiredTime($expiredTime) + { + $this->set("ExpiredTime", $expiredTime); + } + + /** + * 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); + } + + /** + * MemoryLimit: 内存限制(MB),默认根据配置机型 + * + * @return integer|null + */ + public function getMemoryLimit() + { + return $this->get("MemoryLimit"); + } + + /** + * MemoryLimit: 内存限制(MB),默认根据配置机型 + * + * @param int $memoryLimit + */ + public function setMemoryLimit($memoryLimit) + { + $this->set("MemoryLimit", $memoryLimit); + } + + /** + * DiskSpace: 磁盘空间(GB), 默认根据配置机型 + * + * @return integer|null + */ + public function getDiskSpace() + { + return $this->get("DiskSpace"); + } + + /** + * DiskSpace: 磁盘空间(GB), 默认根据配置机型 + * + * @param int $diskSpace + */ + public function setDiskSpace($diskSpace) + { + $this->set("DiskSpace", $diskSpace); + } + + /** + * DiskUsedSize: DB实例磁盘已使用空间,单位GB + * + * @return float|null + */ + public function getDiskUsedSize() + { + return $this->get("DiskUsedSize"); + } + + /** + * DiskUsedSize: DB实例磁盘已使用空间,单位GB + * + * @param float $diskUsedSize + */ + public function setDiskUsedSize($diskUsedSize) + { + $this->set("DiskUsedSize", $diskUsedSize); + } + + /** + * DataFileSize: DB实例数据文件大小,单位GB + * + * @return float|null + */ + public function getDataFileSize() + { + return $this->get("DataFileSize"); + } + + /** + * DataFileSize: DB实例数据文件大小,单位GB + * + * @param float $dataFileSize + */ + public function setDataFileSize($dataFileSize) + { + $this->set("DataFileSize", $dataFileSize); + } + + /** + * SystemFileSize: DB实例系统文件大小,单位GB + * + * @return float|null + */ + public function getSystemFileSize() + { + return $this->get("SystemFileSize"); + } + + /** + * SystemFileSize: DB实例系统文件大小,单位GB + * + * @param float $systemFileSize + */ + public function setSystemFileSize($systemFileSize) + { + $this->set("SystemFileSize", $systemFileSize); + } + + /** + * LogFileSize: DB实例日志文件大小,单位GB + * + * @return float|null + */ + public function getLogFileSize() + { + return $this->get("LogFileSize"); + } + + /** + * LogFileSize: DB实例日志文件大小,单位GB + * + * @param float $logFileSize + */ + public function setLogFileSize($logFileSize) + { + $this->set("LogFileSize", $logFileSize); + } + + /** + * InstanceMode: Normal/HA,普通/高可用 + * + * @return string|null + */ + public function getInstanceMode() + { + return $this->get("InstanceMode"); + } + + /** + * InstanceMode: Normal/HA,普通/高可用 + * + * @param string $instanceMode + */ + public function setInstanceMode($instanceMode) + { + $this->set("InstanceMode", $instanceMode); + } + + /** + * MachineType: 配置机型名称 + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 配置机型名称 + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * SecGroupStatus: 安全组版本 + * + * @return integer|null + */ + public function getSecGroupStatus() + { + return $this->get("SecGroupStatus"); + } + + /** + * SecGroupStatus: 安全组版本 + * + * @param int $secGroupStatus + */ + public function setSecGroupStatus($secGroupStatus) + { + $this->set("SecGroupStatus", $secGroupStatus); + } +} diff --git a/src/UDBPostgreSQL/Models/UDBInstanceSet.php b/src/UDBPostgreSQL/Models/UDBInstanceSet.php new file mode 100644 index 0000000..7b2d8f5 --- /dev/null +++ b/src/UDBPostgreSQL/Models/UDBInstanceSet.php @@ -0,0 +1,316 @@ +get("Zone"); + } + + /** + * Zone: 可用区 + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * 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); + } + + /** + * Name: 实例名称 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 实例名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * DBVersion: 实例的版本,包括postgresql-10.4,postgresql-13.4 + * + * @return string|null + */ + public function getDBVersion() + { + return $this->get("DBVersion"); + } + + /** + * DBVersion: 实例的版本,包括postgresql-10.4,postgresql-13.4 + * + * @param string $dbVersion + */ + public function setDBVersion($dbVersion) + { + $this->set("DBVersion", $dbVersion); + } + + /** + * InstanceMode: normal/ha/readonly,普通/高可用/只读从库 + * + * @return string|null + */ + public function getInstanceMode() + { + return $this->get("InstanceMode"); + } + + /** + * InstanceMode: normal/ha/readonly,普通/高可用/只读从库 + * + * @param string $instanceMode + */ + public function setInstanceMode($instanceMode) + { + $this->set("InstanceMode", $instanceMode); + } + + /** + * State: 实例状态标记 Initing:初始化中,InitFailed:安装失败,Starting:启动中, Running:运行,Stopping:关闭中,Stopped:已关闭,Deleted: 已删除,Upgrading: 升级中 ,Promoting:提升为主库进行中,Recovering:恢复中,RecoverFailed:恢复失败,StartFailed:启动失败,ShutdownFailed:关闭失败,Deleting:删除中,DeleteFailed:删除失败 + * + * @return string|null + */ + public function getState() + { + return $this->get("State"); + } + + /** + * State: 实例状态标记 Initing:初始化中,InitFailed:安装失败,Starting:启动中, Running:运行,Stopping:关闭中,Stopped:已关闭,Deleted: 已删除,Upgrading: 升级中 ,Promoting:提升为主库进行中,Recovering:恢复中,RecoverFailed:恢复失败,StartFailed:启动失败,ShutdownFailed:关闭失败,Deleting:删除中,DeleteFailed:删除失败 + * + * @param string $state + */ + public function setState($state) + { + $this->set("State", $state); + } + + /** + * MachineType: 机器规格,格式为nCmG,n代表cpu核数,m代表内存大小(GB) + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 机器规格,格式为nCmG,n代表cpu核数,m代表内存大小(GB) + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * 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); + } + + /** + * CreateTime: DB实例创建时间,采用UTC计时时间戳 + * + * @return integer|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: DB实例创建时间,采用UTC计时时间戳 + * + * @param int $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ExpiredTime: DB实例过期时间,采用UTC计时时间戳 + * + * @return integer|null + */ + public function getExpiredTime() + { + return $this->get("ExpiredTime"); + } + + /** + * ExpiredTime: DB实例过期时间,采用UTC计时时间戳 + * + * @param int $expiredTime + */ + public function setExpiredTime($expiredTime) + { + $this->set("ExpiredTime", $expiredTime); + } + + /** + * IP: DB实例ip + * + * @return string|null + */ + public function getIP() + { + return $this->get("IP"); + } + + /** + * IP: DB实例ip + * + * @param string $ip + */ + public function setIP($ip) + { + $this->set("IP", $ip); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } + + /** + * DataSet: 从库列表 + * + * @return UDBReadonlyInstance[]|null + */ + public function getDataSet() + { + $items = $this->get("DataSet"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new UDBReadonlyInstance($item)); + } + return $result; + } + + /** + * DataSet: 从库列表 + * + * @param UDBReadonlyInstance[] $dataSet + */ + public function setDataSet(array $dataSet) + { + $result = []; + foreach ($dataSet as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UDBPostgreSQL/Models/UDBReadonlyInstance.php b/src/UDBPostgreSQL/Models/UDBReadonlyInstance.php new file mode 100644 index 0000000..97e664d --- /dev/null +++ b/src/UDBPostgreSQL/Models/UDBReadonlyInstance.php @@ -0,0 +1,284 @@ +get("Zone"); + } + + /** + * Zone: 可用区 + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * 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); + } + + /** + * Name: 实例名称 + * + * @return string|null + */ + public function getName() + { + return $this->get("Name"); + } + + /** + * Name: 实例名称 + * + * @param string $name + */ + public function setName($name) + { + $this->set("Name", $name); + } + + /** + * DBVersion: 实例的版本,包括postgresql-10.4,postgresql-13.4 + * + * @return string|null + */ + public function getDBVersion() + { + return $this->get("DBVersion"); + } + + /** + * DBVersion: 实例的版本,包括postgresql-10.4,postgresql-13.4 + * + * @param string $dbVersion + */ + public function setDBVersion($dbVersion) + { + $this->set("DBVersion", $dbVersion); + } + + /** + * InstanceMode: normal/ha/readonly,普通/高可用/只读从库 + * + * @return string|null + */ + public function getInstanceMode() + { + return $this->get("InstanceMode"); + } + + /** + * InstanceMode: normal/ha/readonly,普通/高可用/只读从库 + * + * @param string $instanceMode + */ + public function setInstanceMode($instanceMode) + { + $this->set("InstanceMode", $instanceMode); + } + + /** + * State: 实例状态标记 Initing:初始化中,InitFailed:安装失败,Starting:启动中, Running:运行,Stopping:关闭中,Stopped:已关闭,Deleted: 已删除,Upgrading: 升级中 ,Promoting:提升为主库进行中,Recovering:恢复中,RecoverFailed:恢复失败,StartFailed:启动失败,ShutdownFailed:关闭失败,Deleting:删除中,DeleteFailed:删除失败 + * + * @return string|null + */ + public function getState() + { + return $this->get("State"); + } + + /** + * State: 实例状态标记 Initing:初始化中,InitFailed:安装失败,Starting:启动中, Running:运行,Stopping:关闭中,Stopped:已关闭,Deleted: 已删除,Upgrading: 升级中 ,Promoting:提升为主库进行中,Recovering:恢复中,RecoverFailed:恢复失败,StartFailed:启动失败,ShutdownFailed:关闭失败,Deleting:删除中,DeleteFailed:删除失败 + * + * @param string $state + */ + public function setState($state) + { + $this->set("State", $state); + } + + /** + * MachineType: 机器规格,格式为nCmG,n代表cpu核数,m代表内存大小(GB) + * + * @return string|null + */ + public function getMachineType() + { + return $this->get("MachineType"); + } + + /** + * MachineType: 机器规格,格式为nCmG,n代表cpu核数,m代表内存大小(GB) + * + * @param string $machineType + */ + public function setMachineType($machineType) + { + $this->set("MachineType", $machineType); + } + + /** + * 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); + } + + /** + * CreateTime: DB实例创建时间,采用UTC计时时间戳 + * + * @return integer|null + */ + public function getCreateTime() + { + return $this->get("CreateTime"); + } + + /** + * CreateTime: DB实例创建时间,采用UTC计时时间戳 + * + * @param int $createTime + */ + public function setCreateTime($createTime) + { + $this->set("CreateTime", $createTime); + } + + /** + * ExpiredTime: DB实例过期时间,采用UTC计时时间戳 + * + * @return integer|null + */ + public function getExpiredTime() + { + return $this->get("ExpiredTime"); + } + + /** + * ExpiredTime: DB实例过期时间,采用UTC计时时间戳 + * + * @param int $expiredTime + */ + public function setExpiredTime($expiredTime) + { + $this->set("ExpiredTime", $expiredTime); + } + + /** + * IP: DB实例ip + * + * @return string|null + */ + public function getIP() + { + return $this->get("IP"); + } + + /** + * IP: DB实例ip + * + * @param string $ip + */ + public function setIP($ip) + { + $this->set("IP", $ip); + } + + /** + * Remark: 备注 + * + * @return string|null + */ + public function getRemark() + { + return $this->get("Remark"); + } + + /** + * Remark: 备注 + * + * @param string $remark + */ + public function setRemark($remark) + { + $this->set("Remark", $remark); + } +} diff --git a/src/UDBPostgreSQL/Models/UPgSQLBackup.php b/src/UDBPostgreSQL/Models/UPgSQLBackup.php new file mode 100644 index 0000000..a9cbfbf --- /dev/null +++ b/src/UDBPostgreSQL/Models/UPgSQLBackup.php @@ -0,0 +1,204 @@ +get("Region"); + } + + /** + * Region: 备份所在地域 + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * InstanceID: DB实例Id + * + * @return string|null + */ + public function getInstanceID() + { + return $this->get("InstanceID"); + } + + /** + * InstanceID: DB实例Id + * + * @param string $instanceID + */ + public function setInstanceID($instanceID) + { + $this->set("InstanceID", $instanceID); + } + + /** + * BackupID: 备份id + * + * @return string|null + */ + public function getBackupID() + { + return $this->get("BackupID"); + } + + /** + * BackupID: 备份id + * + * @param string $backupID + */ + public function setBackupID($backupID) + { + $this->set("BackupID", $backupID); + } + + /** + * BackupName: 备份名称 + * + * @return string|null + */ + public function getBackupName() + { + return $this->get("BackupName"); + } + + /** + * BackupName: 备份名称 + * + * @param string $backupName + */ + public function setBackupName($backupName) + { + $this->set("BackupName", $backupName); + } + + /** + * BackupStartTime: 备份时间(Unix时间戳) + * + * @return integer|null + */ + public function getBackupStartTime() + { + return $this->get("BackupStartTime"); + } + + /** + * BackupStartTime: 备份时间(Unix时间戳) + * + * @param int $backupStartTime + */ + public function setBackupStartTime($backupStartTime) + { + $this->set("BackupStartTime", $backupStartTime); + } + + /** + * BackupSize: 备份文件大小(字节) + * + * @return integer|null + */ + public function getBackupSize() + { + return $this->get("BackupSize"); + } + + /** + * BackupSize: 备份文件大小(字节) + * + * @param int $backupSize + */ + public function setBackupSize($backupSize) + { + $this->set("BackupSize", $backupSize); + } + + /** + * BackupType: 备份类型,手动或者自动 + * + * @return integer|null + */ + public function getBackupType() + { + return $this->get("BackupType"); + } + + /** + * BackupType: 备份类型,手动或者自动 + * + * @param int $backupType + */ + public function setBackupType($backupType) + { + $this->set("BackupType", $backupType); + } + + /** + * State: 备份状态 (Backuping:备份中,Success:备份成功, Failed:备份失败, Expired:备份过期) + * + * @return string|null + */ + public function getState() + { + return $this->get("State"); + } + + /** + * State: 备份状态 (Backuping:备份中,Success:备份成功, Failed:备份失败, Expired:备份过期) + * + * @param string $state + */ + public function setState($state) + { + $this->set("State", $state); + } + + /** + * BackupEndTime: 备份完成时间(Unix时间戳) + * + * @return integer|null + */ + public function getBackupEndTime() + { + return $this->get("BackupEndTime"); + } + + /** + * BackupEndTime: 备份完成时间(Unix时间戳) + * + * @param int $backupEndTime + */ + public function setBackupEndTime($backupEndTime) + { + $this->set("BackupEndTime", $backupEndTime); + } +} diff --git a/src/UDBPostgreSQL/Models/UPgSQLInstancePriceSet.php b/src/UDBPostgreSQL/Models/UPgSQLInstancePriceSet.php new file mode 100644 index 0000000..aa7f34f --- /dev/null +++ b/src/UDBPostgreSQL/Models/UPgSQLInstancePriceSet.php @@ -0,0 +1,84 @@ +get("ChargeType"); + } + + /** + * ChargeType: 计费类型,Year,Month,Dynamic。 + * + * @param string $chargeType + */ + public function setChargeType($chargeType) + { + $this->set("ChargeType", $chargeType); + } + + /** + * Price: 实际价格,单位:元,保留小数点后两位有效数字。 + * + * @return float|null + */ + public function getPrice() + { + return $this->get("Price"); + } + + /** + * Price: 实际价格,单位:元,保留小数点后两位有效数字。 + * + * @param float $price + */ + public function setPrice($price) + { + $this->set("Price", $price); + } + + /** + * OriginalPrice: 购买原价,单位:元。 + * + * @return float|null + */ + public function getOriginalPrice() + { + return $this->get("OriginalPrice"); + } + + /** + * OriginalPrice: 购买原价,单位:元。 + * + * @param float $originalPrice + */ + public function setOriginalPrice($originalPrice) + { + $this->set("OriginalPrice", $originalPrice); + } +} diff --git a/src/UDBPostgreSQL/Params/CreateUPgSQLReadonlyParamLabels.php b/src/UDBPostgreSQL/Params/CreateUPgSQLReadonlyParamLabels.php new file mode 100644 index 0000000..c1b3aec --- /dev/null +++ b/src/UDBPostgreSQL/Params/CreateUPgSQLReadonlyParamLabels.php @@ -0,0 +1,64 @@ +get("Key"); + } + + /** + * Key: 用户资源标签的键值 + * + * @param string $key + */ + public function setKey($key) + { + $this->set("Key", $key); + } + + /** + * Value: 用户资源标签值 + * + * @return string|null + */ + public function getValue() + { + return $this->get("Value"); + } + + /** + * Value: 用户资源标签值 + * + * @param string $value + */ + public function setValue($value) + { + $this->set("Value", $value); + } +} diff --git a/src/UDBPostgreSQL/Params/CreateUPgSQLReadonlyParamSecGroupId.php b/src/UDBPostgreSQL/Params/CreateUPgSQLReadonlyParamSecGroupId.php new file mode 100644 index 0000000..177e830 --- /dev/null +++ b/src/UDBPostgreSQL/Params/CreateUPgSQLReadonlyParamSecGroupId.php @@ -0,0 +1,64 @@ +get("Id"); + } + + /** + * Id: 安全组id + * + * @param string $id + */ + public function setId($id) + { + $this->set("Id", $id); + } + + /** + * Priority: 安全组优先级 + * + * @return integer|null + */ + public function getPriority() + { + return $this->get("Priority"); + } + + /** + * Priority: 安全组优先级 + * + * @param int $priority + */ + public function setPriority($priority) + { + $this->set("Priority", $priority); + } +} diff --git a/src/UDBPostgreSQL/UDBPostgreSQLClient.php b/src/UDBPostgreSQL/UDBPostgreSQLClient.php new file mode 100644 index 0000000..c1e5fd9 --- /dev/null +++ b/src/UDBPostgreSQL/UDBPostgreSQLClient.php @@ -0,0 +1,1184 @@ + (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) DB实例Id + * "BackupName" => (string) 备份名称 + * "BackupMethod" => (integer) 使用的备份方式(物理备份,逻辑备份) + * "Blacklist" => (string) 备份黑名单列表,以“ ;” 分隔。 + * ] + * + * Outputs: + * + * $outputs = [ + * "BackupID" => (string) 返回的备份ID + * ] + * + * @return BackupUPgSQLResponse + * @throws UCloudException + */ + public function backupUPgSQL(BackupUPgSQLRequest $request = null) + { + $resp = $this->invoke($request); + return new BackupUPgSQLResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * BackupUPgSQLLog - 备份日志包 + * + * See also: https://docs.ucloud.cn/api/udbpostgresql-api/backup_u_pg_sql_log + * + * 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) + * "BackupName" => (string) 备份导出文件名称 + * "InstanceID" => (string) 资源ID + * "LogType" => (string) 日志类型:slowlog(慢日志),errorlog(错误日志),不区分大小写 + * "BeginTime" => (integer) 日志开始时间 + * "EndTime" => (integer) 日志结束时间 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return BackupUPgSQLLogResponse + * @throws UCloudException + */ + public function backupUPgSQLLog(BackupUPgSQLLogRequest $request = null) + { + $resp = $this->invoke($request); + return new BackupUPgSQLLogResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUPgSQLInstance - 创建PG云数据库 + * + * See also: https://docs.ucloud.cn/api/udbpostgresql-api/create_u_pg_sql_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) + * "Name" => (string) 实例名称,至少6位 + * "DBVersion" => (string) PostgreSQL的版本,pg10.4:postgresql-10.4,pg13.4:postgresql-13.4 + * "ParamGroupID" => (integer) DB实例使用的配置参数组id + * "AdminPassword" => (string) 管理员密码 + * "Port" => (integer) 端口默认为5432 + * "DiskSpace" => (string) 磁盘空间(GB) + * "MachineType" => (string) 机器配置类型,2核4G的机器:o.pgsql2m.medium + * "SubnetID" => (string) 子网ID + * "VPCID" => (string) VPC的ID + * "InstanceMode" => (string) UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例 "HA": 高可用版UDB实例 默认是"Normal" + * ] + * + * Outputs: + * + * $outputs = [ + * "InstanceID" => (string) 资源ID + * ] + * + * @return CreateUPgSQLInstanceResponse + * @throws UCloudException + */ + public function createUPgSQLInstance(CreateUPgSQLInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new CreateUPgSQLInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUPgSQLParamTemplate - 创建PG参数模板 + * + * See also: https://docs.ucloud.cn/api/udbpostgresql-api/create_u_pg_sql_param_template + * + * 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) + * "GroupName" => (string) 模板名称 + * "SrcGroupID" => (integer) 基准模板 + * "DBVersion" => (string) 什么版本,以及类型的DB + * "Description" => (string) 描述信息 + * ] + * + * Outputs: + * + * $outputs = [ + * "GroupID" => (integer) 创建的模板ID + * ] + * + * @return CreateUPgSQLParamTemplateResponse + * @throws UCloudException + */ + public function createUPgSQLParamTemplate(CreateUPgSQLParamTemplateRequest $request = null) + { + $resp = $this->invoke($request); + return new CreateUPgSQLParamTemplateResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * CreateUPgSQLReadonly - 创建PG从库 + * + * See also: https://docs.ucloud.cn/api/udbpostgresql-api/create_u_pg_sql_readonly + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Name" => (string) Db名称 + * "Port" => (integer) DB端口 + * "DiskSpace" => (integer) 磁盘空间 + * "MachineType" => (string) 机器配置类型,2核4G的机器:o.pgsql2m.medium + * "SrcInstanceID" => (string) 同步的源库 + * "SubnetID" => (string) 子网ID + * "VPCID" => (string) VPCID + * "Labels" => (array) [ + * [ + * "Key" => (string) 用户资源标签的键值 + * "Value" => (string) 用户资源标签值 + * ] + * ] + * "SecGroupId" => (array) [ + * [ + * "Id" => (string) 安全组id + * "Priority" => (integer) 安全组优先级 + * ] + * ] + * ] + * + * Outputs: + * + * $outputs = [ + * "InstanceID" => (string) 资源ID + * ] + * + * @return CreateUPgSQLReadonlyResponse + * @throws UCloudException + */ + public function createUPgSQLReadonly(CreateUPgSQLReadonlyRequest $request = null) + { + $resp = $this->invoke($request); + return new CreateUPgSQLReadonlyResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteUPgSQLInstance - 删除PG实例 + * + * See also: https://docs.ucloud.cn/api/udbpostgresql-api/delete_u_pg_sql_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 DeleteUPgSQLInstanceResponse + * @throws UCloudException + */ + public function deleteUPgSQLInstance(DeleteUPgSQLInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new DeleteUPgSQLInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DeleteUPgSQLParamTemplate - 删除参数模板 + * + * See also: https://docs.ucloud.cn/api/udbpostgresql-api/delete_u_pg_sql_param_template + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "GroupID" => (integer) 模板ID + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return DeleteUPgSQLParamTemplateResponse + * @throws UCloudException + */ + public function deleteUPgSQLParamTemplate(DeleteUPgSQLParamTemplateRequest $request = null) + { + $resp = $this->invoke($request); + return new DeleteUPgSQLParamTemplateResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * DownloadUPgSQLParamTemplate - 下载参数模板信息 + * + * See also: https://docs.ucloud.cn/api/udbpostgresql-api/download_u_pg_sql_param_template + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "GroupID" => (integer) 参数模板id + * ] + * + * Outputs: + * + * $outputs = [ + * "Content" => (string) base64编码过的 + * ] + * + * @return DownloadUPgSQLParamTemplateResponse + * @throws UCloudException + */ + public function downloadUPgSQLParamTemplate(DownloadUPgSQLParamTemplateRequest $request = null) + { + $resp = $this->invoke($request); + return new DownloadUPgSQLParamTemplateResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUPgSQLBackupStrategy - 获取备份策略 + * + * See also: https://docs.ucloud.cn/api/udbpostgresql-api/get_u_pg_sql_backup_strategy + * + * 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) DB实例Id + * ] + * + * Outputs: + * + * $outputs = [ + * "BackupTimeRange" => (string) 自动备份预计开始时间范围 + * "BackupWeek" => (string) 自动备份预期星期几(1~7)开始 + * "BackupMethod" => (string) 默认的备份方式 + * ] + * + * @return GetUPgSQLBackupStrategyResponse + * @throws UCloudException + */ + public function getUPgSQLBackupStrategy(GetUPgSQLBackupStrategyRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUPgSQLBackupStrategyResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUPgSQLBackupURL - 获取备份下载地址 + * + * See also: https://docs.ucloud.cn/api/udbpostgresql-api/get_u_pg_sql_backup_url + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "InstanceID" => (string) DB实例Id + * "BackupID" => (string) 备份Id + * ] + * + * Outputs: + * + * $outputs = [ + * "BackupPath" => (string) DB实例备份文件公网的地址 + * "InnerBackupPath" => (string) DB实例备份文件内网的地址 + * ] + * + * @return GetUPgSQLBackupURLResponse + * @throws UCloudException + */ + public function getUPgSQLBackupURL(GetUPgSQLBackupURLRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUPgSQLBackupURLResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUPgSQLInstance - 获取PG云数据库实例描述 + * + * See also: https://docs.ucloud.cn/api/udbpostgresql-api/get_u_pg_sql_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 = [ + * "DataSet" => (object) DataSet[ + * "Zone" => (string) DB实例所在可用区 + * "BackupZone" => (string) 备份所在可用区 + * "InstanceID" => (string) DB实例id + * "Name" => (string) 实例名称 + * "DBVersion" => (string) DB 版本 + * "ParamGroupID" => (integer) DB实例使用的配置参数组id + * "AdminUser" => (string) 管理员帐户名,默认root + * "IP" => (string) DBip + * "Port" => (integer) DB port + * "VPCID" => (string) VPC的ID + * "SubnetID" => (string) 子网ID + * "Remark" => (string) 备注 + * "BackupCount" => (integer) 备份文件保留的数量,默认7次 + * "BackupBeginTime" => (integer) 备份开始时间,单位小时计,默认3点 + * "BackupTimeRange" => (integer) 备份的时间段,范围[0,23] + * "BackupDate" => (string) 用于设置备份策略的备份日期标记位。共7位,每一位为一周中一天的备份情况 0表示关闭当天备份,1表示打开当天备份。最右边的一位 为星期天的备份开关,其余从右到左依次为星期一到星期 六的备份配置开关,每周必须至少设置两天备份。 例如:1100000 表示打开星期六和星期五的自动备份功能 + * "State" => (string) DB状态标记 Init:初始化中,Fail:安装失败,Starting:启动中,Running:运行,Shutdown:关闭中,Shutoff:已关闭,Delete:已删除,Upgrading:升级中,Promoting:提升为独库进行中,Recovering:恢复中,Recover fail:恢复失败 + * "CreateTime" => (integer) DB实例创建时间,采用UTC计时时间戳 + * "ModifyTime" => (integer) DB实例修改时间,采用UTC计时时间戳 + * "ExpiredTime" => (integer) DB实例过期时间,采用UTC计时时间戳 + * "Cpu" => (integer) CPU限制(核),默认根据配置机型 + * "MemoryLimit" => (integer) 内存限制(MB),默认根据配置机型 + * "DiskSpace" => (integer) 磁盘空间(GB), 默认根据配置机型 + * "DiskUsedSize" => (number) DB实例磁盘已使用空间,单位GB + * "DataFileSize" => (number) DB实例数据文件大小,单位GB + * "SystemFileSize" => (number) DB实例系统文件大小,单位GB + * "LogFileSize" => (number) DB实例日志文件大小,单位GB + * "InstanceMode" => (string) Normal/HA,普通/高可用 + * "MachineType" => (string) 配置机型名称 + * "SecGroupStatus" => (integer) 安全组版本 + * ] + * ] + * + * @return GetUPgSQLInstanceResponse + * @throws UCloudException + */ + public function getUPgSQLInstance(GetUPgSQLInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUPgSQLInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUPgSQLInstanceLog - 可以查询DB的错误日志和满查询日志 + * + * See also: https://docs.ucloud.cn/api/udbpostgresql-api/get_u_pg_sql_instance_log + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "LogType" => (string) 日志类型 + * "CompanyID" => (integer) 公司ID + * "AccountID" => (integer) 账户ID + * "BeginTime" => (integer) 起始时间,需使用时间戳 + * "InstanceID" => (string) 实例资源ID + * "EndTime" => (integer) 结束时间,需使用时间戳,结束时间需大于起始时间实时查询的时候不需要传 + * ] + * + * Outputs: + * + * $outputs = [ + * "Log" => (string) 返回的日志信息 + * ] + * + * @return GetUPgSQLInstanceLogResponse + * @throws UCloudException + */ + public function getUPgSQLInstanceLog(GetUPgSQLInstanceLogRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUPgSQLInstanceLogResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUPgSQLInstanceParam - 获取实例参数信息 + * + * See also: https://docs.ucloud.cn/api/udbpostgresql-api/get_u_pg_sql_instance_param + * + * 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 = [ + * "Data" => (array) 参数的键值对信息[ + * [ + * "Key" => (string) 参数Key + * "Value" => (string) 参数值 + * "ValueType" => (integer) 值类型 + * "AllowedVal" => (string) 允许的值 + * "ApplyType" => (integer) 允许类型 + * "Modifiable" => (boolean) 是否可以修改 + * "FormatType" => (integer) 参数格式类型 + * ] + * ] + * ] + * + * @return GetUPgSQLInstanceParamResponse + * @throws UCloudException + */ + public function getUPgSQLInstanceParam(GetUPgSQLInstanceParamRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUPgSQLInstanceParamResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUPgSQLInstancePrice - 获取创建PG云数据库价格 + * + * See also: https://docs.ucloud.cn/api/udbpostgresql-api/get_u_pg_sql_instance_price + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "MachineType" => (string) 机器配置类型 参考2C4G机器:o.pgsql2m.medium + * "DiskSpace" => (integer) 磁盘空间(GB) + * "InstanceMode" => (string) UDB实例模式类型, 可选值如下: "Normal": 普通版UDB实例 "HA": 高可用版UDB实例 + * "ChargeType" => (string) 计费模式。枚举值为: Year,按年付费; Month,按月付费; Dynamic,按小时付费(需开启权限)。默认为月付 + * "Quantity" => (integer) 购买时长。默认: 1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 + * ] + * + * Outputs: + * + * $outputs = [ + * "PriceSet" => (array) 价格列表[ + * [ + * "ChargeType" => (string) 计费类型,Year,Month,Dynamic。 + * "Price" => (number) 实际价格,单位:元,保留小数点后两位有效数字。 + * "OriginalPrice" => (number) 购买原价,单位:元。 + * ] + * ] + * ] + * + * @return GetUPgSQLInstancePriceResponse + * @throws UCloudException + */ + public function getUPgSQLInstancePrice(GetUPgSQLInstancePriceRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUPgSQLInstancePriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUPgSQLParamTemplate - 获取模板信息 + * + * See also: https://docs.ucloud.cn/api/udbpostgresql-api/get_u_pg_sql_param_template + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "GroupID" => (integer) 模板ID + * ] + * + * Outputs: + * + * $outputs = [ + * "Data" => (array) 参数列表[ + * [ + * "Key" => (string) 参数Key + * "Value" => (string) 参数值 + * "ValueType" => (integer) 值类型 + * "AllowedVal" => (string) 允许的值 + * "ApplyType" => (integer) 允许类型 + * "Modifiable" => (boolean) 是否可以修改 + * "FormatType" => (integer) 参数格式类型 + * ] + * ] + * ] + * + * @return GetUPgSQLParamTemplateResponse + * @throws UCloudException + */ + public function getUPgSQLParamTemplate(GetUPgSQLParamTemplateRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUPgSQLParamTemplateResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUPgSQLUpgradePrice - 获取 PG 云数据库升降级价格 + * + * See also: https://docs.ucloud.cn/api/udbpostgresql-api/get_u_pg_sql_upgrade_price + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "InstanceID" => (string) 资源ID + * "DiskSpace" => (integer) 磁盘空间(GB) + * "MachineType" => (string) 机器配置类型 + * "InstanceMode" => (string) UDB实例模式类型, 可选值如下: "normal": 普通版UDB实例 "ha": 高可用版UDB实例 默认是"normal" + * ] + * + * Outputs: + * + * $outputs = [ + * "Price" => (number) 规格调整差价。精确到小数点后2位。 + * "OriginalPrice" => (number) 限时优惠的折前原价 + * ] + * + * @return GetUPgSQLUpgradePriceResponse + * @throws UCloudException + */ + public function getUPgSQLUpgradePrice(GetUPgSQLUpgradePriceRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUPgSQLUpgradePriceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListUPgSQLBackup - 获取备份列表 + * + * See also: https://docs.ucloud.cn/api/udbpostgresql-api/list_u_pg_sql_backup + * + * 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) DB实例Id + * "BackupType" => (integer) 备份类型,默认值是0(0:表示全部,1:自动备份,2:手动备份 + * "Offset" => (integer) 列表起始位置偏移量,默认为0 + * "Limit" => (integer) 返回数据长度,默认为20,最大100 + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 备份信息列表.修参数[ + * [ + * "Region" => (string) 备份所在地域 + * "InstanceID" => (string) DB实例Id + * "BackupID" => (string) 备份id + * "BackupName" => (string) 备份名称 + * "BackupStartTime" => (integer) 备份时间(Unix时间戳) + * "BackupSize" => (integer) 备份文件大小(字节) + * "BackupType" => (integer) 备份类型,手动或者自动 + * "State" => (string) 备份状态 (Backuping:备份中,Success:备份成功, Failed:备份失败, Expired:备份过期) + * "BackupEndTime" => (integer) 备份完成时间(Unix时间戳) + * ] + * ] + * "TotalCount" => (integer) 总个数 + * ] + * + * @return ListUPgSQLBackupResponse + * @throws UCloudException + */ + public function listUPgSQLBackup(ListUPgSQLBackupRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUPgSQLBackupResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListUPgSQLInstance - 获取PG云数据库列表 + * + * See also: https://docs.ucloud.cn/api/udbpostgresql-api/list_u_pg_sql_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) + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 数据库信息列表[ + * [ + * "Zone" => (string) 可用区 + * "InstanceID" => (string) 资源ID + * "Name" => (string) 实例名称 + * "DBVersion" => (string) 实例的版本,包括postgresql-10.4,postgresql-13.4 + * "InstanceMode" => (string) normal/ha/readonly,普通/高可用/只读从库 + * "State" => (string) 实例状态标记 Initing:初始化中,InitFailed:安装失败,Starting:启动中, Running:运行,Stopping:关闭中,Stopped:已关闭,Deleted: 已删除,Upgrading: 升级中 ,Promoting:提升为主库进行中,Recovering:恢复中,RecoverFailed:恢复失败,StartFailed:启动失败,ShutdownFailed:关闭失败,Deleting:删除中,DeleteFailed:删除失败 + * "MachineType" => (string) 机器规格,格式为nCmG,n代表cpu核数,m代表内存大小(GB) + * "VPCID" => (string) VPC的ID + * "SubnetID" => (string) 子网ID + * "CreateTime" => (integer) DB实例创建时间,采用UTC计时时间戳 + * "ExpiredTime" => (integer) DB实例过期时间,采用UTC计时时间戳 + * "IP" => (string) DB实例ip + * "Remark" => (string) 备注 + * "DataSet" => (array) 从库列表[ + * [ + * "Zone" => (string) 可用区 + * "InstanceID" => (string) 资源ID + * "Name" => (string) 实例名称 + * "DBVersion" => (string) 实例的版本,包括postgresql-10.4,postgresql-13.4 + * "InstanceMode" => (string) normal/ha/readonly,普通/高可用/只读从库 + * "State" => (string) 实例状态标记 Initing:初始化中,InitFailed:安装失败,Starting:启动中, Running:运行,Stopping:关闭中,Stopped:已关闭,Deleted: 已删除,Upgrading: 升级中 ,Promoting:提升为主库进行中,Recovering:恢复中,RecoverFailed:恢复失败,StartFailed:启动失败,ShutdownFailed:关闭失败,Deleting:删除中,DeleteFailed:删除失败 + * "MachineType" => (string) 机器规格,格式为nCmG,n代表cpu核数,m代表内存大小(GB) + * "VPCID" => (string) VPC的ID + * "SubnetID" => (string) 子网ID + * "CreateTime" => (integer) DB实例创建时间,采用UTC计时时间戳 + * "ExpiredTime" => (integer) DB实例过期时间,采用UTC计时时间戳 + * "IP" => (string) DB实例ip + * "Remark" => (string) 备注 + * ] + * ] + * ] + * ] + * ] + * + * @return ListUPgSQLInstanceResponse + * @throws UCloudException + */ + public function listUPgSQLInstance(ListUPgSQLInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUPgSQLInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListUPgSQLLog - 获取数据库日志 + * + * See also: https://docs.ucloud.cn/api/udbpostgresql-api/list_u_pg_sql_log + * + * 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) + * "BeginTime" => (integer) 查询的日志开始的时间戳 + * "EndTime" => (integer) 查询日志的结束时间戳 + * "InstanceID" => (string) 资源ID + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) 数据库日志信息列表[ + * [ + * "BeginTime" => (integer) + * "EndTime" => (integer) + * "Name" => (string) + * "Size" => (integer) + * ] + * ] + * ] + * + * @return ListUPgSQLLogResponse + * @throws UCloudException + */ + public function listUPgSQLLog(ListUPgSQLLogRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUPgSQLLogResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListUPgSQLMachineType - 获取UPgSQL支持机器类型列表 + * + * See also: https://docs.ucloud.cn/api/udbpostgresql-api/list_u_pg_sql_machine_type + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * ] + * + * Outputs: + * + * $outputs = [ + * "DataSet" => (array) [ + * [ + * "ID" => (string) 机器类型ID + * "Description" => (string) 格式为nCmG,n代表cpu核数,m代表内存大小(GB) + * "Cpu" => (integer) cpu核数 + * "Memory" => (integer) 内存用量(GB) + * "Os" => (string) 机器类型,N/O + * ] + * ] + * ] + * + * @return ListUPgSQLMachineTypeResponse + * @throws UCloudException + */ + public function listUPgSQLMachineType(ListUPgSQLMachineTypeRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUPgSQLMachineTypeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListUPgSQLParamTemplate - 获取可用参数模板列表 + * + * See also: https://docs.ucloud.cn/api/udbpostgresql-api/list_u_pg_sql_param_template + * + * 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,100 + * "Count" => (integer) 总数 + * ] + * + * Outputs: + * + * $outputs = [ + * "Data" => (array) 参数模板信息[ + * [ + * "GroupID" => (integer) 参数模板ID + * "GroupName" => (string) 参数模板名称 + * "DBVersion" => (string) 应用的DB版本 + * "Description" => (string) 描述信息 + * "Modifiable" => (boolean) 是否可以修改 + * "ParamGroupTypeName" => (string) 模板组类型名称 + * ] + * ] + * ] + * + * @return ListUPgSQLParamTemplateResponse + * @throws UCloudException + */ + public function listUPgSQLParamTemplate(ListUPgSQLParamTemplateRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUPgSQLParamTemplateResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * ListUPgSQLVersion - 获取UPgSQL支持版本列表 + * + * See also: https://docs.ucloud.cn/api/udbpostgresql-api/list_u_pg_sql_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 = [ + * "DataSet" => (array) postgresql版本信息[ + * [ + * "DBVersion" => (string) PgSQL版本 + * "Available" => (string) 2位二进制控制是否开放单点和高可用,前一位控制单点是否开放,后一位控制高可用,例如"01"代表只开放高可用,"10"代表只开放单点,"11"代表全开放 + * ] + * ] + * ] + * + * @return ListUPgSQLVersionResponse + * @throws UCloudException + */ + public function listUPgSQLVersion(ListUPgSQLVersionRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUPgSQLVersionResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * RestartUPgSQLInstance - 重启PG实例 + * + * See also: https://docs.ucloud.cn/api/udbpostgresql-api/restart_u_pg_sql_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 + * "RestartHost" => (boolean) 是否一并重启主机 + * "ForceToRestart" => (boolean) 是否强制重启 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return RestartUPgSQLInstanceResponse + * @throws UCloudException + */ + public function restartUPgSQLInstance(RestartUPgSQLInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new RestartUPgSQLInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * StartUPgSQLInstance - 启动 PG实例 + * + * See also: https://docs.ucloud.cn/api/udbpostgresql-api/start_u_pg_sql_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 StartUPgSQLInstanceResponse + * @throws UCloudException + */ + public function startUPgSQLInstance(StartUPgSQLInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new StartUPgSQLInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * StopUPgSQLCreatingReadonly - 停止创建从库 + * + * See also: https://docs.ucloud.cn/api/udbpostgresql-api/stop_u_pg_sql_creating_readonly + * + * 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) 停止创建从库 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return StopUPgSQLCreatingReadonlyResponse + * @throws UCloudException + */ + public function stopUPgSQLCreatingReadonly(StopUPgSQLCreatingReadonlyRequest $request = null) + { + $resp = $this->invoke($request); + return new StopUPgSQLCreatingReadonlyResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * StopUPgSQLInstance - 关闭PG实例 + * + * See also: https://docs.ucloud.cn/api/udbpostgresql-api/stop_u_pg_sql_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 + * "StopHost" => (boolean) 是否将主机一并关闭 + * "ForceToStop" => (boolean) 是否强制关闭 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return StopUPgSQLInstanceResponse + * @throws UCloudException + */ + public function stopUPgSQLInstance(StopUPgSQLInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new StopUPgSQLInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateUPgSQLAttribute - 更新数据库属性 + * + * See also: https://docs.ucloud.cn/api/udbpostgresql-api/update_u_pg_sql_attribute + * + * 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) DB实例Id + * "Name" => (string) 新的db名字(不能为空字符串) + * "Remark" => (string) 新的备注信息 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return UpdateUPgSQLAttributeResponse + * @throws UCloudException + */ + public function updateUPgSQLAttribute(UpdateUPgSQLAttributeRequest $request = null) + { + $resp = $this->invoke($request); + return new UpdateUPgSQLAttributeResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateUPgSQLBackupStrategy - 修改备份策略 + * + * See also: https://docs.ucloud.cn/api/udbpostgresql-api/update_u_pg_sql_backup_strategy + * + * 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) DB实例Id + * "BackupTimeRange" => (string) 自动备份预计开始时间范围(00:00~23:59),例如:(3:00~4:00) + * "BackupWeek" => (string) 自动备份预期星期几(1~7)开始。默认1,2,3,4,5,6,7(星期一到星期日) + * "BackupMethod" => (string) 选择默认的备份方式 + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return UpdateUPgSQLBackupStrategyResponse + * @throws UCloudException + */ + public function updateUPgSQLBackupStrategy(UpdateUPgSQLBackupStrategyRequest $request = null) + { + $resp = $this->invoke($request); + return new UpdateUPgSQLBackupStrategyResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpdateUPgSQLPassword - 更新数据库用户密码 + * + * See also: https://docs.ucloud.cn/api/udbpostgresql-api/update_u_pg_sql_password + * + * Arguments: + * + * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "InstanceID" => (string) DB实例Id + * "Password" => (string) 新的db用户密码 + * "Name" => (string) 数据库用户的名称。默认是root + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return UpdateUPgSQLPasswordResponse + * @throws UCloudException + */ + public function updateUPgSQLPassword(UpdateUPgSQLPasswordRequest $request = null) + { + $resp = $this->invoke($request); + return new UpdateUPgSQLPasswordResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UpgradeUPgSQLInstance - 硬件规格升降级 + * + * See also: https://docs.ucloud.cn/api/udbpostgresql-api/upgrade_u_pg_sql_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 + * "DiskSpace" => (integer) 磁盘空间(GB) + * "MachineType" => (string) 机器配置类型 + * "InstanceMode" => (string) 数据库类型(ha:高可用类型,normal:普通类型,readonly:从库) + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return UpgradeUPgSQLInstanceResponse + * @throws UCloudException + */ + public function upgradeUPgSQLInstance(UpgradeUPgSQLInstanceRequest $request = null) + { + $resp = $this->invoke($request); + return new UpgradeUPgSQLInstanceResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * UploadUPgSQLParamTemplate - 上传参数模板 + * + * See also: https://docs.ucloud.cn/api/udbpostgresql-api/upload_u_pg_sql_param_template + * + * 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) + * "GroupName" => (string) 模板名称 + * "DBVersion" => (string) 应用的DB版本 + * "Content" => (string) base64编码过的 + * "Description" => (string) 模板描述 + * "ParamGroupType" => (string) 版本 + * ] + * + * Outputs: + * + * $outputs = [ + * "GroupID" => (integer) 生成的模板ID + * ] + * + * @return UploadUPgSQLParamTemplateResponse + * @throws UCloudException + */ + public function uploadUPgSQLParamTemplate(UploadUPgSQLParamTemplateRequest $request = null) + { + $resp = $this->invoke($request); + return new UploadUPgSQLParamTemplateResponse($resp->toArray(), $resp->getRequestId()); + } +}