diff --git a/CHANGELOG.md b/CHANGELOG.md index b1ea3ad47..d43251a3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,327 @@ +# 3.1.111 2024-08-15 + +### HuaweiCloud SDK AOS + +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **EstimateExecutionPlanPrice** + - changes of response param + - `+ items.module_address` + +### HuaweiCloud SDK CCE + +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **ShowNodePool** + - changes of response param + - `+ status.scaleGroupStatuses` + - `* spec.extensionScaleGroups: object -> list` + - **UpdateNodePool** + - changes of request param + - `* spec.extensionScaleGroups: object -> list` + - changes of response param + - `+ status.scaleGroupStatuses` + - `* spec.extensionScaleGroups: object -> list` + - **DeleteNodePool** + - changes of response param + - `+ status.scaleGroupStatuses` + - `* spec.extensionScaleGroups: object -> list` + - **CreateNodePool** + - changes of request param + - `+ status.scaleGroupStatuses` + - `* spec.extensionScaleGroups: object -> list` + - changes of response param + - `+ status.scaleGroupStatuses` + - `* spec.extensionScaleGroups: object -> list` + - **ListNodePools** + - changes of response param + - `+ items.status.scaleGroupStatuses` + - `* items.spec.extensionScaleGroups: object -> list` + +### HuaweiCloud SDK CDM + +- _Features_ + - Support the following APIs: + - `ShowAvailabilityZones` + - `ShowDatastores` + - `ShowFlavors` + - `ShowFlavorDetail` + - `ShowEnterpriseProjects` + - `ShowClusterEnterpriseProjects` + - `ShowInstanceDetail` + - `ModifyCluster` +- _Bug Fix_ + - None +- _Change_ + - None + +### HuaweiCloud SDK Config + +- _Features_ + - Support the API `CollectRemediationExecutionStatusesSummary` +- _Bug Fix_ + - None +- _Change_ + - None + +### HuaweiCloud SDK DCS + +- _Features_ + - Support the API `BatchRestartOnlineMigrationTasks` +- _Bug Fix_ + - None +- _Change_ + - **BatchStopMigrationTasks** + - changes of response param + - `+ migration_tasks.error_msg` + - `+ migration_tasks.error_code` + +### HuaweiCloud SDK DLI + +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **ShowQueue** + - changes of response param + - `+ default_spark_version` + - `+ support_hetu_engine_versions` + - `+ support_spark_versions` + - `+ default_hetu_engine_version` + - `+ support_flink_jar_versions` + - `+ support_flink_sql_versions` + - `+ default_flink_sql_version` + - `+ default_flink_jar_version` + - **ListQueues** + - changes of response param + - `+ queues.support_spark_versions` + - `+ queues.default_spark_version` + - `+ queues.support_hetu_engine_versions` + - `+ queues.default_hetu_engine_version` + - `+ queues.support_flink_sql_versions` + - `+ queues.default_flink_sql_version` + - `+ queues.support_flink_jar_versions` + - `+ queues.default_flink_jar_version` + +### HuaweiCloud SDK EIP + +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **UpdatePrePaidBandwidth** + - changes of request param + - `+ extendParam.period_type` + - `+ extendParam.period_num` + - **ListEipBandwidths** + - changes of response param + - `* eip_bandwidths.tenant_id: uuid -> string` + - **ListProjectGeipBindings** + - changes of response param + - `* geip_bindings.vnic.vni: int32 -> string` + +### HuaweiCloud SDK ELB + +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **ListAvailabilityZones** + - changes of response param + - `+ spec_code` + - **ListFlavors** + - changes of request param + - `- loadbalancer_type` + - **ShowLoadBalancer** + - changes of response param + - `+ loadbalancer.gw_flavor_id` + - `+ loadbalancer.loadbalancer_type` + - **UpdateLoadBalancer** + - changes of response param + - `+ loadbalancer.gw_flavor_id` + - `+ loadbalancer.loadbalancer_type` + - **BatchAddAvailableZones** + - changes of response param + - `+ loadbalancer.gw_flavor_id` + - `+ loadbalancer.loadbalancer_type` + - **BatchRemoveAvailableZones** + - changes of response param + - `+ loadbalancer.gw_flavor_id` + - `+ loadbalancer.loadbalancer_type` + - **ListLoadBalancers** + - changes of response param + - `+ loadbalancers.gw_flavor_id` + - `+ loadbalancers.loadbalancer_type` + - **CreateLoadBalancer** + - changes of response param + - `+ loadbalancer.gw_flavor_id` + - `+ loadbalancer.loadbalancer_type` + +### HuaweiCloud SDK GaussDBforopenGauss + +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **CreateInstance** + - changes of request param + - `+ ha.instance_mode` + - **ShowBatchUpgradeCandidateVersions** + - changes of response param + - `+ hotfix_rollback_infos` + +### HuaweiCloud SDK IMS + +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **ListImages** + - changes of request param + - `+ visibility: enum value [shared]` + - changes of response param + - `+ images.visibility: enum value [shared]` + - **UpdateImage** + - changes of response param + - `+ visibility: enum value [shared]` + +### HuaweiCloud SDK LTS + +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **ListLogs** + - changes of request param + - `+ query` + - `+ is_analysis_query` + - changes of response param + - `+ analysisLogs` + +### HuaweiCloud SDK OCR + +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **RecognizeTransportationLicense** + - changes of response param + - `+ result.expiry_date` + - `+ result.review_expiry_date` + - `+ result.assessed_technical_level` + +### HuaweiCloud SDK ServiceStage + +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **UpdateComponentAction** + - changes of request param + - `+ action: enum value [rollback_current]` + - **ShowComponentInfo** + - changes of response param + - `+ swimlane_id` + - `+ deploy_strategy.gray_release.replica_surge_mode` + - `+ deploy_strategy.gray_release.deployment_mode` + - `+ deploy_strategy.gray_release.rule_match_mode` + - `+ deploy_strategy.gray_release.rules` + - `+ deploy_strategy.gray_release.type: enum value [WEIGHT,CONTENT]` + - `- deploy_strategy.gray_release.type: enum value [weight,content]` + - **ModifyComponent** + - changes of request param + - `+ swimlane_id` + - `+ deploy_strategy.gray_release.replica_surge_mode` + - `+ deploy_strategy.gray_release.deployment_mode` + - `+ deploy_strategy.gray_release.rule_match_mode` + - `+ deploy_strategy.gray_release.rules` + - `+ deploy_strategy.gray_release.type: enum value [WEIGHT,CONTENT]` + - `- deploy_strategy.gray_release.type: enum value [weight,content]` + - **CreateComponent** + - changes of request param + - `+ swimlane_id` + - `+ deploy_strategy.gray_release.replica_surge_mode` + - `+ deploy_strategy.gray_release.deployment_mode` + - `+ deploy_strategy.gray_release.rule_match_mode` + - `+ deploy_strategy.gray_release.rules` + - `+ deploy_strategy.gray_release.type: enum value [WEIGHT,CONTENT]` + - `- deploy_strategy.gray_release.type: enum value [weight,content]` + +### HuaweiCloud SDK SMS + +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **ShowTask** + - changes of response param + - `- exist_server` + - **UpdateTask** + - changes of request param + - `+ exist_server` + +### HuaweiCloud SDK VPCEP + +- _Features_ + - None +- _Bug Fix_ + - None +- _Change_ + - **ListEndpointInfoDetails** + - changes of response param + - `+ policy_statement.Effect: enum value [Deny]` + - `- policy_statement.Effect: enum value [Refuse]` + - **UpdateEndpointWhite** + - changes of response param + - `+ policy_statement.Effect: enum value [Deny]` + - `- policy_statement.Effect: enum value [Refuse]` + - **UpdateEndpointPolicy** + - changes of request param + - `+ policy_statement.Effect: enum value [Deny]` + - `- policy_statement.Effect: enum value [Refuse]` + - changes of response param + - `+ policy_statement.Effect: enum value [Deny]` + - `- policy_statement.Effect: enum value [Refuse]` + - **DeleteEndpointPolicy** + - changes of response param + - `+ policy_statement.Effect: enum value [Deny]` + - `- policy_statement.Effect: enum value [Refuse]` + - **CreateEndpoint** + - changes of request param + - `+ policy_statement.Effect: enum value [Deny]` + - `- policy_statement.Effect: enum value [Refuse]` + - changes of response param + - `+ policy_statement.Effect: enum value [Deny]` + - `- policy_statement.Effect: enum value [Refuse]` + - **ListEndpoints** + - changes of response param + - `+ endpoints.policy_statement.Effect: enum value [Deny]` + - `- endpoints.policy_statement.Effect: enum value [Refuse]` + +### HuaweiCloud SDK VPN + +- _Features_ + - Support the API `UpdatePostpaidVgwSpecification` +- _Bug Fix_ + - None +- _Change_ + - None + # 3.1.110 2024-08-08 ### HuaweiCloud SDK Config diff --git a/CHANGELOG_CN.md b/CHANGELOG_CN.md index a15649d7d..62c40e7e4 100644 --- a/CHANGELOG_CN.md +++ b/CHANGELOG_CN.md @@ -1,3 +1,327 @@ +# 3.1.111 2024-08-15 + +### HuaweiCloud SDK AOS + +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **EstimateExecutionPlanPrice** + - 响应参数变更 + - `+ items.module_address` + +### HuaweiCloud SDK CCE + +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **ShowNodePool** + - 响应参数变更 + - `+ status.scaleGroupStatuses` + - `* spec.extensionScaleGroups: object -> list` + - **UpdateNodePool** + - 请求参数变更 + - `* spec.extensionScaleGroups: object -> list` + - 响应参数变更 + - `+ status.scaleGroupStatuses` + - `* spec.extensionScaleGroups: object -> list` + - **DeleteNodePool** + - 响应参数变更 + - `+ status.scaleGroupStatuses` + - `* spec.extensionScaleGroups: object -> list` + - **CreateNodePool** + - 请求参数变更 + - `+ status.scaleGroupStatuses` + - `* spec.extensionScaleGroups: object -> list` + - 响应参数变更 + - `+ status.scaleGroupStatuses` + - `* spec.extensionScaleGroups: object -> list` + - **ListNodePools** + - 响应参数变更 + - `+ items.status.scaleGroupStatuses` + - `* items.spec.extensionScaleGroups: object -> list` + +### HuaweiCloud SDK CDM + +- _新增特性_ + - 支持以下接口: + - `ShowAvailabilityZones` + - `ShowDatastores` + - `ShowFlavors` + - `ShowFlavorDetail` + - `ShowEnterpriseProjects` + - `ShowClusterEnterpriseProjects` + - `ShowInstanceDetail` + - `ModifyCluster` +- _解决问题_ + - 无 +- _特性变更_ + - 无 + +### HuaweiCloud SDK Config + +- _新增特性_ + - 支持接口`CollectRemediationExecutionStatusesSummary` +- _解决问题_ + - 无 +- _特性变更_ + - 无 + +### HuaweiCloud SDK DCS + +- _新增特性_ + - 支持接口`BatchRestartOnlineMigrationTasks` +- _解决问题_ + - 无 +- _特性变更_ + - **BatchStopMigrationTasks** + - 响应参数变更 + - `+ migration_tasks.error_msg` + - `+ migration_tasks.error_code` + +### HuaweiCloud SDK DLI + +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **ShowQueue** + - 响应参数变更 + - `+ default_spark_version` + - `+ support_hetu_engine_versions` + - `+ support_spark_versions` + - `+ default_hetu_engine_version` + - `+ support_flink_jar_versions` + - `+ support_flink_sql_versions` + - `+ default_flink_sql_version` + - `+ default_flink_jar_version` + - **ListQueues** + - 响应参数变更 + - `+ queues.support_spark_versions` + - `+ queues.default_spark_version` + - `+ queues.support_hetu_engine_versions` + - `+ queues.default_hetu_engine_version` + - `+ queues.support_flink_sql_versions` + - `+ queues.default_flink_sql_version` + - `+ queues.support_flink_jar_versions` + - `+ queues.default_flink_jar_version` + +### HuaweiCloud SDK EIP + +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **UpdatePrePaidBandwidth** + - 请求参数变更 + - `+ extendParam.period_type` + - `+ extendParam.period_num` + - **ListEipBandwidths** + - 响应参数变更 + - `* eip_bandwidths.tenant_id: uuid -> string` + - **ListProjectGeipBindings** + - 响应参数变更 + - `* geip_bindings.vnic.vni: int32 -> string` + +### HuaweiCloud SDK ELB + +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **ListAvailabilityZones** + - 响应参数变更 + - `+ spec_code` + - **ListFlavors** + - 请求参数变更 + - `- loadbalancer_type` + - **ShowLoadBalancer** + - 响应参数变更 + - `+ loadbalancer.gw_flavor_id` + - `+ loadbalancer.loadbalancer_type` + - **UpdateLoadBalancer** + - 响应参数变更 + - `+ loadbalancer.gw_flavor_id` + - `+ loadbalancer.loadbalancer_type` + - **BatchAddAvailableZones** + - 响应参数变更 + - `+ loadbalancer.gw_flavor_id` + - `+ loadbalancer.loadbalancer_type` + - **BatchRemoveAvailableZones** + - 响应参数变更 + - `+ loadbalancer.gw_flavor_id` + - `+ loadbalancer.loadbalancer_type` + - **ListLoadBalancers** + - 响应参数变更 + - `+ loadbalancers.gw_flavor_id` + - `+ loadbalancers.loadbalancer_type` + - **CreateLoadBalancer** + - 响应参数变更 + - `+ loadbalancer.gw_flavor_id` + - `+ loadbalancer.loadbalancer_type` + +### HuaweiCloud SDK GaussDBforopenGauss + +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **CreateInstance** + - 请求参数变更 + - `+ ha.instance_mode` + - **ShowBatchUpgradeCandidateVersions** + - 响应参数变更 + - `+ hotfix_rollback_infos` + +### HuaweiCloud SDK IMS + +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **ListImages** + - 请求参数变更 + - `+ visibility: enum value [shared]` + - 响应参数变更 + - `+ images.visibility: enum value [shared]` + - **UpdateImage** + - 响应参数变更 + - `+ visibility: enum value [shared]` + +### HuaweiCloud SDK LTS + +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **ListLogs** + - 请求参数变更 + - `+ query` + - `+ is_analysis_query` + - 响应参数变更 + - `+ analysisLogs` + +### HuaweiCloud SDK OCR + +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **RecognizeTransportationLicense** + - 响应参数变更 + - `+ result.expiry_date` + - `+ result.review_expiry_date` + - `+ result.assessed_technical_level` + +### HuaweiCloud SDK ServiceStage + +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **UpdateComponentAction** + - 请求参数变更 + - `+ action: enum value [rollback_current]` + - **ShowComponentInfo** + - 响应参数变更 + - `+ swimlane_id` + - `+ deploy_strategy.gray_release.replica_surge_mode` + - `+ deploy_strategy.gray_release.deployment_mode` + - `+ deploy_strategy.gray_release.rule_match_mode` + - `+ deploy_strategy.gray_release.rules` + - `+ deploy_strategy.gray_release.type: enum value [WEIGHT,CONTENT]` + - `- deploy_strategy.gray_release.type: enum value [weight,content]` + - **ModifyComponent** + - 请求参数变更 + - `+ swimlane_id` + - `+ deploy_strategy.gray_release.replica_surge_mode` + - `+ deploy_strategy.gray_release.deployment_mode` + - `+ deploy_strategy.gray_release.rule_match_mode` + - `+ deploy_strategy.gray_release.rules` + - `+ deploy_strategy.gray_release.type: enum value [WEIGHT,CONTENT]` + - `- deploy_strategy.gray_release.type: enum value [weight,content]` + - **CreateComponent** + - 请求参数变更 + - `+ swimlane_id` + - `+ deploy_strategy.gray_release.replica_surge_mode` + - `+ deploy_strategy.gray_release.deployment_mode` + - `+ deploy_strategy.gray_release.rule_match_mode` + - `+ deploy_strategy.gray_release.rules` + - `+ deploy_strategy.gray_release.type: enum value [WEIGHT,CONTENT]` + - `- deploy_strategy.gray_release.type: enum value [weight,content]` + +### HuaweiCloud SDK SMS + +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **ShowTask** + - 响应参数变更 + - `- exist_server` + - **UpdateTask** + - 请求参数变更 + - `+ exist_server` + +### HuaweiCloud SDK VPCEP + +- _新增特性_ + - 无 +- _解决问题_ + - 无 +- _特性变更_ + - **ListEndpointInfoDetails** + - 响应参数变更 + - `+ policy_statement.Effect: enum value [Deny]` + - `- policy_statement.Effect: enum value [Refuse]` + - **UpdateEndpointWhite** + - 响应参数变更 + - `+ policy_statement.Effect: enum value [Deny]` + - `- policy_statement.Effect: enum value [Refuse]` + - **UpdateEndpointPolicy** + - 请求参数变更 + - `+ policy_statement.Effect: enum value [Deny]` + - `- policy_statement.Effect: enum value [Refuse]` + - 响应参数变更 + - `+ policy_statement.Effect: enum value [Deny]` + - `- policy_statement.Effect: enum value [Refuse]` + - **DeleteEndpointPolicy** + - 响应参数变更 + - `+ policy_statement.Effect: enum value [Deny]` + - `- policy_statement.Effect: enum value [Refuse]` + - **CreateEndpoint** + - 请求参数变更 + - `+ policy_statement.Effect: enum value [Deny]` + - `- policy_statement.Effect: enum value [Refuse]` + - 响应参数变更 + - `+ policy_statement.Effect: enum value [Deny]` + - `- policy_statement.Effect: enum value [Refuse]` + - **ListEndpoints** + - 响应参数变更 + - `+ endpoints.policy_statement.Effect: enum value [Deny]` + - `- endpoints.policy_statement.Effect: enum value [Refuse]` + +### HuaweiCloud SDK VPN + +- _新增特性_ + - 支持接口`UpdatePostpaidVgwSpecification` +- _解决问题_ + - 无 +- _特性变更_ + - 无 + # 3.1.110 2024-08-08 ### HuaweiCloud SDK Config diff --git a/VERSION b/VERSION index 579728d4d..308dc7bc1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.1.110 +3.1.111 diff --git a/all/package.json b/all/package.json index 07e23b5e1..371c735d7 100644 --- a/all/package.json +++ b/all/package.json @@ -1,105 +1,106 @@ { "name": "@huaweicloud/huaweicloud-sdk-all", - "version": "3.1.110", + "version": "3.1.111", "description": "Huawei Cloud SDK for Node.js includes all cloud services", "repository": { "type": "git", "url": "https://github.com/huaweicloud/huaweicloud-sdk-nodejs-v3" }, "dependencies": { - "@huaweicloud/huaweicloud-sdk-aad": "3.1.110", - "@huaweicloud/huaweicloud-sdk-antiddos": "3.1.110", - "@huaweicloud/huaweicloud-sdk-aom": "3.1.110", - "@huaweicloud/huaweicloud-sdk-aos": "3.1.110", - "@huaweicloud/huaweicloud-sdk-apig": "3.1.110", - "@huaweicloud/huaweicloud-sdk-as": "3.1.110", - "@huaweicloud/huaweicloud-sdk-bms": "3.1.110", - "@huaweicloud/huaweicloud-sdk-cbh": "3.1.110", - "@huaweicloud/huaweicloud-sdk-cbr": "3.1.110", - "@huaweicloud/huaweicloud-sdk-cc": "3.1.110", - "@huaweicloud/huaweicloud-sdk-cce": "3.1.110", - "@huaweicloud/huaweicloud-sdk-cdm": "3.1.110", - "@huaweicloud/huaweicloud-sdk-cdn": "3.1.110", - "@huaweicloud/huaweicloud-sdk-ces": "3.1.110", - "@huaweicloud/huaweicloud-sdk-cfw": "3.1.110", - "@huaweicloud/huaweicloud-sdk-cloudrtc": "3.1.110", - "@huaweicloud/huaweicloud-sdk-cloudtable": "3.1.110", - "@huaweicloud/huaweicloud-sdk-codeartsartifact": "3.1.110", - "@huaweicloud/huaweicloud-sdk-codeartsbuild": "3.1.110", - "@huaweicloud/huaweicloud-sdk-codeartsdeploy": "3.1.110", - "@huaweicloud/huaweicloud-sdk-codeartspipeline": "3.1.110", - "@huaweicloud/huaweicloud-sdk-config": "3.1.110", - "@huaweicloud/huaweicloud-sdk-cse": "3.1.110", - "@huaweicloud/huaweicloud-sdk-csms": "3.1.110", - "@huaweicloud/huaweicloud-sdk-css": "3.1.110", - "@huaweicloud/huaweicloud-sdk-cts": "3.1.110", - "@huaweicloud/huaweicloud-sdk-dataartsstudio": "3.1.110", - "@huaweicloud/huaweicloud-sdk-dbss": "3.1.110", - "@huaweicloud/huaweicloud-sdk-dc": "3.1.110", - "@huaweicloud/huaweicloud-sdk-dcs": "3.1.110", - "@huaweicloud/huaweicloud-sdk-dds": "3.1.110", - "@huaweicloud/huaweicloud-sdk-devstar": "3.1.110", - "@huaweicloud/huaweicloud-sdk-dli": "3.1.110", - "@huaweicloud/huaweicloud-sdk-dns": "3.1.110", - "@huaweicloud/huaweicloud-sdk-drs": "3.1.110", - "@huaweicloud/huaweicloud-sdk-dsc": "3.1.110", - "@huaweicloud/huaweicloud-sdk-dws": "3.1.110", - "@huaweicloud/huaweicloud-sdk-ecs": "3.1.110", - "@huaweicloud/huaweicloud-sdk-eip": "3.1.110", - "@huaweicloud/huaweicloud-sdk-elb": "3.1.110", - "@huaweicloud/huaweicloud-sdk-eps": "3.1.110", - "@huaweicloud/huaweicloud-sdk-er": "3.1.110", - "@huaweicloud/huaweicloud-sdk-evs": "3.1.110", - "@huaweicloud/huaweicloud-sdk-frs": "3.1.110", - "@huaweicloud/huaweicloud-sdk-functiongraph": "3.1.110", - "@huaweicloud/huaweicloud-sdk-ga": "3.1.110", - "@huaweicloud/huaweicloud-sdk-gaussdb": "3.1.110", - "@huaweicloud/huaweicloud-sdk-gaussdbfornosql": "3.1.110", - "@huaweicloud/huaweicloud-sdk-gaussdbforopengauss": "3.1.110", - "@huaweicloud/huaweicloud-sdk-ges": "3.1.110", - "@huaweicloud/huaweicloud-sdk-hss": "3.1.110", - "@huaweicloud/huaweicloud-sdk-iam": "3.1.110", - "@huaweicloud/huaweicloud-sdk-iamaccessanalyzer": "3.1.110", - "@huaweicloud/huaweicloud-sdk-image": "3.1.110", - "@huaweicloud/huaweicloud-sdk-ims": "3.1.110", - "@huaweicloud/huaweicloud-sdk-iotda": "3.1.110", - "@huaweicloud/huaweicloud-sdk-iotdm": "3.1.110", - "@huaweicloud/huaweicloud-sdk-ivs": "3.1.110", - "@huaweicloud/huaweicloud-sdk-kafka": "3.1.110", - "@huaweicloud/huaweicloud-sdk-kms": "3.1.110", - "@huaweicloud/huaweicloud-sdk-kps": "3.1.110", - "@huaweicloud/huaweicloud-sdk-live": "3.1.110", - "@huaweicloud/huaweicloud-sdk-lts": "3.1.110", - "@huaweicloud/huaweicloud-sdk-meeting": "3.1.110", - "@huaweicloud/huaweicloud-sdk-metastudio": "3.1.110", - "@huaweicloud/huaweicloud-sdk-moderation": "3.1.110", - "@huaweicloud/huaweicloud-sdk-mpc": "3.1.110", - "@huaweicloud/huaweicloud-sdk-mrs": "3.1.110", - "@huaweicloud/huaweicloud-sdk-msgsms": "3.1.110", - "@huaweicloud/huaweicloud-sdk-nat": "3.1.110", - "@huaweicloud/huaweicloud-sdk-ocr": "3.1.110", - "@huaweicloud/huaweicloud-sdk-oms": "3.1.110", - "@huaweicloud/huaweicloud-sdk-organizations": "3.1.110", - "@huaweicloud/huaweicloud-sdk-pangulargemodels": "3.1.110", - "@huaweicloud/huaweicloud-sdk-rabbitmq": "3.1.110", - "@huaweicloud/huaweicloud-sdk-ram": "3.1.110", - "@huaweicloud/huaweicloud-sdk-rds": "3.1.110", - "@huaweicloud/huaweicloud-sdk-rms": "3.1.110", - "@huaweicloud/huaweicloud-sdk-rocketmq": "3.1.110", - "@huaweicloud/huaweicloud-sdk-secmaster": "3.1.110", - "@huaweicloud/huaweicloud-sdk-servicestage": "3.1.110", - "@huaweicloud/huaweicloud-sdk-sfsturbo": "3.1.110", - "@huaweicloud/huaweicloud-sdk-sis": "3.1.110", - "@huaweicloud/huaweicloud-sdk-smn": "3.1.110", - "@huaweicloud/huaweicloud-sdk-sms": "3.1.110", - "@huaweicloud/huaweicloud-sdk-swr": "3.1.110", - "@huaweicloud/huaweicloud-sdk-tics": "3.1.110", - "@huaweicloud/huaweicloud-sdk-tms": "3.1.110", - "@huaweicloud/huaweicloud-sdk-vod": "3.1.110", - "@huaweicloud/huaweicloud-sdk-vpc": "3.1.110", - "@huaweicloud/huaweicloud-sdk-vpcep": "3.1.110", - "@huaweicloud/huaweicloud-sdk-vpn": "3.1.110", - "@huaweicloud/huaweicloud-sdk-waf": "3.1.110" + "@huaweicloud/huaweicloud-sdk-aad": "3.1.111", + "@huaweicloud/huaweicloud-sdk-antiddos": "3.1.111", + "@huaweicloud/huaweicloud-sdk-aom": "3.1.111", + "@huaweicloud/huaweicloud-sdk-aos": "3.1.111", + "@huaweicloud/huaweicloud-sdk-apig": "3.1.111", + "@huaweicloud/huaweicloud-sdk-as": "3.1.111", + "@huaweicloud/huaweicloud-sdk-bms": "3.1.111", + "@huaweicloud/huaweicloud-sdk-cbh": "3.1.111", + "@huaweicloud/huaweicloud-sdk-cbr": "3.1.111", + "@huaweicloud/huaweicloud-sdk-cc": "3.1.111", + "@huaweicloud/huaweicloud-sdk-cce": "3.1.111", + "@huaweicloud/huaweicloud-sdk-cdm": "3.1.111", + "@huaweicloud/huaweicloud-sdk-cdn": "3.1.111", + "@huaweicloud/huaweicloud-sdk-ces": "3.1.111", + "@huaweicloud/huaweicloud-sdk-cfw": "3.1.111", + "@huaweicloud/huaweicloud-sdk-cloudrtc": "3.1.111", + "@huaweicloud/huaweicloud-sdk-cloudtable": "3.1.111", + "@huaweicloud/huaweicloud-sdk-coc": "3.1.111", + "@huaweicloud/huaweicloud-sdk-codeartsartifact": "3.1.111", + "@huaweicloud/huaweicloud-sdk-codeartsbuild": "3.1.111", + "@huaweicloud/huaweicloud-sdk-codeartsdeploy": "3.1.111", + "@huaweicloud/huaweicloud-sdk-codeartspipeline": "3.1.111", + "@huaweicloud/huaweicloud-sdk-config": "3.1.111", + "@huaweicloud/huaweicloud-sdk-cse": "3.1.111", + "@huaweicloud/huaweicloud-sdk-csms": "3.1.111", + "@huaweicloud/huaweicloud-sdk-css": "3.1.111", + "@huaweicloud/huaweicloud-sdk-cts": "3.1.111", + "@huaweicloud/huaweicloud-sdk-dataartsstudio": "3.1.111", + "@huaweicloud/huaweicloud-sdk-dbss": "3.1.111", + "@huaweicloud/huaweicloud-sdk-dc": "3.1.111", + "@huaweicloud/huaweicloud-sdk-dcs": "3.1.111", + "@huaweicloud/huaweicloud-sdk-dds": "3.1.111", + "@huaweicloud/huaweicloud-sdk-devstar": "3.1.111", + "@huaweicloud/huaweicloud-sdk-dli": "3.1.111", + "@huaweicloud/huaweicloud-sdk-dns": "3.1.111", + "@huaweicloud/huaweicloud-sdk-drs": "3.1.111", + "@huaweicloud/huaweicloud-sdk-dsc": "3.1.111", + "@huaweicloud/huaweicloud-sdk-dws": "3.1.111", + "@huaweicloud/huaweicloud-sdk-ecs": "3.1.111", + "@huaweicloud/huaweicloud-sdk-eip": "3.1.111", + "@huaweicloud/huaweicloud-sdk-elb": "3.1.111", + "@huaweicloud/huaweicloud-sdk-eps": "3.1.111", + "@huaweicloud/huaweicloud-sdk-er": "3.1.111", + "@huaweicloud/huaweicloud-sdk-evs": "3.1.111", + "@huaweicloud/huaweicloud-sdk-frs": "3.1.111", + "@huaweicloud/huaweicloud-sdk-functiongraph": "3.1.111", + "@huaweicloud/huaweicloud-sdk-ga": "3.1.111", + "@huaweicloud/huaweicloud-sdk-gaussdb": "3.1.111", + "@huaweicloud/huaweicloud-sdk-gaussdbfornosql": "3.1.111", + "@huaweicloud/huaweicloud-sdk-gaussdbforopengauss": "3.1.111", + "@huaweicloud/huaweicloud-sdk-ges": "3.1.111", + "@huaweicloud/huaweicloud-sdk-hss": "3.1.111", + "@huaweicloud/huaweicloud-sdk-iam": "3.1.111", + "@huaweicloud/huaweicloud-sdk-iamaccessanalyzer": "3.1.111", + "@huaweicloud/huaweicloud-sdk-image": "3.1.111", + "@huaweicloud/huaweicloud-sdk-ims": "3.1.111", + "@huaweicloud/huaweicloud-sdk-iotda": "3.1.111", + "@huaweicloud/huaweicloud-sdk-iotdm": "3.1.111", + "@huaweicloud/huaweicloud-sdk-ivs": "3.1.111", + "@huaweicloud/huaweicloud-sdk-kafka": "3.1.111", + "@huaweicloud/huaweicloud-sdk-kms": "3.1.111", + "@huaweicloud/huaweicloud-sdk-kps": "3.1.111", + "@huaweicloud/huaweicloud-sdk-live": "3.1.111", + "@huaweicloud/huaweicloud-sdk-lts": "3.1.111", + "@huaweicloud/huaweicloud-sdk-meeting": "3.1.111", + "@huaweicloud/huaweicloud-sdk-metastudio": "3.1.111", + "@huaweicloud/huaweicloud-sdk-moderation": "3.1.111", + "@huaweicloud/huaweicloud-sdk-mpc": "3.1.111", + "@huaweicloud/huaweicloud-sdk-mrs": "3.1.111", + "@huaweicloud/huaweicloud-sdk-msgsms": "3.1.111", + "@huaweicloud/huaweicloud-sdk-nat": "3.1.111", + "@huaweicloud/huaweicloud-sdk-ocr": "3.1.111", + "@huaweicloud/huaweicloud-sdk-oms": "3.1.111", + "@huaweicloud/huaweicloud-sdk-organizations": "3.1.111", + "@huaweicloud/huaweicloud-sdk-pangulargemodels": "3.1.111", + "@huaweicloud/huaweicloud-sdk-rabbitmq": "3.1.111", + "@huaweicloud/huaweicloud-sdk-ram": "3.1.111", + "@huaweicloud/huaweicloud-sdk-rds": "3.1.111", + "@huaweicloud/huaweicloud-sdk-rms": "3.1.111", + "@huaweicloud/huaweicloud-sdk-rocketmq": "3.1.111", + "@huaweicloud/huaweicloud-sdk-secmaster": "3.1.111", + "@huaweicloud/huaweicloud-sdk-servicestage": "3.1.111", + "@huaweicloud/huaweicloud-sdk-sfsturbo": "3.1.111", + "@huaweicloud/huaweicloud-sdk-sis": "3.1.111", + "@huaweicloud/huaweicloud-sdk-smn": "3.1.111", + "@huaweicloud/huaweicloud-sdk-sms": "3.1.111", + "@huaweicloud/huaweicloud-sdk-swr": "3.1.111", + "@huaweicloud/huaweicloud-sdk-tics": "3.1.111", + "@huaweicloud/huaweicloud-sdk-tms": "3.1.111", + "@huaweicloud/huaweicloud-sdk-vod": "3.1.111", + "@huaweicloud/huaweicloud-sdk-vpc": "3.1.111", + "@huaweicloud/huaweicloud-sdk-vpcep": "3.1.111", + "@huaweicloud/huaweicloud-sdk-vpn": "3.1.111", + "@huaweicloud/huaweicloud-sdk-waf": "3.1.111" }, "files": ["package.json"] } diff --git a/package.json b/package.json index 3add7cf81..39c11b1d0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "huaweicloud-sdk-nodejs-v3", - "version": "3.1.110", + "version": "3.1.111", "description": "Core code for Huaweicloud SDK for Node.js", "main": "index.js", "scripts": { diff --git a/services/aos/v1/AosClient.ts b/services/aos/v1/AosClient.ts index 1c3861939..117b14c90 100644 --- a/services/aos/v1/AosClient.ts +++ b/services/aos/v1/AosClient.ts @@ -662,7 +662,7 @@ export class AosClient { /** * 创建私有hook(CreatePrivateHook) * - * 创建一个带有初始默认版本的私有hook,创建私有hook的时候需要同时创建一个初始化默认版本,不允许空私有hook的创建。 + * 创建一个带有初始默认版本的私有hook,创建私有hook的时候需要同时创建一个初始化的默认版本,不允许空私有hook的创建。 * 设置配置(Configuration)后的私有hook才会在触发资源栈部署时生效,资源栈使用私有hook的默认版本。若创建私有hook时未指定配置项,则该私有hook在资源栈部署时不生效,后续可通过UpdatePrivateHook API更新配置。 * * 支持hook策略模板检验的资源栈服务API: * DeployStack @@ -670,9 +670,9 @@ export class AosClient { * * 创建私有hook时指定的版本为初始默认版本。 * * 如果同名的私有hook在当前domain_id+region下已经存在,则会返回409。 * * 私有hook版本号遵循语义化版本号(Semantic Version),为用户自定义。 - * * 资源编排服务只会对私有hook进行浅校验,如文件大小。不进行策略文件语法类校验。若语法类存在错误,则会在hook策略校验生效时报错。 + * * 资源编排服务会对私有hook进行校验,如文件大小,策略文件语法校验等。若存在错误,则会创建失败。 * * 当前仅支持部署资源前的检测,不支持部署资源过程中的检测。如果通过了部署资源前的检测,资源栈则会继续部署资源。反之会停止部署资源,并记录资源栈事件(stack events)。 - * * 仅支持OPA开源引擎识别的,以rego(https://www.openpolicyagent.org/docs/latest/policy-language/)语言编写的策略模板(用户可以通过policy_uri或policy_body给与策略文件内容)。 + * * 仅支持OPA开源引擎识别的,以Rego(https://www.openpolicyagent.org/docs/latest/policy-language/)语言编写的策略模板(用户可以通过policy_uri或policy_body给与策略文件内容)。 * * 策略模板中的决策结果使用object类型的hook_result,hook_result所在包的包名必须使用policy。hook_result格式如下: * ``` * hook_result := { @@ -721,7 +721,7 @@ export class AosClient { * 创建私有hook版本,创建私有hook版本后需要调用UpdatePrivateHook API设置为默认版本才能生效。 * * 版本号遵循语义化版本号(Semantic Version),为用户自定义。 * * 若hook_name和hook_id同时存在,则资源编排服务会检查是否两个匹配,如果不匹配则会返回400。 - * * 资源编排服务只会对私有hook进行浅校验,如文件大小。不进行策略文件语法类校验。若语法类存在错误,则会在hook策略校验生效时报错。 + * * 资源编排服务会对私有hook进行校验,如文件大小,策略文件语法校验等。若存在错误,则会创建失败。 * * Please refer to HUAWEI cloud API Explorer for details. * @@ -823,16 +823,16 @@ export class AosClient { } /** - * 获取私有hook版本元数据(ShowPrivateHookVersionMetadata) + * 获取私有hook版本的元数据(ShowPrivateHookVersionMetadata) * - * 获取当前私有hook对应的版本的元数据信息 + * 获取当前私有hook对应版本的元数据信息 * * * 具体返回的信息见ShowPrivateHookVersionMetadataResponseBody。 * * 如果hook_name和hook_id同时存在,则资源编排服务会检查是否两个匹配,如果不匹配则会返回400。 * * Please refer to HUAWEI cloud API Explorer for details. * - * @summary 获取私有hook版本元数据 + * @summary 获取私有hook版本的元数据 * @param {string} clientRequestId 用户指定的,对于此请求的唯一Id,用于定位某个请求,推荐使用UUID * @param {string} hookName 私有hook的名字。此名字在domain_id+region下应唯一,可以使用中文、大小写英文、数字、下划线、中划线。首字符需为中文或者英文,区分大小写。 推荐用户使用三段命名空间:{自定义hook名称}-{hook应用场景}-hook。 * @param {string} hookVersion 私有hook的版本号。版本号必须遵循语义化版本号(Semantic Version),为用户自定义。 @@ -2789,7 +2789,7 @@ export const ParamCreater = function () { /** * 创建私有hook(CreatePrivateHook) * - * 创建一个带有初始默认版本的私有hook,创建私有hook的时候需要同时创建一个初始化默认版本,不允许空私有hook的创建。 + * 创建一个带有初始默认版本的私有hook,创建私有hook的时候需要同时创建一个初始化的默认版本,不允许空私有hook的创建。 * 设置配置(Configuration)后的私有hook才会在触发资源栈部署时生效,资源栈使用私有hook的默认版本。若创建私有hook时未指定配置项,则该私有hook在资源栈部署时不生效,后续可通过UpdatePrivateHook API更新配置。 * * 支持hook策略模板检验的资源栈服务API: * DeployStack @@ -2797,9 +2797,9 @@ export const ParamCreater = function () { * * 创建私有hook时指定的版本为初始默认版本。 * * 如果同名的私有hook在当前domain_id+region下已经存在,则会返回409。 * * 私有hook版本号遵循语义化版本号(Semantic Version),为用户自定义。 - * * 资源编排服务只会对私有hook进行浅校验,如文件大小。不进行策略文件语法类校验。若语法类存在错误,则会在hook策略校验生效时报错。 + * * 资源编排服务会对私有hook进行校验,如文件大小,策略文件语法校验等。若存在错误,则会创建失败。 * * 当前仅支持部署资源前的检测,不支持部署资源过程中的检测。如果通过了部署资源前的检测,资源栈则会继续部署资源。反之会停止部署资源,并记录资源栈事件(stack events)。 - * * 仅支持OPA开源引擎识别的,以rego(https://www.openpolicyagent.org/docs/latest/policy-language/)语言编写的策略模板(用户可以通过policy_uri或policy_body给与策略文件内容)。 + * * 仅支持OPA开源引擎识别的,以Rego(https://www.openpolicyagent.org/docs/latest/policy-language/)语言编写的策略模板(用户可以通过policy_uri或policy_body给与策略文件内容)。 * * 策略模板中的决策结果使用object类型的hook_result,hook_result所在包的包名必须使用policy。hook_result格式如下: * ``` * hook_result := { @@ -2873,7 +2873,7 @@ export const ParamCreater = function () { * 创建私有hook版本,创建私有hook版本后需要调用UpdatePrivateHook API设置为默认版本才能生效。 * * 版本号遵循语义化版本号(Semantic Version),为用户自定义。 * * 若hook_name和hook_id同时存在,则资源编排服务会检查是否两个匹配,如果不匹配则会返回400。 - * * 资源编排服务只会对私有hook进行浅校验,如文件大小。不进行策略文件语法类校验。若语法类存在错误,则会在hook策略校验生效时报错。 + * * 资源编排服务会对私有hook进行校验,如文件大小,策略文件语法校验等。若存在错误,则会创建失败。 * * Please refer to HUAWEI cloud API Explorer for details. */ @@ -3106,9 +3106,9 @@ export const ParamCreater = function () { }, /** - * 获取私有hook版本元数据(ShowPrivateHookVersionMetadata) + * 获取私有hook版本的元数据(ShowPrivateHookVersionMetadata) * - * 获取当前私有hook对应的版本的元数据信息 + * 获取当前私有hook对应版本的元数据信息 * * * 具体返回的信息见ShowPrivateHookVersionMetadataResponseBody。 * * 如果hook_name和hook_id同时存在,则资源编排服务会检查是否两个匹配,如果不匹配则会返回400。 diff --git a/services/aos/v1/model/ItemsResponse.ts b/services/aos/v1/model/ItemsResponse.ts index a9f3fa815..dfe201478 100644 --- a/services/aos/v1/model/ItemsResponse.ts +++ b/services/aos/v1/model/ItemsResponse.ts @@ -8,6 +8,7 @@ export class ItemsResponse { private 'resource_type'?: string; private 'resource_name'?: string; public index?: string; + private 'module_address'?: string; public supported?: boolean; private 'unsupported_message'?: string; private 'resource_price'?: Array; @@ -37,6 +38,16 @@ export class ItemsResponse { this['index'] = index; return this; } + public withModuleAddress(moduleAddress: string): ItemsResponse { + this['module_address'] = moduleAddress; + return this; + } + public set moduleAddress(moduleAddress: string | undefined) { + this['module_address'] = moduleAddress; + } + public get moduleAddress(): string | undefined { + return this['module_address']; + } public withSupported(supported: boolean): ItemsResponse { this['supported'] = supported; return this; diff --git a/services/cce/v3/CceClient.ts b/services/cce/v3/CceClient.ts index 03a6dca07..a37085ada 100644 --- a/services/cce/v3/CceClient.ts +++ b/services/cce/v3/CceClient.ts @@ -358,6 +358,9 @@ import { RollbackAutopilotAddonInstanceResponse } from './model/RollbackAutopilo import { Runtime } from './model/Runtime'; import { RuntimeConfig } from './model/RuntimeConfig'; import { ScaleGroupAutoscaling } from './model/ScaleGroupAutoscaling'; +import { ScaleGroupStatus } from './model/ScaleGroupStatus'; +import { ScaleGroupStatusExistingNodeCount } from './model/ScaleGroupStatusExistingNodeCount'; +import { ScaleGroupStatusUpcomingNodeCount } from './model/ScaleGroupStatusUpcomingNodeCount'; import { ScaleNodePoolOptions } from './model/ScaleNodePoolOptions'; import { ScaleNodePoolRequest } from './model/ScaleNodePoolRequest'; import { ScaleNodePoolRequestBody } from './model/ScaleNodePoolRequestBody'; diff --git a/services/cce/v3/CceRegion.ts b/services/cce/v3/CceRegion.ts index 303f659bc..6da4efdf3 100644 --- a/services/cce/v3/CceRegion.ts +++ b/services/cce/v3/CceRegion.ts @@ -36,6 +36,7 @@ export class CceRegion { public static ME_EAST_1 = new Region("me-east-1", ["https://cce.me-east-1.myhuaweicloud.com"]); public static CN_EAST_4 = new Region("cn-east-4", ["https://cce.cn-east-4.myhuaweicloud.com"]); public static AF_NORTH_1 = new Region("af-north-1", ["https://cce.af-north-1.myhuaweicloud.com"]); + public static CN_EAST_5 = new Region("cn-east-5", ["https://cce.cn-east-5.myhuaweicloud.com"]); private static REGION_MAP: RegionMap = { @@ -68,7 +69,8 @@ export class CceRegion { "ru-moscow-1":CceRegion.RU_MOSCOW_1, "me-east-1":CceRegion.ME_EAST_1, "cn-east-4":CceRegion.CN_EAST_4, - "af-north-1":CceRegion.AF_NORTH_1 + "af-north-1":CceRegion.AF_NORTH_1, + "cn-east-5":CceRegion.CN_EAST_5 }; public static valueOf(regionId: string) { diff --git a/services/cce/v3/model/CreateNodePoolStatus.ts b/services/cce/v3/model/CreateNodePoolStatus.ts index b75178d60..d348ccf2f 100644 --- a/services/cce/v3/model/CreateNodePoolStatus.ts +++ b/services/cce/v3/model/CreateNodePoolStatus.ts @@ -1,4 +1,5 @@ import { NodePoolCondition } from './NodePoolCondition'; +import { ScaleGroupStatus } from './ScaleGroupStatus'; export class CreateNodePoolStatus { @@ -7,6 +8,7 @@ export class CreateNodePoolStatus { public deletingNode?: number; public phase?: CreateNodePoolStatusPhaseEnum | string; public conditions?: Array; + public scaleGroupStatuses?: Array; public constructor() { } public withCurrentNode(currentNode: number): CreateNodePoolStatus { @@ -29,6 +31,10 @@ export class CreateNodePoolStatus { this['conditions'] = conditions; return this; } + public withScaleGroupStatuses(scaleGroupStatuses: Array): CreateNodePoolStatus { + this['scaleGroupStatuses'] = scaleGroupStatuses; + return this; + } } /** diff --git a/services/cce/v3/model/DeleteNodePoolStatus.ts b/services/cce/v3/model/DeleteNodePoolStatus.ts index ea2a4b803..e97e78bd7 100644 --- a/services/cce/v3/model/DeleteNodePoolStatus.ts +++ b/services/cce/v3/model/DeleteNodePoolStatus.ts @@ -1,4 +1,5 @@ import { NodePoolCondition } from './NodePoolCondition'; +import { ScaleGroupStatus } from './ScaleGroupStatus'; export class DeleteNodePoolStatus { @@ -8,6 +9,7 @@ export class DeleteNodePoolStatus { public phase?: DeleteNodePoolStatusPhaseEnum | string; public jobId?: string; public conditions?: Array; + public scaleGroupStatuses?: Array; public constructor() { } public withCurrentNode(currentNode: number): DeleteNodePoolStatus { @@ -34,6 +36,10 @@ export class DeleteNodePoolStatus { this['conditions'] = conditions; return this; } + public withScaleGroupStatuses(scaleGroupStatuses: Array): DeleteNodePoolStatus { + this['scaleGroupStatuses'] = scaleGroupStatuses; + return this; + } } /** diff --git a/services/cce/v3/model/NodePoolSpec.ts b/services/cce/v3/model/NodePoolSpec.ts index 9f2cd6192..62e25909a 100644 --- a/services/cce/v3/model/NodePoolSpec.ts +++ b/services/cce/v3/model/NodePoolSpec.ts @@ -12,7 +12,7 @@ export class NodePoolSpec { public autoscaling?: NodePoolNodeAutoscaling; public nodeManagement?: NodeManagement; public podSecurityGroups?: Array; - public extensionScaleGroups?: ExtensionScaleGroup; + public extensionScaleGroups?: Array; public customSecurityGroups?: Array; public constructor(nodeTemplate?: NodeSpec) { this['nodeTemplate'] = nodeTemplate; @@ -41,7 +41,7 @@ export class NodePoolSpec { this['podSecurityGroups'] = podSecurityGroups; return this; } - public withExtensionScaleGroups(extensionScaleGroups: ExtensionScaleGroup): NodePoolSpec { + public withExtensionScaleGroups(extensionScaleGroups: Array): NodePoolSpec { this['extensionScaleGroups'] = extensionScaleGroups; return this; } diff --git a/services/cce/v3/model/NodePoolSpecUpdate.ts b/services/cce/v3/model/NodePoolSpecUpdate.ts index 218aa5a5f..6627b1750 100644 --- a/services/cce/v3/model/NodePoolSpecUpdate.ts +++ b/services/cce/v3/model/NodePoolSpecUpdate.ts @@ -7,7 +7,7 @@ export class NodePoolSpecUpdate { public nodeTemplate?: NodeSpecUpdate; public initialNodeCount?: number; public autoscaling?: NodePoolNodeAutoscaling; - public extensionScaleGroups?: ExtensionScaleGroup; + public extensionScaleGroups?: Array; public constructor(nodeTemplate?: NodeSpecUpdate, initialNodeCount?: number, autoscaling?: NodePoolNodeAutoscaling) { this['nodeTemplate'] = nodeTemplate; this['initialNodeCount'] = initialNodeCount; @@ -25,7 +25,7 @@ export class NodePoolSpecUpdate { this['autoscaling'] = autoscaling; return this; } - public withExtensionScaleGroups(extensionScaleGroups: ExtensionScaleGroup): NodePoolSpecUpdate { + public withExtensionScaleGroups(extensionScaleGroups: Array): NodePoolSpecUpdate { this['extensionScaleGroups'] = extensionScaleGroups; return this; } diff --git a/services/cce/v3/model/NodePoolStatus.ts b/services/cce/v3/model/NodePoolStatus.ts index 98d65adad..0a0286fa8 100644 --- a/services/cce/v3/model/NodePoolStatus.ts +++ b/services/cce/v3/model/NodePoolStatus.ts @@ -1,4 +1,5 @@ import { NodePoolCondition } from './NodePoolCondition'; +import { ScaleGroupStatus } from './ScaleGroupStatus'; export class NodePoolStatus { @@ -8,6 +9,7 @@ export class NodePoolStatus { public phase?: NodePoolStatusPhaseEnum | string; public jobId?: string; public conditions?: Array; + public scaleGroupStatuses?: Array; public constructor() { } public withCurrentNode(currentNode: number): NodePoolStatus { @@ -34,6 +36,10 @@ export class NodePoolStatus { this['conditions'] = conditions; return this; } + public withScaleGroupStatuses(scaleGroupStatuses: Array): NodePoolStatus { + this['scaleGroupStatuses'] = scaleGroupStatuses; + return this; + } } /** diff --git a/services/cce/v3/model/ScaleGroupStatus.ts b/services/cce/v3/model/ScaleGroupStatus.ts new file mode 100644 index 000000000..f5d0b0be3 --- /dev/null +++ b/services/cce/v3/model/ScaleGroupStatus.ts @@ -0,0 +1,76 @@ +import { NodePoolCondition } from './NodePoolCondition'; +import { ScaleGroupStatusExistingNodeCount } from './ScaleGroupStatusExistingNodeCount'; +import { ScaleGroupStatusUpcomingNodeCount } from './ScaleGroupStatusUpcomingNodeCount'; + + +export class ScaleGroupStatus { + public name?: string; + public uid?: string; + public creationTimestamp?: string; + public updateTimestamp?: string; + public phase?: ScaleGroupStatusPhaseEnum | string; + public desiredNodeCount?: number; + public unpaidScaleNodeCount?: number; + public existingNodeCount?: ScaleGroupStatusExistingNodeCount; + public upcomingNodeCount?: ScaleGroupStatusUpcomingNodeCount; + public scaleDownDisabledNodeCount?: number; + public conditions?: Array; + public constructor() { + } + public withName(name: string): ScaleGroupStatus { + this['name'] = name; + return this; + } + public withUid(uid: string): ScaleGroupStatus { + this['uid'] = uid; + return this; + } + public withCreationTimestamp(creationTimestamp: string): ScaleGroupStatus { + this['creationTimestamp'] = creationTimestamp; + return this; + } + public withUpdateTimestamp(updateTimestamp: string): ScaleGroupStatus { + this['updateTimestamp'] = updateTimestamp; + return this; + } + public withPhase(phase: ScaleGroupStatusPhaseEnum | string): ScaleGroupStatus { + this['phase'] = phase; + return this; + } + public withDesiredNodeCount(desiredNodeCount: number): ScaleGroupStatus { + this['desiredNodeCount'] = desiredNodeCount; + return this; + } + public withUnpaidScaleNodeCount(unpaidScaleNodeCount: number): ScaleGroupStatus { + this['unpaidScaleNodeCount'] = unpaidScaleNodeCount; + return this; + } + public withExistingNodeCount(existingNodeCount: ScaleGroupStatusExistingNodeCount): ScaleGroupStatus { + this['existingNodeCount'] = existingNodeCount; + return this; + } + public withUpcomingNodeCount(upcomingNodeCount: ScaleGroupStatusUpcomingNodeCount): ScaleGroupStatus { + this['upcomingNodeCount'] = upcomingNodeCount; + return this; + } + public withScaleDownDisabledNodeCount(scaleDownDisabledNodeCount: number): ScaleGroupStatus { + this['scaleDownDisabledNodeCount'] = scaleDownDisabledNodeCount; + return this; + } + public withConditions(conditions: Array): ScaleGroupStatus { + this['conditions'] = conditions; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum ScaleGroupStatusPhaseEnum { + SYNCHRONIZING = 'Synchronizing', + SYNCHRONIZED = 'Synchronized', + SOLDOUT = 'SoldOut', + DELETING = 'Deleting', + ERROR = 'Error' +} diff --git a/services/cce/v3/model/ScaleGroupStatusExistingNodeCount.ts b/services/cce/v3/model/ScaleGroupStatusExistingNodeCount.ts new file mode 100644 index 000000000..6c2271157 --- /dev/null +++ b/services/cce/v3/model/ScaleGroupStatusExistingNodeCount.ts @@ -0,0 +1,21 @@ + + +export class ScaleGroupStatusExistingNodeCount { + public postPaid?: number; + public prePaid?: number; + public total?: number; + public constructor() { + } + public withPostPaid(postPaid: number): ScaleGroupStatusExistingNodeCount { + this['postPaid'] = postPaid; + return this; + } + public withPrePaid(prePaid: number): ScaleGroupStatusExistingNodeCount { + this['prePaid'] = prePaid; + return this; + } + public withTotal(total: number): ScaleGroupStatusExistingNodeCount { + this['total'] = total; + return this; + } +} \ No newline at end of file diff --git a/services/cce/v3/model/ScaleGroupStatusUpcomingNodeCount.ts b/services/cce/v3/model/ScaleGroupStatusUpcomingNodeCount.ts new file mode 100644 index 000000000..78a2b19f2 --- /dev/null +++ b/services/cce/v3/model/ScaleGroupStatusUpcomingNodeCount.ts @@ -0,0 +1,21 @@ + + +export class ScaleGroupStatusUpcomingNodeCount { + public postPaid?: number; + public prePaid?: number; + public total?: number; + public constructor() { + } + public withPostPaid(postPaid: number): ScaleGroupStatusUpcomingNodeCount { + this['postPaid'] = postPaid; + return this; + } + public withPrePaid(prePaid: number): ScaleGroupStatusUpcomingNodeCount { + this['prePaid'] = prePaid; + return this; + } + public withTotal(total: number): ScaleGroupStatusUpcomingNodeCount { + this['total'] = total; + return this; + } +} \ No newline at end of file diff --git a/services/cce/v3/model/UpdateNodePoolStatus.ts b/services/cce/v3/model/UpdateNodePoolStatus.ts index 114963548..df999e7f8 100644 --- a/services/cce/v3/model/UpdateNodePoolStatus.ts +++ b/services/cce/v3/model/UpdateNodePoolStatus.ts @@ -1,4 +1,5 @@ import { NodePoolCondition } from './NodePoolCondition'; +import { ScaleGroupStatus } from './ScaleGroupStatus'; export class UpdateNodePoolStatus { @@ -7,6 +8,7 @@ export class UpdateNodePoolStatus { public deletingNode?: number; public phase?: UpdateNodePoolStatusPhaseEnum | string; public conditions?: Array; + public scaleGroupStatuses?: Array; public constructor() { } public withCurrentNode(currentNode: number): UpdateNodePoolStatus { @@ -29,6 +31,10 @@ export class UpdateNodePoolStatus { this['conditions'] = conditions; return this; } + public withScaleGroupStatuses(scaleGroupStatuses: Array): UpdateNodePoolStatus { + this['scaleGroupStatuses'] = scaleGroupStatuses; + return this; + } } /** diff --git a/services/cce/v3/public-api.ts b/services/cce/v3/public-api.ts index 12bb55cd2..60fd884b0 100644 --- a/services/cce/v3/public-api.ts +++ b/services/cce/v3/public-api.ts @@ -355,6 +355,9 @@ export * from './model/RollbackAutopilotAddonInstanceResponse'; export * from './model/Runtime'; export * from './model/RuntimeConfig'; export * from './model/ScaleGroupAutoscaling'; +export * from './model/ScaleGroupStatus'; +export * from './model/ScaleGroupStatusExistingNodeCount'; +export * from './model/ScaleGroupStatusUpcomingNodeCount'; export * from './model/ScaleNodePoolOptions'; export * from './model/ScaleNodePoolRequest'; export * from './model/ScaleNodePoolRequestBody'; diff --git a/services/cdm/v1/CdmClient.ts b/services/cdm/v1/CdmClient.ts index f82ad247d..76b282582 100644 --- a/services/cdm/v1/CdmClient.ts +++ b/services/cdm/v1/CdmClient.ts @@ -3,13 +3,22 @@ import { ClientBuilder } from "@huaweicloud/huaweicloud-sdk-core/ClientBuilder"; import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; import { ActionProgress } from './model/ActionProgress'; +import { CdmClusterAvailabilityZone } from './model/CdmClusterAvailabilityZone'; +import { CdmClusterDatastore } from './model/CdmClusterDatastore'; +import { CdmClusterDatastoreVersion } from './model/CdmClusterDatastoreVersion'; +import { CdmClusterEnterpriseProject } from './model/CdmClusterEnterpriseProject'; +import { CdmClusterFlavor } from './model/CdmClusterFlavor'; +import { CdmClusterVersion } from './model/CdmClusterVersion'; import { CdmCreateAndUpdateLinkReq } from './model/CdmCreateAndUpdateLinkReq'; import { CdmCreateClusterReq } from './model/CdmCreateClusterReq'; import { CdmCreateClusterReqCluster } from './model/CdmCreateClusterReqCluster'; import { CdmCreateJobJsonReq } from './model/CdmCreateJobJsonReq'; import { CdmDeleteClusterReq } from './model/CdmDeleteClusterReq'; +import { CdmModifyClusterReq } from './model/CdmModifyClusterReq'; import { CdmQueryClusterDetailsRepsonseMaintainWindow } from './model/CdmQueryClusterDetailsRepsonseMaintainWindow'; import { CdmQueryClusterDetailsRepsonsePublicEndpointStatus } from './model/CdmQueryClusterDetailsRepsonsePublicEndpointStatus'; +import { CdmQueryClusterInstanceDetail } from './model/CdmQueryClusterInstanceDetail'; +import { CdmQueryClusterInstanceDetailFlavor } from './model/CdmQueryClusterInstanceDetailFlavor'; import { CdmRandomCreateAndStartJobJsonReq } from './model/CdmRandomCreateAndStartJobJsonReq'; import { CdmRestartClusterReq } from './model/CdmRestartClusterReq'; import { CdmRestartClusterReqRestart } from './model/CdmRestartClusterReqRestart'; @@ -49,6 +58,7 @@ import { ExtendedConfigs } from './model/ExtendedConfigs'; import { ExtendedProperties } from './model/ExtendedProperties'; import { FailedReasons } from './model/FailedReasons'; import { FailedReasonsCREATEFAILED } from './model/FailedReasonsCREATEFAILED'; +import { FlavorAttribute } from './model/FlavorAttribute'; import { Input } from './model/Input'; import { Instance } from './model/Instance'; import { Job } from './model/Job'; @@ -58,12 +68,28 @@ import { LinksLinkconfigvalues } from './model/LinksLinkconfigvalues'; import { LinksLinkconfigvaluesExtendedconfigs } from './model/LinksLinkconfigvaluesExtendedconfigs'; import { ListClustersRequest } from './model/ListClustersRequest'; import { ListClustersResponse } from './model/ListClustersResponse'; +import { ModifyClusterRequest } from './model/ModifyClusterRequest'; +import { ModifyClusterResponse } from './model/ModifyClusterResponse'; import { Nics } from './model/Nics'; import { Resource } from './model/Resource'; import { RestartClusterRequest } from './model/RestartClusterRequest'; import { RestartClusterResponse } from './model/RestartClusterResponse'; +import { ShowAvailabilityZonesRequest } from './model/ShowAvailabilityZonesRequest'; +import { ShowAvailabilityZonesResponse } from './model/ShowAvailabilityZonesResponse'; import { ShowClusterDetailRequest } from './model/ShowClusterDetailRequest'; import { ShowClusterDetailResponse } from './model/ShowClusterDetailResponse'; +import { ShowClusterEnterpriseProjectsRequest } from './model/ShowClusterEnterpriseProjectsRequest'; +import { ShowClusterEnterpriseProjectsResponse } from './model/ShowClusterEnterpriseProjectsResponse'; +import { ShowDatastoresRequest } from './model/ShowDatastoresRequest'; +import { ShowDatastoresResponse } from './model/ShowDatastoresResponse'; +import { ShowEnterpriseProjectsRequest } from './model/ShowEnterpriseProjectsRequest'; +import { ShowEnterpriseProjectsResponse } from './model/ShowEnterpriseProjectsResponse'; +import { ShowFlavorDetailRequest } from './model/ShowFlavorDetailRequest'; +import { ShowFlavorDetailResponse } from './model/ShowFlavorDetailResponse'; +import { ShowFlavorsRequest } from './model/ShowFlavorsRequest'; +import { ShowFlavorsResponse } from './model/ShowFlavorsResponse'; +import { ShowInstanceDetailRequest } from './model/ShowInstanceDetailRequest'; +import { ShowInstanceDetailResponse } from './model/ShowInstanceDetailResponse'; import { ShowJobStatusRequest } from './model/ShowJobStatusRequest'; import { ShowJobStatusResponse } from './model/ShowJobStatusResponse'; import { ShowJobsRequest } from './model/ShowJobsRequest'; @@ -265,6 +291,28 @@ export class CdmClient { return this.hcClient.sendRequest(options); } + /** + * 修改CDM集群配置。 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 修改集群 + * @param {string} clusterId 集群ID + * @param {string} contentType 消息体的类型(格式),有Body体的情况下必选,没有Body体无需填写。如果请求消息体中含有中文字符,则需要通过charset=utf8指定中文字符集,例如取值为:application/json;charset=utf8。 + * @param {string} xLanguage 请求语言。 + * @param {CdmModifyClusterReq} cdmModifyClusterReq 修改集群请求JSON体。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public modifyCluster(modifyClusterRequest?: ModifyClusterRequest): Promise { + const options = ParamCreater().modifyCluster(modifyClusterRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + /** * 重启集群接口。 * @@ -285,6 +333,25 @@ export class CdmClient { return this.hcClient.sendRequest(options); } + /** + * 查询CDM集群的所有可用区。 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 查询所有可用区 + * @param {string} regionId 区域ID。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public showAvailabilityZones(showAvailabilityZonesRequest?: ShowAvailabilityZonesRequest): Promise { + const options = ParamCreater().showAvailabilityZones(showAvailabilityZonesRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + /** * 查询集群详情接口。 * @@ -304,6 +371,118 @@ export class CdmClient { return this.hcClient.sendRequest(options); } + /** + * 查询指定集群的企业项目ID。 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 查询集群的企业项目ID + * @param {string} clusterId 集群ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public showClusterEnterpriseProjects(showClusterEnterpriseProjectsRequest?: ShowClusterEnterpriseProjectsRequest): Promise { + const options = ParamCreater().showClusterEnterpriseProjects(showClusterEnterpriseProjectsRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * 查询CDM集群支持的版本。 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 查询支持的版本 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public showDatastores(showDatastoresRequest?: ShowDatastoresRequest): Promise { + const options = ParamCreater().showDatastores(); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * 查询当前项目下的所有集群的企业项目ID。 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 查询所有集群的企业项目ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public showEnterpriseProjects(showEnterpriseProjectsRequest?: ShowEnterpriseProjectsRequest): Promise { + const options = ParamCreater().showEnterpriseProjects(); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * 查询指定规格ID的规格详请。 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 查询规格详情 + * @param {string} flavorId 规格ID,获取方法请参见[查询版本规格](ShowFlavors.xml)。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public showFlavorDetail(showFlavorDetailRequest?: ShowFlavorDetailRequest): Promise { + const options = ParamCreater().showFlavorDetail(showFlavorDetailRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * 按版本ID查询所有兼容规格。 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 查询版本规格 + * @param {string} datastoreId 版本ID,获取方法请参见[CDM支持的版本](ShowDatastores.xml)。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public showFlavors(showFlavorsRequest?: ShowFlavorsRequest): Promise { + const options = ParamCreater().showFlavors(showFlavorsRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * 查询集群实例信息。 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 查询集群实例信息 + * @param {string} instanceId 实例ID,获取方法请参见[获取集群列表](ListClusters.xml)。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public showInstanceDetail(showInstanceDetailRequest?: ShowInstanceDetailRequest): Promise { + const options = ParamCreater().showInstanceDetail(showInstanceDetailRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + /** * 查询作业状态接口。 * @@ -860,6 +1039,66 @@ export const ParamCreater = function () { return options; }, + /** + * 修改CDM集群配置。 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + modifyCluster(modifyClusterRequest?: ModifyClusterRequest) { + const options = { + method: "POST", + url: "/v1.1/{project_id}/cluster/modify/{cluster_id}", + contentType: "application/json;charset=UTF-8", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let body: any; + + let clusterId; + + let contentType; + + let xLanguage; + + if (modifyClusterRequest !== null && modifyClusterRequest !== undefined) { + if (modifyClusterRequest instanceof ModifyClusterRequest) { + clusterId = modifyClusterRequest.clusterId; + contentType = modifyClusterRequest.contentType; + xLanguage = modifyClusterRequest.xLanguage; + body = modifyClusterRequest.body + } else { + clusterId = modifyClusterRequest['cluster_id']; + contentType = modifyClusterRequest['Content-Type']; + xLanguage = modifyClusterRequest['X-Language']; + body = modifyClusterRequest['body']; + } + } + + + if (clusterId === null || clusterId === undefined) { + throw new RequiredError('clusterId','Required parameter clusterId was null or undefined when calling modifyCluster.'); + } + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + if (contentType !== undefined && contentType !== null) { + localVarHeaderParameter['Content-Type'] = String(contentType); + } + if (xLanguage !== undefined && xLanguage !== null) { + localVarHeaderParameter['X-Language'] = String(xLanguage); + } + localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8'; + + options.data = body !== undefined ? body : {}; + options.pathParams = { 'cluster_id': clusterId, }; + options.headers = localVarHeaderParameter; + return options; + }, + /** * 重启集群接口。 * @@ -906,6 +1145,43 @@ export const ParamCreater = function () { return options; }, + /** + * 查询CDM集群的所有可用区。 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + showAvailabilityZones(showAvailabilityZonesRequest?: ShowAvailabilityZonesRequest) { + const options = { + method: "GET", + url: "/v1.1/{project_id}/regions/{region_id}/availability_zones", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {} + }; + const localVarHeaderParameter = {} as any; + + + let regionId; + + if (showAvailabilityZonesRequest !== null && showAvailabilityZonesRequest !== undefined) { + if (showAvailabilityZonesRequest instanceof ShowAvailabilityZonesRequest) { + regionId = showAvailabilityZonesRequest.regionId; + } else { + regionId = showAvailabilityZonesRequest['region_id']; + } + } + + + if (regionId === null || regionId === undefined) { + throw new RequiredError('regionId','Required parameter regionId was null or undefined when calling showAvailabilityZones.'); + } + + options.pathParams = { 'region_id': regionId, }; + options.headers = localVarHeaderParameter; + return options; + }, + /** * 查询集群详情接口。 * @@ -943,6 +1219,196 @@ export const ParamCreater = function () { return options; }, + /** + * 查询指定集群的企业项目ID。 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + showClusterEnterpriseProjects(showClusterEnterpriseProjectsRequest?: ShowClusterEnterpriseProjectsRequest) { + const options = { + method: "GET", + url: "/v1.1/{project_id}/clusters/{cluster_id}/enterprise-projects", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {} + }; + const localVarHeaderParameter = {} as any; + + + let clusterId; + + if (showClusterEnterpriseProjectsRequest !== null && showClusterEnterpriseProjectsRequest !== undefined) { + if (showClusterEnterpriseProjectsRequest instanceof ShowClusterEnterpriseProjectsRequest) { + clusterId = showClusterEnterpriseProjectsRequest.clusterId; + } else { + clusterId = showClusterEnterpriseProjectsRequest['cluster_id']; + } + } + + + if (clusterId === null || clusterId === undefined) { + throw new RequiredError('clusterId','Required parameter clusterId was null or undefined when calling showClusterEnterpriseProjects.'); + } + + options.pathParams = { 'cluster_id': clusterId, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 查询CDM集群支持的版本。 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + showDatastores() { + const options = { + method: "GET", + url: "/v1.1/{project_id}/datastores", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {} + }; + const localVarHeaderParameter = {} as any; + + + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 查询当前项目下的所有集群的企业项目ID。 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + showEnterpriseProjects() { + const options = { + method: "GET", + url: "/v1.1/{project_id}/enterprise-projects", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {} + }; + const localVarHeaderParameter = {} as any; + + + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 查询指定规格ID的规格详请。 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + showFlavorDetail(showFlavorDetailRequest?: ShowFlavorDetailRequest) { + const options = { + method: "GET", + url: "/v1.1/{project_id}/flavors/{flavor_id}", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {} + }; + const localVarHeaderParameter = {} as any; + + + let flavorId; + + if (showFlavorDetailRequest !== null && showFlavorDetailRequest !== undefined) { + if (showFlavorDetailRequest instanceof ShowFlavorDetailRequest) { + flavorId = showFlavorDetailRequest.flavorId; + } else { + flavorId = showFlavorDetailRequest['flavor_id']; + } + } + + + if (flavorId === null || flavorId === undefined) { + throw new RequiredError('flavorId','Required parameter flavorId was null or undefined when calling showFlavorDetail.'); + } + + options.pathParams = { 'flavor_id': flavorId, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 按版本ID查询所有兼容规格。 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + showFlavors(showFlavorsRequest?: ShowFlavorsRequest) { + const options = { + method: "GET", + url: "/v1.1/{project_id}/datastores/{datastore_id}/flavors", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {} + }; + const localVarHeaderParameter = {} as any; + + + let datastoreId; + + if (showFlavorsRequest !== null && showFlavorsRequest !== undefined) { + if (showFlavorsRequest instanceof ShowFlavorsRequest) { + datastoreId = showFlavorsRequest.datastoreId; + } else { + datastoreId = showFlavorsRequest['datastore_id']; + } + } + + + if (datastoreId === null || datastoreId === undefined) { + throw new RequiredError('datastoreId','Required parameter datastoreId was null or undefined when calling showFlavors.'); + } + + options.pathParams = { 'datastore_id': datastoreId, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 查询集群实例信息。 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + showInstanceDetail(showInstanceDetailRequest?: ShowInstanceDetailRequest) { + const options = { + method: "GET", + url: "/v1.1/{project_id}/instances/{instance_id}", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {} + }; + const localVarHeaderParameter = {} as any; + + + let instanceId; + + if (showInstanceDetailRequest !== null && showInstanceDetailRequest !== undefined) { + if (showInstanceDetailRequest instanceof ShowInstanceDetailRequest) { + instanceId = showInstanceDetailRequest.instanceId; + } else { + instanceId = showInstanceDetailRequest['instance_id']; + } + } + + + if (instanceId === null || instanceId === undefined) { + throw new RequiredError('instanceId','Required parameter instanceId was null or undefined when calling showInstanceDetail.'); + } + + options.pathParams = { 'instance_id': instanceId, }; + options.headers = localVarHeaderParameter; + return options; + }, + /** * 查询作业状态接口。 * diff --git a/services/cdm/v1/model/CdmClusterAvailabilityZone.ts b/services/cdm/v1/model/CdmClusterAvailabilityZone.ts new file mode 100644 index 000000000..896a121c6 --- /dev/null +++ b/services/cdm/v1/model/CdmClusterAvailabilityZone.ts @@ -0,0 +1,36 @@ + + +export class CdmClusterAvailabilityZone { + public availableZoneId?: string; + public availableZoneName?: string; + public availableZoneCode?: string; + public azStatus?: string; + public type?: string; + public tags?: object; + public constructor() { + } + public withAvailableZoneId(availableZoneId: string): CdmClusterAvailabilityZone { + this['availableZoneId'] = availableZoneId; + return this; + } + public withAvailableZoneName(availableZoneName: string): CdmClusterAvailabilityZone { + this['availableZoneName'] = availableZoneName; + return this; + } + public withAvailableZoneCode(availableZoneCode: string): CdmClusterAvailabilityZone { + this['availableZoneCode'] = availableZoneCode; + return this; + } + public withAzStatus(azStatus: string): CdmClusterAvailabilityZone { + this['azStatus'] = azStatus; + return this; + } + public withType(type: string): CdmClusterAvailabilityZone { + this['type'] = type; + return this; + } + public withTags(tags: object): CdmClusterAvailabilityZone { + this['tags'] = tags; + return this; + } +} \ No newline at end of file diff --git a/services/cdm/v1/model/CdmClusterDatastore.ts b/services/cdm/v1/model/CdmClusterDatastore.ts new file mode 100644 index 000000000..4a1d931d2 --- /dev/null +++ b/services/cdm/v1/model/CdmClusterDatastore.ts @@ -0,0 +1,37 @@ +import { CdmClusterVersion } from './CdmClusterVersion'; + + +export class CdmClusterDatastore { + public id?: string; + public name?: string; + public bigclusterEnable?: boolean; + public defaultVersion?: string; + public versions?: Array; + public constructor(id?: string, name?: string, bigclusterEnable?: boolean, defaultVersion?: string, versions?: Array) { + this['id'] = id; + this['name'] = name; + this['bigclusterEnable'] = bigclusterEnable; + this['defaultVersion'] = defaultVersion; + this['versions'] = versions; + } + public withId(id: string): CdmClusterDatastore { + this['id'] = id; + return this; + } + public withName(name: string): CdmClusterDatastore { + this['name'] = name; + return this; + } + public withBigclusterEnable(bigclusterEnable: boolean): CdmClusterDatastore { + this['bigclusterEnable'] = bigclusterEnable; + return this; + } + public withDefaultVersion(defaultVersion: string): CdmClusterDatastore { + this['defaultVersion'] = defaultVersion; + return this; + } + public withVersions(versions: Array): CdmClusterDatastore { + this['versions'] = versions; + return this; + } +} \ No newline at end of file diff --git a/services/cdm/v1/model/CdmClusterDatastoreVersion.ts b/services/cdm/v1/model/CdmClusterDatastoreVersion.ts new file mode 100644 index 000000000..034b42a9f --- /dev/null +++ b/services/cdm/v1/model/CdmClusterDatastoreVersion.ts @@ -0,0 +1,22 @@ +import { CdmClusterFlavor } from './CdmClusterFlavor'; + + +export class CdmClusterDatastoreVersion { + public id?: string; + public name?: string; + public flavors?: Array; + public constructor() { + } + public withId(id: string): CdmClusterDatastoreVersion { + this['id'] = id; + return this; + } + public withName(name: string): CdmClusterDatastoreVersion { + this['name'] = name; + return this; + } + public withFlavors(flavors: Array): CdmClusterDatastoreVersion { + this['flavors'] = flavors; + return this; + } +} \ No newline at end of file diff --git a/services/cdm/v1/model/CdmClusterEnterpriseProject.ts b/services/cdm/v1/model/CdmClusterEnterpriseProject.ts new file mode 100644 index 000000000..1702496cc --- /dev/null +++ b/services/cdm/v1/model/CdmClusterEnterpriseProject.ts @@ -0,0 +1,29 @@ +import { SysTags } from './SysTags'; + + +export class CdmClusterEnterpriseProject { + private 'cluster_id'?: string; + private 'sys_tags'?: Array; + public constructor() { + } + public withClusterId(clusterId: string): CdmClusterEnterpriseProject { + this['cluster_id'] = clusterId; + return this; + } + public set clusterId(clusterId: string | undefined) { + this['cluster_id'] = clusterId; + } + public get clusterId(): string | undefined { + return this['cluster_id']; + } + public withSysTags(sysTags: Array): CdmClusterEnterpriseProject { + this['sys_tags'] = sysTags; + return this; + } + public set sysTags(sysTags: Array | undefined) { + this['sys_tags'] = sysTags; + } + public get sysTags(): Array | undefined { + return this['sys_tags']; + } +} \ No newline at end of file diff --git a/services/cdm/v1/model/CdmClusterFlavor.ts b/services/cdm/v1/model/CdmClusterFlavor.ts new file mode 100644 index 000000000..9ae832909 --- /dev/null +++ b/services/cdm/v1/model/CdmClusterFlavor.ts @@ -0,0 +1,52 @@ + + +export class CdmClusterFlavor { + public cpu?: number; + public ram?: number; + public name?: string; + public region?: string; + public typename?: string; + public clusterMode?: string; + public status?: string; + private 'str_id'?: string; + public constructor() { + } + public withCpu(cpu: number): CdmClusterFlavor { + this['cpu'] = cpu; + return this; + } + public withRam(ram: number): CdmClusterFlavor { + this['ram'] = ram; + return this; + } + public withName(name: string): CdmClusterFlavor { + this['name'] = name; + return this; + } + public withRegion(region: string): CdmClusterFlavor { + this['region'] = region; + return this; + } + public withTypename(typename: string): CdmClusterFlavor { + this['typename'] = typename; + return this; + } + public withClusterMode(clusterMode: string): CdmClusterFlavor { + this['clusterMode'] = clusterMode; + return this; + } + public withStatus(status: string): CdmClusterFlavor { + this['status'] = status; + return this; + } + public withStrId(strId: string): CdmClusterFlavor { + this['str_id'] = strId; + return this; + } + public set strId(strId: string | undefined) { + this['str_id'] = strId; + } + public get strId(): string | undefined { + return this['str_id']; + } +} \ No newline at end of file diff --git a/services/cdm/v1/model/CdmClusterVersion.ts b/services/cdm/v1/model/CdmClusterVersion.ts new file mode 100644 index 000000000..72320a6cd --- /dev/null +++ b/services/cdm/v1/model/CdmClusterVersion.ts @@ -0,0 +1,42 @@ +import { ClusterLinks } from './ClusterLinks'; + + +export class CdmClusterVersion { + public active?: string; + public id?: string; + public image?: string; + public name?: string; + public packages?: string; + public datastore?: string; + public links?: Array; + public constructor() { + } + public withActive(active: string): CdmClusterVersion { + this['active'] = active; + return this; + } + public withId(id: string): CdmClusterVersion { + this['id'] = id; + return this; + } + public withImage(image: string): CdmClusterVersion { + this['image'] = image; + return this; + } + public withName(name: string): CdmClusterVersion { + this['name'] = name; + return this; + } + public withPackages(packages: string): CdmClusterVersion { + this['packages'] = packages; + return this; + } + public withDatastore(datastore: string): CdmClusterVersion { + this['datastore'] = datastore; + return this; + } + public withLinks(links: Array): CdmClusterVersion { + this['links'] = links; + return this; + } +} \ No newline at end of file diff --git a/services/cdm/v1/model/CdmModifyClusterReq.ts b/services/cdm/v1/model/CdmModifyClusterReq.ts new file mode 100644 index 000000000..c040dc622 --- /dev/null +++ b/services/cdm/v1/model/CdmModifyClusterReq.ts @@ -0,0 +1,41 @@ + + +export class CdmModifyClusterReq { + public autoOff?: boolean; + public scheduleBootOff?: boolean; + public scheduleBootTime?: string; + public scheduleOffTime?: string; + public autoRemind?: boolean; + public phoneNum?: string; + public email?: string; + public constructor() { + } + public withAutoOff(autoOff: boolean): CdmModifyClusterReq { + this['autoOff'] = autoOff; + return this; + } + public withScheduleBootOff(scheduleBootOff: boolean): CdmModifyClusterReq { + this['scheduleBootOff'] = scheduleBootOff; + return this; + } + public withScheduleBootTime(scheduleBootTime: string): CdmModifyClusterReq { + this['scheduleBootTime'] = scheduleBootTime; + return this; + } + public withScheduleOffTime(scheduleOffTime: string): CdmModifyClusterReq { + this['scheduleOffTime'] = scheduleOffTime; + return this; + } + public withAutoRemind(autoRemind: boolean): CdmModifyClusterReq { + this['autoRemind'] = autoRemind; + return this; + } + public withPhoneNum(phoneNum: string): CdmModifyClusterReq { + this['phoneNum'] = phoneNum; + return this; + } + public withEmail(email: string): CdmModifyClusterReq { + this['email'] = email; + return this; + } +} \ No newline at end of file diff --git a/services/cdm/v1/model/CdmQueryClusterInstanceDetail.ts b/services/cdm/v1/model/CdmQueryClusterInstanceDetail.ts new file mode 100644 index 000000000..d5d40ed88 --- /dev/null +++ b/services/cdm/v1/model/CdmQueryClusterInstanceDetail.ts @@ -0,0 +1,119 @@ +import { CdmQueryClusterInstanceDetailFlavor } from './CdmQueryClusterInstanceDetailFlavor'; +import { Datastore } from './Datastore'; + + +export class CdmQueryClusterInstanceDetail { + public configurationStatus?: string; + public paramsGroupId?: string; + public type?: string; + public role?: string; + public subnetid?: string; + public securegroup?: string; + public vpc?: string; + public azcode?: string; + public region?: string; + public created?: string; + public updated?: string; + public name?: string; + public id?: string; + public flavor?: CdmQueryClusterInstanceDetailFlavor; + public datastore?: Datastore; + public dbuser?: string; + public payModel?: number; + public publicIp?: string; + public trafficIp?: string; + public trafficIpv6?: string; + private 'cluster_id'?: string; + public constructor() { + } + public withConfigurationStatus(configurationStatus: string): CdmQueryClusterInstanceDetail { + this['configurationStatus'] = configurationStatus; + return this; + } + public withParamsGroupId(paramsGroupId: string): CdmQueryClusterInstanceDetail { + this['paramsGroupId'] = paramsGroupId; + return this; + } + public withType(type: string): CdmQueryClusterInstanceDetail { + this['type'] = type; + return this; + } + public withRole(role: string): CdmQueryClusterInstanceDetail { + this['role'] = role; + return this; + } + public withSubnetid(subnetid: string): CdmQueryClusterInstanceDetail { + this['subnetid'] = subnetid; + return this; + } + public withSecuregroup(securegroup: string): CdmQueryClusterInstanceDetail { + this['securegroup'] = securegroup; + return this; + } + public withVpc(vpc: string): CdmQueryClusterInstanceDetail { + this['vpc'] = vpc; + return this; + } + public withAzcode(azcode: string): CdmQueryClusterInstanceDetail { + this['azcode'] = azcode; + return this; + } + public withRegion(region: string): CdmQueryClusterInstanceDetail { + this['region'] = region; + return this; + } + public withCreated(created: string): CdmQueryClusterInstanceDetail { + this['created'] = created; + return this; + } + public withUpdated(updated: string): CdmQueryClusterInstanceDetail { + this['updated'] = updated; + return this; + } + public withName(name: string): CdmQueryClusterInstanceDetail { + this['name'] = name; + return this; + } + public withId(id: string): CdmQueryClusterInstanceDetail { + this['id'] = id; + return this; + } + public withFlavor(flavor: CdmQueryClusterInstanceDetailFlavor): CdmQueryClusterInstanceDetail { + this['flavor'] = flavor; + return this; + } + public withDatastore(datastore: Datastore): CdmQueryClusterInstanceDetail { + this['datastore'] = datastore; + return this; + } + public withDbuser(dbuser: string): CdmQueryClusterInstanceDetail { + this['dbuser'] = dbuser; + return this; + } + public withPayModel(payModel: number): CdmQueryClusterInstanceDetail { + this['payModel'] = payModel; + return this; + } + public withPublicIp(publicIp: string): CdmQueryClusterInstanceDetail { + this['publicIp'] = publicIp; + return this; + } + public withTrafficIp(trafficIp: string): CdmQueryClusterInstanceDetail { + this['trafficIp'] = trafficIp; + return this; + } + public withTrafficIpv6(trafficIpv6: string): CdmQueryClusterInstanceDetail { + this['trafficIpv6'] = trafficIpv6; + return this; + } + public withClusterId(clusterId: string): CdmQueryClusterInstanceDetail { + this['cluster_id'] = clusterId; + return this; + } + public set clusterId(clusterId: string | undefined) { + this['cluster_id'] = clusterId; + } + public get clusterId(): string | undefined { + return this['cluster_id']; + } +} \ No newline at end of file diff --git a/services/cdm/v1/model/CdmQueryClusterInstanceDetailFlavor.ts b/services/cdm/v1/model/CdmQueryClusterInstanceDetailFlavor.ts new file mode 100644 index 000000000..1f3ab6739 --- /dev/null +++ b/services/cdm/v1/model/CdmQueryClusterInstanceDetailFlavor.ts @@ -0,0 +1,17 @@ +import { ClusterLinks } from './ClusterLinks'; + + +export class CdmQueryClusterInstanceDetailFlavor { + public id?: string; + public links?: Array; + public constructor() { + } + public withId(id: string): CdmQueryClusterInstanceDetailFlavor { + this['id'] = id; + return this; + } + public withLinks(links: Array): CdmQueryClusterInstanceDetailFlavor { + this['links'] = links; + return this; + } +} \ No newline at end of file diff --git a/services/cdm/v1/model/FlavorAttribute.ts b/services/cdm/v1/model/FlavorAttribute.ts new file mode 100644 index 000000000..d88697739 --- /dev/null +++ b/services/cdm/v1/model/FlavorAttribute.ts @@ -0,0 +1,16 @@ + + +export class FlavorAttribute { + public name?: string; + public value?: string; + public constructor() { + } + public withName(name: string): FlavorAttribute { + this['name'] = name; + return this; + } + public withValue(value: string): FlavorAttribute { + this['value'] = value; + return this; + } +} \ No newline at end of file diff --git a/services/cdm/v1/model/ModifyClusterRequest.ts b/services/cdm/v1/model/ModifyClusterRequest.ts new file mode 100644 index 000000000..6e8b20488 --- /dev/null +++ b/services/cdm/v1/model/ModifyClusterRequest.ts @@ -0,0 +1,48 @@ +import { CdmModifyClusterReq } from './CdmModifyClusterReq'; + + +export class ModifyClusterRequest { + private 'cluster_id'?: string; + private 'Content-Type'?: string; + private 'X-Language'?: string; + public body?: CdmModifyClusterReq; + public constructor(clusterId?: string, contentType?: string, xLanguage?: string) { + this['cluster_id'] = clusterId; + this['Content-Type'] = contentType; + this['X-Language'] = xLanguage; + } + public withClusterId(clusterId: string): ModifyClusterRequest { + this['cluster_id'] = clusterId; + return this; + } + public set clusterId(clusterId: string | undefined) { + this['cluster_id'] = clusterId; + } + public get clusterId(): string | undefined { + return this['cluster_id']; + } + public withContentType(contentType: string): ModifyClusterRequest { + this['Content-Type'] = contentType; + return this; + } + public set contentType(contentType: string | undefined) { + this['Content-Type'] = contentType; + } + public get contentType(): string | undefined { + return this['Content-Type']; + } + public withXLanguage(xLanguage: string): ModifyClusterRequest { + this['X-Language'] = xLanguage; + return this; + } + public set xLanguage(xLanguage: string | undefined) { + this['X-Language'] = xLanguage; + } + public get xLanguage(): string | undefined { + return this['X-Language']; + } + public withBody(body: CdmModifyClusterReq): ModifyClusterRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/cdm/v1/model/ModifyClusterResponse.ts b/services/cdm/v1/model/ModifyClusterResponse.ts new file mode 100644 index 000000000..81e06c64c --- /dev/null +++ b/services/cdm/v1/model/ModifyClusterResponse.ts @@ -0,0 +1,8 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ModifyClusterResponse extends SdkResponse { + public constructor() { + super(); + } +} \ No newline at end of file diff --git a/services/cdm/v1/model/ShowAvailabilityZonesRequest.ts b/services/cdm/v1/model/ShowAvailabilityZonesRequest.ts new file mode 100644 index 000000000..2f64f8928 --- /dev/null +++ b/services/cdm/v1/model/ShowAvailabilityZonesRequest.ts @@ -0,0 +1,18 @@ + + +export class ShowAvailabilityZonesRequest { + private 'region_id'?: string; + public constructor(regionId?: string) { + this['region_id'] = regionId; + } + public withRegionId(regionId: string): ShowAvailabilityZonesRequest { + this['region_id'] = regionId; + return this; + } + public set regionId(regionId: string | undefined) { + this['region_id'] = regionId; + } + public get regionId(): string | undefined { + return this['region_id']; + } +} \ No newline at end of file diff --git a/services/cdm/v1/model/ShowAvailabilityZonesResponse.ts b/services/cdm/v1/model/ShowAvailabilityZonesResponse.ts new file mode 100644 index 000000000..6f4552110 --- /dev/null +++ b/services/cdm/v1/model/ShowAvailabilityZonesResponse.ts @@ -0,0 +1,24 @@ +import { CdmClusterAvailabilityZone } from './CdmClusterAvailabilityZone'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ShowAvailabilityZonesResponse extends SdkResponse { + public regionId?: string; + public defaultAZ?: string; + public availableZones?: Array; + public constructor() { + super(); + } + public withRegionId(regionId: string): ShowAvailabilityZonesResponse { + this['regionId'] = regionId; + return this; + } + public withDefaultAZ(defaultAZ: string): ShowAvailabilityZonesResponse { + this['defaultAZ'] = defaultAZ; + return this; + } + public withAvailableZones(availableZones: Array): ShowAvailabilityZonesResponse { + this['availableZones'] = availableZones; + return this; + } +} \ No newline at end of file diff --git a/services/cdm/v1/model/ShowClusterEnterpriseProjectsRequest.ts b/services/cdm/v1/model/ShowClusterEnterpriseProjectsRequest.ts new file mode 100644 index 000000000..c7528158a --- /dev/null +++ b/services/cdm/v1/model/ShowClusterEnterpriseProjectsRequest.ts @@ -0,0 +1,18 @@ + + +export class ShowClusterEnterpriseProjectsRequest { + private 'cluster_id'?: string; + public constructor(clusterId?: string) { + this['cluster_id'] = clusterId; + } + public withClusterId(clusterId: string): ShowClusterEnterpriseProjectsRequest { + this['cluster_id'] = clusterId; + return this; + } + public set clusterId(clusterId: string | undefined) { + this['cluster_id'] = clusterId; + } + public get clusterId(): string | undefined { + return this['cluster_id']; + } +} \ No newline at end of file diff --git a/services/cdm/v1/model/ShowClusterEnterpriseProjectsResponse.ts b/services/cdm/v1/model/ShowClusterEnterpriseProjectsResponse.ts new file mode 100644 index 000000000..70bdaf99e --- /dev/null +++ b/services/cdm/v1/model/ShowClusterEnterpriseProjectsResponse.ts @@ -0,0 +1,20 @@ +import { SysTags } from './SysTags'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ShowClusterEnterpriseProjectsResponse extends SdkResponse { + private 'sys_tags'?: Array; + public constructor() { + super(); + } + public withSysTags(sysTags: Array): ShowClusterEnterpriseProjectsResponse { + this['sys_tags'] = sysTags; + return this; + } + public set sysTags(sysTags: Array | undefined) { + this['sys_tags'] = sysTags; + } + public get sysTags(): Array | undefined { + return this['sys_tags']; + } +} \ No newline at end of file diff --git a/services/cdm/v1/model/ShowDatastoresRequest.ts b/services/cdm/v1/model/ShowDatastoresRequest.ts new file mode 100644 index 000000000..5569574d9 --- /dev/null +++ b/services/cdm/v1/model/ShowDatastoresRequest.ts @@ -0,0 +1,6 @@ + + +export class ShowDatastoresRequest { + public constructor() { + } +} \ No newline at end of file diff --git a/services/cdm/v1/model/ShowDatastoresResponse.ts b/services/cdm/v1/model/ShowDatastoresResponse.ts new file mode 100644 index 000000000..b4e01f20b --- /dev/null +++ b/services/cdm/v1/model/ShowDatastoresResponse.ts @@ -0,0 +1,14 @@ +import { CdmClusterDatastore } from './CdmClusterDatastore'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ShowDatastoresResponse extends SdkResponse { + public datastores?: Array; + public constructor() { + super(); + } + public withDatastores(datastores: Array): ShowDatastoresResponse { + this['datastores'] = datastores; + return this; + } +} \ No newline at end of file diff --git a/services/cdm/v1/model/ShowEnterpriseProjectsRequest.ts b/services/cdm/v1/model/ShowEnterpriseProjectsRequest.ts new file mode 100644 index 000000000..4f651129f --- /dev/null +++ b/services/cdm/v1/model/ShowEnterpriseProjectsRequest.ts @@ -0,0 +1,6 @@ + + +export class ShowEnterpriseProjectsRequest { + public constructor() { + } +} \ No newline at end of file diff --git a/services/cdm/v1/model/ShowEnterpriseProjectsResponse.ts b/services/cdm/v1/model/ShowEnterpriseProjectsResponse.ts new file mode 100644 index 000000000..ef0a846cd --- /dev/null +++ b/services/cdm/v1/model/ShowEnterpriseProjectsResponse.ts @@ -0,0 +1,14 @@ +import { CdmClusterEnterpriseProject } from './CdmClusterEnterpriseProject'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ShowEnterpriseProjectsResponse extends SdkResponse { + public resources?: Array; + public constructor() { + super(); + } + public withResources(resources: Array): ShowEnterpriseProjectsResponse { + this['resources'] = resources; + return this; + } +} \ No newline at end of file diff --git a/services/cdm/v1/model/ShowFlavorDetailRequest.ts b/services/cdm/v1/model/ShowFlavorDetailRequest.ts new file mode 100644 index 000000000..f5b5728bd --- /dev/null +++ b/services/cdm/v1/model/ShowFlavorDetailRequest.ts @@ -0,0 +1,18 @@ + + +export class ShowFlavorDetailRequest { + private 'flavor_id'?: string; + public constructor(flavorId?: string) { + this['flavor_id'] = flavorId; + } + public withFlavorId(flavorId: string): ShowFlavorDetailRequest { + this['flavor_id'] = flavorId; + return this; + } + public set flavorId(flavorId: string | undefined) { + this['flavor_id'] = flavorId; + } + public get flavorId(): string | undefined { + return this['flavor_id']; + } +} \ No newline at end of file diff --git a/services/cdm/v1/model/ShowFlavorDetailResponse.ts b/services/cdm/v1/model/ShowFlavorDetailResponse.ts new file mode 100644 index 000000000..7415f57de --- /dev/null +++ b/services/cdm/v1/model/ShowFlavorDetailResponse.ts @@ -0,0 +1,36 @@ +import { FlavorAttribute } from './FlavorAttribute'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ShowFlavorDetailResponse extends SdkResponse { + public name?: string; + private 'str_id'?: string; + private 'flavor_detail'?: Array; + public constructor() { + super(); + } + public withName(name: string): ShowFlavorDetailResponse { + this['name'] = name; + return this; + } + public withStrId(strId: string): ShowFlavorDetailResponse { + this['str_id'] = strId; + return this; + } + public set strId(strId: string | undefined) { + this['str_id'] = strId; + } + public get strId(): string | undefined { + return this['str_id']; + } + public withFlavorDetail(flavorDetail: Array): ShowFlavorDetailResponse { + this['flavor_detail'] = flavorDetail; + return this; + } + public set flavorDetail(flavorDetail: Array | undefined) { + this['flavor_detail'] = flavorDetail; + } + public get flavorDetail(): Array | undefined { + return this['flavor_detail']; + } +} \ No newline at end of file diff --git a/services/cdm/v1/model/ShowFlavorsRequest.ts b/services/cdm/v1/model/ShowFlavorsRequest.ts new file mode 100644 index 000000000..37498d4e4 --- /dev/null +++ b/services/cdm/v1/model/ShowFlavorsRequest.ts @@ -0,0 +1,18 @@ + + +export class ShowFlavorsRequest { + private 'datastore_id'?: string; + public constructor(datastoreId?: string) { + this['datastore_id'] = datastoreId; + } + public withDatastoreId(datastoreId: string): ShowFlavorsRequest { + this['datastore_id'] = datastoreId; + return this; + } + public set datastoreId(datastoreId: string | undefined) { + this['datastore_id'] = datastoreId; + } + public get datastoreId(): string | undefined { + return this['datastore_id']; + } +} \ No newline at end of file diff --git a/services/cdm/v1/model/ShowFlavorsResponse.ts b/services/cdm/v1/model/ShowFlavorsResponse.ts new file mode 100644 index 000000000..0804d598b --- /dev/null +++ b/services/cdm/v1/model/ShowFlavorsResponse.ts @@ -0,0 +1,24 @@ +import { CdmClusterDatastoreVersion } from './CdmClusterDatastoreVersion'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ShowFlavorsResponse extends SdkResponse { + public id?: string; + public dbname?: string; + public versions?: Array; + public constructor() { + super(); + } + public withId(id: string): ShowFlavorsResponse { + this['id'] = id; + return this; + } + public withDbname(dbname: string): ShowFlavorsResponse { + this['dbname'] = dbname; + return this; + } + public withVersions(versions: Array): ShowFlavorsResponse { + this['versions'] = versions; + return this; + } +} \ No newline at end of file diff --git a/services/cdm/v1/model/ShowInstanceDetailRequest.ts b/services/cdm/v1/model/ShowInstanceDetailRequest.ts new file mode 100644 index 000000000..29b0c6c34 --- /dev/null +++ b/services/cdm/v1/model/ShowInstanceDetailRequest.ts @@ -0,0 +1,18 @@ + + +export class ShowInstanceDetailRequest { + private 'instance_id'?: string; + public constructor(instanceId?: string) { + this['instance_id'] = instanceId; + } + public withInstanceId(instanceId: string): ShowInstanceDetailRequest { + this['instance_id'] = instanceId; + return this; + } + public set instanceId(instanceId: string | undefined) { + this['instance_id'] = instanceId; + } + public get instanceId(): string | undefined { + return this['instance_id']; + } +} \ No newline at end of file diff --git a/services/cdm/v1/model/ShowInstanceDetailResponse.ts b/services/cdm/v1/model/ShowInstanceDetailResponse.ts new file mode 100644 index 000000000..9875cfae4 --- /dev/null +++ b/services/cdm/v1/model/ShowInstanceDetailResponse.ts @@ -0,0 +1,14 @@ +import { CdmQueryClusterInstanceDetail } from './CdmQueryClusterInstanceDetail'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ShowInstanceDetailResponse extends SdkResponse { + public instance?: CdmQueryClusterInstanceDetail; + public constructor() { + super(); + } + public withInstance(instance: CdmQueryClusterInstanceDetail): ShowInstanceDetailResponse { + this['instance'] = instance; + return this; + } +} \ No newline at end of file diff --git a/services/cdm/v1/public-api.ts b/services/cdm/v1/public-api.ts index 8664e1211..cb89af93a 100644 --- a/services/cdm/v1/public-api.ts +++ b/services/cdm/v1/public-api.ts @@ -1,13 +1,22 @@ export * from './CdmClient'; export * from './model/ActionProgress'; +export * from './model/CdmClusterAvailabilityZone'; +export * from './model/CdmClusterDatastore'; +export * from './model/CdmClusterDatastoreVersion'; +export * from './model/CdmClusterEnterpriseProject'; +export * from './model/CdmClusterFlavor'; +export * from './model/CdmClusterVersion'; export * from './model/CdmCreateAndUpdateLinkReq'; export * from './model/CdmCreateClusterReq'; export * from './model/CdmCreateClusterReqCluster'; export * from './model/CdmCreateJobJsonReq'; export * from './model/CdmDeleteClusterReq'; +export * from './model/CdmModifyClusterReq'; export * from './model/CdmQueryClusterDetailsRepsonseMaintainWindow'; export * from './model/CdmQueryClusterDetailsRepsonsePublicEndpointStatus'; +export * from './model/CdmQueryClusterInstanceDetail'; +export * from './model/CdmQueryClusterInstanceDetailFlavor'; export * from './model/CdmRandomCreateAndStartJobJsonReq'; export * from './model/CdmRestartClusterReq'; export * from './model/CdmRestartClusterReqRestart'; @@ -47,6 +56,7 @@ export * from './model/ExtendedConfigs'; export * from './model/ExtendedProperties'; export * from './model/FailedReasons'; export * from './model/FailedReasonsCREATEFAILED'; +export * from './model/FlavorAttribute'; export * from './model/Input'; export * from './model/Instance'; export * from './model/Job'; @@ -56,12 +66,28 @@ export * from './model/LinksLinkconfigvalues'; export * from './model/LinksLinkconfigvaluesExtendedconfigs'; export * from './model/ListClustersRequest'; export * from './model/ListClustersResponse'; +export * from './model/ModifyClusterRequest'; +export * from './model/ModifyClusterResponse'; export * from './model/Nics'; export * from './model/Resource'; export * from './model/RestartClusterRequest'; export * from './model/RestartClusterResponse'; +export * from './model/ShowAvailabilityZonesRequest'; +export * from './model/ShowAvailabilityZonesResponse'; export * from './model/ShowClusterDetailRequest'; export * from './model/ShowClusterDetailResponse'; +export * from './model/ShowClusterEnterpriseProjectsRequest'; +export * from './model/ShowClusterEnterpriseProjectsResponse'; +export * from './model/ShowDatastoresRequest'; +export * from './model/ShowDatastoresResponse'; +export * from './model/ShowEnterpriseProjectsRequest'; +export * from './model/ShowEnterpriseProjectsResponse'; +export * from './model/ShowFlavorDetailRequest'; +export * from './model/ShowFlavorDetailResponse'; +export * from './model/ShowFlavorsRequest'; +export * from './model/ShowFlavorsResponse'; +export * from './model/ShowInstanceDetailRequest'; +export * from './model/ShowInstanceDetailResponse'; export * from './model/ShowJobStatusRequest'; export * from './model/ShowJobStatusResponse'; export * from './model/ShowJobsRequest'; diff --git a/services/coc/huaweicloud-sdk-coc.ts b/services/coc/huaweicloud-sdk-coc.ts new file mode 100644 index 000000000..8453177df --- /dev/null +++ b/services/coc/huaweicloud-sdk-coc.ts @@ -0,0 +1,2 @@ +export * from './v1/public-api'; +export * as v1 from './v1/public-api'; diff --git a/services/coc/v1/CocClient.ts b/services/coc/v1/CocClient.ts new file mode 100644 index 000000000..1aade232b --- /dev/null +++ b/services/coc/v1/CocClient.ts @@ -0,0 +1,3025 @@ +import { HcClient } from "@huaweicloud/huaweicloud-sdk-core/HcClient"; +import { ClientBuilder } from "@huaweicloud/huaweicloud-sdk-core/ClientBuilder"; +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +import { AddScriptModel } from './model/AddScriptModel'; +import { ApplicationQueryResponseData } from './model/ApplicationQueryResponseData'; +import { AuthorizableTicketBody } from './model/AuthorizableTicketBody'; +import { AuthorizeTicketCommonInfo } from './model/AuthorizeTicketCommonInfo'; +import { AuthorizeTicketInfo } from './model/AuthorizeTicketInfo'; +import { BaseResponse } from './model/BaseResponse'; +import { BatchListResourceResponseData } from './model/BatchListResourceResponseData'; +import { CocIssuesTicketDetailInfoResponseData } from './model/CocIssuesTicketDetailInfoResponseData'; +import { ComplianceItem } from './model/ComplianceItem'; +import { CompliantSummary } from './model/CompliantSummary'; +import { CreateCocIncidentRequest } from './model/CreateCocIncidentRequest'; +import { CreateCocIncidentResponse } from './model/CreateCocIncidentResponse'; +import { CreateCocIssuesRequest } from './model/CreateCocIssuesRequest'; +import { CreateCocIssuesResponse } from './model/CreateCocIssuesResponse'; +import { CreateExternalIncidentRequest } from './model/CreateExternalIncidentRequest'; +import { CreateExternalIncidentResponseData } from './model/CreateExternalIncidentResponseData'; +import { CreateExternalIssuesRequest } from './model/CreateExternalIssuesRequest'; +import { CreateExternalIssuesResponseData } from './model/CreateExternalIssuesResponseData'; +import { CreateReportCustomEventRequest } from './model/CreateReportCustomEventRequest'; +import { CreateReportCustomEventResponse } from './model/CreateReportCustomEventResponse'; +import { CreateReportPrometheusEventRequest } from './model/CreateReportPrometheusEventRequest'; +import { CreateReportPrometheusEventResponse } from './model/CreateReportPrometheusEventResponse'; +import { CreateScriptRequest } from './model/CreateScriptRequest'; +import { CreateScriptResponse } from './model/CreateScriptResponse'; +import { CreateWarRoomRequest } from './model/CreateWarRoomRequest'; +import { CreateWarRoomRequestBody } from './model/CreateWarRoomRequestBody'; +import { CreateWarRoomResponse } from './model/CreateWarRoomResponse'; +import { Customttribute } from './model/Customttribute'; +import { DeleteScriptRequest } from './model/DeleteScriptRequest'; +import { DeleteScriptResponse } from './model/DeleteScriptResponse'; +import { EditScriptModel } from './model/EditScriptModel'; +import { EnumDataInfo } from './model/EnumDataInfo'; +import { ExectionInstanceModel } from './model/ExectionInstanceModel'; +import { ExectuionStatistic } from './model/ExectuionStatistic'; +import { ExecuteInstancesBatchInfo } from './model/ExecuteInstancesBatchInfo'; +import { ExecutePublicScriptRequest } from './model/ExecutePublicScriptRequest'; +import { ExecutePublicScriptResponse } from './model/ExecutePublicScriptResponse'; +import { ExecuteResourceInstance } from './model/ExecuteResourceInstance'; +import { ExecuteScriptRequest } from './model/ExecuteScriptRequest'; +import { ExecuteScriptResponse } from './model/ExecuteScriptResponse'; +import { ExecutionSummary } from './model/ExecutionSummary'; +import { ExtraFieldInfo } from './model/ExtraFieldInfo'; +import { GetPublicScriptRequest } from './model/GetPublicScriptRequest'; +import { GetPublicScriptResponse } from './model/GetPublicScriptResponse'; +import { GetScriptJobBatchRequest } from './model/GetScriptJobBatchRequest'; +import { GetScriptJobBatchResponse } from './model/GetScriptJobBatchResponse'; +import { GetScriptJobInfoRequest } from './model/GetScriptJobInfoRequest'; +import { GetScriptJobInfoResponse } from './model/GetScriptJobInfoResponse'; +import { GetScriptJobStatisticsRequest } from './model/GetScriptJobStatisticsRequest'; +import { GetScriptJobStatisticsResponse } from './model/GetScriptJobStatisticsResponse'; +import { GetScriptRequest } from './model/GetScriptRequest'; +import { GetScriptResponse } from './model/GetScriptResponse'; +import { HandleCocIncidentRequest } from './model/HandleCocIncidentRequest'; +import { HandleCocIncidentResponse } from './model/HandleCocIncidentResponse'; +import { HandleExternalIncidentRequest } from './model/HandleExternalIncidentRequest'; +import { HandleExternalIncidentResponseData } from './model/HandleExternalIncidentResponseData'; +import { IncidentTicketInfoResponseData } from './model/IncidentTicketInfoResponseData'; +import { InstanceCompliant } from './model/InstanceCompliant'; +import { JobScriptBatchDetailModel } from './model/JobScriptBatchDetailModel'; +import { JobScriptBatchListModel } from './model/JobScriptBatchListModel'; +import { JobScriptOrderInfoModel } from './model/JobScriptOrderInfoModel'; +import { JobScriptOrderInfoProp } from './model/JobScriptOrderInfoProp'; +import { JobScriptOrderListModel } from './model/JobScriptOrderListModel'; +import { JobScriptOrderListPage } from './model/JobScriptOrderListPage'; +import { JobScriptOrderListProp } from './model/JobScriptOrderListProp'; +import { JobScriptOrderOperationBody } from './model/JobScriptOrderOperationBody'; +import { JobScriptOrderStatisticsModel } from './model/JobScriptOrderStatisticsModel'; +import { ListApplicationsRequest } from './model/ListApplicationsRequest'; +import { ListApplicationsResponse } from './model/ListApplicationsResponse'; +import { ListAuthorizableTicketsExternalRequest } from './model/ListAuthorizableTicketsExternalRequest'; +import { ListAuthorizableTicketsExternalResponse } from './model/ListAuthorizableTicketsExternalResponse'; +import { ListAuthorizableTicketsReq } from './model/ListAuthorizableTicketsReq'; +import { ListBaseRequest } from './model/ListBaseRequest'; +import { ListBaseResponse } from './model/ListBaseResponse'; +import { ListCocTicketOperationHistoriesRequest } from './model/ListCocTicketOperationHistoriesRequest'; +import { ListCocTicketOperationHistoriesResponse } from './model/ListCocTicketOperationHistoriesResponse'; +import { ListInstanceCompliantRequest } from './model/ListInstanceCompliantRequest'; +import { ListInstanceCompliantResponse } from './model/ListInstanceCompliantResponse'; +import { ListPublicScriptsRequest } from './model/ListPublicScriptsRequest'; +import { ListPublicScriptsResponse } from './model/ListPublicScriptsResponse'; +import { ListResourceRequest } from './model/ListResourceRequest'; +import { ListResourceResponse } from './model/ListResourceResponse'; +import { ListScriptJobBatchesRequest } from './model/ListScriptJobBatchesRequest'; +import { ListScriptJobBatchesResponse } from './model/ListScriptJobBatchesResponse'; +import { ListScriptJobsRequest } from './model/ListScriptJobsRequest'; +import { ListScriptJobsResponse } from './model/ListScriptJobsResponse'; +import { ListScriptsRequest } from './model/ListScriptsRequest'; +import { ListScriptsResponse } from './model/ListScriptsResponse'; +import { ListTenantWarRoomRequestBody } from './model/ListTenantWarRoomRequestBody'; +import { ListTicketParams } from './model/ListTicketParams'; +import { ListWarRoomsRequest } from './model/ListWarRoomsRequest'; +import { ListWarRoomsResponse } from './model/ListWarRoomsResponse'; +import { NonCompliantSummary } from './model/NonCompliantSummary'; +import { ObjectFilter } from './model/ObjectFilter'; +import { OperateScriptJobRequest } from './model/OperateScriptJobRequest'; +import { OperateScriptJobResponse } from './model/OperateScriptJobResponse'; +import { PatchDetail } from './model/PatchDetail'; +import { PublicScriptDetailModel } from './model/PublicScriptDetailModel'; +import { PublicScriptListModel } from './model/PublicScriptListModel'; +import { PublicScriptListPage } from './model/PublicScriptListPage'; +import { PublicScriptPropertiesModel } from './model/PublicScriptPropertiesModel'; +import { ReportCustomEventRequestBody } from './model/ReportCustomEventRequestBody'; +import { ResourceInstance } from './model/ResourceInstance'; +import { ResourceInstanceProp } from './model/ResourceInstanceProp'; +import { ReviewerInfo } from './model/ReviewerInfo'; +import { ScheduleGroupInfo } from './model/ScheduleGroupInfo'; +import { ScriptDetailModel } from './model/ScriptDetailModel'; +import { ScriptExecuteInputParam } from './model/ScriptExecuteInputParam'; +import { ScriptExecuteModel } from './model/ScriptExecuteModel'; +import { ScriptExecuteParam } from './model/ScriptExecuteParam'; +import { ScriptExecuteParamReference } from './model/ScriptExecuteParamReference'; +import { ScriptListModel } from './model/ScriptListModel'; +import { ScriptListPage } from './model/ScriptListPage'; +import { ScriptParamDefine } from './model/ScriptParamDefine'; +import { ScriptPropertiesModel } from './model/ScriptPropertiesModel'; +import { SeveritySummary } from './model/SeveritySummary'; +import { ShowCocIncidentDetailRequest } from './model/ShowCocIncidentDetailRequest'; +import { ShowCocIncidentDetailResponse } from './model/ShowCocIncidentDetailResponse'; +import { ShowCocIssuesDetailRequest } from './model/ShowCocIssuesDetailRequest'; +import { ShowCocIssuesDetailResponse } from './model/ShowCocIssuesDetailResponse'; +import { ShowInstancePatchItemsRequest } from './model/ShowInstancePatchItemsRequest'; +import { ShowInstancePatchItemsResponse } from './model/ShowInstancePatchItemsResponse'; +import { SyncResourceReq } from './model/SyncResourceReq'; +import { SyncResourceRequest } from './model/SyncResourceRequest'; +import { SyncResourceResponse } from './model/SyncResourceResponse'; +import { Tag } from './model/Tag'; +import { TicketHistoryInfo } from './model/TicketHistoryInfo'; +import { TicketInfoEnumData } from './model/TicketInfoEnumData'; +import { UpdateScriptRequest } from './model/UpdateScriptRequest'; +import { UpdateScriptResponse } from './model/UpdateScriptResponse'; +import { UpdateTicketHistoryInfo } from './model/UpdateTicketHistoryInfo'; +import { WarRoomEnumeration } from './model/WarRoomEnumeration'; +import { WarRoomIncident } from './model/WarRoomIncident'; +import { WarRoomTenantInfo } from './model/WarRoomTenantInfo'; +import { WarRoomTenantInfoImpactedApplication } from './model/WarRoomTenantInfoImpactedApplication'; +import { WarRoomTenantInfoRegions } from './model/WarRoomTenantInfoRegions'; + +export class CocClient { + public static newBuilder(): ClientBuilder { + return new ClientBuilder(newClient); + } + + private hcClient: HcClient; + public constructor(client: HcClient) { + this.hcClient = client; + } + + public getPath() { + return __dirname; + } + + + /** + * 查询应用 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 查询应用 + * @param {number} limit 最大的返回数量 + * @param {Array} [idList] id列表 + * @param {string} [parentId] parent id + * @param {string} [nameLike] 应用名称模糊匹配 + * @param {string} [code] 应用code + * @param {string} [marker] 分页参数,上一页请求最后一个id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public listApplications(listApplicationsRequest?: ListApplicationsRequest): Promise { + const options = ParamCreater().listApplications(listApplicationsRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * 分页获取节点合规性报告 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 获取节点合规性报告 + * @param {string} [enterpriseProjectId] 企业项目id + * @param {string} [name] 名称 + * @param {string} [instanceId] ECS实例id + * @param {string} [ip] 内网ip + * @param {string} [eip] 弹性公网ip + * @param {string} [operatingSystem] 操作系统 - HuaweiCloudEulerOS - CentOS - EulerOS + * @param {string} [region] 区域 + * @param {string} [group] 分组 + * @param {string} [compliantStatus] 合规性状态 - non_compliant:不合规 - compliant:合规 + * @param {string} [orderId] 工单id + * @param {number} [offset] 偏移量 + * @param {number} [limit] 每页数量 + * @param {string} [sortDir] 排序 - asc:升序 - desc:降序 + * @param {string} [sortKey] 排序字段 - report_time:报告时间 + * @param {string} [reportScene] 报告场景 - CCE - ECS + * @param {string} [cceInfoId] cce 集群信息id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public listInstanceCompliant(listInstanceCompliantRequest?: ListInstanceCompliantRequest): Promise { + const options = ParamCreater().listInstanceCompliant(listInstanceCompliantRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * 分页获取节点补丁详情 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 分页获取节点补丁详情 + * @param {string} instanceCompliantId 合规性报告id + * @param {number} [offset] 偏移量 + * @param {number} [limit] 每页数量 + * @param {string} [title] 补丁名称 + * @param {string} [sortDir] 排序 - asc:升序 - desc:降序 + * @param {string} [sortKey] 排序字段 -installed_time:补丁安装时间 + * @param {string} [patchStatus] 补丁状态 INSTALLED:已安装 INSTALLED_OTHER:已安装其他 MISSING:缺失 REJECT:拒绝 FAILED:失败 PENDING_REBOOT:已安装待重启 + * @param {string} [classification] 分类 + * @param {string} [severityLevel] 严重性级别 + * @param {string} [complianceLevel] 合规性级别 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public showInstancePatchItems(showInstancePatchItemsRequest?: ShowInstancePatchItemsRequest): Promise { + const options = ParamCreater().showInstancePatchItems(showInstancePatchItemsRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * 支持租户将自开发的监控系统按照标准化集成至COC,集成后告警会按照标准格式上报至COC告警中心 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 支持用户自主接入告警数据 + * @param {string} integrationKey 集成ID + * @param {ReportCustomEventRequestBody} reportCustomEventRequestBody 应用运维管理事件接入请求内容 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public createReportCustomEvent(createReportCustomEventRequest?: CreateReportCustomEventRequest): Promise { + const options = ParamCreater().createReportCustomEvent(createReportCustomEventRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * Prometheus事件接入 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary Prometheus事件接入 + * @param {string} integrationKey 集成ID + * @param {{ [key: string]: object; }} [prometheusMessageRequestBody] Prometheus事件接入请求内容 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public createReportPrometheusEvent(createReportPrometheusEventRequest?: CreateReportPrometheusEventRequest): Promise { + const options = ParamCreater().createReportPrometheusEvent(createReportPrometheusEventRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * CreateExternalIncident 创建事件单 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary CreateExternalIncident 创建事件单 + * @param {CreateExternalIncidentRequest} createCocIncidentRequestBody 创单参数 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public createCocIncident(createCocIncidentRequest?: CreateCocIncidentRequest): Promise { + const options = ParamCreater().createCocIncident(createCocIncidentRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * HandleCocIncident 处理事件单 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary HandleCocIncident处理事件单 + * @param {HandleExternalIncidentRequest} handleCocIncidentRequestBody request + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public handleCocIncident(handleCocIncidentRequest?: HandleCocIncidentRequest): Promise { + const options = ParamCreater().handleCocIncident(handleCocIncidentRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * ListCocTicketOperationHistories 获取事件单历史 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary GetCocTicketOperationHistories 获取事件单历史 + * @param {'incident' | 'issues_mgmt'} ticketType 工单类型:incident,issues_mgmt + * @param {ListTicketParams} listCocTicketOperationHistoriesRequestBody 查询参数。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public listCocTicketOperationHistories(listCocTicketOperationHistoriesRequest?: ListCocTicketOperationHistoriesRequest): Promise { + const options = ParamCreater().listCocTicketOperationHistories(listCocTicketOperationHistoriesRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * ShowCocIncidentDetail 获取事件单详细 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary GetCocIncidentDetail 获取事件单详细 + * @param {string} incidentNum 事件单号 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public showCocIncidentDetail(showCocIncidentDetailRequest?: ShowCocIncidentDetailRequest): Promise { + const options = ParamCreater().showCocIncidentDetail(showCocIncidentDetailRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * CreateExternalIssues 创建问题单 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary CreateExternalIssues 创建问题单 + * @param {CreateExternalIssuesRequest} createCocIssuesRequestBody 创单参数 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public createCocIssues(createCocIssuesRequest?: CreateCocIssuesRequest): Promise { + const options = ParamCreater().createCocIssues(createCocIssuesRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * ShowCocIssuesDetail 获取事件单详细 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary GetCocIssuesDetail 获取事件单详细 + * @param {string} ticketId 问题单号 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public showCocIssuesDetail(showCocIssuesDetailRequest?: ShowCocIssuesDetailRequest): Promise { + const options = ParamCreater().showCocIssuesDetail(showCocIssuesDetailRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * 查询COC可授权单列表(变更单号、事件单号、warroom和告警) + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 查询COC可授权单列表 + * @param {ListAuthorizableTicketsReq} listAuthorizableTicketsExternalRequestBody 查询参数。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public listAuthorizableTicketsExternal(listAuthorizableTicketsExternalRequest?: ListAuthorizableTicketsExternalRequest): Promise { + const options = ParamCreater().listAuthorizableTicketsExternal(listAuthorizableTicketsExternalRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * 查询用户所有资源 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 查询用户所有资源 + * @param {string} provider 云服务名称 + * @param {string} type 资源类型名称 + * @param {number} limit 最大的返回数量 + * @param {string} [marker] 分页参数,通过上一个请求中返回的marker信息作为输入,获取当前页 + * @param {Array} [resourceIdList] 资源id列表 + * @param {string} [name] 名称 + * @param {string} [regionId] region id + * @param {string} [azId] az id + * @param {string} [ipType] ip类型,fixed:内网IP,floating:弹性公网IP + * @param {string} [ip] ip + * @param {string} [status] 资源状态 + * @param {string} [agentState] agent状态 + * @param {string} [imageName] 镜像名称,模糊匹配 + * @param {string} [osType] 系统类型 + * @param {string} [tag] 标签的值 + * @param {string} [tagKey] 标签的key + * @param {string} [groupId] 分组id + * @param {string} [componentId] 组件id + * @param {string} [applicationId] 应用id + * @param {string} [cceClusterId] cce集群id + * @param {string} [vpcId] vpc id + * @param {string} [epId] 企业项目id + * @param {boolean} [isDelegated] 资源是否已托管 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public listResource(listResourceRequest?: ListResourceRequest): Promise { + const options = ParamCreater().listResource(listResourceRequest); + + // @ts-ignore + options['responseHeaders'] = ['X-request-id']; + + return this.hcClient.sendRequest(options); + } + + /** + * 从RMS同步用户所有资源 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 从RMS同步用户所有资源 + * @param {SyncResourceReq} syncResourceRequestBody 同步资源请求体 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public syncResource(syncResourceRequest?: SyncResourceRequest): Promise { + const options = ParamCreater().syncResource(syncResourceRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * 查询:批次详情,分页获取批次中的实例列表。 + * 过滤条件:分页参数 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 展示批次详情 + * @param {number} batchIndex 批次index + * @param {string} executeUuid 脚本工单的执行Id,取自executeJobScript和ListJobScriptOrders返回体中 + * @param {number} limit 分页参数:每页返回记录个数限制 + * @param {number} marker 分页参数:上一页最后一个记录id + * @param {'READY' | 'PROCESSING' | 'ABNORMAL' | 'CANCELED' | 'FINISHED'} [status] 实例执行状态 READY:待执行 PROCESSING:执行中 ABNORMAL:异常 CANCELED:已取消 FINISHED:成功 + * @param {string} [xLanguage] 国际化标记,zh-cn表示中文,en-us或不传表示英文 + * @param {string} [xProjectId] 项目ID,一个项目对应一个region + * @param {string} [xUserProfile] IAM5.0用户信息 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getScriptJobBatch(getScriptJobBatchRequest?: GetScriptJobBatchRequest): Promise { + const options = ParamCreater().getScriptJobBatch(getScriptJobBatchRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * 查询执行:基本信息 + * 执行类型、执行名称、创建人、创建时间、结束时间、执行状态、标签(脚本id,脚本名,执行脚本参数,执行用户,超时时长、成功率阈值) + * + * 不同的任务类型消费标签中的不同key + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 展示脚本工单基本信息 + * @param {string} executeUuid 脚本工单的执行Id,取自executeJobScript和ListJobScriptOrders返回体中 + * @param {string} [xLanguage] 国际化标记,zh-cn表示中文,en-us或不传表示英文 + * @param {string} [xProjectId] 项目ID,一个项目对应一个region + * @param {string} [xUserProfile] IAM5.0用户信息 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getScriptJobInfo(getScriptJobInfoRequest?: GetScriptJobInfoRequest): Promise { + const options = ParamCreater().getScriptJobInfo(getScriptJobInfoRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * 查询:实例状态统计信息。 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 展示实例状态统计信息 + * @param {string} executeUuid 脚本工单的执行Id,取自executeJobScript和ListJobScriptOrders返回体中 + * @param {string} [xLanguage] 国际化标记,zh-cn表示中文,en-us或不传表示英文 + * @param {string} [xProjectId] 项目ID,一个项目对应一个region + * @param {string} [xUserProfile] IAM5.0用户信息 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getScriptJobStatistics(getScriptJobStatisticsRequest?: GetScriptJobStatisticsRequest): Promise { + const options = ParamCreater().getScriptJobStatistics(getScriptJobStatisticsRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * 查询:批次列表 + * 返回:批次index、批次标签 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 展示批次列表 + * @param {string} executeUuid 脚本工单的执行Id,取自executeJobScript和ListJobScriptOrders返回体中 + * @param {string} [xLanguage] 国际化标记,zh-cn表示中文,en-us或不传表示英文 + * @param {string} [xProjectId] 项目ID,一个项目对应一个region + * @param {string} [xUserProfile] IAM5.0用户信息 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public listScriptJobBatches(listScriptJobBatchesRequest?: ListScriptJobBatchesRequest): Promise { + const options = ParamCreater().listScriptJobBatches(listScriptJobBatchesRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * 查询作业工单列表,分页查询 + * 过滤:创建时间开始,创建时间结束、创建人 + * 返回:id、脚本名称、区域、创建人、创建时间、结束时间、总耗时、状态 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 展示工单列表 + * @param {number} [limit] 分页参数 + * @param {number} [marker] 分页参数 + * @param {number} [startTime] 创建时间开始 + * @param {number} [endTime] 创建时间结束 + * @param {string} [creator] 创建人 + * @param {'PROCESSING' | 'ABNORMAL' | 'PAUSED' | 'CANCELED' | 'FINISHED'} [status] 工单状态 PROCESSING:执行中 ABNORMAL:异常 PAUSED:暂停 CANCELED:已取消 FINISHED:成功 + * @param {string} [xLanguage] 国际化标记,zh-cn表示中文,en-us或不传表示英文 + * @param {string} [xProjectId] 项目ID,一个项目对应一个region + * @param {string} [xUserProfile] IAM5.0用户信息 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public listScriptJobs(listScriptJobsRequest?: ListScriptJobsRequest): Promise { + const options = ParamCreater().listScriptJobs(listScriptJobsRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * 操作类型:取消实例、跳过批次、取消整个工单、暂停整个工单、继续整个工单 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 操作脚本工单 + * @param {string} executeUuid 脚本工单的执行Id,取自executeJobScript和ListJobScriptOrders返回体中 + * @param {string} [xLanguage] 国际化标记,zh-cn表示中文,en-us或不传表示英文 + * @param {string} [xProjectId] 项目ID,一个项目对应一个region + * @param {string} [xUserProfile] IAM5.0用户信息 + * @param {JobScriptOrderOperationBody} [updateScriptOrderRequestBody] 工单操作请求体 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public operateScriptJob(operateScriptJobRequest?: OperateScriptJobRequest): Promise { + const options = ParamCreater().operateScriptJob(operateScriptJobRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * 创建作业脚本:自定义脚本 + * - 脚本有标签属性,表示是高危脚本。创建时候不需要对脚本进行是否是高危的二次校验。 + * - 进行租户隔离;北向接口创建的脚本,审批人字段不填写,默认不需要审批 + * - 约束条件: + * - 脚本名称:同一租户下,脚本名称不能重复,最大字符64个字符,支持中文+字母+数字+下划线。 + * - 脚本内容最大100kb。 + * - 脚本参数个数最多20个。 + * - 脚本描述:最大256个字符。 + * - 单个参数的参数名称 64个字符,只支持字母+数字+下划线。 + * - 单个参数的值最大1024个字符,正则表达式如下:^((?!\\.{2,})[a-zA-Z0-9_\\-/\\.\\*\\x20\\?:\",=+@\\\\\\[\\{\\]\\}])*$。 + * - 审批人最多支持5人。 + * - 脚本输出的日志总量只支持1MB。 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 创建脚本 + * @param {AddScriptModel} createScriptsRequestBody 添加脚本的请求体 + * @param {string} [xProjectId] 项目ID,一个项目对应一个region + * @param {string} [xUserProfile] IAM5.0用户信息 + * @param {string} [xLanguage] 国际化标记,zh-cn表示中文,en-us或不传表示英文 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public createScript(createScriptRequest?: CreateScriptRequest): Promise { + const options = ParamCreater().createScript(createScriptRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * 删除作业脚本:自定义脚本。 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 删除自定义脚本 + * @param {string} scriptUuid 脚本uuid + * @param {string} [xLanguage] 国际化标记,zh-cn表示中文,en-us或不传表示英文 + * @param {string} [xProjectId] 项目ID,一个项目对应一个region + * @param {string} [xUserProfile] IAM5.0用户信息 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public deleteScript(deleteScriptRequest?: DeleteScriptRequest): Promise { + const options = ParamCreater().deleteScript(deleteScriptRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * 执行脚本 + * + * 脚本入参、超时时间、执行用户、资源受限 + * 脚本入参支持20个。 + * 单次下发的机器支持200个。 + * 单次批次内机器数量最大10个。 + * 最大批次数量为20批。 + * 脚本输出的日志总量只支持1MB。 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 执行自定义脚本 + * @param {string} scriptUuid 脚本UUID + * @param {ScriptExecuteModel} executeScriptRequestBody 启动执行请求体 + * @param {string} [xLanguage] 国际化标记,zh-cn表示中文,en-us或不传表示英文 + * @param {string} [xProjectId] 项目ID,一个项目对应一个region + * @param {string} [xUserProfile] IAM5.0用户信息 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public executeScript(executeScriptRequest?: ExecuteScriptRequest): Promise { + const options = ParamCreater().executeScript(executeScriptRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * 获取脚本详情 + * 约束条件: + * 只能查询自定义脚本详情 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 获取自定义脚本详情 + * @param {string} scriptUuid 脚本UUID + * @param {string} [xLanguage] 国际化标记,zh-cn表示中文,en-us或不传表示英文 + * @param {string} [xProjectId] 项目ID,一个项目对应一个region + * @param {string} [xUserProfile] IAM5.0用户信息 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getScript(getScriptRequest?: GetScriptRequest): Promise { + const options = ParamCreater().getScript(getScriptRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * 作业脚本列表:自定义脚本 + * + * limit最大为100 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 查询脚本列表 + * @param {number} limit 分页参数:每页返回记录个数限制 + * @param {number} [marker] 分页参数:上一页最后一个记录id + * @param {string} [nameLike] 脚本名(模糊) + * @param {string} [creator] 创建人 + * @param {'LOW' | 'MEDIUM' | 'HIGH'} [riskLevel] 风险等级 LOW:低风险 MEDIUM:中风险 HIGH:高风险 + * @param {'SHELL' | 'PYTHON' | 'BAT'} [type] 脚本类型 SHELL:shell脚本 PYTHON:python脚本 BAT:Bat脚本 + * @param {string} [enterpriseProjectId] 企业项目id + * @param {string} [xLanguage] 国际化标记,zh-cn表示中文,en-us或不传表示英文 + * @param {string} [xProjectId] 项目ID,一个项目对应一个region + * @param {string} [xUserProfile] IAM5.0用户信息 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public listScripts(listScriptsRequest?: ListScriptsRequest): Promise { + const options = ParamCreater().listScripts(listScriptsRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * 修改作业脚本:自定义脚本 + * 约束条件: + * 脚本名称:同一租户下,脚本名称不能重复,最大字符64个字符,支持中文+字母+数字+下划线。 + * 脚本内容最大4096个字符。 + * 脚本参数个数最多20个。 + * 脚本描述:最大256个字符。 + * 单个参数的参数名称 64个字符,只支持字母+数字+下划线。 + * 单个参数的值最大1024个字符,正则表达式如下:^((?!.{2,})[a-zA-Z0-9_-/.*\\x20?:\",=+@\\[{]}])*$。 + * 修改的脚本如果有审批人,在修改之后,需要再次选择审批人,查询审批 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 修改脚本 + * @param {string} scriptUuid 脚本uuid + * @param {EditScriptModel} updateScriptRequestBody 待更新的脚本内容 + * @param {string} [xLanguage] 国际化标记,zh-cn表示中文,en-us或不传表示英文 + * @param {string} [xProjectId] 项目ID,一个项目对应一个region + * @param {string} [xUserProfile] IAM5.0用户信息 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public updateScript(updateScriptRequest?: UpdateScriptRequest): Promise { + const options = ParamCreater().updateScript(updateScriptRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * 执行公共脚本 + * 脚本入参、超时时间、执行用户、资源受限 + * 脚本入参支持20个。 + * 单次下发的机器支持200个。 + * 单次批次内机器数量最大10个。 + * 最大批次数量为20批。 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 执行公共脚本 + * @param {string} scriptUuid 公共脚本Uuid + * @param {ScriptExecuteModel} executeJobPublicScriptRequestBody 执行公共脚本请求体 + * @param {string} [xLanguage] 国际化标记,zh-cn表示中文,en-us或不传表示英文 + * @param {string} [xProjectId] 项目ID,一个项目对应一个region + * @param {string} [xUserProfile] IAM5.0用户信息 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public executePublicScript(executePublicScriptRequest?: ExecutePublicScriptRequest): Promise { + const options = ParamCreater().executePublicScript(executePublicScriptRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * 展示公共脚本详情 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 展示公共脚本详情 + * @param {string} scriptUuid 公共脚本Uuid + * @param {string} [xLanguage] 国际化标记,zh-cn表示中文,en-us或不传表示英文 + * @param {string} [xProjectId] 项目ID,一个项目对应一个region + * @param {string} [xUserProfile] IAM5.0用户信息 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getPublicScript(getPublicScriptRequest?: GetPublicScriptRequest): Promise { + const options = ParamCreater().getPublicScript(getPublicScriptRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * 获取公共脚本列表,分页逻辑:采用limit+marker方式,提高分页效率。用自增id作为marker参数 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 获取公共脚本列表 + * @param {number} limit 分页参数:每页返回记录个数限制 + * @param {number} [marker] 分页参数:上一页最后一个记录id + * @param {string} [nameLike] 脚本名(只支持右模糊搜索) + * @param {string} [name] 脚本名(精确搜索) + * @param {'LOW' | 'MEDIUM' | 'HIGH'} [riskLevel] 风险等级 LOW:低风险 MEDIUM:中风险 HIGH:高风险 + * @param {'SHELL' | 'PYTHON' | 'BAT'} [type] 脚本类型 SHELL:shell脚本 PYTHON:python脚本 BAT:bat脚本 + * @param {string} [xLanguage] 国际化标记,zh-cn表示中文,en-us或不传表示英文 + * @param {string} [xProjectId] 项目ID,一个项目对应一个region + * @param {string} [xUserProfile] IAM5.0用户信息 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public listPublicScripts(listPublicScriptsRequest?: ListPublicScriptsRequest): Promise { + const options = ParamCreater().listPublicScripts(listPublicScriptsRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * 创建租户区WarRoom + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 创建租户区WarRoom + * @param {CreateWarRoomRequestBody} createWarRoomRequestBody 创建租户区WarRoom的请求 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public createWarRoom(createWarRoomRequest?: CreateWarRoomRequest): Promise { + const options = ParamCreater().createWarRoom(createWarRoomRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + + /** + * 查询租户区WarRoom信息列表 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 查询租户区WarRoom信息列表 + * @param {ListTenantWarRoomRequestBody} listWarRoomRequestBody 查询租户区WarRoom列表的请求 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public listWarRooms(listWarRoomsRequest?: ListWarRoomsRequest): Promise { + const options = ParamCreater().listWarRooms(listWarRoomsRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } +} + +export const ParamCreater = function () { + return { + + /** + * 查询应用 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + listApplications(listApplicationsRequest?: ListApplicationsRequest) { + const options = { + method: "GET", + url: "/v1/applications", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {} + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + let limit; + + let idList; + + let parentId; + + let nameLike; + + let code; + + let marker; + + if (listApplicationsRequest !== null && listApplicationsRequest !== undefined) { + if (listApplicationsRequest instanceof ListApplicationsRequest) { + limit = listApplicationsRequest.limit; + idList = listApplicationsRequest.idList; + parentId = listApplicationsRequest.parentId; + nameLike = listApplicationsRequest.nameLike; + code = listApplicationsRequest.code; + marker = listApplicationsRequest.marker; + } else { + limit = listApplicationsRequest['limit']; + idList = listApplicationsRequest['id_list']; + parentId = listApplicationsRequest['parent_id']; + nameLike = listApplicationsRequest['name_like']; + code = listApplicationsRequest['code']; + marker = listApplicationsRequest['marker']; + } + } + + + if (limit === null || limit === undefined) { + throw new RequiredError('limit','Required parameter limit was null or undefined when calling listApplications.'); + } + if (limit !== null && limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + if (idList !== null && idList !== undefined) { + localVarQueryParameter['id_list'] = idList; + } + if (parentId !== null && parentId !== undefined) { + localVarQueryParameter['parent_id'] = parentId; + } + if (nameLike !== null && nameLike !== undefined) { + localVarQueryParameter['name_like'] = nameLike; + } + if (code !== null && code !== undefined) { + localVarQueryParameter['code'] = code; + } + if (marker !== null && marker !== undefined) { + localVarQueryParameter['marker'] = marker; + } + + options.queryParams = localVarQueryParameter; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 分页获取节点合规性报告 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + listInstanceCompliant(listInstanceCompliantRequest?: ListInstanceCompliantRequest) { + const options = { + method: "GET", + url: "/v1/patch/instance/compliant", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {} + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + let enterpriseProjectId; + + let name; + + let instanceId; + + let ip; + + let eip; + + let operatingSystem; + + let region; + + let group; + + let compliantStatus; + + let orderId; + + let offset; + + let limit; + + let sortDir; + + let sortKey; + + let reportScene; + + let cceInfoId; + + if (listInstanceCompliantRequest !== null && listInstanceCompliantRequest !== undefined) { + if (listInstanceCompliantRequest instanceof ListInstanceCompliantRequest) { + enterpriseProjectId = listInstanceCompliantRequest.enterpriseProjectId; + name = listInstanceCompliantRequest.name; + instanceId = listInstanceCompliantRequest.instanceId; + ip = listInstanceCompliantRequest.ip; + eip = listInstanceCompliantRequest.eip; + operatingSystem = listInstanceCompliantRequest.operatingSystem; + region = listInstanceCompliantRequest.region; + group = listInstanceCompliantRequest.group; + compliantStatus = listInstanceCompliantRequest.compliantStatus; + orderId = listInstanceCompliantRequest.orderId; + offset = listInstanceCompliantRequest.offset; + limit = listInstanceCompliantRequest.limit; + sortDir = listInstanceCompliantRequest.sortDir; + sortKey = listInstanceCompliantRequest.sortKey; + reportScene = listInstanceCompliantRequest.reportScene; + cceInfoId = listInstanceCompliantRequest.cceInfoId; + } else { + enterpriseProjectId = listInstanceCompliantRequest['enterprise_project_id']; + name = listInstanceCompliantRequest['name']; + instanceId = listInstanceCompliantRequest['instance_id']; + ip = listInstanceCompliantRequest['ip']; + eip = listInstanceCompliantRequest['eip']; + operatingSystem = listInstanceCompliantRequest['operating_system']; + region = listInstanceCompliantRequest['region']; + group = listInstanceCompliantRequest['group']; + compliantStatus = listInstanceCompliantRequest['compliant_status']; + orderId = listInstanceCompliantRequest['order_id']; + offset = listInstanceCompliantRequest['offset']; + limit = listInstanceCompliantRequest['limit']; + sortDir = listInstanceCompliantRequest['sort_dir']; + sortKey = listInstanceCompliantRequest['sort_key']; + reportScene = listInstanceCompliantRequest['report_scene']; + cceInfoId = listInstanceCompliantRequest['cce_info_id']; + } + } + + + if (enterpriseProjectId !== null && enterpriseProjectId !== undefined) { + localVarQueryParameter['enterprise_project_id'] = enterpriseProjectId; + } + if (name !== null && name !== undefined) { + localVarQueryParameter['name'] = name; + } + if (instanceId !== null && instanceId !== undefined) { + localVarQueryParameter['instance_id'] = instanceId; + } + if (ip !== null && ip !== undefined) { + localVarQueryParameter['ip'] = ip; + } + if (eip !== null && eip !== undefined) { + localVarQueryParameter['eip'] = eip; + } + if (operatingSystem !== null && operatingSystem !== undefined) { + localVarQueryParameter['operating_system'] = operatingSystem; + } + if (region !== null && region !== undefined) { + localVarQueryParameter['region'] = region; + } + if (group !== null && group !== undefined) { + localVarQueryParameter['group'] = group; + } + if (compliantStatus !== null && compliantStatus !== undefined) { + localVarQueryParameter['compliant_status'] = compliantStatus; + } + if (orderId !== null && orderId !== undefined) { + localVarQueryParameter['order_id'] = orderId; + } + if (offset !== null && offset !== undefined) { + localVarQueryParameter['offset'] = offset; + } + if (limit !== null && limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + if (sortDir !== null && sortDir !== undefined) { + localVarQueryParameter['sort_dir'] = sortDir; + } + if (sortKey !== null && sortKey !== undefined) { + localVarQueryParameter['sort_key'] = sortKey; + } + if (reportScene !== null && reportScene !== undefined) { + localVarQueryParameter['report_scene'] = reportScene; + } + if (cceInfoId !== null && cceInfoId !== undefined) { + localVarQueryParameter['cce_info_id'] = cceInfoId; + } + + options.queryParams = localVarQueryParameter; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 分页获取节点补丁详情 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + showInstancePatchItems(showInstancePatchItemsRequest?: ShowInstancePatchItemsRequest) { + const options = { + method: "GET", + url: "/v1/patch/instance/compliant/{instance_compliant_id}", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {} + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + let instanceCompliantId; + + let offset; + + let limit; + + let title; + + let sortDir; + + let sortKey; + + let patchStatus; + + let classification; + + let severityLevel; + + let complianceLevel; + + if (showInstancePatchItemsRequest !== null && showInstancePatchItemsRequest !== undefined) { + if (showInstancePatchItemsRequest instanceof ShowInstancePatchItemsRequest) { + instanceCompliantId = showInstancePatchItemsRequest.instanceCompliantId; + offset = showInstancePatchItemsRequest.offset; + limit = showInstancePatchItemsRequest.limit; + title = showInstancePatchItemsRequest.title; + sortDir = showInstancePatchItemsRequest.sortDir; + sortKey = showInstancePatchItemsRequest.sortKey; + patchStatus = showInstancePatchItemsRequest.patchStatus; + classification = showInstancePatchItemsRequest.classification; + severityLevel = showInstancePatchItemsRequest.severityLevel; + complianceLevel = showInstancePatchItemsRequest.complianceLevel; + } else { + instanceCompliantId = showInstancePatchItemsRequest['instance_compliant_id']; + offset = showInstancePatchItemsRequest['offset']; + limit = showInstancePatchItemsRequest['limit']; + title = showInstancePatchItemsRequest['title']; + sortDir = showInstancePatchItemsRequest['sort_dir']; + sortKey = showInstancePatchItemsRequest['sort_key']; + patchStatus = showInstancePatchItemsRequest['patch_status']; + classification = showInstancePatchItemsRequest['classification']; + severityLevel = showInstancePatchItemsRequest['severity_level']; + complianceLevel = showInstancePatchItemsRequest['compliance_level']; + } + } + + + if (instanceCompliantId === null || instanceCompliantId === undefined) { + throw new RequiredError('instanceCompliantId','Required parameter instanceCompliantId was null or undefined when calling showInstancePatchItems.'); + } + if (offset !== null && offset !== undefined) { + localVarQueryParameter['offset'] = offset; + } + if (limit !== null && limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + if (title !== null && title !== undefined) { + localVarQueryParameter['title'] = title; + } + if (sortDir !== null && sortDir !== undefined) { + localVarQueryParameter['sort_dir'] = sortDir; + } + if (sortKey !== null && sortKey !== undefined) { + localVarQueryParameter['sort_key'] = sortKey; + } + if (patchStatus !== null && patchStatus !== undefined) { + localVarQueryParameter['patch_status'] = patchStatus; + } + if (classification !== null && classification !== undefined) { + localVarQueryParameter['classification'] = classification; + } + if (severityLevel !== null && severityLevel !== undefined) { + localVarQueryParameter['severity_level'] = severityLevel; + } + if (complianceLevel !== null && complianceLevel !== undefined) { + localVarQueryParameter['compliance_level'] = complianceLevel; + } + + options.queryParams = localVarQueryParameter; + options.pathParams = { 'instance_compliant_id': instanceCompliantId, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 支持租户将自开发的监控系统按照标准化集成至COC,集成后告警会按照标准格式上报至COC告警中心 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + createReportCustomEvent(createReportCustomEventRequest?: CreateReportCustomEventRequest) { + const options = { + method: "POST", + url: "/event/huawei/custom/{integration_key}", + contentType: "application/json; charset=utf-8", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let body: any; + + let integrationKey; + + if (createReportCustomEventRequest !== null && createReportCustomEventRequest !== undefined) { + if (createReportCustomEventRequest instanceof CreateReportCustomEventRequest) { + integrationKey = createReportCustomEventRequest.integrationKey; + body = createReportCustomEventRequest.body + } else { + integrationKey = createReportCustomEventRequest['integration_key']; + body = createReportCustomEventRequest['body']; + } + } + + + if (integrationKey === null || integrationKey === undefined) { + throw new RequiredError('integrationKey','Required parameter integrationKey was null or undefined when calling createReportCustomEvent.'); + } + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + localVarHeaderParameter['Content-Type'] = 'application/json; charset=utf-8'; + + options.data = body !== undefined ? body : {}; + options.pathParams = { 'integration_key': integrationKey, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * Prometheus事件接入 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + createReportPrometheusEvent(createReportPrometheusEventRequest?: CreateReportPrometheusEventRequest) { + const options = { + method: "POST", + url: "/v1/event/prometheus/{integration_key}", + contentType: "application/json; charset=utf-8", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let body: any; + + let integrationKey; + + if (createReportPrometheusEventRequest !== null && createReportPrometheusEventRequest !== undefined) { + if (createReportPrometheusEventRequest instanceof CreateReportPrometheusEventRequest) { + integrationKey = createReportPrometheusEventRequest.integrationKey; + body = createReportPrometheusEventRequest.body + } else { + integrationKey = createReportPrometheusEventRequest['integration_key']; + body = createReportPrometheusEventRequest['body']; + } + } + + + if (integrationKey === null || integrationKey === undefined) { + throw new RequiredError('integrationKey','Required parameter integrationKey was null or undefined when calling createReportPrometheusEvent.'); + } + localVarHeaderParameter['Content-Type'] = 'application/json; charset=utf-8'; + + options.data = body !== undefined ? body : {}; + options.pathParams = { 'integration_key': integrationKey, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * CreateExternalIncident 创建事件单 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + createCocIncident(createCocIncidentRequest?: CreateCocIncidentRequest) { + const options = { + method: "POST", + url: "/v1/external/incident/create", + contentType: "application/json;charset=UTF-8", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let body: any; + + if (createCocIncidentRequest !== null && createCocIncidentRequest !== undefined) { + if (createCocIncidentRequest instanceof CreateCocIncidentRequest) { + body = createCocIncidentRequest.body + } else { + body = createCocIncidentRequest['body']; + } + } + + + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8'; + + options.data = body !== undefined ? body : {}; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * HandleCocIncident 处理事件单 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + handleCocIncident(handleCocIncidentRequest?: HandleCocIncidentRequest) { + const options = { + method: "POST", + url: "/v1/external/incident/handle", + contentType: "application/json;charset=UTF-8", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let body: any; + + if (handleCocIncidentRequest !== null && handleCocIncidentRequest !== undefined) { + if (handleCocIncidentRequest instanceof HandleCocIncidentRequest) { + body = handleCocIncidentRequest.body + } else { + body = handleCocIncidentRequest['body']; + } + } + + + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8'; + + options.data = body !== undefined ? body : {}; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * ListCocTicketOperationHistories 获取事件单历史 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + listCocTicketOperationHistories(listCocTicketOperationHistoriesRequest?: ListCocTicketOperationHistoriesRequest) { + const options = { + method: "POST", + url: "/v1/external/{ticket_type}/list-histories", + contentType: "application/json;charset=UTF-8", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let body: any; + + let ticketType; + + if (listCocTicketOperationHistoriesRequest !== null && listCocTicketOperationHistoriesRequest !== undefined) { + if (listCocTicketOperationHistoriesRequest instanceof ListCocTicketOperationHistoriesRequest) { + ticketType = listCocTicketOperationHistoriesRequest.ticketType; + body = listCocTicketOperationHistoriesRequest.body + } else { + ticketType = listCocTicketOperationHistoriesRequest['ticket_type']; + body = listCocTicketOperationHistoriesRequest['body']; + } + } + + + if (ticketType === null || ticketType === undefined) { + throw new RequiredError('ticketType','Required parameter ticketType was null or undefined when calling listCocTicketOperationHistories.'); + } + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8'; + + options.data = body !== undefined ? body : {}; + options.pathParams = { 'ticket_type': ticketType, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * ShowCocIncidentDetail 获取事件单详细 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + showCocIncidentDetail(showCocIncidentDetailRequest?: ShowCocIncidentDetailRequest) { + const options = { + method: "GET", + url: "/v1/external/incident/{incident_num}", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {} + }; + const localVarHeaderParameter = {} as any; + + + let incidentNum; + + if (showCocIncidentDetailRequest !== null && showCocIncidentDetailRequest !== undefined) { + if (showCocIncidentDetailRequest instanceof ShowCocIncidentDetailRequest) { + incidentNum = showCocIncidentDetailRequest.incidentNum; + } else { + incidentNum = showCocIncidentDetailRequest['incident_num']; + } + } + + + if (incidentNum === null || incidentNum === undefined) { + throw new RequiredError('incidentNum','Required parameter incidentNum was null or undefined when calling showCocIncidentDetail.'); + } + + options.pathParams = { 'incident_num': incidentNum, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * CreateExternalIssues 创建问题单 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + createCocIssues(createCocIssuesRequest?: CreateCocIssuesRequest) { + const options = { + method: "POST", + url: "/v1/external/issues/create", + contentType: "application/json;charset=UTF-8", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let body: any; + + if (createCocIssuesRequest !== null && createCocIssuesRequest !== undefined) { + if (createCocIssuesRequest instanceof CreateCocIssuesRequest) { + body = createCocIssuesRequest.body + } else { + body = createCocIssuesRequest['body']; + } + } + + + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8'; + + options.data = body !== undefined ? body : {}; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * ShowCocIssuesDetail 获取事件单详细 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + showCocIssuesDetail(showCocIssuesDetailRequest?: ShowCocIssuesDetailRequest) { + const options = { + method: "GET", + url: "/v1/external/issues/{ticket_id}", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {} + }; + const localVarHeaderParameter = {} as any; + + + let ticketId; + + if (showCocIssuesDetailRequest !== null && showCocIssuesDetailRequest !== undefined) { + if (showCocIssuesDetailRequest instanceof ShowCocIssuesDetailRequest) { + ticketId = showCocIssuesDetailRequest.ticketId; + } else { + ticketId = showCocIssuesDetailRequest['ticket_id']; + } + } + + + if (ticketId === null || ticketId === undefined) { + throw new RequiredError('ticketId','Required parameter ticketId was null or undefined when calling showCocIssuesDetail.'); + } + + options.pathParams = { 'ticket_id': ticketId, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 查询COC可授权单列表(变更单号、事件单号、warroom和告警) + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + listAuthorizableTicketsExternal(listAuthorizableTicketsExternalRequest?: ListAuthorizableTicketsExternalRequest) { + const options = { + method: "POST", + url: "/v1/external/list/authorizable-tickets", + contentType: "application/json;charset=UTF-8", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let body: any; + + if (listAuthorizableTicketsExternalRequest !== null && listAuthorizableTicketsExternalRequest !== undefined) { + if (listAuthorizableTicketsExternalRequest instanceof ListAuthorizableTicketsExternalRequest) { + body = listAuthorizableTicketsExternalRequest.body + } else { + body = listAuthorizableTicketsExternalRequest['body']; + } + } + + + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8'; + + options.data = body !== undefined ? body : {}; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 查询用户所有资源 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + listResource(listResourceRequest?: ListResourceRequest) { + const options = { + method: "GET", + url: "/v1/resources", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {} + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + let provider; + + let type; + + let limit; + + let marker; + + let resourceIdList; + + let name; + + let regionId; + + let azId; + + let ipType; + + let ip; + + let status; + + let agentState; + + let imageName; + + let osType; + + let tag; + + let tagKey; + + let groupId; + + let componentId; + + let applicationId; + + let cceClusterId; + + let vpcId; + + let epId; + + let isDelegated; + + if (listResourceRequest !== null && listResourceRequest !== undefined) { + if (listResourceRequest instanceof ListResourceRequest) { + provider = listResourceRequest.provider; + type = listResourceRequest.type; + limit = listResourceRequest.limit; + marker = listResourceRequest.marker; + resourceIdList = listResourceRequest.resourceIdList; + name = listResourceRequest.name; + regionId = listResourceRequest.regionId; + azId = listResourceRequest.azId; + ipType = listResourceRequest.ipType; + ip = listResourceRequest.ip; + status = listResourceRequest.status; + agentState = listResourceRequest.agentState; + imageName = listResourceRequest.imageName; + osType = listResourceRequest.osType; + tag = listResourceRequest.tag; + tagKey = listResourceRequest.tagKey; + groupId = listResourceRequest.groupId; + componentId = listResourceRequest.componentId; + applicationId = listResourceRequest.applicationId; + cceClusterId = listResourceRequest.cceClusterId; + vpcId = listResourceRequest.vpcId; + epId = listResourceRequest.epId; + isDelegated = listResourceRequest.isDelegated; + } else { + provider = listResourceRequest['provider']; + type = listResourceRequest['type']; + limit = listResourceRequest['limit']; + marker = listResourceRequest['marker']; + resourceIdList = listResourceRequest['resource_id_list']; + name = listResourceRequest['name']; + regionId = listResourceRequest['region_id']; + azId = listResourceRequest['az_id']; + ipType = listResourceRequest['ip_type']; + ip = listResourceRequest['ip']; + status = listResourceRequest['status']; + agentState = listResourceRequest['agent_state']; + imageName = listResourceRequest['image_name']; + osType = listResourceRequest['os_type']; + tag = listResourceRequest['tag']; + tagKey = listResourceRequest['tag_key']; + groupId = listResourceRequest['group_id']; + componentId = listResourceRequest['component_id']; + applicationId = listResourceRequest['application_id']; + cceClusterId = listResourceRequest['cce_cluster_id']; + vpcId = listResourceRequest['vpc_id']; + epId = listResourceRequest['ep_id']; + isDelegated = listResourceRequest['is_delegated']; + } + } + + + if (provider === null || provider === undefined) { + throw new RequiredError('provider','Required parameter provider was null or undefined when calling listResource.'); + } + if (provider !== null && provider !== undefined) { + localVarQueryParameter['provider'] = provider; + } + if (type === null || type === undefined) { + throw new RequiredError('type','Required parameter type was null or undefined when calling listResource.'); + } + if (type !== null && type !== undefined) { + localVarQueryParameter['type'] = type; + } + if (limit === null || limit === undefined) { + throw new RequiredError('limit','Required parameter limit was null or undefined when calling listResource.'); + } + if (limit !== null && limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + if (marker !== null && marker !== undefined) { + localVarQueryParameter['marker'] = marker; + } + if (resourceIdList !== null && resourceIdList !== undefined) { + localVarQueryParameter['resource_id_list'] = resourceIdList; + } + if (name !== null && name !== undefined) { + localVarQueryParameter['name'] = name; + } + if (regionId !== null && regionId !== undefined) { + localVarQueryParameter['region_id'] = regionId; + } + if (azId !== null && azId !== undefined) { + localVarQueryParameter['az_id'] = azId; + } + if (ipType !== null && ipType !== undefined) { + localVarQueryParameter['ip_type'] = ipType; + } + if (ip !== null && ip !== undefined) { + localVarQueryParameter['ip'] = ip; + } + if (status !== null && status !== undefined) { + localVarQueryParameter['status'] = status; + } + if (agentState !== null && agentState !== undefined) { + localVarQueryParameter['agent_state'] = agentState; + } + if (imageName !== null && imageName !== undefined) { + localVarQueryParameter['image_name'] = imageName; + } + if (osType !== null && osType !== undefined) { + localVarQueryParameter['os_type'] = osType; + } + if (tag !== null && tag !== undefined) { + localVarQueryParameter['tag'] = tag; + } + if (tagKey !== null && tagKey !== undefined) { + localVarQueryParameter['tag_key'] = tagKey; + } + if (groupId !== null && groupId !== undefined) { + localVarQueryParameter['group_id'] = groupId; + } + if (componentId !== null && componentId !== undefined) { + localVarQueryParameter['component_id'] = componentId; + } + if (applicationId !== null && applicationId !== undefined) { + localVarQueryParameter['application_id'] = applicationId; + } + if (cceClusterId !== null && cceClusterId !== undefined) { + localVarQueryParameter['cce_cluster_id'] = cceClusterId; + } + if (vpcId !== null && vpcId !== undefined) { + localVarQueryParameter['vpc_id'] = vpcId; + } + if (epId !== null && epId !== undefined) { + localVarQueryParameter['ep_id'] = epId; + } + if (isDelegated !== null && isDelegated !== undefined) { + localVarQueryParameter['is_delegated'] = isDelegated; + } + + options.queryParams = localVarQueryParameter; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 从RMS同步用户所有资源 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + syncResource(syncResourceRequest?: SyncResourceRequest) { + const options = { + method: "POST", + url: "/v1/resources/sync", + contentType: "application/json;charset=UTF-8", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let body: any; + + if (syncResourceRequest !== null && syncResourceRequest !== undefined) { + if (syncResourceRequest instanceof SyncResourceRequest) { + body = syncResourceRequest.body + } else { + body = syncResourceRequest['body']; + } + } + + + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8'; + + options.data = body !== undefined ? body : {}; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 查询:批次详情,分页获取批次中的实例列表。 + * 过滤条件:分页参数 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + getScriptJobBatch(getScriptJobBatchRequest?: GetScriptJobBatchRequest) { + const options = { + method: "GET", + url: "/v1/job/script/orders/{execute_uuid}/batches/{batch_index}", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {} + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + let batchIndex; + + let executeUuid; + + let limit; + + let marker; + + let status; + + let xLanguage; + + let xProjectId; + + let xUserProfile; + + if (getScriptJobBatchRequest !== null && getScriptJobBatchRequest !== undefined) { + if (getScriptJobBatchRequest instanceof GetScriptJobBatchRequest) { + batchIndex = getScriptJobBatchRequest.batchIndex; + executeUuid = getScriptJobBatchRequest.executeUuid; + limit = getScriptJobBatchRequest.limit; + marker = getScriptJobBatchRequest.marker; + status = getScriptJobBatchRequest.status; + xLanguage = getScriptJobBatchRequest.xLanguage; + xProjectId = getScriptJobBatchRequest.xProjectId; + xUserProfile = getScriptJobBatchRequest.xUserProfile; + } else { + batchIndex = getScriptJobBatchRequest['batch_index']; + executeUuid = getScriptJobBatchRequest['execute_uuid']; + limit = getScriptJobBatchRequest['limit']; + marker = getScriptJobBatchRequest['marker']; + status = getScriptJobBatchRequest['status']; + xLanguage = getScriptJobBatchRequest['X-Language']; + xProjectId = getScriptJobBatchRequest['x-project-id']; + xUserProfile = getScriptJobBatchRequest['x-user-profile']; + } + } + + + if (batchIndex === null || batchIndex === undefined) { + throw new RequiredError('batchIndex','Required parameter batchIndex was null or undefined when calling getScriptJobBatch.'); + } + if (executeUuid === null || executeUuid === undefined) { + throw new RequiredError('executeUuid','Required parameter executeUuid was null or undefined when calling getScriptJobBatch.'); + } + if (limit === null || limit === undefined) { + throw new RequiredError('limit','Required parameter limit was null or undefined when calling getScriptJobBatch.'); + } + if (limit !== null && limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + if (marker === null || marker === undefined) { + throw new RequiredError('marker','Required parameter marker was null or undefined when calling getScriptJobBatch.'); + } + if (marker !== null && marker !== undefined) { + localVarQueryParameter['marker'] = marker; + } + if (status !== null && status !== undefined) { + localVarQueryParameter['status'] = status; + } + if (xLanguage !== undefined && xLanguage !== null) { + localVarHeaderParameter['X-Language'] = String(xLanguage); + } + if (xProjectId !== undefined && xProjectId !== null) { + localVarHeaderParameter['x-project-id'] = String(xProjectId); + } + if (xUserProfile !== undefined && xUserProfile !== null) { + localVarHeaderParameter['x-user-profile'] = String(xUserProfile); + } + + options.queryParams = localVarQueryParameter; + options.pathParams = { 'batch_index': batchIndex,'execute_uuid': executeUuid, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 查询执行:基本信息 + * 执行类型、执行名称、创建人、创建时间、结束时间、执行状态、标签(脚本id,脚本名,执行脚本参数,执行用户,超时时长、成功率阈值) + * + * 不同的任务类型消费标签中的不同key + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + getScriptJobInfo(getScriptJobInfoRequest?: GetScriptJobInfoRequest) { + const options = { + method: "GET", + url: "/v1/job/script/orders/{execute_uuid}", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {} + }; + const localVarHeaderParameter = {} as any; + + + let executeUuid; + + let xLanguage; + + let xProjectId; + + let xUserProfile; + + if (getScriptJobInfoRequest !== null && getScriptJobInfoRequest !== undefined) { + if (getScriptJobInfoRequest instanceof GetScriptJobInfoRequest) { + executeUuid = getScriptJobInfoRequest.executeUuid; + xLanguage = getScriptJobInfoRequest.xLanguage; + xProjectId = getScriptJobInfoRequest.xProjectId; + xUserProfile = getScriptJobInfoRequest.xUserProfile; + } else { + executeUuid = getScriptJobInfoRequest['execute_uuid']; + xLanguage = getScriptJobInfoRequest['X-Language']; + xProjectId = getScriptJobInfoRequest['x-project-id']; + xUserProfile = getScriptJobInfoRequest['x-user-profile']; + } + } + + + if (executeUuid === null || executeUuid === undefined) { + throw new RequiredError('executeUuid','Required parameter executeUuid was null or undefined when calling getScriptJobInfo.'); + } + if (xLanguage !== undefined && xLanguage !== null) { + localVarHeaderParameter['X-Language'] = String(xLanguage); + } + if (xProjectId !== undefined && xProjectId !== null) { + localVarHeaderParameter['x-project-id'] = String(xProjectId); + } + if (xUserProfile !== undefined && xUserProfile !== null) { + localVarHeaderParameter['x-user-profile'] = String(xUserProfile); + } + + options.pathParams = { 'execute_uuid': executeUuid, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 查询:实例状态统计信息。 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + getScriptJobStatistics(getScriptJobStatisticsRequest?: GetScriptJobStatisticsRequest) { + const options = { + method: "GET", + url: "/v1/job/script/orders/{execute_uuid}/statistics", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {} + }; + const localVarHeaderParameter = {} as any; + + + let executeUuid; + + let xLanguage; + + let xProjectId; + + let xUserProfile; + + if (getScriptJobStatisticsRequest !== null && getScriptJobStatisticsRequest !== undefined) { + if (getScriptJobStatisticsRequest instanceof GetScriptJobStatisticsRequest) { + executeUuid = getScriptJobStatisticsRequest.executeUuid; + xLanguage = getScriptJobStatisticsRequest.xLanguage; + xProjectId = getScriptJobStatisticsRequest.xProjectId; + xUserProfile = getScriptJobStatisticsRequest.xUserProfile; + } else { + executeUuid = getScriptJobStatisticsRequest['execute_uuid']; + xLanguage = getScriptJobStatisticsRequest['X-Language']; + xProjectId = getScriptJobStatisticsRequest['x-project-id']; + xUserProfile = getScriptJobStatisticsRequest['x-user-profile']; + } + } + + + if (executeUuid === null || executeUuid === undefined) { + throw new RequiredError('executeUuid','Required parameter executeUuid was null or undefined when calling getScriptJobStatistics.'); + } + if (xLanguage !== undefined && xLanguage !== null) { + localVarHeaderParameter['X-Language'] = String(xLanguage); + } + if (xProjectId !== undefined && xProjectId !== null) { + localVarHeaderParameter['x-project-id'] = String(xProjectId); + } + if (xUserProfile !== undefined && xUserProfile !== null) { + localVarHeaderParameter['x-user-profile'] = String(xUserProfile); + } + + options.pathParams = { 'execute_uuid': executeUuid, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 查询:批次列表 + * 返回:批次index、批次标签 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + listScriptJobBatches(listScriptJobBatchesRequest?: ListScriptJobBatchesRequest) { + const options = { + method: "GET", + url: "/v1/job/script/orders/{execute_uuid}/batches", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {} + }; + const localVarHeaderParameter = {} as any; + + + let executeUuid; + + let xLanguage; + + let xProjectId; + + let xUserProfile; + + if (listScriptJobBatchesRequest !== null && listScriptJobBatchesRequest !== undefined) { + if (listScriptJobBatchesRequest instanceof ListScriptJobBatchesRequest) { + executeUuid = listScriptJobBatchesRequest.executeUuid; + xLanguage = listScriptJobBatchesRequest.xLanguage; + xProjectId = listScriptJobBatchesRequest.xProjectId; + xUserProfile = listScriptJobBatchesRequest.xUserProfile; + } else { + executeUuid = listScriptJobBatchesRequest['execute_uuid']; + xLanguage = listScriptJobBatchesRequest['X-Language']; + xProjectId = listScriptJobBatchesRequest['x-project-id']; + xUserProfile = listScriptJobBatchesRequest['x-user-profile']; + } + } + + + if (executeUuid === null || executeUuid === undefined) { + throw new RequiredError('executeUuid','Required parameter executeUuid was null or undefined when calling listScriptJobBatches.'); + } + if (xLanguage !== undefined && xLanguage !== null) { + localVarHeaderParameter['X-Language'] = String(xLanguage); + } + if (xProjectId !== undefined && xProjectId !== null) { + localVarHeaderParameter['x-project-id'] = String(xProjectId); + } + if (xUserProfile !== undefined && xUserProfile !== null) { + localVarHeaderParameter['x-user-profile'] = String(xUserProfile); + } + + options.pathParams = { 'execute_uuid': executeUuid, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 查询作业工单列表,分页查询 + * 过滤:创建时间开始,创建时间结束、创建人 + * 返回:id、脚本名称、区域、创建人、创建时间、结束时间、总耗时、状态 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + listScriptJobs(listScriptJobsRequest?: ListScriptJobsRequest) { + const options = { + method: "GET", + url: "/v1/job/script/orders", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {} + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + let limit; + + let marker; + + let startTime; + + let endTime; + + let creator; + + let status; + + let xLanguage; + + let xProjectId; + + let xUserProfile; + + if (listScriptJobsRequest !== null && listScriptJobsRequest !== undefined) { + if (listScriptJobsRequest instanceof ListScriptJobsRequest) { + limit = listScriptJobsRequest.limit; + marker = listScriptJobsRequest.marker; + startTime = listScriptJobsRequest.startTime; + endTime = listScriptJobsRequest.endTime; + creator = listScriptJobsRequest.creator; + status = listScriptJobsRequest.status; + xLanguage = listScriptJobsRequest.xLanguage; + xProjectId = listScriptJobsRequest.xProjectId; + xUserProfile = listScriptJobsRequest.xUserProfile; + } else { + limit = listScriptJobsRequest['limit']; + marker = listScriptJobsRequest['marker']; + startTime = listScriptJobsRequest['start_time']; + endTime = listScriptJobsRequest['end_time']; + creator = listScriptJobsRequest['creator']; + status = listScriptJobsRequest['status']; + xLanguage = listScriptJobsRequest['X-Language']; + xProjectId = listScriptJobsRequest['x-project-id']; + xUserProfile = listScriptJobsRequest['x-user-profile']; + } + } + + + if (limit !== null && limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + if (marker !== null && marker !== undefined) { + localVarQueryParameter['marker'] = marker; + } + if (startTime !== null && startTime !== undefined) { + localVarQueryParameter['start_time'] = startTime; + } + if (endTime !== null && endTime !== undefined) { + localVarQueryParameter['end_time'] = endTime; + } + if (creator !== null && creator !== undefined) { + localVarQueryParameter['creator'] = creator; + } + if (status !== null && status !== undefined) { + localVarQueryParameter['status'] = status; + } + if (xLanguage !== undefined && xLanguage !== null) { + localVarHeaderParameter['X-Language'] = String(xLanguage); + } + if (xProjectId !== undefined && xProjectId !== null) { + localVarHeaderParameter['x-project-id'] = String(xProjectId); + } + if (xUserProfile !== undefined && xUserProfile !== null) { + localVarHeaderParameter['x-user-profile'] = String(xUserProfile); + } + + options.queryParams = localVarQueryParameter; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 操作类型:取消实例、跳过批次、取消整个工单、暂停整个工单、继续整个工单 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + operateScriptJob(operateScriptJobRequest?: OperateScriptJobRequest) { + const options = { + method: "PUT", + url: "/v1/job/script/orders/{execute_uuid}/operation", + contentType: "application/json;charset=UTF-8", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let body: any; + + let executeUuid; + + let xLanguage; + + let xProjectId; + + let xUserProfile; + + if (operateScriptJobRequest !== null && operateScriptJobRequest !== undefined) { + if (operateScriptJobRequest instanceof OperateScriptJobRequest) { + executeUuid = operateScriptJobRequest.executeUuid; + xLanguage = operateScriptJobRequest.xLanguage; + xProjectId = operateScriptJobRequest.xProjectId; + xUserProfile = operateScriptJobRequest.xUserProfile; + body = operateScriptJobRequest.body + } else { + executeUuid = operateScriptJobRequest['execute_uuid']; + xLanguage = operateScriptJobRequest['X-Language']; + xProjectId = operateScriptJobRequest['x-project-id']; + xUserProfile = operateScriptJobRequest['x-user-profile']; + body = operateScriptJobRequest['body']; + } + } + + + if (executeUuid === null || executeUuid === undefined) { + throw new RequiredError('executeUuid','Required parameter executeUuid was null or undefined when calling operateScriptJob.'); + } + if (xLanguage !== undefined && xLanguage !== null) { + localVarHeaderParameter['X-Language'] = String(xLanguage); + } + if (xProjectId !== undefined && xProjectId !== null) { + localVarHeaderParameter['x-project-id'] = String(xProjectId); + } + if (xUserProfile !== undefined && xUserProfile !== null) { + localVarHeaderParameter['x-user-profile'] = String(xUserProfile); + } + localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8'; + + options.data = body !== undefined ? body : {}; + options.pathParams = { 'execute_uuid': executeUuid, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 创建作业脚本:自定义脚本 + * - 脚本有标签属性,表示是高危脚本。创建时候不需要对脚本进行是否是高危的二次校验。 + * - 进行租户隔离;北向接口创建的脚本,审批人字段不填写,默认不需要审批 + * - 约束条件: + * - 脚本名称:同一租户下,脚本名称不能重复,最大字符64个字符,支持中文+字母+数字+下划线。 + * - 脚本内容最大100kb。 + * - 脚本参数个数最多20个。 + * - 脚本描述:最大256个字符。 + * - 单个参数的参数名称 64个字符,只支持字母+数字+下划线。 + * - 单个参数的值最大1024个字符,正则表达式如下:^((?!\\.{2,})[a-zA-Z0-9_\\-/\\.\\*\\x20\\?:\",=+@\\\\\\[\\{\\]\\}])*$。 + * - 审批人最多支持5人。 + * - 脚本输出的日志总量只支持1MB。 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + createScript(createScriptRequest?: CreateScriptRequest) { + const options = { + method: "POST", + url: "/v1/job/scripts", + contentType: "application/json;charset=UTF-8", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let body: any; + + let xProjectId; + + let xUserProfile; + + let xLanguage; + + if (createScriptRequest !== null && createScriptRequest !== undefined) { + if (createScriptRequest instanceof CreateScriptRequest) { + body = createScriptRequest.body + xProjectId = createScriptRequest.xProjectId; + xUserProfile = createScriptRequest.xUserProfile; + xLanguage = createScriptRequest.xLanguage; + } else { + body = createScriptRequest['body']; + xProjectId = createScriptRequest['x-project-id']; + xUserProfile = createScriptRequest['x-user-profile']; + xLanguage = createScriptRequest['X-Language']; + } + } + + + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + if (xProjectId !== undefined && xProjectId !== null) { + localVarHeaderParameter['x-project-id'] = String(xProjectId); + } + if (xUserProfile !== undefined && xUserProfile !== null) { + localVarHeaderParameter['x-user-profile'] = String(xUserProfile); + } + if (xLanguage !== undefined && xLanguage !== null) { + localVarHeaderParameter['X-Language'] = String(xLanguage); + } + localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8'; + + options.data = body !== undefined ? body : {}; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 删除作业脚本:自定义脚本。 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + deleteScript(deleteScriptRequest?: DeleteScriptRequest) { + const options = { + method: "DELETE", + url: "/v1/job/scripts/{script_uuid}", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {} + }; + const localVarHeaderParameter = {} as any; + + + let scriptUuid; + + let xLanguage; + + let xProjectId; + + let xUserProfile; + + if (deleteScriptRequest !== null && deleteScriptRequest !== undefined) { + if (deleteScriptRequest instanceof DeleteScriptRequest) { + scriptUuid = deleteScriptRequest.scriptUuid; + xLanguage = deleteScriptRequest.xLanguage; + xProjectId = deleteScriptRequest.xProjectId; + xUserProfile = deleteScriptRequest.xUserProfile; + } else { + scriptUuid = deleteScriptRequest['script_uuid']; + xLanguage = deleteScriptRequest['X-Language']; + xProjectId = deleteScriptRequest['x-project-id']; + xUserProfile = deleteScriptRequest['x-user-profile']; + } + } + + + if (scriptUuid === null || scriptUuid === undefined) { + throw new RequiredError('scriptUuid','Required parameter scriptUuid was null or undefined when calling deleteScript.'); + } + if (xLanguage !== undefined && xLanguage !== null) { + localVarHeaderParameter['X-Language'] = String(xLanguage); + } + if (xProjectId !== undefined && xProjectId !== null) { + localVarHeaderParameter['x-project-id'] = String(xProjectId); + } + if (xUserProfile !== undefined && xUserProfile !== null) { + localVarHeaderParameter['x-user-profile'] = String(xUserProfile); + } + + options.pathParams = { 'script_uuid': scriptUuid, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 执行脚本 + * + * 脚本入参、超时时间、执行用户、资源受限 + * 脚本入参支持20个。 + * 单次下发的机器支持200个。 + * 单次批次内机器数量最大10个。 + * 最大批次数量为20批。 + * 脚本输出的日志总量只支持1MB。 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + executeScript(executeScriptRequest?: ExecuteScriptRequest) { + const options = { + method: "POST", + url: "/v1/job/scripts/{script_uuid}", + contentType: "application/json;charset=UTF-8", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let body: any; + + let scriptUuid; + + let xLanguage; + + let xProjectId; + + let xUserProfile; + + if (executeScriptRequest !== null && executeScriptRequest !== undefined) { + if (executeScriptRequest instanceof ExecuteScriptRequest) { + scriptUuid = executeScriptRequest.scriptUuid; + body = executeScriptRequest.body + xLanguage = executeScriptRequest.xLanguage; + xProjectId = executeScriptRequest.xProjectId; + xUserProfile = executeScriptRequest.xUserProfile; + } else { + scriptUuid = executeScriptRequest['script_uuid']; + body = executeScriptRequest['body']; + xLanguage = executeScriptRequest['X-Language']; + xProjectId = executeScriptRequest['x-project-id']; + xUserProfile = executeScriptRequest['x-user-profile']; + } + } + + + if (scriptUuid === null || scriptUuid === undefined) { + throw new RequiredError('scriptUuid','Required parameter scriptUuid was null or undefined when calling executeScript.'); + } + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + if (xLanguage !== undefined && xLanguage !== null) { + localVarHeaderParameter['X-Language'] = String(xLanguage); + } + if (xProjectId !== undefined && xProjectId !== null) { + localVarHeaderParameter['x-project-id'] = String(xProjectId); + } + if (xUserProfile !== undefined && xUserProfile !== null) { + localVarHeaderParameter['x-user-profile'] = String(xUserProfile); + } + localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8'; + + options.data = body !== undefined ? body : {}; + options.pathParams = { 'script_uuid': scriptUuid, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 获取脚本详情 + * 约束条件: + * 只能查询自定义脚本详情 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + getScript(getScriptRequest?: GetScriptRequest) { + const options = { + method: "GET", + url: "/v1/job/scripts/{script_uuid}", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {} + }; + const localVarHeaderParameter = {} as any; + + + let scriptUuid; + + let xLanguage; + + let xProjectId; + + let xUserProfile; + + if (getScriptRequest !== null && getScriptRequest !== undefined) { + if (getScriptRequest instanceof GetScriptRequest) { + scriptUuid = getScriptRequest.scriptUuid; + xLanguage = getScriptRequest.xLanguage; + xProjectId = getScriptRequest.xProjectId; + xUserProfile = getScriptRequest.xUserProfile; + } else { + scriptUuid = getScriptRequest['script_uuid']; + xLanguage = getScriptRequest['X-Language']; + xProjectId = getScriptRequest['x-project-id']; + xUserProfile = getScriptRequest['x-user-profile']; + } + } + + + if (scriptUuid === null || scriptUuid === undefined) { + throw new RequiredError('scriptUuid','Required parameter scriptUuid was null or undefined when calling getScript.'); + } + if (xLanguage !== undefined && xLanguage !== null) { + localVarHeaderParameter['X-Language'] = String(xLanguage); + } + if (xProjectId !== undefined && xProjectId !== null) { + localVarHeaderParameter['x-project-id'] = String(xProjectId); + } + if (xUserProfile !== undefined && xUserProfile !== null) { + localVarHeaderParameter['x-user-profile'] = String(xUserProfile); + } + + options.pathParams = { 'script_uuid': scriptUuid, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 作业脚本列表:自定义脚本 + * + * limit最大为100 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + listScripts(listScriptsRequest?: ListScriptsRequest) { + const options = { + method: "GET", + url: "/v1/job/scripts", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {} + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + let limit; + + let marker; + + let nameLike; + + let creator; + + let riskLevel; + + let type; + + let enterpriseProjectId; + + let xLanguage; + + let xProjectId; + + let xUserProfile; + + if (listScriptsRequest !== null && listScriptsRequest !== undefined) { + if (listScriptsRequest instanceof ListScriptsRequest) { + limit = listScriptsRequest.limit; + marker = listScriptsRequest.marker; + nameLike = listScriptsRequest.nameLike; + creator = listScriptsRequest.creator; + riskLevel = listScriptsRequest.riskLevel; + type = listScriptsRequest.type; + enterpriseProjectId = listScriptsRequest.enterpriseProjectId; + xLanguage = listScriptsRequest.xLanguage; + xProjectId = listScriptsRequest.xProjectId; + xUserProfile = listScriptsRequest.xUserProfile; + } else { + limit = listScriptsRequest['limit']; + marker = listScriptsRequest['marker']; + nameLike = listScriptsRequest['name_like']; + creator = listScriptsRequest['creator']; + riskLevel = listScriptsRequest['risk_level']; + type = listScriptsRequest['type']; + enterpriseProjectId = listScriptsRequest['enterprise_project_id']; + xLanguage = listScriptsRequest['X-Language']; + xProjectId = listScriptsRequest['x-project-id']; + xUserProfile = listScriptsRequest['x-user-profile']; + } + } + + + if (limit === null || limit === undefined) { + throw new RequiredError('limit','Required parameter limit was null or undefined when calling listScripts.'); + } + if (limit !== null && limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + if (marker !== null && marker !== undefined) { + localVarQueryParameter['marker'] = marker; + } + if (nameLike !== null && nameLike !== undefined) { + localVarQueryParameter['name_like'] = nameLike; + } + if (creator !== null && creator !== undefined) { + localVarQueryParameter['creator'] = creator; + } + if (riskLevel !== null && riskLevel !== undefined) { + localVarQueryParameter['risk_level'] = riskLevel; + } + if (type !== null && type !== undefined) { + localVarQueryParameter['type'] = type; + } + if (enterpriseProjectId !== null && enterpriseProjectId !== undefined) { + localVarQueryParameter['enterprise_project_id'] = enterpriseProjectId; + } + if (xLanguage !== undefined && xLanguage !== null) { + localVarHeaderParameter['X-Language'] = String(xLanguage); + } + if (xProjectId !== undefined && xProjectId !== null) { + localVarHeaderParameter['x-project-id'] = String(xProjectId); + } + if (xUserProfile !== undefined && xUserProfile !== null) { + localVarHeaderParameter['x-user-profile'] = String(xUserProfile); + } + + options.queryParams = localVarQueryParameter; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 修改作业脚本:自定义脚本 + * 约束条件: + * 脚本名称:同一租户下,脚本名称不能重复,最大字符64个字符,支持中文+字母+数字+下划线。 + * 脚本内容最大4096个字符。 + * 脚本参数个数最多20个。 + * 脚本描述:最大256个字符。 + * 单个参数的参数名称 64个字符,只支持字母+数字+下划线。 + * 单个参数的值最大1024个字符,正则表达式如下:^((?!.{2,})[a-zA-Z0-9_-/.*\\x20?:\",=+@\\[{]}])*$。 + * 修改的脚本如果有审批人,在修改之后,需要再次选择审批人,查询审批 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + updateScript(updateScriptRequest?: UpdateScriptRequest) { + const options = { + method: "PUT", + url: "/v1/job/scripts/{script_uuid}", + contentType: "application/json;charset=UTF-8", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let body: any; + + let scriptUuid; + + let xLanguage; + + let xProjectId; + + let xUserProfile; + + if (updateScriptRequest !== null && updateScriptRequest !== undefined) { + if (updateScriptRequest instanceof UpdateScriptRequest) { + scriptUuid = updateScriptRequest.scriptUuid; + body = updateScriptRequest.body + xLanguage = updateScriptRequest.xLanguage; + xProjectId = updateScriptRequest.xProjectId; + xUserProfile = updateScriptRequest.xUserProfile; + } else { + scriptUuid = updateScriptRequest['script_uuid']; + body = updateScriptRequest['body']; + xLanguage = updateScriptRequest['X-Language']; + xProjectId = updateScriptRequest['x-project-id']; + xUserProfile = updateScriptRequest['x-user-profile']; + } + } + + + if (scriptUuid === null || scriptUuid === undefined) { + throw new RequiredError('scriptUuid','Required parameter scriptUuid was null or undefined when calling updateScript.'); + } + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + if (xLanguage !== undefined && xLanguage !== null) { + localVarHeaderParameter['X-Language'] = String(xLanguage); + } + if (xProjectId !== undefined && xProjectId !== null) { + localVarHeaderParameter['x-project-id'] = String(xProjectId); + } + if (xUserProfile !== undefined && xUserProfile !== null) { + localVarHeaderParameter['x-user-profile'] = String(xUserProfile); + } + localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8'; + + options.data = body !== undefined ? body : {}; + options.pathParams = { 'script_uuid': scriptUuid, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 执行公共脚本 + * 脚本入参、超时时间、执行用户、资源受限 + * 脚本入参支持20个。 + * 单次下发的机器支持200个。 + * 单次批次内机器数量最大10个。 + * 最大批次数量为20批。 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + executePublicScript(executePublicScriptRequest?: ExecutePublicScriptRequest) { + const options = { + method: "POST", + url: "/v1/job/public-scripts/{script_uuid}", + contentType: "application/json;charset=UTF-8", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let body: any; + + let scriptUuid; + + let xLanguage; + + let xProjectId; + + let xUserProfile; + + if (executePublicScriptRequest !== null && executePublicScriptRequest !== undefined) { + if (executePublicScriptRequest instanceof ExecutePublicScriptRequest) { + scriptUuid = executePublicScriptRequest.scriptUuid; + body = executePublicScriptRequest.body + xLanguage = executePublicScriptRequest.xLanguage; + xProjectId = executePublicScriptRequest.xProjectId; + xUserProfile = executePublicScriptRequest.xUserProfile; + } else { + scriptUuid = executePublicScriptRequest['script_uuid']; + body = executePublicScriptRequest['body']; + xLanguage = executePublicScriptRequest['X-Language']; + xProjectId = executePublicScriptRequest['x-project-id']; + xUserProfile = executePublicScriptRequest['x-user-profile']; + } + } + + + if (scriptUuid === null || scriptUuid === undefined) { + throw new RequiredError('scriptUuid','Required parameter scriptUuid was null or undefined when calling executePublicScript.'); + } + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + if (xLanguage !== undefined && xLanguage !== null) { + localVarHeaderParameter['X-Language'] = String(xLanguage); + } + if (xProjectId !== undefined && xProjectId !== null) { + localVarHeaderParameter['x-project-id'] = String(xProjectId); + } + if (xUserProfile !== undefined && xUserProfile !== null) { + localVarHeaderParameter['x-user-profile'] = String(xUserProfile); + } + localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8'; + + options.data = body !== undefined ? body : {}; + options.pathParams = { 'script_uuid': scriptUuid, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 展示公共脚本详情 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + getPublicScript(getPublicScriptRequest?: GetPublicScriptRequest) { + const options = { + method: "GET", + url: "/v1/job/public-scripts/{script_uuid}", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {} + }; + const localVarHeaderParameter = {} as any; + + + let scriptUuid; + + let xLanguage; + + let xProjectId; + + let xUserProfile; + + if (getPublicScriptRequest !== null && getPublicScriptRequest !== undefined) { + if (getPublicScriptRequest instanceof GetPublicScriptRequest) { + scriptUuid = getPublicScriptRequest.scriptUuid; + xLanguage = getPublicScriptRequest.xLanguage; + xProjectId = getPublicScriptRequest.xProjectId; + xUserProfile = getPublicScriptRequest.xUserProfile; + } else { + scriptUuid = getPublicScriptRequest['script_uuid']; + xLanguage = getPublicScriptRequest['X-Language']; + xProjectId = getPublicScriptRequest['x-project-id']; + xUserProfile = getPublicScriptRequest['x-user-profile']; + } + } + + + if (scriptUuid === null || scriptUuid === undefined) { + throw new RequiredError('scriptUuid','Required parameter scriptUuid was null or undefined when calling getPublicScript.'); + } + if (xLanguage !== undefined && xLanguage !== null) { + localVarHeaderParameter['X-Language'] = String(xLanguage); + } + if (xProjectId !== undefined && xProjectId !== null) { + localVarHeaderParameter['x-project-id'] = String(xProjectId); + } + if (xUserProfile !== undefined && xUserProfile !== null) { + localVarHeaderParameter['x-user-profile'] = String(xUserProfile); + } + + options.pathParams = { 'script_uuid': scriptUuid, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 获取公共脚本列表,分页逻辑:采用limit+marker方式,提高分页效率。用自增id作为marker参数 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + listPublicScripts(listPublicScriptsRequest?: ListPublicScriptsRequest) { + const options = { + method: "GET", + url: "/v1/job/public-scripts", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {} + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + let limit; + + let marker; + + let nameLike; + + let name; + + let riskLevel; + + let type; + + let xLanguage; + + let xProjectId; + + let xUserProfile; + + if (listPublicScriptsRequest !== null && listPublicScriptsRequest !== undefined) { + if (listPublicScriptsRequest instanceof ListPublicScriptsRequest) { + limit = listPublicScriptsRequest.limit; + marker = listPublicScriptsRequest.marker; + nameLike = listPublicScriptsRequest.nameLike; + name = listPublicScriptsRequest.name; + riskLevel = listPublicScriptsRequest.riskLevel; + type = listPublicScriptsRequest.type; + xLanguage = listPublicScriptsRequest.xLanguage; + xProjectId = listPublicScriptsRequest.xProjectId; + xUserProfile = listPublicScriptsRequest.xUserProfile; + } else { + limit = listPublicScriptsRequest['limit']; + marker = listPublicScriptsRequest['marker']; + nameLike = listPublicScriptsRequest['name_like']; + name = listPublicScriptsRequest['name']; + riskLevel = listPublicScriptsRequest['risk_level']; + type = listPublicScriptsRequest['type']; + xLanguage = listPublicScriptsRequest['X-Language']; + xProjectId = listPublicScriptsRequest['x-project-id']; + xUserProfile = listPublicScriptsRequest['x-user-profile']; + } + } + + + if (limit === null || limit === undefined) { + throw new RequiredError('limit','Required parameter limit was null or undefined when calling listPublicScripts.'); + } + if (limit !== null && limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + if (marker !== null && marker !== undefined) { + localVarQueryParameter['marker'] = marker; + } + if (nameLike !== null && nameLike !== undefined) { + localVarQueryParameter['name_like'] = nameLike; + } + if (name !== null && name !== undefined) { + localVarQueryParameter['name'] = name; + } + if (riskLevel !== null && riskLevel !== undefined) { + localVarQueryParameter['risk_level'] = riskLevel; + } + if (type !== null && type !== undefined) { + localVarQueryParameter['type'] = type; + } + if (xLanguage !== undefined && xLanguage !== null) { + localVarHeaderParameter['X-Language'] = String(xLanguage); + } + if (xProjectId !== undefined && xProjectId !== null) { + localVarHeaderParameter['x-project-id'] = String(xProjectId); + } + if (xUserProfile !== undefined && xUserProfile !== null) { + localVarHeaderParameter['x-user-profile'] = String(xUserProfile); + } + + options.queryParams = localVarQueryParameter; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 创建租户区WarRoom + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + createWarRoom(createWarRoomRequest?: CreateWarRoomRequest) { + const options = { + method: "POST", + url: "/v1/external/warrooms", + contentType: "application/json;charset=UTF-8", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let body: any; + + if (createWarRoomRequest !== null && createWarRoomRequest !== undefined) { + if (createWarRoomRequest instanceof CreateWarRoomRequest) { + body = createWarRoomRequest.body + } else { + body = createWarRoomRequest['body']; + } + } + + + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8'; + + options.data = body !== undefined ? body : {}; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 查询租户区WarRoom信息列表 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + listWarRooms(listWarRoomsRequest?: ListWarRoomsRequest) { + const options = { + method: "POST", + url: "/v1/external/warrooms/list", + contentType: "application/json;charset=UTF-8", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let body: any; + + if (listWarRoomsRequest !== null && listWarRoomsRequest !== undefined) { + if (listWarRoomsRequest instanceof ListWarRoomsRequest) { + body = listWarRoomsRequest.body + } else { + body = listWarRoomsRequest['body']; + } + } + + + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8'; + + options.data = body !== undefined ? body : {}; + options.headers = localVarHeaderParameter; + return options; + }, + + } +}; + +function newClient(client: HcClient): CocClient { + return new CocClient(client); +} + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} \ No newline at end of file diff --git a/services/coc/v1/CocRegion.ts b/services/coc/v1/CocRegion.ts new file mode 100644 index 000000000..03f273c06 --- /dev/null +++ b/services/coc/v1/CocRegion.ts @@ -0,0 +1,28 @@ +import { Region } from "@huaweicloud/huaweicloud-sdk-core/region/region"; + + +interface RegionMap { + [key: string]: Region; +} + +export class CocRegion { + public static CN_NORTH_4 = new Region("cn-north-4", ["https://coc.myhuaweicloud.com"]); + public static AP_SOUTHEAST_3 = new Region("ap-southeast-3", ["https://coc-intl.myhuaweicloud.com"]); + + + private static REGION_MAP: RegionMap = { + "cn-north-4":CocRegion.CN_NORTH_4, + "ap-southeast-3":CocRegion.AP_SOUTHEAST_3 + }; + + public static valueOf(regionId: string) { + if (!regionId) { + throw new Error("Unexpected empty parameter: regionId."); + } + const result = this.REGION_MAP[regionId]; + if (result) { + return result; + } + throw new Error(`Unexpected regionId: ${regionId}.`) + } +} diff --git a/services/coc/v1/model/AddScriptModel.ts b/services/coc/v1/model/AddScriptModel.ts new file mode 100644 index 000000000..6512b4ed3 --- /dev/null +++ b/services/coc/v1/model/AddScriptModel.ts @@ -0,0 +1,70 @@ +import { ScriptParamDefine } from './ScriptParamDefine'; +import { ScriptPropertiesModel } from './ScriptPropertiesModel'; + + +export class AddScriptModel { + public name?: string; + public properties?: ScriptPropertiesModel; + public description?: string; + public type?: AddScriptModelTypeEnum | string; + public content?: string; + private 'enterprise_project_id'?: string; + private 'script_params'?: Array; + public constructor(name?: string, properties?: ScriptPropertiesModel, description?: string, type?: string, content?: string) { + this['name'] = name; + this['properties'] = properties; + this['description'] = description; + this['type'] = type; + this['content'] = content; + } + public withName(name: string): AddScriptModel { + this['name'] = name; + return this; + } + public withProperties(properties: ScriptPropertiesModel): AddScriptModel { + this['properties'] = properties; + return this; + } + public withDescription(description: string): AddScriptModel { + this['description'] = description; + return this; + } + public withType(type: AddScriptModelTypeEnum | string): AddScriptModel { + this['type'] = type; + return this; + } + public withContent(content: string): AddScriptModel { + this['content'] = content; + return this; + } + public withEnterpriseProjectId(enterpriseProjectId: string): AddScriptModel { + this['enterprise_project_id'] = enterpriseProjectId; + return this; + } + public set enterpriseProjectId(enterpriseProjectId: string | undefined) { + this['enterprise_project_id'] = enterpriseProjectId; + } + public get enterpriseProjectId(): string | undefined { + return this['enterprise_project_id']; + } + public withScriptParams(scriptParams: Array): AddScriptModel { + this['script_params'] = scriptParams; + return this; + } + public set scriptParams(scriptParams: Array | undefined) { + this['script_params'] = scriptParams; + } + public get scriptParams(): Array | undefined { + return this['script_params']; + } +} + +/** + * @export + * @enum {string} + */ +export enum AddScriptModelTypeEnum { + SHELL = 'SHELL', + PYTHON = 'PYTHON', + BAT = 'BAT' +} diff --git a/services/coc/v1/model/ApplicationQueryResponseData.ts b/services/coc/v1/model/ApplicationQueryResponseData.ts new file mode 100644 index 000000000..e1ad1bb73 --- /dev/null +++ b/services/coc/v1/model/ApplicationQueryResponseData.ts @@ -0,0 +1,53 @@ + + +export class ApplicationQueryResponseData { + public id?: string; + public name?: string; + public code?: string; + private 'domain_id'?: string; + private 'parent_id'?: string; + public description?: string; + public path?: string; + public constructor() { + } + public withId(id: string): ApplicationQueryResponseData { + this['id'] = id; + return this; + } + public withName(name: string): ApplicationQueryResponseData { + this['name'] = name; + return this; + } + public withCode(code: string): ApplicationQueryResponseData { + this['code'] = code; + return this; + } + public withDomainId(domainId: string): ApplicationQueryResponseData { + this['domain_id'] = domainId; + return this; + } + public set domainId(domainId: string | undefined) { + this['domain_id'] = domainId; + } + public get domainId(): string | undefined { + return this['domain_id']; + } + public withParentId(parentId: string): ApplicationQueryResponseData { + this['parent_id'] = parentId; + return this; + } + public set parentId(parentId: string | undefined) { + this['parent_id'] = parentId; + } + public get parentId(): string | undefined { + return this['parent_id']; + } + public withDescription(description: string): ApplicationQueryResponseData { + this['description'] = description; + return this; + } + public withPath(path: string): ApplicationQueryResponseData { + this['path'] = path; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/AuthorizableTicketBody.ts b/services/coc/v1/model/AuthorizableTicketBody.ts new file mode 100644 index 000000000..fd0a8e508 --- /dev/null +++ b/services/coc/v1/model/AuthorizableTicketBody.ts @@ -0,0 +1,33 @@ + + +export class AuthorizableTicketBody { + public type?: string; + private 'scope_id'?: string; + private 'target_id'?: string; + public constructor() { + } + public withType(type: string): AuthorizableTicketBody { + this['type'] = type; + return this; + } + public withScopeId(scopeId: string): AuthorizableTicketBody { + this['scope_id'] = scopeId; + return this; + } + public set scopeId(scopeId: string | undefined) { + this['scope_id'] = scopeId; + } + public get scopeId(): string | undefined { + return this['scope_id']; + } + public withTargetId(targetId: string): AuthorizableTicketBody { + this['target_id'] = targetId; + return this; + } + public set targetId(targetId: string | undefined) { + this['target_id'] = targetId; + } + public get targetId(): string | undefined { + return this['target_id']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/AuthorizeTicketCommonInfo.ts b/services/coc/v1/model/AuthorizeTicketCommonInfo.ts new file mode 100644 index 000000000..2ec148bbd --- /dev/null +++ b/services/coc/v1/model/AuthorizeTicketCommonInfo.ts @@ -0,0 +1,111 @@ + + +export class AuthorizeTicketCommonInfo { + private 'ticket_id'?: string; + private 'target_id'?: string; + private 'scope_id'?: string; + public title?: string; + private 'ticket_type'?: AuthorizeTicketCommonInfoTicketTypeEnum | string; + public owner?: Array; + public level?: string; + public status?: AuthorizeTicketCommonInfoStatusEnum | string; + private 'begin_time'?: string; + private 'end_time'?: string; + public constructor() { + } + public withTicketId(ticketId: string): AuthorizeTicketCommonInfo { + this['ticket_id'] = ticketId; + return this; + } + public set ticketId(ticketId: string | undefined) { + this['ticket_id'] = ticketId; + } + public get ticketId(): string | undefined { + return this['ticket_id']; + } + public withTargetId(targetId: string): AuthorizeTicketCommonInfo { + this['target_id'] = targetId; + return this; + } + public set targetId(targetId: string | undefined) { + this['target_id'] = targetId; + } + public get targetId(): string | undefined { + return this['target_id']; + } + public withScopeId(scopeId: string): AuthorizeTicketCommonInfo { + this['scope_id'] = scopeId; + return this; + } + public set scopeId(scopeId: string | undefined) { + this['scope_id'] = scopeId; + } + public get scopeId(): string | undefined { + return this['scope_id']; + } + public withTitle(title: string): AuthorizeTicketCommonInfo { + this['title'] = title; + return this; + } + public withTicketType(ticketType: AuthorizeTicketCommonInfoTicketTypeEnum | string): AuthorizeTicketCommonInfo { + this['ticket_type'] = ticketType; + return this; + } + public set ticketType(ticketType: AuthorizeTicketCommonInfoTicketTypeEnum | string | undefined) { + this['ticket_type'] = ticketType; + } + public get ticketType(): AuthorizeTicketCommonInfoTicketTypeEnum | string | undefined { + return this['ticket_type']; + } + public withOwner(owner: Array): AuthorizeTicketCommonInfo { + this['owner'] = owner; + return this; + } + public withLevel(level: string): AuthorizeTicketCommonInfo { + this['level'] = level; + return this; + } + public withStatus(status: AuthorizeTicketCommonInfoStatusEnum | string): AuthorizeTicketCommonInfo { + this['status'] = status; + return this; + } + public withBeginTime(beginTime: string): AuthorizeTicketCommonInfo { + this['begin_time'] = beginTime; + return this; + } + public set beginTime(beginTime: string | undefined) { + this['begin_time'] = beginTime; + } + public get beginTime(): string | undefined { + return this['begin_time']; + } + public withEndTime(endTime: string): AuthorizeTicketCommonInfo { + this['end_time'] = endTime; + return this; + } + public set endTime(endTime: string | undefined) { + this['end_time'] = endTime; + } + public get endTime(): string | undefined { + return this['end_time']; + } +} + +/** + * @export + * @enum {string} + */ +export enum AuthorizeTicketCommonInfoTicketTypeEnum { + CHANGE = 'CHANGE', + INCIDENT = 'INCIDENT', + WAR_ROOM = 'WAR_ROOM', + ALARM = 'ALARM' +} +/** + * @export + * @enum {string} + */ +export enum AuthorizeTicketCommonInfoStatusEnum { + OPEN = 'open', + CLOSE = 'close' +} diff --git a/services/coc/v1/model/AuthorizeTicketInfo.ts b/services/coc/v1/model/AuthorizeTicketInfo.ts new file mode 100644 index 000000000..837727885 --- /dev/null +++ b/services/coc/v1/model/AuthorizeTicketInfo.ts @@ -0,0 +1,112 @@ +import { AuthorizeTicketCommonInfo } from './AuthorizeTicketCommonInfo'; + + +export class AuthorizeTicketInfo { + private 'ticket_id'?: string; + private 'target_id'?: string; + private 'scope_id'?: string; + public title?: string; + private 'ticket_type'?: AuthorizeTicketInfoTicketTypeEnum | string; + public owner?: Array; + public level?: string; + public status?: AuthorizeTicketInfoStatusEnum | string; + private 'begin_time'?: string; + private 'end_time'?: string; + public constructor() { + } + public withTicketId(ticketId: string): AuthorizeTicketInfo { + this['ticket_id'] = ticketId; + return this; + } + public set ticketId(ticketId: string | undefined) { + this['ticket_id'] = ticketId; + } + public get ticketId(): string | undefined { + return this['ticket_id']; + } + public withTargetId(targetId: string): AuthorizeTicketInfo { + this['target_id'] = targetId; + return this; + } + public set targetId(targetId: string | undefined) { + this['target_id'] = targetId; + } + public get targetId(): string | undefined { + return this['target_id']; + } + public withScopeId(scopeId: string): AuthorizeTicketInfo { + this['scope_id'] = scopeId; + return this; + } + public set scopeId(scopeId: string | undefined) { + this['scope_id'] = scopeId; + } + public get scopeId(): string | undefined { + return this['scope_id']; + } + public withTitle(title: string): AuthorizeTicketInfo { + this['title'] = title; + return this; + } + public withTicketType(ticketType: AuthorizeTicketInfoTicketTypeEnum | string): AuthorizeTicketInfo { + this['ticket_type'] = ticketType; + return this; + } + public set ticketType(ticketType: AuthorizeTicketInfoTicketTypeEnum | string | undefined) { + this['ticket_type'] = ticketType; + } + public get ticketType(): AuthorizeTicketInfoTicketTypeEnum | string | undefined { + return this['ticket_type']; + } + public withOwner(owner: Array): AuthorizeTicketInfo { + this['owner'] = owner; + return this; + } + public withLevel(level: string): AuthorizeTicketInfo { + this['level'] = level; + return this; + } + public withStatus(status: AuthorizeTicketInfoStatusEnum | string): AuthorizeTicketInfo { + this['status'] = status; + return this; + } + public withBeginTime(beginTime: string): AuthorizeTicketInfo { + this['begin_time'] = beginTime; + return this; + } + public set beginTime(beginTime: string | undefined) { + this['begin_time'] = beginTime; + } + public get beginTime(): string | undefined { + return this['begin_time']; + } + public withEndTime(endTime: string): AuthorizeTicketInfo { + this['end_time'] = endTime; + return this; + } + public set endTime(endTime: string | undefined) { + this['end_time'] = endTime; + } + public get endTime(): string | undefined { + return this['end_time']; + } +} + +/** + * @export + * @enum {string} + */ +export enum AuthorizeTicketInfoTicketTypeEnum { + CHANGE = 'CHANGE', + INCIDENT = 'INCIDENT', + WAR_ROOM = 'WAR_ROOM', + ALARM = 'ALARM' +} +/** + * @export + * @enum {string} + */ +export enum AuthorizeTicketInfoStatusEnum { + OPEN = 'open', + CLOSE = 'close' +} diff --git a/services/coc/v1/model/BaseResponse.ts b/services/coc/v1/model/BaseResponse.ts new file mode 100644 index 000000000..be584ecbe --- /dev/null +++ b/services/coc/v1/model/BaseResponse.ts @@ -0,0 +1,41 @@ + + +export class BaseResponse { + private 'provider_code'?: string; + private 'error_code'?: string; + private 'error_msg'?: string; + public constructor(providerCode?: string, errorCode?: string) { + this['provider_code'] = providerCode; + this['error_code'] = errorCode; + } + public withProviderCode(providerCode: string): BaseResponse { + this['provider_code'] = providerCode; + return this; + } + public set providerCode(providerCode: string | undefined) { + this['provider_code'] = providerCode; + } + public get providerCode(): string | undefined { + return this['provider_code']; + } + public withErrorCode(errorCode: string): BaseResponse { + this['error_code'] = errorCode; + return this; + } + public set errorCode(errorCode: string | undefined) { + this['error_code'] = errorCode; + } + public get errorCode(): string | undefined { + return this['error_code']; + } + public withErrorMsg(errorMsg: string): BaseResponse { + this['error_msg'] = errorMsg; + return this; + } + public set errorMsg(errorMsg: string | undefined) { + this['error_msg'] = errorMsg; + } + public get errorMsg(): string | undefined { + return this['error_msg']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/BatchListResourceResponseData.ts b/services/coc/v1/model/BatchListResourceResponseData.ts new file mode 100644 index 000000000..edd578b27 --- /dev/null +++ b/services/coc/v1/model/BatchListResourceResponseData.ts @@ -0,0 +1,125 @@ +import { Tag } from './Tag'; + + +export class BatchListResourceResponseData { + public id?: string; + private 'resource_id'?: string; + public name?: string; + public provider?: string; + public type?: string; + private 'project_id'?: string; + private 'region_id'?: string; + private 'ep_id'?: string; + public tags?: Array; + private 'agent_id'?: string; + private 'agent_state'?: string; + public properties?: { [key: string]: object; }; + private 'ingest_properties'?: { [key: string]: string; }; + private 'is_delegated'?: boolean; + public constructor() { + } + public withId(id: string): BatchListResourceResponseData { + this['id'] = id; + return this; + } + public withResourceId(resourceId: string): BatchListResourceResponseData { + this['resource_id'] = resourceId; + return this; + } + public set resourceId(resourceId: string | undefined) { + this['resource_id'] = resourceId; + } + public get resourceId(): string | undefined { + return this['resource_id']; + } + public withName(name: string): BatchListResourceResponseData { + this['name'] = name; + return this; + } + public withProvider(provider: string): BatchListResourceResponseData { + this['provider'] = provider; + return this; + } + public withType(type: string): BatchListResourceResponseData { + this['type'] = type; + return this; + } + public withProjectId(projectId: string): BatchListResourceResponseData { + this['project_id'] = projectId; + return this; + } + public set projectId(projectId: string | undefined) { + this['project_id'] = projectId; + } + public get projectId(): string | undefined { + return this['project_id']; + } + public withRegionId(regionId: string): BatchListResourceResponseData { + this['region_id'] = regionId; + return this; + } + public set regionId(regionId: string | undefined) { + this['region_id'] = regionId; + } + public get regionId(): string | undefined { + return this['region_id']; + } + public withEpId(epId: string): BatchListResourceResponseData { + this['ep_id'] = epId; + return this; + } + public set epId(epId: string | undefined) { + this['ep_id'] = epId; + } + public get epId(): string | undefined { + return this['ep_id']; + } + public withTags(tags: Array): BatchListResourceResponseData { + this['tags'] = tags; + return this; + } + public withAgentId(agentId: string): BatchListResourceResponseData { + this['agent_id'] = agentId; + return this; + } + public set agentId(agentId: string | undefined) { + this['agent_id'] = agentId; + } + public get agentId(): string | undefined { + return this['agent_id']; + } + public withAgentState(agentState: string): BatchListResourceResponseData { + this['agent_state'] = agentState; + return this; + } + public set agentState(agentState: string | undefined) { + this['agent_state'] = agentState; + } + public get agentState(): string | undefined { + return this['agent_state']; + } + public withProperties(properties: { [key: string]: object; }): BatchListResourceResponseData { + this['properties'] = properties; + return this; + } + public withIngestProperties(ingestProperties: { [key: string]: string; }): BatchListResourceResponseData { + this['ingest_properties'] = ingestProperties; + return this; + } + public set ingestProperties(ingestProperties: { [key: string]: string; } | undefined) { + this['ingest_properties'] = ingestProperties; + } + public get ingestProperties(): { [key: string]: string; } | undefined { + return this['ingest_properties']; + } + public withIsDelegated(isDelegated: boolean): BatchListResourceResponseData { + this['is_delegated'] = isDelegated; + return this; + } + public set isDelegated(isDelegated: boolean | undefined) { + this['is_delegated'] = isDelegated; + } + public get isDelegated(): boolean | undefined { + return this['is_delegated']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/CocIssuesTicketDetailInfoResponseData.ts b/services/coc/v1/model/CocIssuesTicketDetailInfoResponseData.ts new file mode 100644 index 000000000..01a587256 --- /dev/null +++ b/services/coc/v1/model/CocIssuesTicketDetailInfoResponseData.ts @@ -0,0 +1,250 @@ +import { TicketInfoEnumData } from './TicketInfoEnumData'; + + +export class CocIssuesTicketDetailInfoResponseData { + private 'ticket_type'?: string; + public level?: string; + private 'impacted_cloud_services'?: string; + private 'root_cause_cloud_service'?: string; + private 'root_cause_type'?: string; + private 'root_cause_comment'?: string; + public solution?: string; + private 'issue_contact_person'?: string; + private 'reproduce_probability'?: string; + private 'issue_version'?: string; + public title?: string; + private 'virtual_schedule_type'?: string; + public regions?: string; + public description?: string; + private 'fount_time'?: number; + private 'is_common_issue'?: boolean; + private 'is_need_change'?: boolean; + public creator?: string; + public operator?: string; + private 'ticket_id'?: string; + public assignee?: string; + private 'work_flow_status'?: string; + public phase?: string; + private 'update_time'?: number; + private 'create_time'?: number; + private 'is_deleted'?: boolean; + private 'enum_data_list'?: Array; + public constructor() { + } + public withTicketType(ticketType: string): CocIssuesTicketDetailInfoResponseData { + this['ticket_type'] = ticketType; + return this; + } + public set ticketType(ticketType: string | undefined) { + this['ticket_type'] = ticketType; + } + public get ticketType(): string | undefined { + return this['ticket_type']; + } + public withLevel(level: string): CocIssuesTicketDetailInfoResponseData { + this['level'] = level; + return this; + } + public withImpactedCloudServices(impactedCloudServices: string): CocIssuesTicketDetailInfoResponseData { + this['impacted_cloud_services'] = impactedCloudServices; + return this; + } + public set impactedCloudServices(impactedCloudServices: string | undefined) { + this['impacted_cloud_services'] = impactedCloudServices; + } + public get impactedCloudServices(): string | undefined { + return this['impacted_cloud_services']; + } + public withRootCauseCloudService(rootCauseCloudService: string): CocIssuesTicketDetailInfoResponseData { + this['root_cause_cloud_service'] = rootCauseCloudService; + return this; + } + public set rootCauseCloudService(rootCauseCloudService: string | undefined) { + this['root_cause_cloud_service'] = rootCauseCloudService; + } + public get rootCauseCloudService(): string | undefined { + return this['root_cause_cloud_service']; + } + public withRootCauseType(rootCauseType: string): CocIssuesTicketDetailInfoResponseData { + this['root_cause_type'] = rootCauseType; + return this; + } + public set rootCauseType(rootCauseType: string | undefined) { + this['root_cause_type'] = rootCauseType; + } + public get rootCauseType(): string | undefined { + return this['root_cause_type']; + } + public withRootCauseComment(rootCauseComment: string): CocIssuesTicketDetailInfoResponseData { + this['root_cause_comment'] = rootCauseComment; + return this; + } + public set rootCauseComment(rootCauseComment: string | undefined) { + this['root_cause_comment'] = rootCauseComment; + } + public get rootCauseComment(): string | undefined { + return this['root_cause_comment']; + } + public withSolution(solution: string): CocIssuesTicketDetailInfoResponseData { + this['solution'] = solution; + return this; + } + public withIssueContactPerson(issueContactPerson: string): CocIssuesTicketDetailInfoResponseData { + this['issue_contact_person'] = issueContactPerson; + return this; + } + public set issueContactPerson(issueContactPerson: string | undefined) { + this['issue_contact_person'] = issueContactPerson; + } + public get issueContactPerson(): string | undefined { + return this['issue_contact_person']; + } + public withReproduceProbability(reproduceProbability: string): CocIssuesTicketDetailInfoResponseData { + this['reproduce_probability'] = reproduceProbability; + return this; + } + public set reproduceProbability(reproduceProbability: string | undefined) { + this['reproduce_probability'] = reproduceProbability; + } + public get reproduceProbability(): string | undefined { + return this['reproduce_probability']; + } + public withIssueVersion(issueVersion: string): CocIssuesTicketDetailInfoResponseData { + this['issue_version'] = issueVersion; + return this; + } + public set issueVersion(issueVersion: string | undefined) { + this['issue_version'] = issueVersion; + } + public get issueVersion(): string | undefined { + return this['issue_version']; + } + public withTitle(title: string): CocIssuesTicketDetailInfoResponseData { + this['title'] = title; + return this; + } + public withVirtualScheduleType(virtualScheduleType: string): CocIssuesTicketDetailInfoResponseData { + this['virtual_schedule_type'] = virtualScheduleType; + return this; + } + public set virtualScheduleType(virtualScheduleType: string | undefined) { + this['virtual_schedule_type'] = virtualScheduleType; + } + public get virtualScheduleType(): string | undefined { + return this['virtual_schedule_type']; + } + public withRegions(regions: string): CocIssuesTicketDetailInfoResponseData { + this['regions'] = regions; + return this; + } + public withDescription(description: string): CocIssuesTicketDetailInfoResponseData { + this['description'] = description; + return this; + } + public withFountTime(fountTime: number): CocIssuesTicketDetailInfoResponseData { + this['fount_time'] = fountTime; + return this; + } + public set fountTime(fountTime: number | undefined) { + this['fount_time'] = fountTime; + } + public get fountTime(): number | undefined { + return this['fount_time']; + } + public withIsCommonIssue(isCommonIssue: boolean): CocIssuesTicketDetailInfoResponseData { + this['is_common_issue'] = isCommonIssue; + return this; + } + public set isCommonIssue(isCommonIssue: boolean | undefined) { + this['is_common_issue'] = isCommonIssue; + } + public get isCommonIssue(): boolean | undefined { + return this['is_common_issue']; + } + public withIsNeedChange(isNeedChange: boolean): CocIssuesTicketDetailInfoResponseData { + this['is_need_change'] = isNeedChange; + return this; + } + public set isNeedChange(isNeedChange: boolean | undefined) { + this['is_need_change'] = isNeedChange; + } + public get isNeedChange(): boolean | undefined { + return this['is_need_change']; + } + public withCreator(creator: string): CocIssuesTicketDetailInfoResponseData { + this['creator'] = creator; + return this; + } + public withOperator(operator: string): CocIssuesTicketDetailInfoResponseData { + this['operator'] = operator; + return this; + } + public withTicketId(ticketId: string): CocIssuesTicketDetailInfoResponseData { + this['ticket_id'] = ticketId; + return this; + } + public set ticketId(ticketId: string | undefined) { + this['ticket_id'] = ticketId; + } + public get ticketId(): string | undefined { + return this['ticket_id']; + } + public withAssignee(assignee: string): CocIssuesTicketDetailInfoResponseData { + this['assignee'] = assignee; + return this; + } + public withWorkFlowStatus(workFlowStatus: string): CocIssuesTicketDetailInfoResponseData { + this['work_flow_status'] = workFlowStatus; + return this; + } + public set workFlowStatus(workFlowStatus: string | undefined) { + this['work_flow_status'] = workFlowStatus; + } + public get workFlowStatus(): string | undefined { + return this['work_flow_status']; + } + public withPhase(phase: string): CocIssuesTicketDetailInfoResponseData { + this['phase'] = phase; + return this; + } + public withUpdateTime(updateTime: number): CocIssuesTicketDetailInfoResponseData { + this['update_time'] = updateTime; + return this; + } + public set updateTime(updateTime: number | undefined) { + this['update_time'] = updateTime; + } + public get updateTime(): number | undefined { + return this['update_time']; + } + public withCreateTime(createTime: number): CocIssuesTicketDetailInfoResponseData { + this['create_time'] = createTime; + return this; + } + public set createTime(createTime: number | undefined) { + this['create_time'] = createTime; + } + public get createTime(): number | undefined { + return this['create_time']; + } + public withIsDeleted(isDeleted: boolean): CocIssuesTicketDetailInfoResponseData { + this['is_deleted'] = isDeleted; + return this; + } + public set isDeleted(isDeleted: boolean | undefined) { + this['is_deleted'] = isDeleted; + } + public get isDeleted(): boolean | undefined { + return this['is_deleted']; + } + public withEnumDataList(enumDataList: Array): CocIssuesTicketDetailInfoResponseData { + this['enum_data_list'] = enumDataList; + return this; + } + public set enumDataList(enumDataList: Array | undefined) { + this['enum_data_list'] = enumDataList; + } + public get enumDataList(): Array | undefined { + return this['enum_data_list']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ComplianceItem.ts b/services/coc/v1/model/ComplianceItem.ts new file mode 100644 index 000000000..bf5f2570a --- /dev/null +++ b/services/coc/v1/model/ComplianceItem.ts @@ -0,0 +1,61 @@ +import { PatchDetail } from './PatchDetail'; + + +export class ComplianceItem { + private 'instance_id'?: string; + public title?: string; + public classification?: string; + private 'severity_level'?: string; + private 'compliance_level'?: string; + private 'patch_detail'?: PatchDetail; + public constructor() { + } + public withInstanceId(instanceId: string): ComplianceItem { + this['instance_id'] = instanceId; + return this; + } + public set instanceId(instanceId: string | undefined) { + this['instance_id'] = instanceId; + } + public get instanceId(): string | undefined { + return this['instance_id']; + } + public withTitle(title: string): ComplianceItem { + this['title'] = title; + return this; + } + public withClassification(classification: string): ComplianceItem { + this['classification'] = classification; + return this; + } + public withSeverityLevel(severityLevel: string): ComplianceItem { + this['severity_level'] = severityLevel; + return this; + } + public set severityLevel(severityLevel: string | undefined) { + this['severity_level'] = severityLevel; + } + public get severityLevel(): string | undefined { + return this['severity_level']; + } + public withComplianceLevel(complianceLevel: string): ComplianceItem { + this['compliance_level'] = complianceLevel; + return this; + } + public set complianceLevel(complianceLevel: string | undefined) { + this['compliance_level'] = complianceLevel; + } + public get complianceLevel(): string | undefined { + return this['compliance_level']; + } + public withPatchDetail(patchDetail: PatchDetail): ComplianceItem { + this['patch_detail'] = patchDetail; + return this; + } + public set patchDetail(patchDetail: PatchDetail | undefined) { + this['patch_detail'] = patchDetail; + } + public get patchDetail(): PatchDetail | undefined { + return this['patch_detail']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/CompliantSummary.ts b/services/coc/v1/model/CompliantSummary.ts new file mode 100644 index 000000000..534d5afa7 --- /dev/null +++ b/services/coc/v1/model/CompliantSummary.ts @@ -0,0 +1,29 @@ +import { SeveritySummary } from './SeveritySummary'; + + +export class CompliantSummary { + private 'compliant_count'?: number; + private 'severity_summary'?: SeveritySummary; + public constructor() { + } + public withCompliantCount(compliantCount: number): CompliantSummary { + this['compliant_count'] = compliantCount; + return this; + } + public set compliantCount(compliantCount: number | undefined) { + this['compliant_count'] = compliantCount; + } + public get compliantCount(): number | undefined { + return this['compliant_count']; + } + public withSeveritySummary(severitySummary: SeveritySummary): CompliantSummary { + this['severity_summary'] = severitySummary; + return this; + } + public set severitySummary(severitySummary: SeveritySummary | undefined) { + this['severity_summary'] = severitySummary; + } + public get severitySummary(): SeveritySummary | undefined { + return this['severity_summary']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/CreateCocIncidentRequest.ts b/services/coc/v1/model/CreateCocIncidentRequest.ts new file mode 100644 index 000000000..e7f29eafe --- /dev/null +++ b/services/coc/v1/model/CreateCocIncidentRequest.ts @@ -0,0 +1,12 @@ +import { CreateExternalIncidentRequest } from './CreateExternalIncidentRequest'; + + +export class CreateCocIncidentRequest { + public body?: CreateExternalIncidentRequest; + public constructor() { + } + public withBody(body: CreateExternalIncidentRequest): CreateCocIncidentRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/CreateCocIncidentResponse.ts b/services/coc/v1/model/CreateCocIncidentResponse.ts new file mode 100644 index 000000000..91627d988 --- /dev/null +++ b/services/coc/v1/model/CreateCocIncidentResponse.ts @@ -0,0 +1,50 @@ +import { BaseResponse } from './BaseResponse'; +import { CreateExternalIncidentResponseData } from './CreateExternalIncidentResponseData'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class CreateCocIncidentResponse extends SdkResponse { + private 'provider_code'?: string; + private 'error_code'?: string; + private 'error_msg'?: string; + public data?: CreateExternalIncidentResponseData; + public constructor(providerCode?: string, errorCode?: string) { + super(); + this['provider_code'] = providerCode; + this['error_code'] = errorCode; + } + public withProviderCode(providerCode: string): CreateCocIncidentResponse { + this['provider_code'] = providerCode; + return this; + } + public set providerCode(providerCode: string | undefined) { + this['provider_code'] = providerCode; + } + public get providerCode(): string | undefined { + return this['provider_code']; + } + public withErrorCode(errorCode: string): CreateCocIncidentResponse { + this['error_code'] = errorCode; + return this; + } + public set errorCode(errorCode: string | undefined) { + this['error_code'] = errorCode; + } + public get errorCode(): string | undefined { + return this['error_code']; + } + public withErrorMsg(errorMsg: string): CreateCocIncidentResponse { + this['error_msg'] = errorMsg; + return this; + } + public set errorMsg(errorMsg: string | undefined) { + this['error_msg'] = errorMsg; + } + public get errorMsg(): string | undefined { + return this['error_msg']; + } + public withData(data: CreateExternalIncidentResponseData): CreateCocIncidentResponse { + this['data'] = data; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/CreateCocIssuesRequest.ts b/services/coc/v1/model/CreateCocIssuesRequest.ts new file mode 100644 index 000000000..fb95ee9f3 --- /dev/null +++ b/services/coc/v1/model/CreateCocIssuesRequest.ts @@ -0,0 +1,12 @@ +import { CreateExternalIssuesRequest } from './CreateExternalIssuesRequest'; + + +export class CreateCocIssuesRequest { + public body?: CreateExternalIssuesRequest; + public constructor() { + } + public withBody(body: CreateExternalIssuesRequest): CreateCocIssuesRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/CreateCocIssuesResponse.ts b/services/coc/v1/model/CreateCocIssuesResponse.ts new file mode 100644 index 000000000..ee51529bb --- /dev/null +++ b/services/coc/v1/model/CreateCocIssuesResponse.ts @@ -0,0 +1,50 @@ +import { BaseResponse } from './BaseResponse'; +import { CreateExternalIssuesResponseData } from './CreateExternalIssuesResponseData'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class CreateCocIssuesResponse extends SdkResponse { + private 'provider_code'?: string; + private 'error_code'?: string; + private 'error_msg'?: string; + public data?: CreateExternalIssuesResponseData; + public constructor(providerCode?: string, errorCode?: string) { + super(); + this['provider_code'] = providerCode; + this['error_code'] = errorCode; + } + public withProviderCode(providerCode: string): CreateCocIssuesResponse { + this['provider_code'] = providerCode; + return this; + } + public set providerCode(providerCode: string | undefined) { + this['provider_code'] = providerCode; + } + public get providerCode(): string | undefined { + return this['provider_code']; + } + public withErrorCode(errorCode: string): CreateCocIssuesResponse { + this['error_code'] = errorCode; + return this; + } + public set errorCode(errorCode: string | undefined) { + this['error_code'] = errorCode; + } + public get errorCode(): string | undefined { + return this['error_code']; + } + public withErrorMsg(errorMsg: string): CreateCocIssuesResponse { + this['error_msg'] = errorMsg; + return this; + } + public set errorMsg(errorMsg: string | undefined) { + this['error_msg'] = errorMsg; + } + public get errorMsg(): string | undefined { + return this['error_msg']; + } + public withData(data: CreateExternalIssuesResponseData): CreateCocIssuesResponse { + this['data'] = data; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/CreateExternalIncidentRequest.ts b/services/coc/v1/model/CreateExternalIncidentRequest.ts new file mode 100644 index 000000000..c7c757267 --- /dev/null +++ b/services/coc/v1/model/CreateExternalIncidentRequest.ts @@ -0,0 +1,143 @@ + + +export class CreateExternalIncidentRequest { + public region?: Array; + private 'enterprise_project'?: Array; + private 'current_cloud_service'?: Array; + private 'incident_level'?: string; + private 'is_service_interrupt'?: boolean; + private 'incident_type'?: string; + private 'incident_title'?: string; + private 'incident_description'?: string; + private 'incident_source'?: string; + private 'incident_assignee'?: Array; + private 'assignee_scene'?: string; + private 'assignee_role'?: string; + public creator?: string; + public constructor(incidentLevel?: string, isServiceInterrupt?: boolean, incidentType?: string, incidentTitle?: string, incidentSource?: string, creator?: string) { + this['incident_level'] = incidentLevel; + this['is_service_interrupt'] = isServiceInterrupt; + this['incident_type'] = incidentType; + this['incident_title'] = incidentTitle; + this['incident_source'] = incidentSource; + this['creator'] = creator; + } + public withRegion(region: Array): CreateExternalIncidentRequest { + this['region'] = region; + return this; + } + public withEnterpriseProject(enterpriseProject: Array): CreateExternalIncidentRequest { + this['enterprise_project'] = enterpriseProject; + return this; + } + public set enterpriseProject(enterpriseProject: Array | undefined) { + this['enterprise_project'] = enterpriseProject; + } + public get enterpriseProject(): Array | undefined { + return this['enterprise_project']; + } + public withCurrentCloudService(currentCloudService: Array): CreateExternalIncidentRequest { + this['current_cloud_service'] = currentCloudService; + return this; + } + public set currentCloudService(currentCloudService: Array | undefined) { + this['current_cloud_service'] = currentCloudService; + } + public get currentCloudService(): Array | undefined { + return this['current_cloud_service']; + } + public withIncidentLevel(incidentLevel: string): CreateExternalIncidentRequest { + this['incident_level'] = incidentLevel; + return this; + } + public set incidentLevel(incidentLevel: string | undefined) { + this['incident_level'] = incidentLevel; + } + public get incidentLevel(): string | undefined { + return this['incident_level']; + } + public withIsServiceInterrupt(isServiceInterrupt: boolean): CreateExternalIncidentRequest { + this['is_service_interrupt'] = isServiceInterrupt; + return this; + } + public set isServiceInterrupt(isServiceInterrupt: boolean | undefined) { + this['is_service_interrupt'] = isServiceInterrupt; + } + public get isServiceInterrupt(): boolean | undefined { + return this['is_service_interrupt']; + } + public withIncidentType(incidentType: string): CreateExternalIncidentRequest { + this['incident_type'] = incidentType; + return this; + } + public set incidentType(incidentType: string | undefined) { + this['incident_type'] = incidentType; + } + public get incidentType(): string | undefined { + return this['incident_type']; + } + public withIncidentTitle(incidentTitle: string): CreateExternalIncidentRequest { + this['incident_title'] = incidentTitle; + return this; + } + public set incidentTitle(incidentTitle: string | undefined) { + this['incident_title'] = incidentTitle; + } + public get incidentTitle(): string | undefined { + return this['incident_title']; + } + public withIncidentDescription(incidentDescription: string): CreateExternalIncidentRequest { + this['incident_description'] = incidentDescription; + return this; + } + public set incidentDescription(incidentDescription: string | undefined) { + this['incident_description'] = incidentDescription; + } + public get incidentDescription(): string | undefined { + return this['incident_description']; + } + public withIncidentSource(incidentSource: string): CreateExternalIncidentRequest { + this['incident_source'] = incidentSource; + return this; + } + public set incidentSource(incidentSource: string | undefined) { + this['incident_source'] = incidentSource; + } + public get incidentSource(): string | undefined { + return this['incident_source']; + } + public withIncidentAssignee(incidentAssignee: Array): CreateExternalIncidentRequest { + this['incident_assignee'] = incidentAssignee; + return this; + } + public set incidentAssignee(incidentAssignee: Array | undefined) { + this['incident_assignee'] = incidentAssignee; + } + public get incidentAssignee(): Array | undefined { + return this['incident_assignee']; + } + public withAssigneeScene(assigneeScene: string): CreateExternalIncidentRequest { + this['assignee_scene'] = assigneeScene; + return this; + } + public set assigneeScene(assigneeScene: string | undefined) { + this['assignee_scene'] = assigneeScene; + } + public get assigneeScene(): string | undefined { + return this['assignee_scene']; + } + public withAssigneeRole(assigneeRole: string): CreateExternalIncidentRequest { + this['assignee_role'] = assigneeRole; + return this; + } + public set assigneeRole(assigneeRole: string | undefined) { + this['assignee_role'] = assigneeRole; + } + public get assigneeRole(): string | undefined { + return this['assignee_role']; + } + public withCreator(creator: string): CreateExternalIncidentRequest { + this['creator'] = creator; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/CreateExternalIncidentResponseData.ts b/services/coc/v1/model/CreateExternalIncidentResponseData.ts new file mode 100644 index 000000000..59d7d5773 --- /dev/null +++ b/services/coc/v1/model/CreateExternalIncidentResponseData.ts @@ -0,0 +1,18 @@ + + +export class CreateExternalIncidentResponseData { + private 'incident_num'?: string; + public constructor(incidentNum?: string) { + this['incident_num'] = incidentNum; + } + public withIncidentNum(incidentNum: string): CreateExternalIncidentResponseData { + this['incident_num'] = incidentNum; + return this; + } + public set incidentNum(incidentNum: string | undefined) { + this['incident_num'] = incidentNum; + } + public get incidentNum(): string | undefined { + return this['incident_num']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/CreateExternalIssuesRequest.ts b/services/coc/v1/model/CreateExternalIssuesRequest.ts new file mode 100644 index 000000000..52cd582c6 --- /dev/null +++ b/services/coc/v1/model/CreateExternalIssuesRequest.ts @@ -0,0 +1,214 @@ + + +export class CreateExternalIssuesRequest { + public creator?: string; + public title?: string; + public description?: string; + public regions?: Array; + private 'enterprise_project'?: string; + public source?: string; + private 'source_id'?: string; + private 'fount_time'?: number; + private 'impacted_cloud_services'?: Array; + public level?: CreateExternalIssuesRequestLevelEnum | string; + private 'ticket_type'?: CreateExternalIssuesRequestTicketTypeEnum | string; + private 'reproduce_probability'?: CreateExternalIssuesRequestReproduceProbabilityEnum | string; + private 'root_cause_cloud_service'?: Array; + private 'virtual_schedule_type'?: CreateExternalIssuesRequestVirtualScheduleTypeEnum | string; + private 'schedule_scenes'?: string; + private 'virtual_schedule_role'?: string; + private 'issue_contact_person'?: string; + public constructor(title?: string, description?: string, impactedCloudServices?: Array, level?: string, ticketType?: string, reproduceProbability?: string, rootCauseCloudService?: Array, virtualScheduleType?: string) { + this['title'] = title; + this['description'] = description; + this['impacted_cloud_services'] = impactedCloudServices; + this['level'] = level; + this['ticket_type'] = ticketType; + this['reproduce_probability'] = reproduceProbability; + this['root_cause_cloud_service'] = rootCauseCloudService; + this['virtual_schedule_type'] = virtualScheduleType; + } + public withCreator(creator: string): CreateExternalIssuesRequest { + this['creator'] = creator; + return this; + } + public withTitle(title: string): CreateExternalIssuesRequest { + this['title'] = title; + return this; + } + public withDescription(description: string): CreateExternalIssuesRequest { + this['description'] = description; + return this; + } + public withRegions(regions: Array): CreateExternalIssuesRequest { + this['regions'] = regions; + return this; + } + public withEnterpriseProject(enterpriseProject: string): CreateExternalIssuesRequest { + this['enterprise_project'] = enterpriseProject; + return this; + } + public set enterpriseProject(enterpriseProject: string | undefined) { + this['enterprise_project'] = enterpriseProject; + } + public get enterpriseProject(): string | undefined { + return this['enterprise_project']; + } + public withSource(source: string): CreateExternalIssuesRequest { + this['source'] = source; + return this; + } + public withSourceId(sourceId: string): CreateExternalIssuesRequest { + this['source_id'] = sourceId; + return this; + } + public set sourceId(sourceId: string | undefined) { + this['source_id'] = sourceId; + } + public get sourceId(): string | undefined { + return this['source_id']; + } + public withFountTime(fountTime: number): CreateExternalIssuesRequest { + this['fount_time'] = fountTime; + return this; + } + public set fountTime(fountTime: number | undefined) { + this['fount_time'] = fountTime; + } + public get fountTime(): number | undefined { + return this['fount_time']; + } + public withImpactedCloudServices(impactedCloudServices: Array): CreateExternalIssuesRequest { + this['impacted_cloud_services'] = impactedCloudServices; + return this; + } + public set impactedCloudServices(impactedCloudServices: Array | undefined) { + this['impacted_cloud_services'] = impactedCloudServices; + } + public get impactedCloudServices(): Array | undefined { + return this['impacted_cloud_services']; + } + public withLevel(level: CreateExternalIssuesRequestLevelEnum | string): CreateExternalIssuesRequest { + this['level'] = level; + return this; + } + public withTicketType(ticketType: CreateExternalIssuesRequestTicketTypeEnum | string): CreateExternalIssuesRequest { + this['ticket_type'] = ticketType; + return this; + } + public set ticketType(ticketType: CreateExternalIssuesRequestTicketTypeEnum | string | undefined) { + this['ticket_type'] = ticketType; + } + public get ticketType(): CreateExternalIssuesRequestTicketTypeEnum | string | undefined { + return this['ticket_type']; + } + public withReproduceProbability(reproduceProbability: CreateExternalIssuesRequestReproduceProbabilityEnum | string): CreateExternalIssuesRequest { + this['reproduce_probability'] = reproduceProbability; + return this; + } + public set reproduceProbability(reproduceProbability: CreateExternalIssuesRequestReproduceProbabilityEnum | string | undefined) { + this['reproduce_probability'] = reproduceProbability; + } + public get reproduceProbability(): CreateExternalIssuesRequestReproduceProbabilityEnum | string | undefined { + return this['reproduce_probability']; + } + public withRootCauseCloudService(rootCauseCloudService: Array): CreateExternalIssuesRequest { + this['root_cause_cloud_service'] = rootCauseCloudService; + return this; + } + public set rootCauseCloudService(rootCauseCloudService: Array | undefined) { + this['root_cause_cloud_service'] = rootCauseCloudService; + } + public get rootCauseCloudService(): Array | undefined { + return this['root_cause_cloud_service']; + } + public withVirtualScheduleType(virtualScheduleType: CreateExternalIssuesRequestVirtualScheduleTypeEnum | string): CreateExternalIssuesRequest { + this['virtual_schedule_type'] = virtualScheduleType; + return this; + } + public set virtualScheduleType(virtualScheduleType: CreateExternalIssuesRequestVirtualScheduleTypeEnum | string | undefined) { + this['virtual_schedule_type'] = virtualScheduleType; + } + public get virtualScheduleType(): CreateExternalIssuesRequestVirtualScheduleTypeEnum | string | undefined { + return this['virtual_schedule_type']; + } + public withScheduleScenes(scheduleScenes: string): CreateExternalIssuesRequest { + this['schedule_scenes'] = scheduleScenes; + return this; + } + public set scheduleScenes(scheduleScenes: string | undefined) { + this['schedule_scenes'] = scheduleScenes; + } + public get scheduleScenes(): string | undefined { + return this['schedule_scenes']; + } + public withVirtualScheduleRole(virtualScheduleRole: string): CreateExternalIssuesRequest { + this['virtual_schedule_role'] = virtualScheduleRole; + return this; + } + public set virtualScheduleRole(virtualScheduleRole: string | undefined) { + this['virtual_schedule_role'] = virtualScheduleRole; + } + public get virtualScheduleRole(): string | undefined { + return this['virtual_schedule_role']; + } + public withIssueContactPerson(issueContactPerson: string): CreateExternalIssuesRequest { + this['issue_contact_person'] = issueContactPerson; + return this; + } + public set issueContactPerson(issueContactPerson: string | undefined) { + this['issue_contact_person'] = issueContactPerson; + } + public get issueContactPerson(): string | undefined { + return this['issue_contact_person']; + } +} + +/** + * @export + * @enum {string} + */ +export enum CreateExternalIssuesRequestLevelEnum { + ISSUES_LEVEL_1000 = 'issues_level_1000', + ISSUES_LEVEL_2000 = 'issues_level_2000', + ISSUES_LEVEL_3000 = 'issues_level_3000' +} +/** + * @export + * @enum {string} + */ +export enum CreateExternalIssuesRequestTicketTypeEnum { + ISSUES_TYPE_1000 = 'issues_type_1000', + ISSUES_TYPE_2000 = 'issues_type_2000', + ISSUES_TYPE_3000 = 'issues_type_3000', + ISSUES_TYPE_4000 = 'issues_type_4000', + ISSUES_TYPE_5000 = 'issues_type_5000', + ISSUES_TYPE_6000 = 'issues_type_6000', + ISSUES_TYPE_7000 = 'issues_type_7000', + ISSUES_TYPE_8000 = 'issues_type_8000', + ISSUES_TYPE_9000 = 'issues_type_9000', + ISSUES_TYPE_10000 = 'issues_type_10000', + ISSUES_TYPE_11000 = 'issues_type_11000', + ISSUES_TYPE_12000 = 'issues_type_12000', + ISSUES_TYPE_13000 = 'issues_type_13000', + ISSUES_TYPE_14000 = 'issues_type_14000', + ISSUES_TYPE_15000 = 'issues_type_15000' +} +/** + * @export + * @enum {string} + */ +export enum CreateExternalIssuesRequestReproduceProbabilityEnum { + ISSUES_REPRODUCE_PROBABILITY_1000 = 'issues_reproduce_probability_1000', + ISSUES_REPRODUCE_PROBABILITY_2000 = 'issues_reproduce_probability_2000', + ISSUES_REPRODUCE_PROBABILITY_3000 = 'issues_reproduce_probability_3000', + ISSUES_REPRODUCE_PROBABILITY_4000 = 'issues_reproduce_probability_4000' +} +/** + * @export + * @enum {string} + */ +export enum CreateExternalIssuesRequestVirtualScheduleTypeEnum { + ISSUES_MGMT_VIRTUAL_SCHEDULE_TYPE_1000 = 'issues_mgmt_virtual_schedule_type_1000', + ISSUES_MGMT_VIRTUAL_SCHEDULE_TYPE_2000 = 'issues_mgmt_virtual_schedule_type_2000' +} diff --git a/services/coc/v1/model/CreateExternalIssuesResponseData.ts b/services/coc/v1/model/CreateExternalIssuesResponseData.ts new file mode 100644 index 000000000..520f005e9 --- /dev/null +++ b/services/coc/v1/model/CreateExternalIssuesResponseData.ts @@ -0,0 +1,18 @@ + + +export class CreateExternalIssuesResponseData { + private 'ticket_id'?: string; + public constructor(ticketId?: string) { + this['ticket_id'] = ticketId; + } + public withTicketId(ticketId: string): CreateExternalIssuesResponseData { + this['ticket_id'] = ticketId; + return this; + } + public set ticketId(ticketId: string | undefined) { + this['ticket_id'] = ticketId; + } + public get ticketId(): string | undefined { + return this['ticket_id']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/CreateReportCustomEventRequest.ts b/services/coc/v1/model/CreateReportCustomEventRequest.ts new file mode 100644 index 000000000..91a2b1cbf --- /dev/null +++ b/services/coc/v1/model/CreateReportCustomEventRequest.ts @@ -0,0 +1,24 @@ +import { ReportCustomEventRequestBody } from './ReportCustomEventRequestBody'; + + +export class CreateReportCustomEventRequest { + private 'integration_key'?: string; + public body?: ReportCustomEventRequestBody; + public constructor(integrationKey?: string) { + this['integration_key'] = integrationKey; + } + public withIntegrationKey(integrationKey: string): CreateReportCustomEventRequest { + this['integration_key'] = integrationKey; + return this; + } + public set integrationKey(integrationKey: string | undefined) { + this['integration_key'] = integrationKey; + } + public get integrationKey(): string | undefined { + return this['integration_key']; + } + public withBody(body: ReportCustomEventRequestBody): CreateReportCustomEventRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/CreateReportCustomEventResponse.ts b/services/coc/v1/model/CreateReportCustomEventResponse.ts new file mode 100644 index 000000000..d7d6f69c3 --- /dev/null +++ b/services/coc/v1/model/CreateReportCustomEventResponse.ts @@ -0,0 +1,41 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class CreateReportCustomEventResponse extends SdkResponse { + private 'provider_code'?: string; + private 'error_code'?: string; + private 'error_msg'?: string; + public constructor() { + super(); + } + public withProviderCode(providerCode: string): CreateReportCustomEventResponse { + this['provider_code'] = providerCode; + return this; + } + public set providerCode(providerCode: string | undefined) { + this['provider_code'] = providerCode; + } + public get providerCode(): string | undefined { + return this['provider_code']; + } + public withErrorCode(errorCode: string): CreateReportCustomEventResponse { + this['error_code'] = errorCode; + return this; + } + public set errorCode(errorCode: string | undefined) { + this['error_code'] = errorCode; + } + public get errorCode(): string | undefined { + return this['error_code']; + } + public withErrorMsg(errorMsg: string): CreateReportCustomEventResponse { + this['error_msg'] = errorMsg; + return this; + } + public set errorMsg(errorMsg: string | undefined) { + this['error_msg'] = errorMsg; + } + public get errorMsg(): string | undefined { + return this['error_msg']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/CreateReportPrometheusEventRequest.ts b/services/coc/v1/model/CreateReportPrometheusEventRequest.ts new file mode 100644 index 000000000..87ccc5c73 --- /dev/null +++ b/services/coc/v1/model/CreateReportPrometheusEventRequest.ts @@ -0,0 +1,23 @@ + + +export class CreateReportPrometheusEventRequest { + private 'integration_key'?: string; + public body?: { [key: string]: object; }; + public constructor(integrationKey?: string) { + this['integration_key'] = integrationKey; + } + public withIntegrationKey(integrationKey: string): CreateReportPrometheusEventRequest { + this['integration_key'] = integrationKey; + return this; + } + public set integrationKey(integrationKey: string | undefined) { + this['integration_key'] = integrationKey; + } + public get integrationKey(): string | undefined { + return this['integration_key']; + } + public withBody(body: { [key: string]: object; }): CreateReportPrometheusEventRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/CreateReportPrometheusEventResponse.ts b/services/coc/v1/model/CreateReportPrometheusEventResponse.ts new file mode 100644 index 000000000..034a97782 --- /dev/null +++ b/services/coc/v1/model/CreateReportPrometheusEventResponse.ts @@ -0,0 +1,41 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class CreateReportPrometheusEventResponse extends SdkResponse { + private 'provider_code'?: string; + private 'error_code'?: string; + private 'error_msg'?: string; + public constructor() { + super(); + } + public withProviderCode(providerCode: string): CreateReportPrometheusEventResponse { + this['provider_code'] = providerCode; + return this; + } + public set providerCode(providerCode: string | undefined) { + this['provider_code'] = providerCode; + } + public get providerCode(): string | undefined { + return this['provider_code']; + } + public withErrorCode(errorCode: string): CreateReportPrometheusEventResponse { + this['error_code'] = errorCode; + return this; + } + public set errorCode(errorCode: string | undefined) { + this['error_code'] = errorCode; + } + public get errorCode(): string | undefined { + return this['error_code']; + } + public withErrorMsg(errorMsg: string): CreateReportPrometheusEventResponse { + this['error_msg'] = errorMsg; + return this; + } + public set errorMsg(errorMsg: string | undefined) { + this['error_msg'] = errorMsg; + } + public get errorMsg(): string | undefined { + return this['error_msg']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/CreateScriptRequest.ts b/services/coc/v1/model/CreateScriptRequest.ts new file mode 100644 index 000000000..4382af164 --- /dev/null +++ b/services/coc/v1/model/CreateScriptRequest.ts @@ -0,0 +1,45 @@ +import { AddScriptModel } from './AddScriptModel'; + + +export class CreateScriptRequest { + private 'x-project-id'?: string; + private 'x-user-profile'?: string; + private 'X-Language'?: string; + public body?: AddScriptModel; + public constructor() { + } + public withXProjectId(xProjectId: string): CreateScriptRequest { + this['x-project-id'] = xProjectId; + return this; + } + public set xProjectId(xProjectId: string | undefined) { + this['x-project-id'] = xProjectId; + } + public get xProjectId(): string | undefined { + return this['x-project-id']; + } + public withXUserProfile(xUserProfile: string): CreateScriptRequest { + this['x-user-profile'] = xUserProfile; + return this; + } + public set xUserProfile(xUserProfile: string | undefined) { + this['x-user-profile'] = xUserProfile; + } + public get xUserProfile(): string | undefined { + return this['x-user-profile']; + } + public withXLanguage(xLanguage: string): CreateScriptRequest { + this['X-Language'] = xLanguage; + return this; + } + public set xLanguage(xLanguage: string | undefined) { + this['X-Language'] = xLanguage; + } + public get xLanguage(): string | undefined { + return this['X-Language']; + } + public withBody(body: AddScriptModel): CreateScriptRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/CreateScriptResponse.ts b/services/coc/v1/model/CreateScriptResponse.ts new file mode 100644 index 000000000..14e83f6a9 --- /dev/null +++ b/services/coc/v1/model/CreateScriptResponse.ts @@ -0,0 +1,13 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class CreateScriptResponse extends SdkResponse { + public data?: string; + public constructor() { + super(); + } + public withData(data: string): CreateScriptResponse { + this['data'] = data; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/CreateWarRoomRequest.ts b/services/coc/v1/model/CreateWarRoomRequest.ts new file mode 100644 index 000000000..0a0bf9ae1 --- /dev/null +++ b/services/coc/v1/model/CreateWarRoomRequest.ts @@ -0,0 +1,12 @@ +import { CreateWarRoomRequestBody } from './CreateWarRoomRequestBody'; + + +export class CreateWarRoomRequest { + public body?: CreateWarRoomRequestBody; + public constructor() { + } + public withBody(body: CreateWarRoomRequestBody): CreateWarRoomRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/CreateWarRoomRequestBody.ts b/services/coc/v1/model/CreateWarRoomRequestBody.ts new file mode 100644 index 000000000..73becc8be --- /dev/null +++ b/services/coc/v1/model/CreateWarRoomRequestBody.ts @@ -0,0 +1,133 @@ +import { ScheduleGroupInfo } from './ScheduleGroupInfo'; + + +export class CreateWarRoomRequestBody { + private 'war_room_name'?: string; + public description?: string; + private 'region_code_list'?: Array; + private 'application_id_list'?: Array; + private 'incident_number'?: string; + private 'schedule_group'?: Array; + public participant?: Array; + private 'war_room_admin'?: string; + private 'application_names'?: Array; + private 'region_names'?: Array; + private 'enterprise_project_id'?: string; + private 'notification_type'?: string; + public constructor(warRoomName?: string, applicationIdList?: Array, incidentNumber?: string, scheduleGroup?: Array, warRoomAdmin?: string, enterpriseProjectId?: string) { + this['war_room_name'] = warRoomName; + this['application_id_list'] = applicationIdList; + this['incident_number'] = incidentNumber; + this['schedule_group'] = scheduleGroup; + this['war_room_admin'] = warRoomAdmin; + this['enterprise_project_id'] = enterpriseProjectId; + } + public withWarRoomName(warRoomName: string): CreateWarRoomRequestBody { + this['war_room_name'] = warRoomName; + return this; + } + public set warRoomName(warRoomName: string | undefined) { + this['war_room_name'] = warRoomName; + } + public get warRoomName(): string | undefined { + return this['war_room_name']; + } + public withDescription(description: string): CreateWarRoomRequestBody { + this['description'] = description; + return this; + } + public withRegionCodeList(regionCodeList: Array): CreateWarRoomRequestBody { + this['region_code_list'] = regionCodeList; + return this; + } + public set regionCodeList(regionCodeList: Array | undefined) { + this['region_code_list'] = regionCodeList; + } + public get regionCodeList(): Array | undefined { + return this['region_code_list']; + } + public withApplicationIdList(applicationIdList: Array): CreateWarRoomRequestBody { + this['application_id_list'] = applicationIdList; + return this; + } + public set applicationIdList(applicationIdList: Array | undefined) { + this['application_id_list'] = applicationIdList; + } + public get applicationIdList(): Array | undefined { + return this['application_id_list']; + } + public withIncidentNumber(incidentNumber: string): CreateWarRoomRequestBody { + this['incident_number'] = incidentNumber; + return this; + } + public set incidentNumber(incidentNumber: string | undefined) { + this['incident_number'] = incidentNumber; + } + public get incidentNumber(): string | undefined { + return this['incident_number']; + } + public withScheduleGroup(scheduleGroup: Array): CreateWarRoomRequestBody { + this['schedule_group'] = scheduleGroup; + return this; + } + public set scheduleGroup(scheduleGroup: Array | undefined) { + this['schedule_group'] = scheduleGroup; + } + public get scheduleGroup(): Array | undefined { + return this['schedule_group']; + } + public withParticipant(participant: Array): CreateWarRoomRequestBody { + this['participant'] = participant; + return this; + } + public withWarRoomAdmin(warRoomAdmin: string): CreateWarRoomRequestBody { + this['war_room_admin'] = warRoomAdmin; + return this; + } + public set warRoomAdmin(warRoomAdmin: string | undefined) { + this['war_room_admin'] = warRoomAdmin; + } + public get warRoomAdmin(): string | undefined { + return this['war_room_admin']; + } + public withApplicationNames(applicationNames: Array): CreateWarRoomRequestBody { + this['application_names'] = applicationNames; + return this; + } + public set applicationNames(applicationNames: Array | undefined) { + this['application_names'] = applicationNames; + } + public get applicationNames(): Array | undefined { + return this['application_names']; + } + public withRegionNames(regionNames: Array): CreateWarRoomRequestBody { + this['region_names'] = regionNames; + return this; + } + public set regionNames(regionNames: Array | undefined) { + this['region_names'] = regionNames; + } + public get regionNames(): Array | undefined { + return this['region_names']; + } + public withEnterpriseProjectId(enterpriseProjectId: string): CreateWarRoomRequestBody { + this['enterprise_project_id'] = enterpriseProjectId; + return this; + } + public set enterpriseProjectId(enterpriseProjectId: string | undefined) { + this['enterprise_project_id'] = enterpriseProjectId; + } + public get enterpriseProjectId(): string | undefined { + return this['enterprise_project_id']; + } + public withNotificationType(notificationType: string): CreateWarRoomRequestBody { + this['notification_type'] = notificationType; + return this; + } + public set notificationType(notificationType: string | undefined) { + this['notification_type'] = notificationType; + } + public get notificationType(): string | undefined { + return this['notification_type']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/CreateWarRoomResponse.ts b/services/coc/v1/model/CreateWarRoomResponse.ts new file mode 100644 index 000000000..37ee39a3f --- /dev/null +++ b/services/coc/v1/model/CreateWarRoomResponse.ts @@ -0,0 +1,47 @@ +import { ListBaseResponse } from './ListBaseResponse'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class CreateWarRoomResponse extends SdkResponse { + private 'provider_code'?: string; + private 'error_code'?: string; + private 'error_msg'?: string; + public data?: string; + public constructor() { + super(); + } + public withProviderCode(providerCode: string): CreateWarRoomResponse { + this['provider_code'] = providerCode; + return this; + } + public set providerCode(providerCode: string | undefined) { + this['provider_code'] = providerCode; + } + public get providerCode(): string | undefined { + return this['provider_code']; + } + public withErrorCode(errorCode: string): CreateWarRoomResponse { + this['error_code'] = errorCode; + return this; + } + public set errorCode(errorCode: string | undefined) { + this['error_code'] = errorCode; + } + public get errorCode(): string | undefined { + return this['error_code']; + } + public withErrorMsg(errorMsg: string): CreateWarRoomResponse { + this['error_msg'] = errorMsg; + return this; + } + public set errorMsg(errorMsg: string | undefined) { + this['error_msg'] = errorMsg; + } + public get errorMsg(): string | undefined { + return this['error_msg']; + } + public withData(data: string): CreateWarRoomResponse { + this['data'] = data; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/Customttribute.ts b/services/coc/v1/model/Customttribute.ts new file mode 100644 index 000000000..a309440b7 --- /dev/null +++ b/services/coc/v1/model/Customttribute.ts @@ -0,0 +1,18 @@ + + +export class Customttribute { + public key?: string; + public value?: string; + public constructor(key?: string, value?: string) { + this['key'] = key; + this['value'] = value; + } + public withKey(key: string): Customttribute { + this['key'] = key; + return this; + } + public withValue(value: string): Customttribute { + this['value'] = value; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/DeleteScriptRequest.ts b/services/coc/v1/model/DeleteScriptRequest.ts new file mode 100644 index 000000000..acd71c7c6 --- /dev/null +++ b/services/coc/v1/model/DeleteScriptRequest.ts @@ -0,0 +1,51 @@ + + +export class DeleteScriptRequest { + private 'script_uuid'?: string; + private 'X-Language'?: string; + private 'x-project-id'?: string; + private 'x-user-profile'?: string; + public constructor(scriptUuid?: string) { + this['script_uuid'] = scriptUuid; + } + public withScriptUuid(scriptUuid: string): DeleteScriptRequest { + this['script_uuid'] = scriptUuid; + return this; + } + public set scriptUuid(scriptUuid: string | undefined) { + this['script_uuid'] = scriptUuid; + } + public get scriptUuid(): string | undefined { + return this['script_uuid']; + } + public withXLanguage(xLanguage: string): DeleteScriptRequest { + this['X-Language'] = xLanguage; + return this; + } + public set xLanguage(xLanguage: string | undefined) { + this['X-Language'] = xLanguage; + } + public get xLanguage(): string | undefined { + return this['X-Language']; + } + public withXProjectId(xProjectId: string): DeleteScriptRequest { + this['x-project-id'] = xProjectId; + return this; + } + public set xProjectId(xProjectId: string | undefined) { + this['x-project-id'] = xProjectId; + } + public get xProjectId(): string | undefined { + return this['x-project-id']; + } + public withXUserProfile(xUserProfile: string): DeleteScriptRequest { + this['x-user-profile'] = xUserProfile; + return this; + } + public set xUserProfile(xUserProfile: string | undefined) { + this['x-user-profile'] = xUserProfile; + } + public get xUserProfile(): string | undefined { + return this['x-user-profile']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/DeleteScriptResponse.ts b/services/coc/v1/model/DeleteScriptResponse.ts new file mode 100644 index 000000000..104dc391d --- /dev/null +++ b/services/coc/v1/model/DeleteScriptResponse.ts @@ -0,0 +1,13 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class DeleteScriptResponse extends SdkResponse { + public data?: string; + public constructor() { + super(); + } + public withData(data: string): DeleteScriptResponse { + this['data'] = data; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/EditScriptModel.ts b/services/coc/v1/model/EditScriptModel.ts new file mode 100644 index 000000000..3a4dd5360 --- /dev/null +++ b/services/coc/v1/model/EditScriptModel.ts @@ -0,0 +1,36 @@ +import { ScriptParamDefine } from './ScriptParamDefine'; +import { ScriptPropertiesModel } from './ScriptPropertiesModel'; + + +export class EditScriptModel { + public description?: string; + public content?: string; + public properties?: ScriptPropertiesModel; + private 'script_params'?: Array; + public constructor(description?: string, content?: string) { + this['description'] = description; + this['content'] = content; + } + public withDescription(description: string): EditScriptModel { + this['description'] = description; + return this; + } + public withContent(content: string): EditScriptModel { + this['content'] = content; + return this; + } + public withProperties(properties: ScriptPropertiesModel): EditScriptModel { + this['properties'] = properties; + return this; + } + public withScriptParams(scriptParams: Array): EditScriptModel { + this['script_params'] = scriptParams; + return this; + } + public set scriptParams(scriptParams: Array | undefined) { + this['script_params'] = scriptParams; + } + public get scriptParams(): Array | undefined { + return this['script_params']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/EnumDataInfo.ts b/services/coc/v1/model/EnumDataInfo.ts new file mode 100644 index 000000000..ea56f0e7b --- /dev/null +++ b/services/coc/v1/model/EnumDataInfo.ts @@ -0,0 +1,253 @@ +import { ExtraFieldInfo } from './ExtraFieldInfo'; + + +export class EnumDataInfo { + private 'current_cloud_service_id'?: string; + public description?: string; + private 'level_id'?: string; + private 'mtm_region'?: string; + private 'mtm_type'?: string; + private 'source_id'?: string; + public title?: string; + private 'is_change_event'?: boolean; + private 'is_service_interrupt'?: boolean; + private 'is_deleted'?: boolean; + private 'match_type'?: string; + private 'ticket_id'?: string; + private 'name_zh'?: string; + private 'name_en'?: string; + private 'user_name'?: string; + private 'full_name_zh'?: string; + private 'full_name_en'?: string; + private 'name_zh_path'?: string; + private 'name_en_path'?: string; + public status?: string; + private 'biz_id'?: string; + private 'prop_id'?: string; + private 'model_id'?: string; + private 'enum_type_id'?: string; + public constructor() { + } + public withCurrentCloudServiceId(currentCloudServiceId: string): EnumDataInfo { + this['current_cloud_service_id'] = currentCloudServiceId; + return this; + } + public set currentCloudServiceId(currentCloudServiceId: string | undefined) { + this['current_cloud_service_id'] = currentCloudServiceId; + } + public get currentCloudServiceId(): string | undefined { + return this['current_cloud_service_id']; + } + public withDescription(description: string): EnumDataInfo { + this['description'] = description; + return this; + } + public withLevelId(levelId: string): EnumDataInfo { + this['level_id'] = levelId; + return this; + } + public set levelId(levelId: string | undefined) { + this['level_id'] = levelId; + } + public get levelId(): string | undefined { + return this['level_id']; + } + public withMtmRegion(mtmRegion: string): EnumDataInfo { + this['mtm_region'] = mtmRegion; + return this; + } + public set mtmRegion(mtmRegion: string | undefined) { + this['mtm_region'] = mtmRegion; + } + public get mtmRegion(): string | undefined { + return this['mtm_region']; + } + public withMtmType(mtmType: string): EnumDataInfo { + this['mtm_type'] = mtmType; + return this; + } + public set mtmType(mtmType: string | undefined) { + this['mtm_type'] = mtmType; + } + public get mtmType(): string | undefined { + return this['mtm_type']; + } + public withSourceId(sourceId: string): EnumDataInfo { + this['source_id'] = sourceId; + return this; + } + public set sourceId(sourceId: string | undefined) { + this['source_id'] = sourceId; + } + public get sourceId(): string | undefined { + return this['source_id']; + } + public withTitle(title: string): EnumDataInfo { + this['title'] = title; + return this; + } + public withIsChangeEvent(isChangeEvent: boolean): EnumDataInfo { + this['is_change_event'] = isChangeEvent; + return this; + } + public set isChangeEvent(isChangeEvent: boolean | undefined) { + this['is_change_event'] = isChangeEvent; + } + public get isChangeEvent(): boolean | undefined { + return this['is_change_event']; + } + public withIsServiceInterrupt(isServiceInterrupt: boolean): EnumDataInfo { + this['is_service_interrupt'] = isServiceInterrupt; + return this; + } + public set isServiceInterrupt(isServiceInterrupt: boolean | undefined) { + this['is_service_interrupt'] = isServiceInterrupt; + } + public get isServiceInterrupt(): boolean | undefined { + return this['is_service_interrupt']; + } + public withIsDeleted(isDeleted: boolean): EnumDataInfo { + this['is_deleted'] = isDeleted; + return this; + } + public set isDeleted(isDeleted: boolean | undefined) { + this['is_deleted'] = isDeleted; + } + public get isDeleted(): boolean | undefined { + return this['is_deleted']; + } + public withMatchType(matchType: string): EnumDataInfo { + this['match_type'] = matchType; + return this; + } + public set matchType(matchType: string | undefined) { + this['match_type'] = matchType; + } + public get matchType(): string | undefined { + return this['match_type']; + } + public withTicketId(ticketId: string): EnumDataInfo { + this['ticket_id'] = ticketId; + return this; + } + public set ticketId(ticketId: string | undefined) { + this['ticket_id'] = ticketId; + } + public get ticketId(): string | undefined { + return this['ticket_id']; + } + public withNameZh(nameZh: string): EnumDataInfo { + this['name_zh'] = nameZh; + return this; + } + public set nameZh(nameZh: string | undefined) { + this['name_zh'] = nameZh; + } + public get nameZh(): string | undefined { + return this['name_zh']; + } + public withNameEn(nameEn: string): EnumDataInfo { + this['name_en'] = nameEn; + return this; + } + public set nameEn(nameEn: string | undefined) { + this['name_en'] = nameEn; + } + public get nameEn(): string | undefined { + return this['name_en']; + } + public withUserName(userName: string): EnumDataInfo { + this['user_name'] = userName; + return this; + } + public set userName(userName: string | undefined) { + this['user_name'] = userName; + } + public get userName(): string | undefined { + return this['user_name']; + } + public withFullNameZh(fullNameZh: string): EnumDataInfo { + this['full_name_zh'] = fullNameZh; + return this; + } + public set fullNameZh(fullNameZh: string | undefined) { + this['full_name_zh'] = fullNameZh; + } + public get fullNameZh(): string | undefined { + return this['full_name_zh']; + } + public withFullNameEn(fullNameEn: string): EnumDataInfo { + this['full_name_en'] = fullNameEn; + return this; + } + public set fullNameEn(fullNameEn: string | undefined) { + this['full_name_en'] = fullNameEn; + } + public get fullNameEn(): string | undefined { + return this['full_name_en']; + } + public withNameZhPath(nameZhPath: string): EnumDataInfo { + this['name_zh_path'] = nameZhPath; + return this; + } + public set nameZhPath(nameZhPath: string | undefined) { + this['name_zh_path'] = nameZhPath; + } + public get nameZhPath(): string | undefined { + return this['name_zh_path']; + } + public withNameEnPath(nameEnPath: string): EnumDataInfo { + this['name_en_path'] = nameEnPath; + return this; + } + public set nameEnPath(nameEnPath: string | undefined) { + this['name_en_path'] = nameEnPath; + } + public get nameEnPath(): string | undefined { + return this['name_en_path']; + } + public withStatus(status: string): EnumDataInfo { + this['status'] = status; + return this; + } + public withBizId(bizId: string): EnumDataInfo { + this['biz_id'] = bizId; + return this; + } + public set bizId(bizId: string | undefined) { + this['biz_id'] = bizId; + } + public get bizId(): string | undefined { + return this['biz_id']; + } + public withPropId(propId: string): EnumDataInfo { + this['prop_id'] = propId; + return this; + } + public set propId(propId: string | undefined) { + this['prop_id'] = propId; + } + public get propId(): string | undefined { + return this['prop_id']; + } + public withModelId(modelId: string): EnumDataInfo { + this['model_id'] = modelId; + return this; + } + public set modelId(modelId: string | undefined) { + this['model_id'] = modelId; + } + public get modelId(): string | undefined { + return this['model_id']; + } + public withEnumTypeId(enumTypeId: string): EnumDataInfo { + this['enum_type_id'] = enumTypeId; + return this; + } + public set enumTypeId(enumTypeId: string | undefined) { + this['enum_type_id'] = enumTypeId; + } + public get enumTypeId(): string | undefined { + return this['enum_type_id']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ExectionInstanceModel.ts b/services/coc/v1/model/ExectionInstanceModel.ts new file mode 100644 index 000000000..8117a43d2 --- /dev/null +++ b/services/coc/v1/model/ExectionInstanceModel.ts @@ -0,0 +1,79 @@ +import { ResourceInstance } from './ResourceInstance'; + + +export class ExectionInstanceModel { + public id?: number; + private 'target_instance'?: ResourceInstance; + private 'gmt_created'?: number; + private 'gmt_finished'?: number; + private 'execute_costs'?: number; + public status?: ExectionInstanceModelStatusEnum | string; + public message?: string; + public constructor() { + } + public withId(id: number): ExectionInstanceModel { + this['id'] = id; + return this; + } + public withTargetInstance(targetInstance: ResourceInstance): ExectionInstanceModel { + this['target_instance'] = targetInstance; + return this; + } + public set targetInstance(targetInstance: ResourceInstance | undefined) { + this['target_instance'] = targetInstance; + } + public get targetInstance(): ResourceInstance | undefined { + return this['target_instance']; + } + public withGmtCreated(gmtCreated: number): ExectionInstanceModel { + this['gmt_created'] = gmtCreated; + return this; + } + public set gmtCreated(gmtCreated: number | undefined) { + this['gmt_created'] = gmtCreated; + } + public get gmtCreated(): number | undefined { + return this['gmt_created']; + } + public withGmtFinished(gmtFinished: number): ExectionInstanceModel { + this['gmt_finished'] = gmtFinished; + return this; + } + public set gmtFinished(gmtFinished: number | undefined) { + this['gmt_finished'] = gmtFinished; + } + public get gmtFinished(): number | undefined { + return this['gmt_finished']; + } + public withExecuteCosts(executeCosts: number): ExectionInstanceModel { + this['execute_costs'] = executeCosts; + return this; + } + public set executeCosts(executeCosts: number | undefined) { + this['execute_costs'] = executeCosts; + } + public get executeCosts(): number | undefined { + return this['execute_costs']; + } + public withStatus(status: ExectionInstanceModelStatusEnum | string): ExectionInstanceModel { + this['status'] = status; + return this; + } + public withMessage(message: string): ExectionInstanceModel { + this['message'] = message; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum ExectionInstanceModelStatusEnum { + READY = 'READY', + PROCESSING = 'PROCESSING', + ABNORMAL = 'ABNORMAL', + CANCELED = 'CANCELED', + FINISHED = 'FINISHED', + ROLLBACKED = 'ROLLBACKED' +} diff --git a/services/coc/v1/model/ExectuionStatistic.ts b/services/coc/v1/model/ExectuionStatistic.ts new file mode 100644 index 000000000..23e5a1b96 --- /dev/null +++ b/services/coc/v1/model/ExectuionStatistic.ts @@ -0,0 +1,42 @@ + + +export class ExectuionStatistic { + private 'instance_status'?: string; + private 'instance_count'?: number; + private 'batch_indexes'?: Array; + public constructor(instanceStatus?: string, instanceCount?: number, batchIndexes?: Array) { + this['instance_status'] = instanceStatus; + this['instance_count'] = instanceCount; + this['batch_indexes'] = batchIndexes; + } + public withInstanceStatus(instanceStatus: string): ExectuionStatistic { + this['instance_status'] = instanceStatus; + return this; + } + public set instanceStatus(instanceStatus: string | undefined) { + this['instance_status'] = instanceStatus; + } + public get instanceStatus(): string | undefined { + return this['instance_status']; + } + public withInstanceCount(instanceCount: number): ExectuionStatistic { + this['instance_count'] = instanceCount; + return this; + } + public set instanceCount(instanceCount: number | undefined) { + this['instance_count'] = instanceCount; + } + public get instanceCount(): number | undefined { + return this['instance_count']; + } + public withBatchIndexes(batchIndexes: Array): ExectuionStatistic { + this['batch_indexes'] = batchIndexes; + return this; + } + public set batchIndexes(batchIndexes: Array | undefined) { + this['batch_indexes'] = batchIndexes; + } + public get batchIndexes(): Array | undefined { + return this['batch_indexes']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ExecuteInstancesBatchInfo.ts b/services/coc/v1/model/ExecuteInstancesBatchInfo.ts new file mode 100644 index 000000000..682c054df --- /dev/null +++ b/services/coc/v1/model/ExecuteInstancesBatchInfo.ts @@ -0,0 +1,52 @@ +import { ExecuteResourceInstance } from './ExecuteResourceInstance'; + + +export class ExecuteInstancesBatchInfo { + private 'batch_index'?: number; + private 'target_instances'?: Array; + private 'rotation_strategy'?: ExecuteInstancesBatchInfoRotationStrategyEnum | string; + public constructor(batchIndex?: number, targetInstances?: Array, rotationStrategy?: string) { + this['batch_index'] = batchIndex; + this['target_instances'] = targetInstances; + this['rotation_strategy'] = rotationStrategy; + } + public withBatchIndex(batchIndex: number): ExecuteInstancesBatchInfo { + this['batch_index'] = batchIndex; + return this; + } + public set batchIndex(batchIndex: number | undefined) { + this['batch_index'] = batchIndex; + } + public get batchIndex(): number | undefined { + return this['batch_index']; + } + public withTargetInstances(targetInstances: Array): ExecuteInstancesBatchInfo { + this['target_instances'] = targetInstances; + return this; + } + public set targetInstances(targetInstances: Array | undefined) { + this['target_instances'] = targetInstances; + } + public get targetInstances(): Array | undefined { + return this['target_instances']; + } + public withRotationStrategy(rotationStrategy: ExecuteInstancesBatchInfoRotationStrategyEnum | string): ExecuteInstancesBatchInfo { + this['rotation_strategy'] = rotationStrategy; + return this; + } + public set rotationStrategy(rotationStrategy: ExecuteInstancesBatchInfoRotationStrategyEnum | string | undefined) { + this['rotation_strategy'] = rotationStrategy; + } + public get rotationStrategy(): ExecuteInstancesBatchInfoRotationStrategyEnum | string | undefined { + return this['rotation_strategy']; + } +} + +/** + * @export + * @enum {string} + */ +export enum ExecuteInstancesBatchInfoRotationStrategyEnum { + CONTINUE = 'CONTINUE', + PAUSE = 'PAUSE' +} diff --git a/services/coc/v1/model/ExecutePublicScriptRequest.ts b/services/coc/v1/model/ExecutePublicScriptRequest.ts new file mode 100644 index 000000000..d45b55d59 --- /dev/null +++ b/services/coc/v1/model/ExecutePublicScriptRequest.ts @@ -0,0 +1,57 @@ +import { ScriptExecuteModel } from './ScriptExecuteModel'; + + +export class ExecutePublicScriptRequest { + private 'script_uuid'?: string; + private 'X-Language'?: string; + private 'x-project-id'?: string; + private 'x-user-profile'?: string; + public body?: ScriptExecuteModel; + public constructor(scriptUuid?: string) { + this['script_uuid'] = scriptUuid; + } + public withScriptUuid(scriptUuid: string): ExecutePublicScriptRequest { + this['script_uuid'] = scriptUuid; + return this; + } + public set scriptUuid(scriptUuid: string | undefined) { + this['script_uuid'] = scriptUuid; + } + public get scriptUuid(): string | undefined { + return this['script_uuid']; + } + public withXLanguage(xLanguage: string): ExecutePublicScriptRequest { + this['X-Language'] = xLanguage; + return this; + } + public set xLanguage(xLanguage: string | undefined) { + this['X-Language'] = xLanguage; + } + public get xLanguage(): string | undefined { + return this['X-Language']; + } + public withXProjectId(xProjectId: string): ExecutePublicScriptRequest { + this['x-project-id'] = xProjectId; + return this; + } + public set xProjectId(xProjectId: string | undefined) { + this['x-project-id'] = xProjectId; + } + public get xProjectId(): string | undefined { + return this['x-project-id']; + } + public withXUserProfile(xUserProfile: string): ExecutePublicScriptRequest { + this['x-user-profile'] = xUserProfile; + return this; + } + public set xUserProfile(xUserProfile: string | undefined) { + this['x-user-profile'] = xUserProfile; + } + public get xUserProfile(): string | undefined { + return this['x-user-profile']; + } + public withBody(body: ScriptExecuteModel): ExecutePublicScriptRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ExecutePublicScriptResponse.ts b/services/coc/v1/model/ExecutePublicScriptResponse.ts new file mode 100644 index 000000000..8b5782dcc --- /dev/null +++ b/services/coc/v1/model/ExecutePublicScriptResponse.ts @@ -0,0 +1,13 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ExecutePublicScriptResponse extends SdkResponse { + public data?: string; + public constructor() { + super(); + } + public withData(data: string): ExecutePublicScriptResponse { + this['data'] = data; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ExecuteResourceInstance.ts b/services/coc/v1/model/ExecuteResourceInstance.ts new file mode 100644 index 000000000..fe063637a --- /dev/null +++ b/services/coc/v1/model/ExecuteResourceInstance.ts @@ -0,0 +1,82 @@ +import { Customttribute } from './Customttribute'; + + +export class ExecuteResourceInstance { + private 'resource_id'?: string; + private 'region_id'?: string; + public provider?: string; + public type?: ExecuteResourceInstanceTypeEnum | string; + private 'custom_attributes'?: Array; + private 'agent_sn'?: string; + private 'project_id'?: string; + public constructor(resourceId?: string, regionId?: string) { + this['resource_id'] = resourceId; + this['region_id'] = regionId; + } + public withResourceId(resourceId: string): ExecuteResourceInstance { + this['resource_id'] = resourceId; + return this; + } + public set resourceId(resourceId: string | undefined) { + this['resource_id'] = resourceId; + } + public get resourceId(): string | undefined { + return this['resource_id']; + } + public withRegionId(regionId: string): ExecuteResourceInstance { + this['region_id'] = regionId; + return this; + } + public set regionId(regionId: string | undefined) { + this['region_id'] = regionId; + } + public get regionId(): string | undefined { + return this['region_id']; + } + public withProvider(provider: string): ExecuteResourceInstance { + this['provider'] = provider; + return this; + } + public withType(type: ExecuteResourceInstanceTypeEnum | string): ExecuteResourceInstance { + this['type'] = type; + return this; + } + public withCustomAttributes(customAttributes: Array): ExecuteResourceInstance { + this['custom_attributes'] = customAttributes; + return this; + } + public set customAttributes(customAttributes: Array | undefined) { + this['custom_attributes'] = customAttributes; + } + public get customAttributes(): Array | undefined { + return this['custom_attributes']; + } + public withAgentSn(agentSn: string): ExecuteResourceInstance { + this['agent_sn'] = agentSn; + return this; + } + public set agentSn(agentSn: string | undefined) { + this['agent_sn'] = agentSn; + } + public get agentSn(): string | undefined { + return this['agent_sn']; + } + public withProjectId(projectId: string): ExecuteResourceInstance { + this['project_id'] = projectId; + return this; + } + public set projectId(projectId: string | undefined) { + this['project_id'] = projectId; + } + public get projectId(): string | undefined { + return this['project_id']; + } +} + +/** + * @export + * @enum {string} + */ +export enum ExecuteResourceInstanceTypeEnum { + CLOUDSERVER = 'CLOUDSERVER' +} diff --git a/services/coc/v1/model/ExecuteScriptRequest.ts b/services/coc/v1/model/ExecuteScriptRequest.ts new file mode 100644 index 000000000..28aeeba7b --- /dev/null +++ b/services/coc/v1/model/ExecuteScriptRequest.ts @@ -0,0 +1,57 @@ +import { ScriptExecuteModel } from './ScriptExecuteModel'; + + +export class ExecuteScriptRequest { + private 'script_uuid'?: string; + private 'X-Language'?: string; + private 'x-project-id'?: string; + private 'x-user-profile'?: string; + public body?: ScriptExecuteModel; + public constructor(scriptUuid?: string) { + this['script_uuid'] = scriptUuid; + } + public withScriptUuid(scriptUuid: string): ExecuteScriptRequest { + this['script_uuid'] = scriptUuid; + return this; + } + public set scriptUuid(scriptUuid: string | undefined) { + this['script_uuid'] = scriptUuid; + } + public get scriptUuid(): string | undefined { + return this['script_uuid']; + } + public withXLanguage(xLanguage: string): ExecuteScriptRequest { + this['X-Language'] = xLanguage; + return this; + } + public set xLanguage(xLanguage: string | undefined) { + this['X-Language'] = xLanguage; + } + public get xLanguage(): string | undefined { + return this['X-Language']; + } + public withXProjectId(xProjectId: string): ExecuteScriptRequest { + this['x-project-id'] = xProjectId; + return this; + } + public set xProjectId(xProjectId: string | undefined) { + this['x-project-id'] = xProjectId; + } + public get xProjectId(): string | undefined { + return this['x-project-id']; + } + public withXUserProfile(xUserProfile: string): ExecuteScriptRequest { + this['x-user-profile'] = xUserProfile; + return this; + } + public set xUserProfile(xUserProfile: string | undefined) { + this['x-user-profile'] = xUserProfile; + } + public get xUserProfile(): string | undefined { + return this['x-user-profile']; + } + public withBody(body: ScriptExecuteModel): ExecuteScriptRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ExecuteScriptResponse.ts b/services/coc/v1/model/ExecuteScriptResponse.ts new file mode 100644 index 000000000..73dbbf4d2 --- /dev/null +++ b/services/coc/v1/model/ExecuteScriptResponse.ts @@ -0,0 +1,30 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ExecuteScriptResponse extends SdkResponse { + private 'error_code'?: string; + private 'error_msg'?: string; + public constructor() { + super(); + } + public withErrorCode(errorCode: string): ExecuteScriptResponse { + this['error_code'] = errorCode; + return this; + } + public set errorCode(errorCode: string | undefined) { + this['error_code'] = errorCode; + } + public get errorCode(): string | undefined { + return this['error_code']; + } + public withErrorMsg(errorMsg: string): ExecuteScriptResponse { + this['error_msg'] = errorMsg; + return this; + } + public set errorMsg(errorMsg: string | undefined) { + this['error_msg'] = errorMsg; + } + public get errorMsg(): string | undefined { + return this['error_msg']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ExecutionSummary.ts b/services/coc/v1/model/ExecutionSummary.ts new file mode 100644 index 000000000..9c074e66d --- /dev/null +++ b/services/coc/v1/model/ExecutionSummary.ts @@ -0,0 +1,39 @@ + + +export class ExecutionSummary { + private 'order_id'?: string; + private 'job_id'?: string; + private 'report_time'?: number; + public constructor() { + } + public withOrderId(orderId: string): ExecutionSummary { + this['order_id'] = orderId; + return this; + } + public set orderId(orderId: string | undefined) { + this['order_id'] = orderId; + } + public get orderId(): string | undefined { + return this['order_id']; + } + public withJobId(jobId: string): ExecutionSummary { + this['job_id'] = jobId; + return this; + } + public set jobId(jobId: string | undefined) { + this['job_id'] = jobId; + } + public get jobId(): string | undefined { + return this['job_id']; + } + public withReportTime(reportTime: number): ExecutionSummary { + this['report_time'] = reportTime; + return this; + } + public set reportTime(reportTime: number | undefined) { + this['report_time'] = reportTime; + } + public get reportTime(): number | undefined { + return this['report_time']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ExtraFieldInfo.ts b/services/coc/v1/model/ExtraFieldInfo.ts new file mode 100644 index 000000000..f9f2d331c --- /dev/null +++ b/services/coc/v1/model/ExtraFieldInfo.ts @@ -0,0 +1,93 @@ + + +export class ExtraFieldInfo { + private 'current_cloud_service_id'?: string; + public description?: string; + private 'level_id'?: string; + private 'mtm_region'?: string; + private 'mtm_type'?: string; + private 'source_id'?: string; + public title?: string; + private 'is_change_event'?: boolean; + private 'is_service_interrupt'?: boolean; + public constructor() { + } + public withCurrentCloudServiceId(currentCloudServiceId: string): ExtraFieldInfo { + this['current_cloud_service_id'] = currentCloudServiceId; + return this; + } + public set currentCloudServiceId(currentCloudServiceId: string | undefined) { + this['current_cloud_service_id'] = currentCloudServiceId; + } + public get currentCloudServiceId(): string | undefined { + return this['current_cloud_service_id']; + } + public withDescription(description: string): ExtraFieldInfo { + this['description'] = description; + return this; + } + public withLevelId(levelId: string): ExtraFieldInfo { + this['level_id'] = levelId; + return this; + } + public set levelId(levelId: string | undefined) { + this['level_id'] = levelId; + } + public get levelId(): string | undefined { + return this['level_id']; + } + public withMtmRegion(mtmRegion: string): ExtraFieldInfo { + this['mtm_region'] = mtmRegion; + return this; + } + public set mtmRegion(mtmRegion: string | undefined) { + this['mtm_region'] = mtmRegion; + } + public get mtmRegion(): string | undefined { + return this['mtm_region']; + } + public withMtmType(mtmType: string): ExtraFieldInfo { + this['mtm_type'] = mtmType; + return this; + } + public set mtmType(mtmType: string | undefined) { + this['mtm_type'] = mtmType; + } + public get mtmType(): string | undefined { + return this['mtm_type']; + } + public withSourceId(sourceId: string): ExtraFieldInfo { + this['source_id'] = sourceId; + return this; + } + public set sourceId(sourceId: string | undefined) { + this['source_id'] = sourceId; + } + public get sourceId(): string | undefined { + return this['source_id']; + } + public withTitle(title: string): ExtraFieldInfo { + this['title'] = title; + return this; + } + public withIsChangeEvent(isChangeEvent: boolean): ExtraFieldInfo { + this['is_change_event'] = isChangeEvent; + return this; + } + public set isChangeEvent(isChangeEvent: boolean | undefined) { + this['is_change_event'] = isChangeEvent; + } + public get isChangeEvent(): boolean | undefined { + return this['is_change_event']; + } + public withIsServiceInterrupt(isServiceInterrupt: boolean): ExtraFieldInfo { + this['is_service_interrupt'] = isServiceInterrupt; + return this; + } + public set isServiceInterrupt(isServiceInterrupt: boolean | undefined) { + this['is_service_interrupt'] = isServiceInterrupt; + } + public get isServiceInterrupt(): boolean | undefined { + return this['is_service_interrupt']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/GetPublicScriptRequest.ts b/services/coc/v1/model/GetPublicScriptRequest.ts new file mode 100644 index 000000000..1225ec556 --- /dev/null +++ b/services/coc/v1/model/GetPublicScriptRequest.ts @@ -0,0 +1,51 @@ + + +export class GetPublicScriptRequest { + private 'script_uuid'?: string; + private 'X-Language'?: string; + private 'x-project-id'?: string; + private 'x-user-profile'?: string; + public constructor(scriptUuid?: string) { + this['script_uuid'] = scriptUuid; + } + public withScriptUuid(scriptUuid: string): GetPublicScriptRequest { + this['script_uuid'] = scriptUuid; + return this; + } + public set scriptUuid(scriptUuid: string | undefined) { + this['script_uuid'] = scriptUuid; + } + public get scriptUuid(): string | undefined { + return this['script_uuid']; + } + public withXLanguage(xLanguage: string): GetPublicScriptRequest { + this['X-Language'] = xLanguage; + return this; + } + public set xLanguage(xLanguage: string | undefined) { + this['X-Language'] = xLanguage; + } + public get xLanguage(): string | undefined { + return this['X-Language']; + } + public withXProjectId(xProjectId: string): GetPublicScriptRequest { + this['x-project-id'] = xProjectId; + return this; + } + public set xProjectId(xProjectId: string | undefined) { + this['x-project-id'] = xProjectId; + } + public get xProjectId(): string | undefined { + return this['x-project-id']; + } + public withXUserProfile(xUserProfile: string): GetPublicScriptRequest { + this['x-user-profile'] = xUserProfile; + return this; + } + public set xUserProfile(xUserProfile: string | undefined) { + this['x-user-profile'] = xUserProfile; + } + public get xUserProfile(): string | undefined { + return this['x-user-profile']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/GetPublicScriptResponse.ts b/services/coc/v1/model/GetPublicScriptResponse.ts new file mode 100644 index 000000000..74c8fdd1c --- /dev/null +++ b/services/coc/v1/model/GetPublicScriptResponse.ts @@ -0,0 +1,14 @@ +import { PublicScriptDetailModel } from './PublicScriptDetailModel'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class GetPublicScriptResponse extends SdkResponse { + public data?: PublicScriptDetailModel; + public constructor() { + super(); + } + public withData(data: PublicScriptDetailModel): GetPublicScriptResponse { + this['data'] = data; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/GetScriptJobBatchRequest.ts b/services/coc/v1/model/GetScriptJobBatchRequest.ts new file mode 100644 index 000000000..7025afecf --- /dev/null +++ b/services/coc/v1/model/GetScriptJobBatchRequest.ts @@ -0,0 +1,92 @@ + + +export class GetScriptJobBatchRequest { + private 'batch_index'?: number; + private 'execute_uuid'?: string; + public status?: GetScriptJobBatchRequestStatusEnum | string; + public limit?: number; + public marker?: number; + private 'X-Language'?: string; + private 'x-project-id'?: string; + private 'x-user-profile'?: string; + public constructor(batchIndex?: number, executeUuid?: string, limit?: number, marker?: number) { + this['batch_index'] = batchIndex; + this['execute_uuid'] = executeUuid; + this['limit'] = limit; + this['marker'] = marker; + } + public withBatchIndex(batchIndex: number): GetScriptJobBatchRequest { + this['batch_index'] = batchIndex; + return this; + } + public set batchIndex(batchIndex: number | undefined) { + this['batch_index'] = batchIndex; + } + public get batchIndex(): number | undefined { + return this['batch_index']; + } + public withExecuteUuid(executeUuid: string): GetScriptJobBatchRequest { + this['execute_uuid'] = executeUuid; + return this; + } + public set executeUuid(executeUuid: string | undefined) { + this['execute_uuid'] = executeUuid; + } + public get executeUuid(): string | undefined { + return this['execute_uuid']; + } + public withStatus(status: GetScriptJobBatchRequestStatusEnum | string): GetScriptJobBatchRequest { + this['status'] = status; + return this; + } + public withLimit(limit: number): GetScriptJobBatchRequest { + this['limit'] = limit; + return this; + } + public withMarker(marker: number): GetScriptJobBatchRequest { + this['marker'] = marker; + return this; + } + public withXLanguage(xLanguage: string): GetScriptJobBatchRequest { + this['X-Language'] = xLanguage; + return this; + } + public set xLanguage(xLanguage: string | undefined) { + this['X-Language'] = xLanguage; + } + public get xLanguage(): string | undefined { + return this['X-Language']; + } + public withXProjectId(xProjectId: string): GetScriptJobBatchRequest { + this['x-project-id'] = xProjectId; + return this; + } + public set xProjectId(xProjectId: string | undefined) { + this['x-project-id'] = xProjectId; + } + public get xProjectId(): string | undefined { + return this['x-project-id']; + } + public withXUserProfile(xUserProfile: string): GetScriptJobBatchRequest { + this['x-user-profile'] = xUserProfile; + return this; + } + public set xUserProfile(xUserProfile: string | undefined) { + this['x-user-profile'] = xUserProfile; + } + public get xUserProfile(): string | undefined { + return this['x-user-profile']; + } +} + +/** + * @export + * @enum {string} + */ +export enum GetScriptJobBatchRequestStatusEnum { + READY = 'READY', + PROCESSING = 'PROCESSING', + ABNORMAL = 'ABNORMAL', + CANCELED = 'CANCELED', + FINISHED = 'FINISHED' +} diff --git a/services/coc/v1/model/GetScriptJobBatchResponse.ts b/services/coc/v1/model/GetScriptJobBatchResponse.ts new file mode 100644 index 000000000..1b925779f --- /dev/null +++ b/services/coc/v1/model/GetScriptJobBatchResponse.ts @@ -0,0 +1,14 @@ +import { JobScriptBatchDetailModel } from './JobScriptBatchDetailModel'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class GetScriptJobBatchResponse extends SdkResponse { + public data?: JobScriptBatchDetailModel; + public constructor() { + super(); + } + public withData(data: JobScriptBatchDetailModel): GetScriptJobBatchResponse { + this['data'] = data; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/GetScriptJobInfoRequest.ts b/services/coc/v1/model/GetScriptJobInfoRequest.ts new file mode 100644 index 000000000..d739916be --- /dev/null +++ b/services/coc/v1/model/GetScriptJobInfoRequest.ts @@ -0,0 +1,51 @@ + + +export class GetScriptJobInfoRequest { + private 'execute_uuid'?: string; + private 'X-Language'?: string; + private 'x-project-id'?: string; + private 'x-user-profile'?: string; + public constructor(executeUuid?: string) { + this['execute_uuid'] = executeUuid; + } + public withExecuteUuid(executeUuid: string): GetScriptJobInfoRequest { + this['execute_uuid'] = executeUuid; + return this; + } + public set executeUuid(executeUuid: string | undefined) { + this['execute_uuid'] = executeUuid; + } + public get executeUuid(): string | undefined { + return this['execute_uuid']; + } + public withXLanguage(xLanguage: string): GetScriptJobInfoRequest { + this['X-Language'] = xLanguage; + return this; + } + public set xLanguage(xLanguage: string | undefined) { + this['X-Language'] = xLanguage; + } + public get xLanguage(): string | undefined { + return this['X-Language']; + } + public withXProjectId(xProjectId: string): GetScriptJobInfoRequest { + this['x-project-id'] = xProjectId; + return this; + } + public set xProjectId(xProjectId: string | undefined) { + this['x-project-id'] = xProjectId; + } + public get xProjectId(): string | undefined { + return this['x-project-id']; + } + public withXUserProfile(xUserProfile: string): GetScriptJobInfoRequest { + this['x-user-profile'] = xUserProfile; + return this; + } + public set xUserProfile(xUserProfile: string | undefined) { + this['x-user-profile'] = xUserProfile; + } + public get xUserProfile(): string | undefined { + return this['x-user-profile']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/GetScriptJobInfoResponse.ts b/services/coc/v1/model/GetScriptJobInfoResponse.ts new file mode 100644 index 000000000..0e06bd6d1 --- /dev/null +++ b/services/coc/v1/model/GetScriptJobInfoResponse.ts @@ -0,0 +1,14 @@ +import { JobScriptOrderInfoModel } from './JobScriptOrderInfoModel'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class GetScriptJobInfoResponse extends SdkResponse { + public data?: JobScriptOrderInfoModel; + public constructor() { + super(); + } + public withData(data: JobScriptOrderInfoModel): GetScriptJobInfoResponse { + this['data'] = data; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/GetScriptJobStatisticsRequest.ts b/services/coc/v1/model/GetScriptJobStatisticsRequest.ts new file mode 100644 index 000000000..b063a1a85 --- /dev/null +++ b/services/coc/v1/model/GetScriptJobStatisticsRequest.ts @@ -0,0 +1,51 @@ + + +export class GetScriptJobStatisticsRequest { + private 'execute_uuid'?: string; + private 'X-Language'?: string; + private 'x-project-id'?: string; + private 'x-user-profile'?: string; + public constructor(executeUuid?: string) { + this['execute_uuid'] = executeUuid; + } + public withExecuteUuid(executeUuid: string): GetScriptJobStatisticsRequest { + this['execute_uuid'] = executeUuid; + return this; + } + public set executeUuid(executeUuid: string | undefined) { + this['execute_uuid'] = executeUuid; + } + public get executeUuid(): string | undefined { + return this['execute_uuid']; + } + public withXLanguage(xLanguage: string): GetScriptJobStatisticsRequest { + this['X-Language'] = xLanguage; + return this; + } + public set xLanguage(xLanguage: string | undefined) { + this['X-Language'] = xLanguage; + } + public get xLanguage(): string | undefined { + return this['X-Language']; + } + public withXProjectId(xProjectId: string): GetScriptJobStatisticsRequest { + this['x-project-id'] = xProjectId; + return this; + } + public set xProjectId(xProjectId: string | undefined) { + this['x-project-id'] = xProjectId; + } + public get xProjectId(): string | undefined { + return this['x-project-id']; + } + public withXUserProfile(xUserProfile: string): GetScriptJobStatisticsRequest { + this['x-user-profile'] = xUserProfile; + return this; + } + public set xUserProfile(xUserProfile: string | undefined) { + this['x-user-profile'] = xUserProfile; + } + public get xUserProfile(): string | undefined { + return this['x-user-profile']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/GetScriptJobStatisticsResponse.ts b/services/coc/v1/model/GetScriptJobStatisticsResponse.ts new file mode 100644 index 000000000..1b75b5a97 --- /dev/null +++ b/services/coc/v1/model/GetScriptJobStatisticsResponse.ts @@ -0,0 +1,14 @@ +import { JobScriptOrderStatisticsModel } from './JobScriptOrderStatisticsModel'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class GetScriptJobStatisticsResponse extends SdkResponse { + public data?: JobScriptOrderStatisticsModel; + public constructor() { + super(); + } + public withData(data: JobScriptOrderStatisticsModel): GetScriptJobStatisticsResponse { + this['data'] = data; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/GetScriptRequest.ts b/services/coc/v1/model/GetScriptRequest.ts new file mode 100644 index 000000000..8a551fea0 --- /dev/null +++ b/services/coc/v1/model/GetScriptRequest.ts @@ -0,0 +1,51 @@ + + +export class GetScriptRequest { + private 'script_uuid'?: string; + private 'X-Language'?: string; + private 'x-project-id'?: string; + private 'x-user-profile'?: string; + public constructor(scriptUuid?: string) { + this['script_uuid'] = scriptUuid; + } + public withScriptUuid(scriptUuid: string): GetScriptRequest { + this['script_uuid'] = scriptUuid; + return this; + } + public set scriptUuid(scriptUuid: string | undefined) { + this['script_uuid'] = scriptUuid; + } + public get scriptUuid(): string | undefined { + return this['script_uuid']; + } + public withXLanguage(xLanguage: string): GetScriptRequest { + this['X-Language'] = xLanguage; + return this; + } + public set xLanguage(xLanguage: string | undefined) { + this['X-Language'] = xLanguage; + } + public get xLanguage(): string | undefined { + return this['X-Language']; + } + public withXProjectId(xProjectId: string): GetScriptRequest { + this['x-project-id'] = xProjectId; + return this; + } + public set xProjectId(xProjectId: string | undefined) { + this['x-project-id'] = xProjectId; + } + public get xProjectId(): string | undefined { + return this['x-project-id']; + } + public withXUserProfile(xUserProfile: string): GetScriptRequest { + this['x-user-profile'] = xUserProfile; + return this; + } + public set xUserProfile(xUserProfile: string | undefined) { + this['x-user-profile'] = xUserProfile; + } + public get xUserProfile(): string | undefined { + return this['x-user-profile']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/GetScriptResponse.ts b/services/coc/v1/model/GetScriptResponse.ts new file mode 100644 index 000000000..229d09b02 --- /dev/null +++ b/services/coc/v1/model/GetScriptResponse.ts @@ -0,0 +1,14 @@ +import { ScriptDetailModel } from './ScriptDetailModel'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class GetScriptResponse extends SdkResponse { + public data?: ScriptDetailModel; + public constructor() { + super(); + } + public withData(data: ScriptDetailModel): GetScriptResponse { + this['data'] = data; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/HandleCocIncidentRequest.ts b/services/coc/v1/model/HandleCocIncidentRequest.ts new file mode 100644 index 000000000..a50d02ff1 --- /dev/null +++ b/services/coc/v1/model/HandleCocIncidentRequest.ts @@ -0,0 +1,12 @@ +import { HandleExternalIncidentRequest } from './HandleExternalIncidentRequest'; + + +export class HandleCocIncidentRequest { + public body?: HandleExternalIncidentRequest; + public constructor() { + } + public withBody(body: HandleExternalIncidentRequest): HandleCocIncidentRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/HandleCocIncidentResponse.ts b/services/coc/v1/model/HandleCocIncidentResponse.ts new file mode 100644 index 000000000..864f42a3b --- /dev/null +++ b/services/coc/v1/model/HandleCocIncidentResponse.ts @@ -0,0 +1,50 @@ +import { BaseResponse } from './BaseResponse'; +import { HandleExternalIncidentResponseData } from './HandleExternalIncidentResponseData'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class HandleCocIncidentResponse extends SdkResponse { + private 'provider_code'?: string; + private 'error_code'?: string; + private 'error_msg'?: string; + public data?: HandleExternalIncidentResponseData; + public constructor(providerCode?: string, errorCode?: string) { + super(); + this['provider_code'] = providerCode; + this['error_code'] = errorCode; + } + public withProviderCode(providerCode: string): HandleCocIncidentResponse { + this['provider_code'] = providerCode; + return this; + } + public set providerCode(providerCode: string | undefined) { + this['provider_code'] = providerCode; + } + public get providerCode(): string | undefined { + return this['provider_code']; + } + public withErrorCode(errorCode: string): HandleCocIncidentResponse { + this['error_code'] = errorCode; + return this; + } + public set errorCode(errorCode: string | undefined) { + this['error_code'] = errorCode; + } + public get errorCode(): string | undefined { + return this['error_code']; + } + public withErrorMsg(errorMsg: string): HandleCocIncidentResponse { + this['error_msg'] = errorMsg; + return this; + } + public set errorMsg(errorMsg: string | undefined) { + this['error_msg'] = errorMsg; + } + public get errorMsg(): string | undefined { + return this['error_msg']; + } + public withData(data: HandleExternalIncidentResponseData): HandleCocIncidentResponse { + this['data'] = data; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/HandleExternalIncidentRequest.ts b/services/coc/v1/model/HandleExternalIncidentRequest.ts new file mode 100644 index 000000000..14ae62c68 --- /dev/null +++ b/services/coc/v1/model/HandleExternalIncidentRequest.ts @@ -0,0 +1,41 @@ + + +export class HandleExternalIncidentRequest { + private 'incident_num'?: string; + public operator?: string; + private 'operate_key'?: string; + public parameter?: { [key: string]: object; }; + public constructor(incidentNum?: string, operator?: string, operateKey?: string) { + this['incident_num'] = incidentNum; + this['operator'] = operator; + this['operate_key'] = operateKey; + } + public withIncidentNum(incidentNum: string): HandleExternalIncidentRequest { + this['incident_num'] = incidentNum; + return this; + } + public set incidentNum(incidentNum: string | undefined) { + this['incident_num'] = incidentNum; + } + public get incidentNum(): string | undefined { + return this['incident_num']; + } + public withOperator(operator: string): HandleExternalIncidentRequest { + this['operator'] = operator; + return this; + } + public withOperateKey(operateKey: string): HandleExternalIncidentRequest { + this['operate_key'] = operateKey; + return this; + } + public set operateKey(operateKey: string | undefined) { + this['operate_key'] = operateKey; + } + public get operateKey(): string | undefined { + return this['operate_key']; + } + public withParameter(parameter: { [key: string]: object; }): HandleExternalIncidentRequest { + this['parameter'] = parameter; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/HandleExternalIncidentResponseData.ts b/services/coc/v1/model/HandleExternalIncidentResponseData.ts new file mode 100644 index 000000000..9acec3806 --- /dev/null +++ b/services/coc/v1/model/HandleExternalIncidentResponseData.ts @@ -0,0 +1,6 @@ + + +export class HandleExternalIncidentResponseData { + public constructor() { + } +} \ No newline at end of file diff --git a/services/coc/v1/model/IncidentTicketInfoResponseData.ts b/services/coc/v1/model/IncidentTicketInfoResponseData.ts new file mode 100644 index 000000000..b968fc8fc --- /dev/null +++ b/services/coc/v1/model/IncidentTicketInfoResponseData.ts @@ -0,0 +1,198 @@ +import { TicketInfoEnumData } from './TicketInfoEnumData'; + + +export class IncidentTicketInfoResponseData { + private 'incident_num'?: string; + public region?: Array; + private 'enterprise_project'?: Array; + private 'current_cloud_service'?: Array; + private 'incident_level'?: string; + private 'is_service_interrupt'?: boolean; + private 'incident_type'?: string; + private 'incident_title'?: string; + private 'incident_description'?: string; + private 'incident_source'?: string; + private 'incident_assignee'?: Array; + private 'assignee_scene'?: string; + private 'assignee_role'?: string; + private 'warroom_id'?: string; + private 'handle_time'?: number; + public status?: string; + private 'create_time'?: number; + public creator?: string; + private 'enum_data_list'?: Array; + public constructor() { + } + public withIncidentNum(incidentNum: string): IncidentTicketInfoResponseData { + this['incident_num'] = incidentNum; + return this; + } + public set incidentNum(incidentNum: string | undefined) { + this['incident_num'] = incidentNum; + } + public get incidentNum(): string | undefined { + return this['incident_num']; + } + public withRegion(region: Array): IncidentTicketInfoResponseData { + this['region'] = region; + return this; + } + public withEnterpriseProject(enterpriseProject: Array): IncidentTicketInfoResponseData { + this['enterprise_project'] = enterpriseProject; + return this; + } + public set enterpriseProject(enterpriseProject: Array | undefined) { + this['enterprise_project'] = enterpriseProject; + } + public get enterpriseProject(): Array | undefined { + return this['enterprise_project']; + } + public withCurrentCloudService(currentCloudService: Array): IncidentTicketInfoResponseData { + this['current_cloud_service'] = currentCloudService; + return this; + } + public set currentCloudService(currentCloudService: Array | undefined) { + this['current_cloud_service'] = currentCloudService; + } + public get currentCloudService(): Array | undefined { + return this['current_cloud_service']; + } + public withIncidentLevel(incidentLevel: string): IncidentTicketInfoResponseData { + this['incident_level'] = incidentLevel; + return this; + } + public set incidentLevel(incidentLevel: string | undefined) { + this['incident_level'] = incidentLevel; + } + public get incidentLevel(): string | undefined { + return this['incident_level']; + } + public withIsServiceInterrupt(isServiceInterrupt: boolean): IncidentTicketInfoResponseData { + this['is_service_interrupt'] = isServiceInterrupt; + return this; + } + public set isServiceInterrupt(isServiceInterrupt: boolean | undefined) { + this['is_service_interrupt'] = isServiceInterrupt; + } + public get isServiceInterrupt(): boolean | undefined { + return this['is_service_interrupt']; + } + public withIncidentType(incidentType: string): IncidentTicketInfoResponseData { + this['incident_type'] = incidentType; + return this; + } + public set incidentType(incidentType: string | undefined) { + this['incident_type'] = incidentType; + } + public get incidentType(): string | undefined { + return this['incident_type']; + } + public withIncidentTitle(incidentTitle: string): IncidentTicketInfoResponseData { + this['incident_title'] = incidentTitle; + return this; + } + public set incidentTitle(incidentTitle: string | undefined) { + this['incident_title'] = incidentTitle; + } + public get incidentTitle(): string | undefined { + return this['incident_title']; + } + public withIncidentDescription(incidentDescription: string): IncidentTicketInfoResponseData { + this['incident_description'] = incidentDescription; + return this; + } + public set incidentDescription(incidentDescription: string | undefined) { + this['incident_description'] = incidentDescription; + } + public get incidentDescription(): string | undefined { + return this['incident_description']; + } + public withIncidentSource(incidentSource: string): IncidentTicketInfoResponseData { + this['incident_source'] = incidentSource; + return this; + } + public set incidentSource(incidentSource: string | undefined) { + this['incident_source'] = incidentSource; + } + public get incidentSource(): string | undefined { + return this['incident_source']; + } + public withIncidentAssignee(incidentAssignee: Array): IncidentTicketInfoResponseData { + this['incident_assignee'] = incidentAssignee; + return this; + } + public set incidentAssignee(incidentAssignee: Array | undefined) { + this['incident_assignee'] = incidentAssignee; + } + public get incidentAssignee(): Array | undefined { + return this['incident_assignee']; + } + public withAssigneeScene(assigneeScene: string): IncidentTicketInfoResponseData { + this['assignee_scene'] = assigneeScene; + return this; + } + public set assigneeScene(assigneeScene: string | undefined) { + this['assignee_scene'] = assigneeScene; + } + public get assigneeScene(): string | undefined { + return this['assignee_scene']; + } + public withAssigneeRole(assigneeRole: string): IncidentTicketInfoResponseData { + this['assignee_role'] = assigneeRole; + return this; + } + public set assigneeRole(assigneeRole: string | undefined) { + this['assignee_role'] = assigneeRole; + } + public get assigneeRole(): string | undefined { + return this['assignee_role']; + } + public withWarroomId(warroomId: string): IncidentTicketInfoResponseData { + this['warroom_id'] = warroomId; + return this; + } + public set warroomId(warroomId: string | undefined) { + this['warroom_id'] = warroomId; + } + public get warroomId(): string | undefined { + return this['warroom_id']; + } + public withHandleTime(handleTime: number): IncidentTicketInfoResponseData { + this['handle_time'] = handleTime; + return this; + } + public set handleTime(handleTime: number | undefined) { + this['handle_time'] = handleTime; + } + public get handleTime(): number | undefined { + return this['handle_time']; + } + public withStatus(status: string): IncidentTicketInfoResponseData { + this['status'] = status; + return this; + } + public withCreateTime(createTime: number): IncidentTicketInfoResponseData { + this['create_time'] = createTime; + return this; + } + public set createTime(createTime: number | undefined) { + this['create_time'] = createTime; + } + public get createTime(): number | undefined { + return this['create_time']; + } + public withCreator(creator: string): IncidentTicketInfoResponseData { + this['creator'] = creator; + return this; + } + public withEnumDataList(enumDataList: Array): IncidentTicketInfoResponseData { + this['enum_data_list'] = enumDataList; + return this; + } + public set enumDataList(enumDataList: Array | undefined) { + this['enum_data_list'] = enumDataList; + } + public get enumDataList(): Array | undefined { + return this['enum_data_list']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/InstanceCompliant.ts b/services/coc/v1/model/InstanceCompliant.ts new file mode 100644 index 000000000..5b887643c --- /dev/null +++ b/services/coc/v1/model/InstanceCompliant.ts @@ -0,0 +1,176 @@ +import { CompliantSummary } from './CompliantSummary'; +import { ExecutionSummary } from './ExecutionSummary'; +import { NonCompliantSummary } from './NonCompliantSummary'; + + +export class InstanceCompliant { + private 'compliant_summary'?: CompliantSummary; + private 'non_compliant_summary'?: NonCompliantSummary; + private 'execution_summary'?: ExecutionSummary; + public id?: string; + private 'enterprise_project_id'?: string; + public name?: string; + private 'instance_id'?: string; + private 'node_id'?: string; + public ip?: string; + public eip?: string; + public region?: string; + public group?: string; + private 'report_scene'?: string; + private 'cce_info_id'?: string; + public status?: string; + private 'baseline_id'?: string; + private 'baseline_name'?: string; + private 'rule_type'?: string; + private 'operating_system'?: string; + public constructor() { + } + public withCompliantSummary(compliantSummary: CompliantSummary): InstanceCompliant { + this['compliant_summary'] = compliantSummary; + return this; + } + public set compliantSummary(compliantSummary: CompliantSummary | undefined) { + this['compliant_summary'] = compliantSummary; + } + public get compliantSummary(): CompliantSummary | undefined { + return this['compliant_summary']; + } + public withNonCompliantSummary(nonCompliantSummary: NonCompliantSummary): InstanceCompliant { + this['non_compliant_summary'] = nonCompliantSummary; + return this; + } + public set nonCompliantSummary(nonCompliantSummary: NonCompliantSummary | undefined) { + this['non_compliant_summary'] = nonCompliantSummary; + } + public get nonCompliantSummary(): NonCompliantSummary | undefined { + return this['non_compliant_summary']; + } + public withExecutionSummary(executionSummary: ExecutionSummary): InstanceCompliant { + this['execution_summary'] = executionSummary; + return this; + } + public set executionSummary(executionSummary: ExecutionSummary | undefined) { + this['execution_summary'] = executionSummary; + } + public get executionSummary(): ExecutionSummary | undefined { + return this['execution_summary']; + } + public withId(id: string): InstanceCompliant { + this['id'] = id; + return this; + } + public withEnterpriseProjectId(enterpriseProjectId: string): InstanceCompliant { + this['enterprise_project_id'] = enterpriseProjectId; + return this; + } + public set enterpriseProjectId(enterpriseProjectId: string | undefined) { + this['enterprise_project_id'] = enterpriseProjectId; + } + public get enterpriseProjectId(): string | undefined { + return this['enterprise_project_id']; + } + public withName(name: string): InstanceCompliant { + this['name'] = name; + return this; + } + public withInstanceId(instanceId: string): InstanceCompliant { + this['instance_id'] = instanceId; + return this; + } + public set instanceId(instanceId: string | undefined) { + this['instance_id'] = instanceId; + } + public get instanceId(): string | undefined { + return this['instance_id']; + } + public withNodeId(nodeId: string): InstanceCompliant { + this['node_id'] = nodeId; + return this; + } + public set nodeId(nodeId: string | undefined) { + this['node_id'] = nodeId; + } + public get nodeId(): string | undefined { + return this['node_id']; + } + public withIp(ip: string): InstanceCompliant { + this['ip'] = ip; + return this; + } + public withEip(eip: string): InstanceCompliant { + this['eip'] = eip; + return this; + } + public withRegion(region: string): InstanceCompliant { + this['region'] = region; + return this; + } + public withGroup(group: string): InstanceCompliant { + this['group'] = group; + return this; + } + public withReportScene(reportScene: string): InstanceCompliant { + this['report_scene'] = reportScene; + return this; + } + public set reportScene(reportScene: string | undefined) { + this['report_scene'] = reportScene; + } + public get reportScene(): string | undefined { + return this['report_scene']; + } + public withCceInfoId(cceInfoId: string): InstanceCompliant { + this['cce_info_id'] = cceInfoId; + return this; + } + public set cceInfoId(cceInfoId: string | undefined) { + this['cce_info_id'] = cceInfoId; + } + public get cceInfoId(): string | undefined { + return this['cce_info_id']; + } + public withStatus(status: string): InstanceCompliant { + this['status'] = status; + return this; + } + public withBaselineId(baselineId: string): InstanceCompliant { + this['baseline_id'] = baselineId; + return this; + } + public set baselineId(baselineId: string | undefined) { + this['baseline_id'] = baselineId; + } + public get baselineId(): string | undefined { + return this['baseline_id']; + } + public withBaselineName(baselineName: string): InstanceCompliant { + this['baseline_name'] = baselineName; + return this; + } + public set baselineName(baselineName: string | undefined) { + this['baseline_name'] = baselineName; + } + public get baselineName(): string | undefined { + return this['baseline_name']; + } + public withRuleType(ruleType: string): InstanceCompliant { + this['rule_type'] = ruleType; + return this; + } + public set ruleType(ruleType: string | undefined) { + this['rule_type'] = ruleType; + } + public get ruleType(): string | undefined { + return this['rule_type']; + } + public withOperatingSystem(operatingSystem: string): InstanceCompliant { + this['operating_system'] = operatingSystem; + return this; + } + public set operatingSystem(operatingSystem: string | undefined) { + this['operating_system'] = operatingSystem; + } + public get operatingSystem(): string | undefined { + return this['operating_system']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/JobScriptBatchDetailModel.ts b/services/coc/v1/model/JobScriptBatchDetailModel.ts new file mode 100644 index 000000000..a5000a437 --- /dev/null +++ b/services/coc/v1/model/JobScriptBatchDetailModel.ts @@ -0,0 +1,40 @@ +import { ExectionInstanceModel } from './ExectionInstanceModel'; + + +export class JobScriptBatchDetailModel { + private 'batch_index'?: number; + private 'total_instances'?: number; + private 'execute_instances'?: Array; + public constructor() { + } + public withBatchIndex(batchIndex: number): JobScriptBatchDetailModel { + this['batch_index'] = batchIndex; + return this; + } + public set batchIndex(batchIndex: number | undefined) { + this['batch_index'] = batchIndex; + } + public get batchIndex(): number | undefined { + return this['batch_index']; + } + public withTotalInstances(totalInstances: number): JobScriptBatchDetailModel { + this['total_instances'] = totalInstances; + return this; + } + public set totalInstances(totalInstances: number | undefined) { + this['total_instances'] = totalInstances; + } + public get totalInstances(): number | undefined { + return this['total_instances']; + } + public withExecuteInstances(executeInstances: Array): JobScriptBatchDetailModel { + this['execute_instances'] = executeInstances; + return this; + } + public set executeInstances(executeInstances: Array | undefined) { + this['execute_instances'] = executeInstances; + } + public get executeInstances(): Array | undefined { + return this['execute_instances']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/JobScriptBatchListModel.ts b/services/coc/v1/model/JobScriptBatchListModel.ts new file mode 100644 index 000000000..c6e50e00e --- /dev/null +++ b/services/coc/v1/model/JobScriptBatchListModel.ts @@ -0,0 +1,53 @@ + + +export class JobScriptBatchListModel { + private 'batch_index'?: number; + private 'total_instances'?: number; + private 'rotation_strategy'?: JobScriptBatchListModelRotationStrategyEnum | string; + public properties?: string; + public constructor() { + } + public withBatchIndex(batchIndex: number): JobScriptBatchListModel { + this['batch_index'] = batchIndex; + return this; + } + public set batchIndex(batchIndex: number | undefined) { + this['batch_index'] = batchIndex; + } + public get batchIndex(): number | undefined { + return this['batch_index']; + } + public withTotalInstances(totalInstances: number): JobScriptBatchListModel { + this['total_instances'] = totalInstances; + return this; + } + public set totalInstances(totalInstances: number | undefined) { + this['total_instances'] = totalInstances; + } + public get totalInstances(): number | undefined { + return this['total_instances']; + } + public withRotationStrategy(rotationStrategy: JobScriptBatchListModelRotationStrategyEnum | string): JobScriptBatchListModel { + this['rotation_strategy'] = rotationStrategy; + return this; + } + public set rotationStrategy(rotationStrategy: JobScriptBatchListModelRotationStrategyEnum | string | undefined) { + this['rotation_strategy'] = rotationStrategy; + } + public get rotationStrategy(): JobScriptBatchListModelRotationStrategyEnum | string | undefined { + return this['rotation_strategy']; + } + public withProperties(properties: string): JobScriptBatchListModel { + this['properties'] = properties; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum JobScriptBatchListModelRotationStrategyEnum { + CONTINUE = 'CONTINUE', + PAUSE = 'PAUSE' +} diff --git a/services/coc/v1/model/JobScriptOrderInfoModel.ts b/services/coc/v1/model/JobScriptOrderInfoModel.ts new file mode 100644 index 000000000..c63b98186 --- /dev/null +++ b/services/coc/v1/model/JobScriptOrderInfoModel.ts @@ -0,0 +1,79 @@ +import { JobScriptOrderInfoProp } from './JobScriptOrderInfoProp'; + + +export class JobScriptOrderInfoModel { + private 'execute_uuid'?: string; + private 'gmt_created'?: number; + private 'gmt_finished'?: number; + private 'execute_costs'?: number; + public creator?: string; + public status?: JobScriptOrderInfoModelStatusEnum | string; + public properties?: JobScriptOrderInfoProp; + public constructor() { + } + public withExecuteUuid(executeUuid: string): JobScriptOrderInfoModel { + this['execute_uuid'] = executeUuid; + return this; + } + public set executeUuid(executeUuid: string | undefined) { + this['execute_uuid'] = executeUuid; + } + public get executeUuid(): string | undefined { + return this['execute_uuid']; + } + public withGmtCreated(gmtCreated: number): JobScriptOrderInfoModel { + this['gmt_created'] = gmtCreated; + return this; + } + public set gmtCreated(gmtCreated: number | undefined) { + this['gmt_created'] = gmtCreated; + } + public get gmtCreated(): number | undefined { + return this['gmt_created']; + } + public withGmtFinished(gmtFinished: number): JobScriptOrderInfoModel { + this['gmt_finished'] = gmtFinished; + return this; + } + public set gmtFinished(gmtFinished: number | undefined) { + this['gmt_finished'] = gmtFinished; + } + public get gmtFinished(): number | undefined { + return this['gmt_finished']; + } + public withExecuteCosts(executeCosts: number): JobScriptOrderInfoModel { + this['execute_costs'] = executeCosts; + return this; + } + public set executeCosts(executeCosts: number | undefined) { + this['execute_costs'] = executeCosts; + } + public get executeCosts(): number | undefined { + return this['execute_costs']; + } + public withCreator(creator: string): JobScriptOrderInfoModel { + this['creator'] = creator; + return this; + } + public withStatus(status: JobScriptOrderInfoModelStatusEnum | string): JobScriptOrderInfoModel { + this['status'] = status; + return this; + } + public withProperties(properties: JobScriptOrderInfoProp): JobScriptOrderInfoModel { + this['properties'] = properties; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum JobScriptOrderInfoModelStatusEnum { + READY = 'READY', + PROCESSING = 'PROCESSING', + ABNORMAL = 'ABNORMAL', + PAUSED = 'PAUSED', + CANCELED = 'CANCELED', + FINISHED = 'FINISHED' +} diff --git a/services/coc/v1/model/JobScriptOrderInfoProp.ts b/services/coc/v1/model/JobScriptOrderInfoProp.ts new file mode 100644 index 000000000..5255b966e --- /dev/null +++ b/services/coc/v1/model/JobScriptOrderInfoProp.ts @@ -0,0 +1,73 @@ +import { ScriptExecuteParam } from './ScriptExecuteParam'; + + +export class JobScriptOrderInfoProp { + private 'script_uuid'?: string; + private 'script_name'?: string; + private 'script_version_uuid'?: number; + private 'script_version_name'?: string; + private 'current_execute_batch_index'?: number; + private 'execute_param'?: ScriptExecuteParam; + public constructor() { + } + public withScriptUuid(scriptUuid: string): JobScriptOrderInfoProp { + this['script_uuid'] = scriptUuid; + return this; + } + public set scriptUuid(scriptUuid: string | undefined) { + this['script_uuid'] = scriptUuid; + } + public get scriptUuid(): string | undefined { + return this['script_uuid']; + } + public withScriptName(scriptName: string): JobScriptOrderInfoProp { + this['script_name'] = scriptName; + return this; + } + public set scriptName(scriptName: string | undefined) { + this['script_name'] = scriptName; + } + public get scriptName(): string | undefined { + return this['script_name']; + } + public withScriptVersionUuid(scriptVersionUuid: number): JobScriptOrderInfoProp { + this['script_version_uuid'] = scriptVersionUuid; + return this; + } + public set scriptVersionUuid(scriptVersionUuid: number | undefined) { + this['script_version_uuid'] = scriptVersionUuid; + } + public get scriptVersionUuid(): number | undefined { + return this['script_version_uuid']; + } + public withScriptVersionName(scriptVersionName: string): JobScriptOrderInfoProp { + this['script_version_name'] = scriptVersionName; + return this; + } + public set scriptVersionName(scriptVersionName: string | undefined) { + this['script_version_name'] = scriptVersionName; + } + public get scriptVersionName(): string | undefined { + return this['script_version_name']; + } + public withCurrentExecuteBatchIndex(currentExecuteBatchIndex: number): JobScriptOrderInfoProp { + this['current_execute_batch_index'] = currentExecuteBatchIndex; + return this; + } + public set currentExecuteBatchIndex(currentExecuteBatchIndex: number | undefined) { + this['current_execute_batch_index'] = currentExecuteBatchIndex; + } + public get currentExecuteBatchIndex(): number | undefined { + return this['current_execute_batch_index']; + } + public withExecuteParam(executeParam: ScriptExecuteParam): JobScriptOrderInfoProp { + this['execute_param'] = executeParam; + return this; + } + public set executeParam(executeParam: ScriptExecuteParam | undefined) { + this['execute_param'] = executeParam; + } + public get executeParam(): ScriptExecuteParam | undefined { + return this['execute_param']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/JobScriptOrderListModel.ts b/services/coc/v1/model/JobScriptOrderListModel.ts new file mode 100644 index 000000000..3547de5e1 --- /dev/null +++ b/services/coc/v1/model/JobScriptOrderListModel.ts @@ -0,0 +1,104 @@ +import { JobScriptOrderListProp } from './JobScriptOrderListProp'; + + +export class JobScriptOrderListModel { + private 'order_id'?: number; + private 'order_name'?: string; + private 'execute_uuid'?: string; + private 'gmt_created'?: number; + private 'gmt_finished'?: number; + private 'execute_costs'?: number; + public creator?: string; + public status?: JobScriptOrderListModelStatusEnum | string; + public properties?: JobScriptOrderListProp; + public constructor(orderId?: number, orderName?: string, executeUuid?: string) { + this['order_id'] = orderId; + this['order_name'] = orderName; + this['execute_uuid'] = executeUuid; + } + public withOrderId(orderId: number): JobScriptOrderListModel { + this['order_id'] = orderId; + return this; + } + public set orderId(orderId: number | undefined) { + this['order_id'] = orderId; + } + public get orderId(): number | undefined { + return this['order_id']; + } + public withOrderName(orderName: string): JobScriptOrderListModel { + this['order_name'] = orderName; + return this; + } + public set orderName(orderName: string | undefined) { + this['order_name'] = orderName; + } + public get orderName(): string | undefined { + return this['order_name']; + } + public withExecuteUuid(executeUuid: string): JobScriptOrderListModel { + this['execute_uuid'] = executeUuid; + return this; + } + public set executeUuid(executeUuid: string | undefined) { + this['execute_uuid'] = executeUuid; + } + public get executeUuid(): string | undefined { + return this['execute_uuid']; + } + public withGmtCreated(gmtCreated: number): JobScriptOrderListModel { + this['gmt_created'] = gmtCreated; + return this; + } + public set gmtCreated(gmtCreated: number | undefined) { + this['gmt_created'] = gmtCreated; + } + public get gmtCreated(): number | undefined { + return this['gmt_created']; + } + public withGmtFinished(gmtFinished: number): JobScriptOrderListModel { + this['gmt_finished'] = gmtFinished; + return this; + } + public set gmtFinished(gmtFinished: number | undefined) { + this['gmt_finished'] = gmtFinished; + } + public get gmtFinished(): number | undefined { + return this['gmt_finished']; + } + public withExecuteCosts(executeCosts: number): JobScriptOrderListModel { + this['execute_costs'] = executeCosts; + return this; + } + public set executeCosts(executeCosts: number | undefined) { + this['execute_costs'] = executeCosts; + } + public get executeCosts(): number | undefined { + return this['execute_costs']; + } + public withCreator(creator: string): JobScriptOrderListModel { + this['creator'] = creator; + return this; + } + public withStatus(status: JobScriptOrderListModelStatusEnum | string): JobScriptOrderListModel { + this['status'] = status; + return this; + } + public withProperties(properties: JobScriptOrderListProp): JobScriptOrderListModel { + this['properties'] = properties; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum JobScriptOrderListModelStatusEnum { + READY = 'READY', + PROCESSING = 'PROCESSING', + ABNORMAL = 'ABNORMAL', + PAUSED = 'PAUSED', + CANCELED = 'CANCELED', + FINISHED = 'FINISHED' +} diff --git a/services/coc/v1/model/JobScriptOrderListPage.ts b/services/coc/v1/model/JobScriptOrderListPage.ts new file mode 100644 index 000000000..6c105dcf7 --- /dev/null +++ b/services/coc/v1/model/JobScriptOrderListPage.ts @@ -0,0 +1,19 @@ +import { JobScriptOrderListModel } from './JobScriptOrderListModel'; + + +export class JobScriptOrderListPage { + public total?: number; + public data?: Array; + public constructor(total?: number, data?: Array) { + this['total'] = total; + this['data'] = data; + } + public withTotal(total: number): JobScriptOrderListPage { + this['total'] = total; + return this; + } + public withData(data: Array): JobScriptOrderListPage { + this['data'] = data; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/JobScriptOrderListProp.ts b/services/coc/v1/model/JobScriptOrderListProp.ts new file mode 100644 index 000000000..9f07403d0 --- /dev/null +++ b/services/coc/v1/model/JobScriptOrderListProp.ts @@ -0,0 +1,17 @@ + + +export class JobScriptOrderListProp { + private 'region_ids'?: string; + public constructor() { + } + public withRegionIds(regionIds: string): JobScriptOrderListProp { + this['region_ids'] = regionIds; + return this; + } + public set regionIds(regionIds: string | undefined) { + this['region_ids'] = regionIds; + } + public get regionIds(): string | undefined { + return this['region_ids']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/JobScriptOrderOperationBody.ts b/services/coc/v1/model/JobScriptOrderOperationBody.ts new file mode 100644 index 000000000..33f938f88 --- /dev/null +++ b/services/coc/v1/model/JobScriptOrderOperationBody.ts @@ -0,0 +1,52 @@ + + +export class JobScriptOrderOperationBody { + private 'batch_index'?: number; + private 'instance_id'?: number; + private 'operation_type'?: JobScriptOrderOperationBodyOperationTypeEnum | string; + public constructor(operationType?: string) { + this['operation_type'] = operationType; + } + public withBatchIndex(batchIndex: number): JobScriptOrderOperationBody { + this['batch_index'] = batchIndex; + return this; + } + public set batchIndex(batchIndex: number | undefined) { + this['batch_index'] = batchIndex; + } + public get batchIndex(): number | undefined { + return this['batch_index']; + } + public withInstanceId(instanceId: number): JobScriptOrderOperationBody { + this['instance_id'] = instanceId; + return this; + } + public set instanceId(instanceId: number | undefined) { + this['instance_id'] = instanceId; + } + public get instanceId(): number | undefined { + return this['instance_id']; + } + public withOperationType(operationType: JobScriptOrderOperationBodyOperationTypeEnum | string): JobScriptOrderOperationBody { + this['operation_type'] = operationType; + return this; + } + public set operationType(operationType: JobScriptOrderOperationBodyOperationTypeEnum | string | undefined) { + this['operation_type'] = operationType; + } + public get operationType(): JobScriptOrderOperationBodyOperationTypeEnum | string | undefined { + return this['operation_type']; + } +} + +/** + * @export + * @enum {string} + */ +export enum JobScriptOrderOperationBodyOperationTypeEnum { + CANCEL_INSTANCE = 'CANCEL_INSTANCE', + SKIP_BATCH = 'SKIP_BATCH', + CANCEL_ORDER = 'CANCEL_ORDER', + PAUSE_ORDER = 'PAUSE_ORDER', + CONTINUE_ORDER = 'CONTINUE_ORDER' +} diff --git a/services/coc/v1/model/JobScriptOrderStatisticsModel.ts b/services/coc/v1/model/JobScriptOrderStatisticsModel.ts new file mode 100644 index 000000000..0ee58d4b9 --- /dev/null +++ b/services/coc/v1/model/JobScriptOrderStatisticsModel.ts @@ -0,0 +1,29 @@ +import { ExectuionStatistic } from './ExectuionStatistic'; + + +export class JobScriptOrderStatisticsModel { + private 'total_instance'?: number; + private 'execute_statistics'?: Array; + public constructor() { + } + public withTotalInstance(totalInstance: number): JobScriptOrderStatisticsModel { + this['total_instance'] = totalInstance; + return this; + } + public set totalInstance(totalInstance: number | undefined) { + this['total_instance'] = totalInstance; + } + public get totalInstance(): number | undefined { + return this['total_instance']; + } + public withExecuteStatistics(executeStatistics: Array): JobScriptOrderStatisticsModel { + this['execute_statistics'] = executeStatistics; + return this; + } + public set executeStatistics(executeStatistics: Array | undefined) { + this['execute_statistics'] = executeStatistics; + } + public get executeStatistics(): Array | undefined { + return this['execute_statistics']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ListApplicationsRequest.ts b/services/coc/v1/model/ListApplicationsRequest.ts new file mode 100644 index 000000000..c9b31eb9e --- /dev/null +++ b/services/coc/v1/model/ListApplicationsRequest.ts @@ -0,0 +1,55 @@ + + +export class ListApplicationsRequest { + private 'id_list'?: Array; + private 'parent_id'?: string; + private 'name_like'?: string; + public code?: string; + public marker?: string; + public limit?: number; + public constructor(limit?: number) { + this['limit'] = limit; + } + public withIdList(idList: Array): ListApplicationsRequest { + this['id_list'] = idList; + return this; + } + public set idList(idList: Array | undefined) { + this['id_list'] = idList; + } + public get idList(): Array | undefined { + return this['id_list']; + } + public withParentId(parentId: string): ListApplicationsRequest { + this['parent_id'] = parentId; + return this; + } + public set parentId(parentId: string | undefined) { + this['parent_id'] = parentId; + } + public get parentId(): string | undefined { + return this['parent_id']; + } + public withNameLike(nameLike: string): ListApplicationsRequest { + this['name_like'] = nameLike; + return this; + } + public set nameLike(nameLike: string | undefined) { + this['name_like'] = nameLike; + } + public get nameLike(): string | undefined { + return this['name_like']; + } + public withCode(code: string): ListApplicationsRequest { + this['code'] = code; + return this; + } + public withMarker(marker: string): ListApplicationsRequest { + this['marker'] = marker; + return this; + } + public withLimit(limit: number): ListApplicationsRequest { + this['limit'] = limit; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ListApplicationsResponse.ts b/services/coc/v1/model/ListApplicationsResponse.ts new file mode 100644 index 000000000..f220e7527 --- /dev/null +++ b/services/coc/v1/model/ListApplicationsResponse.ts @@ -0,0 +1,14 @@ +import { ApplicationQueryResponseData } from './ApplicationQueryResponseData'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ListApplicationsResponse extends SdkResponse { + public data?: Array; + public constructor() { + super(); + } + public withData(data: Array): ListApplicationsResponse { + this['data'] = data; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ListAuthorizableTicketsExternalRequest.ts b/services/coc/v1/model/ListAuthorizableTicketsExternalRequest.ts new file mode 100644 index 000000000..e1d47725b --- /dev/null +++ b/services/coc/v1/model/ListAuthorizableTicketsExternalRequest.ts @@ -0,0 +1,12 @@ +import { ListAuthorizableTicketsReq } from './ListAuthorizableTicketsReq'; + + +export class ListAuthorizableTicketsExternalRequest { + public body?: ListAuthorizableTicketsReq; + public constructor() { + } + public withBody(body: ListAuthorizableTicketsReq): ListAuthorizableTicketsExternalRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ListAuthorizableTicketsExternalResponse.ts b/services/coc/v1/model/ListAuthorizableTicketsExternalResponse.ts new file mode 100644 index 000000000..2eb480dce --- /dev/null +++ b/services/coc/v1/model/ListAuthorizableTicketsExternalResponse.ts @@ -0,0 +1,50 @@ +import { AuthorizeTicketInfo } from './AuthorizeTicketInfo'; +import { BaseResponse } from './BaseResponse'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ListAuthorizableTicketsExternalResponse extends SdkResponse { + private 'provider_code'?: string; + private 'error_code'?: string; + private 'error_msg'?: string; + public data?: Array; + public constructor(providerCode?: string, errorCode?: string) { + super(); + this['provider_code'] = providerCode; + this['error_code'] = errorCode; + } + public withProviderCode(providerCode: string): ListAuthorizableTicketsExternalResponse { + this['provider_code'] = providerCode; + return this; + } + public set providerCode(providerCode: string | undefined) { + this['provider_code'] = providerCode; + } + public get providerCode(): string | undefined { + return this['provider_code']; + } + public withErrorCode(errorCode: string): ListAuthorizableTicketsExternalResponse { + this['error_code'] = errorCode; + return this; + } + public set errorCode(errorCode: string | undefined) { + this['error_code'] = errorCode; + } + public get errorCode(): string | undefined { + return this['error_code']; + } + public withErrorMsg(errorMsg: string): ListAuthorizableTicketsExternalResponse { + this['error_msg'] = errorMsg; + return this; + } + public set errorMsg(errorMsg: string | undefined) { + this['error_msg'] = errorMsg; + } + public get errorMsg(): string | undefined { + return this['error_msg']; + } + public withData(data: Array): ListAuthorizableTicketsExternalResponse { + this['data'] = data; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ListAuthorizableTicketsReq.ts b/services/coc/v1/model/ListAuthorizableTicketsReq.ts new file mode 100644 index 000000000..201379e65 --- /dev/null +++ b/services/coc/v1/model/ListAuthorizableTicketsReq.ts @@ -0,0 +1,18 @@ +import { AuthorizableTicketBody } from './AuthorizableTicketBody'; + + +export class ListAuthorizableTicketsReq { + private 'request_params'?: Array; + public constructor() { + } + public withRequestParams(requestParams: Array): ListAuthorizableTicketsReq { + this['request_params'] = requestParams; + return this; + } + public set requestParams(requestParams: Array | undefined) { + this['request_params'] = requestParams; + } + public get requestParams(): Array | undefined { + return this['request_params']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ListBaseRequest.ts b/services/coc/v1/model/ListBaseRequest.ts new file mode 100644 index 000000000..5c7b51829 --- /dev/null +++ b/services/coc/v1/model/ListBaseRequest.ts @@ -0,0 +1,16 @@ + + +export class ListBaseRequest { + public limit?: number; + public offset?: number; + public constructor() { + } + public withLimit(limit: number): ListBaseRequest { + this['limit'] = limit; + return this; + } + public withOffset(offset: number): ListBaseRequest { + this['offset'] = offset; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ListBaseResponse.ts b/services/coc/v1/model/ListBaseResponse.ts new file mode 100644 index 000000000..7990913bf --- /dev/null +++ b/services/coc/v1/model/ListBaseResponse.ts @@ -0,0 +1,39 @@ + + +export class ListBaseResponse { + private 'provider_code'?: string; + private 'error_code'?: string; + private 'error_msg'?: string; + public constructor() { + } + public withProviderCode(providerCode: string): ListBaseResponse { + this['provider_code'] = providerCode; + return this; + } + public set providerCode(providerCode: string | undefined) { + this['provider_code'] = providerCode; + } + public get providerCode(): string | undefined { + return this['provider_code']; + } + public withErrorCode(errorCode: string): ListBaseResponse { + this['error_code'] = errorCode; + return this; + } + public set errorCode(errorCode: string | undefined) { + this['error_code'] = errorCode; + } + public get errorCode(): string | undefined { + return this['error_code']; + } + public withErrorMsg(errorMsg: string): ListBaseResponse { + this['error_msg'] = errorMsg; + return this; + } + public set errorMsg(errorMsg: string | undefined) { + this['error_msg'] = errorMsg; + } + public get errorMsg(): string | undefined { + return this['error_msg']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ListCocTicketOperationHistoriesRequest.ts b/services/coc/v1/model/ListCocTicketOperationHistoriesRequest.ts new file mode 100644 index 000000000..9b9298679 --- /dev/null +++ b/services/coc/v1/model/ListCocTicketOperationHistoriesRequest.ts @@ -0,0 +1,33 @@ +import { ListTicketParams } from './ListTicketParams'; + + +export class ListCocTicketOperationHistoriesRequest { + private 'ticket_type'?: ListCocTicketOperationHistoriesRequestTicketTypeEnum | string; + public body?: ListTicketParams; + public constructor(ticketType?: string) { + this['ticket_type'] = ticketType; + } + public withTicketType(ticketType: ListCocTicketOperationHistoriesRequestTicketTypeEnum | string): ListCocTicketOperationHistoriesRequest { + this['ticket_type'] = ticketType; + return this; + } + public set ticketType(ticketType: ListCocTicketOperationHistoriesRequestTicketTypeEnum | string | undefined) { + this['ticket_type'] = ticketType; + } + public get ticketType(): ListCocTicketOperationHistoriesRequestTicketTypeEnum | string | undefined { + return this['ticket_type']; + } + public withBody(body: ListTicketParams): ListCocTicketOperationHistoriesRequest { + this['body'] = body; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum ListCocTicketOperationHistoriesRequestTicketTypeEnum { + INCIDENT = 'incident', + ISSUES_MGMT = 'issues_mgmt' +} diff --git a/services/coc/v1/model/ListCocTicketOperationHistoriesResponse.ts b/services/coc/v1/model/ListCocTicketOperationHistoriesResponse.ts new file mode 100644 index 000000000..f5cdb4c7a --- /dev/null +++ b/services/coc/v1/model/ListCocTicketOperationHistoriesResponse.ts @@ -0,0 +1,49 @@ +import { BaseResponse } from './BaseResponse'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ListCocTicketOperationHistoriesResponse extends SdkResponse { + private 'provider_code'?: string; + private 'error_code'?: string; + private 'error_msg'?: string; + public data?: object; + public constructor(providerCode?: string, errorCode?: string) { + super(); + this['provider_code'] = providerCode; + this['error_code'] = errorCode; + } + public withProviderCode(providerCode: string): ListCocTicketOperationHistoriesResponse { + this['provider_code'] = providerCode; + return this; + } + public set providerCode(providerCode: string | undefined) { + this['provider_code'] = providerCode; + } + public get providerCode(): string | undefined { + return this['provider_code']; + } + public withErrorCode(errorCode: string): ListCocTicketOperationHistoriesResponse { + this['error_code'] = errorCode; + return this; + } + public set errorCode(errorCode: string | undefined) { + this['error_code'] = errorCode; + } + public get errorCode(): string | undefined { + return this['error_code']; + } + public withErrorMsg(errorMsg: string): ListCocTicketOperationHistoriesResponse { + this['error_msg'] = errorMsg; + return this; + } + public set errorMsg(errorMsg: string | undefined) { + this['error_msg'] = errorMsg; + } + public get errorMsg(): string | undefined { + return this['error_msg']; + } + public withData(data: object): ListCocTicketOperationHistoriesResponse { + this['data'] = data; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ListInstanceCompliantRequest.ts b/services/coc/v1/model/ListInstanceCompliantRequest.ts new file mode 100644 index 000000000..43970bd3c --- /dev/null +++ b/services/coc/v1/model/ListInstanceCompliantRequest.ts @@ -0,0 +1,140 @@ + + +export class ListInstanceCompliantRequest { + private 'enterprise_project_id'?: string; + public name?: string; + private 'instance_id'?: string; + public ip?: string; + public eip?: string; + private 'operating_system'?: string; + public region?: string; + public group?: string; + private 'compliant_status'?: string; + private 'order_id'?: string; + public offset?: number; + public limit?: number; + private 'sort_dir'?: string; + private 'sort_key'?: string; + private 'report_scene'?: string; + private 'cce_info_id'?: string; + public constructor() { + } + public withEnterpriseProjectId(enterpriseProjectId: string): ListInstanceCompliantRequest { + this['enterprise_project_id'] = enterpriseProjectId; + return this; + } + public set enterpriseProjectId(enterpriseProjectId: string | undefined) { + this['enterprise_project_id'] = enterpriseProjectId; + } + public get enterpriseProjectId(): string | undefined { + return this['enterprise_project_id']; + } + public withName(name: string): ListInstanceCompliantRequest { + this['name'] = name; + return this; + } + public withInstanceId(instanceId: string): ListInstanceCompliantRequest { + this['instance_id'] = instanceId; + return this; + } + public set instanceId(instanceId: string | undefined) { + this['instance_id'] = instanceId; + } + public get instanceId(): string | undefined { + return this['instance_id']; + } + public withIp(ip: string): ListInstanceCompliantRequest { + this['ip'] = ip; + return this; + } + public withEip(eip: string): ListInstanceCompliantRequest { + this['eip'] = eip; + return this; + } + public withOperatingSystem(operatingSystem: string): ListInstanceCompliantRequest { + this['operating_system'] = operatingSystem; + return this; + } + public set operatingSystem(operatingSystem: string | undefined) { + this['operating_system'] = operatingSystem; + } + public get operatingSystem(): string | undefined { + return this['operating_system']; + } + public withRegion(region: string): ListInstanceCompliantRequest { + this['region'] = region; + return this; + } + public withGroup(group: string): ListInstanceCompliantRequest { + this['group'] = group; + return this; + } + public withCompliantStatus(compliantStatus: string): ListInstanceCompliantRequest { + this['compliant_status'] = compliantStatus; + return this; + } + public set compliantStatus(compliantStatus: string | undefined) { + this['compliant_status'] = compliantStatus; + } + public get compliantStatus(): string | undefined { + return this['compliant_status']; + } + public withOrderId(orderId: string): ListInstanceCompliantRequest { + this['order_id'] = orderId; + return this; + } + public set orderId(orderId: string | undefined) { + this['order_id'] = orderId; + } + public get orderId(): string | undefined { + return this['order_id']; + } + public withOffset(offset: number): ListInstanceCompliantRequest { + this['offset'] = offset; + return this; + } + public withLimit(limit: number): ListInstanceCompliantRequest { + this['limit'] = limit; + return this; + } + public withSortDir(sortDir: string): ListInstanceCompliantRequest { + this['sort_dir'] = sortDir; + return this; + } + public set sortDir(sortDir: string | undefined) { + this['sort_dir'] = sortDir; + } + public get sortDir(): string | undefined { + return this['sort_dir']; + } + public withSortKey(sortKey: string): ListInstanceCompliantRequest { + this['sort_key'] = sortKey; + return this; + } + public set sortKey(sortKey: string | undefined) { + this['sort_key'] = sortKey; + } + public get sortKey(): string | undefined { + return this['sort_key']; + } + public withReportScene(reportScene: string): ListInstanceCompliantRequest { + this['report_scene'] = reportScene; + return this; + } + public set reportScene(reportScene: string | undefined) { + this['report_scene'] = reportScene; + } + public get reportScene(): string | undefined { + return this['report_scene']; + } + public withCceInfoId(cceInfoId: string): ListInstanceCompliantRequest { + this['cce_info_id'] = cceInfoId; + return this; + } + public set cceInfoId(cceInfoId: string | undefined) { + this['cce_info_id'] = cceInfoId; + } + public get cceInfoId(): string | undefined { + return this['cce_info_id']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ListInstanceCompliantResponse.ts b/services/coc/v1/model/ListInstanceCompliantResponse.ts new file mode 100644 index 000000000..25a666dce --- /dev/null +++ b/services/coc/v1/model/ListInstanceCompliantResponse.ts @@ -0,0 +1,25 @@ +import { InstanceCompliant } from './InstanceCompliant'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ListInstanceCompliantResponse extends SdkResponse { + public count?: number; + private 'instance_compliant'?: Array; + public constructor() { + super(); + } + public withCount(count: number): ListInstanceCompliantResponse { + this['count'] = count; + return this; + } + public withInstanceCompliant(instanceCompliant: Array): ListInstanceCompliantResponse { + this['instance_compliant'] = instanceCompliant; + return this; + } + public set instanceCompliant(instanceCompliant: Array | undefined) { + this['instance_compliant'] = instanceCompliant; + } + public get instanceCompliant(): Array | undefined { + return this['instance_compliant']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ListPublicScriptsRequest.ts b/services/coc/v1/model/ListPublicScriptsRequest.ts new file mode 100644 index 000000000..699888d37 --- /dev/null +++ b/services/coc/v1/model/ListPublicScriptsRequest.ts @@ -0,0 +1,101 @@ + + +export class ListPublicScriptsRequest { + public limit?: number; + public marker?: number; + private 'name_like'?: string; + public name?: string; + private 'risk_level'?: ListPublicScriptsRequestRiskLevelEnum | string; + public type?: ListPublicScriptsRequestTypeEnum | string; + private 'X-Language'?: string; + private 'x-project-id'?: string; + private 'x-user-profile'?: string; + public constructor(limit?: number) { + this['limit'] = limit; + } + public withLimit(limit: number): ListPublicScriptsRequest { + this['limit'] = limit; + return this; + } + public withMarker(marker: number): ListPublicScriptsRequest { + this['marker'] = marker; + return this; + } + public withNameLike(nameLike: string): ListPublicScriptsRequest { + this['name_like'] = nameLike; + return this; + } + public set nameLike(nameLike: string | undefined) { + this['name_like'] = nameLike; + } + public get nameLike(): string | undefined { + return this['name_like']; + } + public withName(name: string): ListPublicScriptsRequest { + this['name'] = name; + return this; + } + public withRiskLevel(riskLevel: ListPublicScriptsRequestRiskLevelEnum | string): ListPublicScriptsRequest { + this['risk_level'] = riskLevel; + return this; + } + public set riskLevel(riskLevel: ListPublicScriptsRequestRiskLevelEnum | string | undefined) { + this['risk_level'] = riskLevel; + } + public get riskLevel(): ListPublicScriptsRequestRiskLevelEnum | string | undefined { + return this['risk_level']; + } + public withType(type: ListPublicScriptsRequestTypeEnum | string): ListPublicScriptsRequest { + this['type'] = type; + return this; + } + public withXLanguage(xLanguage: string): ListPublicScriptsRequest { + this['X-Language'] = xLanguage; + return this; + } + public set xLanguage(xLanguage: string | undefined) { + this['X-Language'] = xLanguage; + } + public get xLanguage(): string | undefined { + return this['X-Language']; + } + public withXProjectId(xProjectId: string): ListPublicScriptsRequest { + this['x-project-id'] = xProjectId; + return this; + } + public set xProjectId(xProjectId: string | undefined) { + this['x-project-id'] = xProjectId; + } + public get xProjectId(): string | undefined { + return this['x-project-id']; + } + public withXUserProfile(xUserProfile: string): ListPublicScriptsRequest { + this['x-user-profile'] = xUserProfile; + return this; + } + public set xUserProfile(xUserProfile: string | undefined) { + this['x-user-profile'] = xUserProfile; + } + public get xUserProfile(): string | undefined { + return this['x-user-profile']; + } +} + +/** + * @export + * @enum {string} + */ +export enum ListPublicScriptsRequestRiskLevelEnum { + LOW = 'LOW', + MEDIUM = 'MEDIUM', + HIGH = 'HIGH' +} +/** + * @export + * @enum {string} + */ +export enum ListPublicScriptsRequestTypeEnum { + SHELL = 'SHELL', + PYTHON = 'PYTHON', + BAT = 'BAT' +} diff --git a/services/coc/v1/model/ListPublicScriptsResponse.ts b/services/coc/v1/model/ListPublicScriptsResponse.ts new file mode 100644 index 000000000..081bb8443 --- /dev/null +++ b/services/coc/v1/model/ListPublicScriptsResponse.ts @@ -0,0 +1,14 @@ +import { PublicScriptListPage } from './PublicScriptListPage'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ListPublicScriptsResponse extends SdkResponse { + public data?: PublicScriptListPage; + public constructor() { + super(); + } + public withData(data: PublicScriptListPage): ListPublicScriptsResponse { + this['data'] = data; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ListResourceRequest.ts b/services/coc/v1/model/ListResourceRequest.ts new file mode 100644 index 000000000..0f70d1e06 --- /dev/null +++ b/services/coc/v1/model/ListResourceRequest.ts @@ -0,0 +1,214 @@ + + +export class ListResourceRequest { + public provider?: string; + public type?: string; + public limit?: number; + public marker?: string; + private 'resource_id_list'?: Array; + public name?: string; + private 'region_id'?: string; + private 'az_id'?: string; + private 'ip_type'?: string; + public ip?: string; + public status?: string; + private 'agent_state'?: string; + private 'image_name'?: string; + private 'os_type'?: string; + public tag?: string; + private 'tag_key'?: string; + private 'group_id'?: string; + private 'component_id'?: string; + private 'application_id'?: string; + private 'cce_cluster_id'?: string; + private 'vpc_id'?: string; + private 'ep_id'?: string; + private 'is_delegated'?: boolean; + public constructor(provider?: string, type?: string, limit?: number) { + this['provider'] = provider; + this['type'] = type; + this['limit'] = limit; + } + public withProvider(provider: string): ListResourceRequest { + this['provider'] = provider; + return this; + } + public withType(type: string): ListResourceRequest { + this['type'] = type; + return this; + } + public withLimit(limit: number): ListResourceRequest { + this['limit'] = limit; + return this; + } + public withMarker(marker: string): ListResourceRequest { + this['marker'] = marker; + return this; + } + public withResourceIdList(resourceIdList: Array): ListResourceRequest { + this['resource_id_list'] = resourceIdList; + return this; + } + public set resourceIdList(resourceIdList: Array | undefined) { + this['resource_id_list'] = resourceIdList; + } + public get resourceIdList(): Array | undefined { + return this['resource_id_list']; + } + public withName(name: string): ListResourceRequest { + this['name'] = name; + return this; + } + public withRegionId(regionId: string): ListResourceRequest { + this['region_id'] = regionId; + return this; + } + public set regionId(regionId: string | undefined) { + this['region_id'] = regionId; + } + public get regionId(): string | undefined { + return this['region_id']; + } + public withAzId(azId: string): ListResourceRequest { + this['az_id'] = azId; + return this; + } + public set azId(azId: string | undefined) { + this['az_id'] = azId; + } + public get azId(): string | undefined { + return this['az_id']; + } + public withIpType(ipType: string): ListResourceRequest { + this['ip_type'] = ipType; + return this; + } + public set ipType(ipType: string | undefined) { + this['ip_type'] = ipType; + } + public get ipType(): string | undefined { + return this['ip_type']; + } + public withIp(ip: string): ListResourceRequest { + this['ip'] = ip; + return this; + } + public withStatus(status: string): ListResourceRequest { + this['status'] = status; + return this; + } + public withAgentState(agentState: string): ListResourceRequest { + this['agent_state'] = agentState; + return this; + } + public set agentState(agentState: string | undefined) { + this['agent_state'] = agentState; + } + public get agentState(): string | undefined { + return this['agent_state']; + } + public withImageName(imageName: string): ListResourceRequest { + this['image_name'] = imageName; + return this; + } + public set imageName(imageName: string | undefined) { + this['image_name'] = imageName; + } + public get imageName(): string | undefined { + return this['image_name']; + } + public withOsType(osType: string): ListResourceRequest { + this['os_type'] = osType; + return this; + } + public set osType(osType: string | undefined) { + this['os_type'] = osType; + } + public get osType(): string | undefined { + return this['os_type']; + } + public withTag(tag: string): ListResourceRequest { + this['tag'] = tag; + return this; + } + public withTagKey(tagKey: string): ListResourceRequest { + this['tag_key'] = tagKey; + return this; + } + public set tagKey(tagKey: string | undefined) { + this['tag_key'] = tagKey; + } + public get tagKey(): string | undefined { + return this['tag_key']; + } + public withGroupId(groupId: string): ListResourceRequest { + this['group_id'] = groupId; + return this; + } + public set groupId(groupId: string | undefined) { + this['group_id'] = groupId; + } + public get groupId(): string | undefined { + return this['group_id']; + } + public withComponentId(componentId: string): ListResourceRequest { + this['component_id'] = componentId; + return this; + } + public set componentId(componentId: string | undefined) { + this['component_id'] = componentId; + } + public get componentId(): string | undefined { + return this['component_id']; + } + public withApplicationId(applicationId: string): ListResourceRequest { + this['application_id'] = applicationId; + return this; + } + public set applicationId(applicationId: string | undefined) { + this['application_id'] = applicationId; + } + public get applicationId(): string | undefined { + return this['application_id']; + } + public withCceClusterId(cceClusterId: string): ListResourceRequest { + this['cce_cluster_id'] = cceClusterId; + return this; + } + public set cceClusterId(cceClusterId: string | undefined) { + this['cce_cluster_id'] = cceClusterId; + } + public get cceClusterId(): string | undefined { + return this['cce_cluster_id']; + } + public withVpcId(vpcId: string): ListResourceRequest { + this['vpc_id'] = vpcId; + return this; + } + public set vpcId(vpcId: string | undefined) { + this['vpc_id'] = vpcId; + } + public get vpcId(): string | undefined { + return this['vpc_id']; + } + public withEpId(epId: string): ListResourceRequest { + this['ep_id'] = epId; + return this; + } + public set epId(epId: string | undefined) { + this['ep_id'] = epId; + } + public get epId(): string | undefined { + return this['ep_id']; + } + public withIsDelegated(isDelegated: boolean): ListResourceRequest { + this['is_delegated'] = isDelegated; + return this; + } + public set isDelegated(isDelegated: boolean | undefined) { + this['is_delegated'] = isDelegated; + } + public get isDelegated(): boolean | undefined { + return this['is_delegated']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ListResourceResponse.ts b/services/coc/v1/model/ListResourceResponse.ts new file mode 100644 index 000000000..e58b161cd --- /dev/null +++ b/services/coc/v1/model/ListResourceResponse.ts @@ -0,0 +1,25 @@ +import { BatchListResourceResponseData } from './BatchListResourceResponseData'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ListResourceResponse extends SdkResponse { + public data?: Array; + private 'X-request-id'?: string; + public constructor() { + super(); + } + public withData(data: Array): ListResourceResponse { + this['data'] = data; + return this; + } + public withXRequestId(xRequestId: string): ListResourceResponse { + this['X-request-id'] = xRequestId; + return this; + } + public set xRequestId(xRequestId: string | undefined) { + this['X-request-id'] = xRequestId; + } + public get xRequestId(): string | undefined { + return this['X-request-id']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ListScriptJobBatchesRequest.ts b/services/coc/v1/model/ListScriptJobBatchesRequest.ts new file mode 100644 index 000000000..e21d0b79d --- /dev/null +++ b/services/coc/v1/model/ListScriptJobBatchesRequest.ts @@ -0,0 +1,51 @@ + + +export class ListScriptJobBatchesRequest { + private 'execute_uuid'?: string; + private 'X-Language'?: string; + private 'x-project-id'?: string; + private 'x-user-profile'?: string; + public constructor(executeUuid?: string) { + this['execute_uuid'] = executeUuid; + } + public withExecuteUuid(executeUuid: string): ListScriptJobBatchesRequest { + this['execute_uuid'] = executeUuid; + return this; + } + public set executeUuid(executeUuid: string | undefined) { + this['execute_uuid'] = executeUuid; + } + public get executeUuid(): string | undefined { + return this['execute_uuid']; + } + public withXLanguage(xLanguage: string): ListScriptJobBatchesRequest { + this['X-Language'] = xLanguage; + return this; + } + public set xLanguage(xLanguage: string | undefined) { + this['X-Language'] = xLanguage; + } + public get xLanguage(): string | undefined { + return this['X-Language']; + } + public withXProjectId(xProjectId: string): ListScriptJobBatchesRequest { + this['x-project-id'] = xProjectId; + return this; + } + public set xProjectId(xProjectId: string | undefined) { + this['x-project-id'] = xProjectId; + } + public get xProjectId(): string | undefined { + return this['x-project-id']; + } + public withXUserProfile(xUserProfile: string): ListScriptJobBatchesRequest { + this['x-user-profile'] = xUserProfile; + return this; + } + public set xUserProfile(xUserProfile: string | undefined) { + this['x-user-profile'] = xUserProfile; + } + public get xUserProfile(): string | undefined { + return this['x-user-profile']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ListScriptJobBatchesResponse.ts b/services/coc/v1/model/ListScriptJobBatchesResponse.ts new file mode 100644 index 000000000..c7b4968bc --- /dev/null +++ b/services/coc/v1/model/ListScriptJobBatchesResponse.ts @@ -0,0 +1,14 @@ +import { JobScriptBatchListModel } from './JobScriptBatchListModel'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ListScriptJobBatchesResponse extends SdkResponse { + public data?: Array; + public constructor() { + super(); + } + public withData(data: Array): ListScriptJobBatchesResponse { + this['data'] = data; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ListScriptJobsRequest.ts b/services/coc/v1/model/ListScriptJobsRequest.ts new file mode 100644 index 000000000..d8a307dd2 --- /dev/null +++ b/services/coc/v1/model/ListScriptJobsRequest.ts @@ -0,0 +1,93 @@ + + +export class ListScriptJobsRequest { + public limit?: number; + public marker?: number; + private 'start_time'?: number; + private 'end_time'?: number; + public creator?: string; + public status?: ListScriptJobsRequestStatusEnum | string; + private 'X-Language'?: string; + private 'x-project-id'?: string; + private 'x-user-profile'?: string; + public constructor() { + } + public withLimit(limit: number): ListScriptJobsRequest { + this['limit'] = limit; + return this; + } + public withMarker(marker: number): ListScriptJobsRequest { + this['marker'] = marker; + return this; + } + public withStartTime(startTime: number): ListScriptJobsRequest { + this['start_time'] = startTime; + return this; + } + public set startTime(startTime: number | undefined) { + this['start_time'] = startTime; + } + public get startTime(): number | undefined { + return this['start_time']; + } + public withEndTime(endTime: number): ListScriptJobsRequest { + this['end_time'] = endTime; + return this; + } + public set endTime(endTime: number | undefined) { + this['end_time'] = endTime; + } + public get endTime(): number | undefined { + return this['end_time']; + } + public withCreator(creator: string): ListScriptJobsRequest { + this['creator'] = creator; + return this; + } + public withStatus(status: ListScriptJobsRequestStatusEnum | string): ListScriptJobsRequest { + this['status'] = status; + return this; + } + public withXLanguage(xLanguage: string): ListScriptJobsRequest { + this['X-Language'] = xLanguage; + return this; + } + public set xLanguage(xLanguage: string | undefined) { + this['X-Language'] = xLanguage; + } + public get xLanguage(): string | undefined { + return this['X-Language']; + } + public withXProjectId(xProjectId: string): ListScriptJobsRequest { + this['x-project-id'] = xProjectId; + return this; + } + public set xProjectId(xProjectId: string | undefined) { + this['x-project-id'] = xProjectId; + } + public get xProjectId(): string | undefined { + return this['x-project-id']; + } + public withXUserProfile(xUserProfile: string): ListScriptJobsRequest { + this['x-user-profile'] = xUserProfile; + return this; + } + public set xUserProfile(xUserProfile: string | undefined) { + this['x-user-profile'] = xUserProfile; + } + public get xUserProfile(): string | undefined { + return this['x-user-profile']; + } +} + +/** + * @export + * @enum {string} + */ +export enum ListScriptJobsRequestStatusEnum { + PROCESSING = 'PROCESSING', + ABNORMAL = 'ABNORMAL', + PAUSED = 'PAUSED', + CANCELED = 'CANCELED', + FINISHED = 'FINISHED' +} diff --git a/services/coc/v1/model/ListScriptJobsResponse.ts b/services/coc/v1/model/ListScriptJobsResponse.ts new file mode 100644 index 000000000..687832ea6 --- /dev/null +++ b/services/coc/v1/model/ListScriptJobsResponse.ts @@ -0,0 +1,14 @@ +import { JobScriptOrderListPage } from './JobScriptOrderListPage'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ListScriptJobsResponse extends SdkResponse { + public data?: JobScriptOrderListPage; + public constructor() { + super(); + } + public withData(data: JobScriptOrderListPage): ListScriptJobsResponse { + this['data'] = data; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ListScriptsRequest.ts b/services/coc/v1/model/ListScriptsRequest.ts new file mode 100644 index 000000000..e78ffd61a --- /dev/null +++ b/services/coc/v1/model/ListScriptsRequest.ts @@ -0,0 +1,112 @@ + + +export class ListScriptsRequest { + public limit?: number; + public marker?: number; + private 'name_like'?: string; + public creator?: string; + private 'risk_level'?: ListScriptsRequestRiskLevelEnum | string; + public type?: ListScriptsRequestTypeEnum | string; + private 'enterprise_project_id'?: string; + private 'X-Language'?: string; + private 'x-project-id'?: string; + private 'x-user-profile'?: string; + public constructor(limit?: number) { + this['limit'] = limit; + } + public withLimit(limit: number): ListScriptsRequest { + this['limit'] = limit; + return this; + } + public withMarker(marker: number): ListScriptsRequest { + this['marker'] = marker; + return this; + } + public withNameLike(nameLike: string): ListScriptsRequest { + this['name_like'] = nameLike; + return this; + } + public set nameLike(nameLike: string | undefined) { + this['name_like'] = nameLike; + } + public get nameLike(): string | undefined { + return this['name_like']; + } + public withCreator(creator: string): ListScriptsRequest { + this['creator'] = creator; + return this; + } + public withRiskLevel(riskLevel: ListScriptsRequestRiskLevelEnum | string): ListScriptsRequest { + this['risk_level'] = riskLevel; + return this; + } + public set riskLevel(riskLevel: ListScriptsRequestRiskLevelEnum | string | undefined) { + this['risk_level'] = riskLevel; + } + public get riskLevel(): ListScriptsRequestRiskLevelEnum | string | undefined { + return this['risk_level']; + } + public withType(type: ListScriptsRequestTypeEnum | string): ListScriptsRequest { + this['type'] = type; + return this; + } + public withEnterpriseProjectId(enterpriseProjectId: string): ListScriptsRequest { + this['enterprise_project_id'] = enterpriseProjectId; + return this; + } + public set enterpriseProjectId(enterpriseProjectId: string | undefined) { + this['enterprise_project_id'] = enterpriseProjectId; + } + public get enterpriseProjectId(): string | undefined { + return this['enterprise_project_id']; + } + public withXLanguage(xLanguage: string): ListScriptsRequest { + this['X-Language'] = xLanguage; + return this; + } + public set xLanguage(xLanguage: string | undefined) { + this['X-Language'] = xLanguage; + } + public get xLanguage(): string | undefined { + return this['X-Language']; + } + public withXProjectId(xProjectId: string): ListScriptsRequest { + this['x-project-id'] = xProjectId; + return this; + } + public set xProjectId(xProjectId: string | undefined) { + this['x-project-id'] = xProjectId; + } + public get xProjectId(): string | undefined { + return this['x-project-id']; + } + public withXUserProfile(xUserProfile: string): ListScriptsRequest { + this['x-user-profile'] = xUserProfile; + return this; + } + public set xUserProfile(xUserProfile: string | undefined) { + this['x-user-profile'] = xUserProfile; + } + public get xUserProfile(): string | undefined { + return this['x-user-profile']; + } +} + +/** + * @export + * @enum {string} + */ +export enum ListScriptsRequestRiskLevelEnum { + LOW = 'LOW', + MEDIUM = 'MEDIUM', + HIGH = 'HIGH' +} +/** + * @export + * @enum {string} + */ +export enum ListScriptsRequestTypeEnum { + SHELL = 'SHELL', + PYTHON = 'PYTHON', + BAT = 'BAT' +} diff --git a/services/coc/v1/model/ListScriptsResponse.ts b/services/coc/v1/model/ListScriptsResponse.ts new file mode 100644 index 000000000..2476a80a9 --- /dev/null +++ b/services/coc/v1/model/ListScriptsResponse.ts @@ -0,0 +1,14 @@ +import { ScriptListPage } from './ScriptListPage'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ListScriptsResponse extends SdkResponse { + public data?: ScriptListPage; + public constructor() { + super(); + } + public withData(data: ScriptListPage): ListScriptsResponse { + this['data'] = data; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ListTenantWarRoomRequestBody.ts b/services/coc/v1/model/ListTenantWarRoomRequestBody.ts new file mode 100644 index 000000000..343fb323e --- /dev/null +++ b/services/coc/v1/model/ListTenantWarRoomRequestBody.ts @@ -0,0 +1,208 @@ +import { ListBaseRequest } from './ListBaseRequest'; + + +export class ListTenantWarRoomRequestBody { + public limit?: number; + public offset?: number; + private 'current_users'?: Array; + private 'war_room_nums'?: Array; + private 'incident_num'?: string; + public title?: string; + private 'region_code_list'?: Array; + private 'incident_levels'?: Array; + private 'impacted_application_ids'?: Array; + public admin?: Array; + public status?: Array; + private 'triggered_start_time'?: number; + private 'triggered_end_time'?: number; + private 'occur_start_time'?: number; + private 'occur_end_time'?: number; + private 'recover_start_time'?: number; + private 'recover_end_time'?: number; + private 'notification_level'?: Array; + private 'enterprise_project_ids'?: Array; + private 'war_room_num'?: string; + private 'statistic_flag'?: boolean; + public constructor() { + } + public withLimit(limit: number): ListTenantWarRoomRequestBody { + this['limit'] = limit; + return this; + } + public withOffset(offset: number): ListTenantWarRoomRequestBody { + this['offset'] = offset; + return this; + } + public withCurrentUsers(currentUsers: Array): ListTenantWarRoomRequestBody { + this['current_users'] = currentUsers; + return this; + } + public set currentUsers(currentUsers: Array | undefined) { + this['current_users'] = currentUsers; + } + public get currentUsers(): Array | undefined { + return this['current_users']; + } + public withWarRoomNums(warRoomNums: Array): ListTenantWarRoomRequestBody { + this['war_room_nums'] = warRoomNums; + return this; + } + public set warRoomNums(warRoomNums: Array | undefined) { + this['war_room_nums'] = warRoomNums; + } + public get warRoomNums(): Array | undefined { + return this['war_room_nums']; + } + public withIncidentNum(incidentNum: string): ListTenantWarRoomRequestBody { + this['incident_num'] = incidentNum; + return this; + } + public set incidentNum(incidentNum: string | undefined) { + this['incident_num'] = incidentNum; + } + public get incidentNum(): string | undefined { + return this['incident_num']; + } + public withTitle(title: string): ListTenantWarRoomRequestBody { + this['title'] = title; + return this; + } + public withRegionCodeList(regionCodeList: Array): ListTenantWarRoomRequestBody { + this['region_code_list'] = regionCodeList; + return this; + } + public set regionCodeList(regionCodeList: Array | undefined) { + this['region_code_list'] = regionCodeList; + } + public get regionCodeList(): Array | undefined { + return this['region_code_list']; + } + public withIncidentLevels(incidentLevels: Array): ListTenantWarRoomRequestBody { + this['incident_levels'] = incidentLevels; + return this; + } + public set incidentLevels(incidentLevels: Array | undefined) { + this['incident_levels'] = incidentLevels; + } + public get incidentLevels(): Array | undefined { + return this['incident_levels']; + } + public withImpactedApplicationIds(impactedApplicationIds: Array): ListTenantWarRoomRequestBody { + this['impacted_application_ids'] = impactedApplicationIds; + return this; + } + public set impactedApplicationIds(impactedApplicationIds: Array | undefined) { + this['impacted_application_ids'] = impactedApplicationIds; + } + public get impactedApplicationIds(): Array | undefined { + return this['impacted_application_ids']; + } + public withAdmin(admin: Array): ListTenantWarRoomRequestBody { + this['admin'] = admin; + return this; + } + public withStatus(status: Array): ListTenantWarRoomRequestBody { + this['status'] = status; + return this; + } + public withTriggeredStartTime(triggeredStartTime: number): ListTenantWarRoomRequestBody { + this['triggered_start_time'] = triggeredStartTime; + return this; + } + public set triggeredStartTime(triggeredStartTime: number | undefined) { + this['triggered_start_time'] = triggeredStartTime; + } + public get triggeredStartTime(): number | undefined { + return this['triggered_start_time']; + } + public withTriggeredEndTime(triggeredEndTime: number): ListTenantWarRoomRequestBody { + this['triggered_end_time'] = triggeredEndTime; + return this; + } + public set triggeredEndTime(triggeredEndTime: number | undefined) { + this['triggered_end_time'] = triggeredEndTime; + } + public get triggeredEndTime(): number | undefined { + return this['triggered_end_time']; + } + public withOccurStartTime(occurStartTime: number): ListTenantWarRoomRequestBody { + this['occur_start_time'] = occurStartTime; + return this; + } + public set occurStartTime(occurStartTime: number | undefined) { + this['occur_start_time'] = occurStartTime; + } + public get occurStartTime(): number | undefined { + return this['occur_start_time']; + } + public withOccurEndTime(occurEndTime: number): ListTenantWarRoomRequestBody { + this['occur_end_time'] = occurEndTime; + return this; + } + public set occurEndTime(occurEndTime: number | undefined) { + this['occur_end_time'] = occurEndTime; + } + public get occurEndTime(): number | undefined { + return this['occur_end_time']; + } + public withRecoverStartTime(recoverStartTime: number): ListTenantWarRoomRequestBody { + this['recover_start_time'] = recoverStartTime; + return this; + } + public set recoverStartTime(recoverStartTime: number | undefined) { + this['recover_start_time'] = recoverStartTime; + } + public get recoverStartTime(): number | undefined { + return this['recover_start_time']; + } + public withRecoverEndTime(recoverEndTime: number): ListTenantWarRoomRequestBody { + this['recover_end_time'] = recoverEndTime; + return this; + } + public set recoverEndTime(recoverEndTime: number | undefined) { + this['recover_end_time'] = recoverEndTime; + } + public get recoverEndTime(): number | undefined { + return this['recover_end_time']; + } + public withNotificationLevel(notificationLevel: Array): ListTenantWarRoomRequestBody { + this['notification_level'] = notificationLevel; + return this; + } + public set notificationLevel(notificationLevel: Array | undefined) { + this['notification_level'] = notificationLevel; + } + public get notificationLevel(): Array | undefined { + return this['notification_level']; + } + public withEnterpriseProjectIds(enterpriseProjectIds: Array): ListTenantWarRoomRequestBody { + this['enterprise_project_ids'] = enterpriseProjectIds; + return this; + } + public set enterpriseProjectIds(enterpriseProjectIds: Array | undefined) { + this['enterprise_project_ids'] = enterpriseProjectIds; + } + public get enterpriseProjectIds(): Array | undefined { + return this['enterprise_project_ids']; + } + public withWarRoomNum(warRoomNum: string): ListTenantWarRoomRequestBody { + this['war_room_num'] = warRoomNum; + return this; + } + public set warRoomNum(warRoomNum: string | undefined) { + this['war_room_num'] = warRoomNum; + } + public get warRoomNum(): string | undefined { + return this['war_room_num']; + } + public withStatisticFlag(statisticFlag: boolean): ListTenantWarRoomRequestBody { + this['statistic_flag'] = statisticFlag; + return this; + } + public set statisticFlag(statisticFlag: boolean | undefined) { + this['statistic_flag'] = statisticFlag; + } + public get statisticFlag(): boolean | undefined { + return this['statistic_flag']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ListTicketParams.ts b/services/coc/v1/model/ListTicketParams.ts new file mode 100644 index 000000000..7bfbc0952 --- /dev/null +++ b/services/coc/v1/model/ListTicketParams.ts @@ -0,0 +1,30 @@ +import { ObjectFilter } from './ObjectFilter'; + + +export class ListTicketParams { + private 'string_filters'?: Array; + private 'sort_filter'?: ObjectFilter; + public constructor(stringFilters?: Array) { + this['string_filters'] = stringFilters; + } + public withStringFilters(stringFilters: Array): ListTicketParams { + this['string_filters'] = stringFilters; + return this; + } + public set stringFilters(stringFilters: Array | undefined) { + this['string_filters'] = stringFilters; + } + public get stringFilters(): Array | undefined { + return this['string_filters']; + } + public withSortFilter(sortFilter: ObjectFilter): ListTicketParams { + this['sort_filter'] = sortFilter; + return this; + } + public set sortFilter(sortFilter: ObjectFilter | undefined) { + this['sort_filter'] = sortFilter; + } + public get sortFilter(): ObjectFilter | undefined { + return this['sort_filter']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ListWarRoomsRequest.ts b/services/coc/v1/model/ListWarRoomsRequest.ts new file mode 100644 index 000000000..5b9744541 --- /dev/null +++ b/services/coc/v1/model/ListWarRoomsRequest.ts @@ -0,0 +1,12 @@ +import { ListTenantWarRoomRequestBody } from './ListTenantWarRoomRequestBody'; + + +export class ListWarRoomsRequest { + public body?: ListTenantWarRoomRequestBody; + public constructor() { + } + public withBody(body: ListTenantWarRoomRequestBody): ListWarRoomsRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ListWarRoomsResponse.ts b/services/coc/v1/model/ListWarRoomsResponse.ts new file mode 100644 index 000000000..458b11abb --- /dev/null +++ b/services/coc/v1/model/ListWarRoomsResponse.ts @@ -0,0 +1,48 @@ +import { ListBaseResponse } from './ListBaseResponse'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ListWarRoomsResponse extends SdkResponse { + private 'provider_code'?: string; + private 'error_code'?: string; + private 'error_msg'?: string; + public data?: object; + public constructor(data?: object) { + super(); + this['data'] = data; + } + public withProviderCode(providerCode: string): ListWarRoomsResponse { + this['provider_code'] = providerCode; + return this; + } + public set providerCode(providerCode: string | undefined) { + this['provider_code'] = providerCode; + } + public get providerCode(): string | undefined { + return this['provider_code']; + } + public withErrorCode(errorCode: string): ListWarRoomsResponse { + this['error_code'] = errorCode; + return this; + } + public set errorCode(errorCode: string | undefined) { + this['error_code'] = errorCode; + } + public get errorCode(): string | undefined { + return this['error_code']; + } + public withErrorMsg(errorMsg: string): ListWarRoomsResponse { + this['error_msg'] = errorMsg; + return this; + } + public set errorMsg(errorMsg: string | undefined) { + this['error_msg'] = errorMsg; + } + public get errorMsg(): string | undefined { + return this['error_msg']; + } + public withData(data: object): ListWarRoomsResponse { + this['data'] = data; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/NonCompliantSummary.ts b/services/coc/v1/model/NonCompliantSummary.ts new file mode 100644 index 000000000..c0cd48abd --- /dev/null +++ b/services/coc/v1/model/NonCompliantSummary.ts @@ -0,0 +1,29 @@ +import { SeveritySummary } from './SeveritySummary'; + + +export class NonCompliantSummary { + private 'non_compliant_count'?: number; + private 'severity_summary'?: SeveritySummary; + public constructor() { + } + public withNonCompliantCount(nonCompliantCount: number): NonCompliantSummary { + this['non_compliant_count'] = nonCompliantCount; + return this; + } + public set nonCompliantCount(nonCompliantCount: number | undefined) { + this['non_compliant_count'] = nonCompliantCount; + } + public get nonCompliantCount(): number | undefined { + return this['non_compliant_count']; + } + public withSeveritySummary(severitySummary: SeveritySummary): NonCompliantSummary { + this['severity_summary'] = severitySummary; + return this; + } + public set severitySummary(severitySummary: SeveritySummary | undefined) { + this['severity_summary'] = severitySummary; + } + public get severitySummary(): SeveritySummary | undefined { + return this['severity_summary']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ObjectFilter.ts b/services/coc/v1/model/ObjectFilter.ts new file mode 100644 index 000000000..3ce898100 --- /dev/null +++ b/services/coc/v1/model/ObjectFilter.ts @@ -0,0 +1,24 @@ + + +export class ObjectFilter { + public operator?: string; + public field?: string; + public values?: Array; + public constructor(operator?: string, field?: string, values?: Array) { + this['operator'] = operator; + this['field'] = field; + this['values'] = values; + } + public withOperator(operator: string): ObjectFilter { + this['operator'] = operator; + return this; + } + public withField(field: string): ObjectFilter { + this['field'] = field; + return this; + } + public withValues(values: Array): ObjectFilter { + this['values'] = values; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/OperateScriptJobRequest.ts b/services/coc/v1/model/OperateScriptJobRequest.ts new file mode 100644 index 000000000..e10a4b41c --- /dev/null +++ b/services/coc/v1/model/OperateScriptJobRequest.ts @@ -0,0 +1,57 @@ +import { JobScriptOrderOperationBody } from './JobScriptOrderOperationBody'; + + +export class OperateScriptJobRequest { + private 'execute_uuid'?: string; + private 'X-Language'?: string; + private 'x-project-id'?: string; + private 'x-user-profile'?: string; + public body?: JobScriptOrderOperationBody; + public constructor(executeUuid?: string) { + this['execute_uuid'] = executeUuid; + } + public withExecuteUuid(executeUuid: string): OperateScriptJobRequest { + this['execute_uuid'] = executeUuid; + return this; + } + public set executeUuid(executeUuid: string | undefined) { + this['execute_uuid'] = executeUuid; + } + public get executeUuid(): string | undefined { + return this['execute_uuid']; + } + public withXLanguage(xLanguage: string): OperateScriptJobRequest { + this['X-Language'] = xLanguage; + return this; + } + public set xLanguage(xLanguage: string | undefined) { + this['X-Language'] = xLanguage; + } + public get xLanguage(): string | undefined { + return this['X-Language']; + } + public withXProjectId(xProjectId: string): OperateScriptJobRequest { + this['x-project-id'] = xProjectId; + return this; + } + public set xProjectId(xProjectId: string | undefined) { + this['x-project-id'] = xProjectId; + } + public get xProjectId(): string | undefined { + return this['x-project-id']; + } + public withXUserProfile(xUserProfile: string): OperateScriptJobRequest { + this['x-user-profile'] = xUserProfile; + return this; + } + public set xUserProfile(xUserProfile: string | undefined) { + this['x-user-profile'] = xUserProfile; + } + public get xUserProfile(): string | undefined { + return this['x-user-profile']; + } + public withBody(body: JobScriptOrderOperationBody): OperateScriptJobRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/OperateScriptJobResponse.ts b/services/coc/v1/model/OperateScriptJobResponse.ts new file mode 100644 index 000000000..b342c00a8 --- /dev/null +++ b/services/coc/v1/model/OperateScriptJobResponse.ts @@ -0,0 +1,13 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class OperateScriptJobResponse extends SdkResponse { + public data?: string; + public constructor() { + super(); + } + public withData(data: string): OperateScriptJobResponse { + this['data'] = data; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/PatchDetail.ts b/services/coc/v1/model/PatchDetail.ts new file mode 100644 index 000000000..9876170cb --- /dev/null +++ b/services/coc/v1/model/PatchDetail.ts @@ -0,0 +1,50 @@ + + +export class PatchDetail { + private 'installed_time'?: number; + private 'patch_baseline_id'?: string; + private 'patch_baseline_name'?: string; + private 'patch_status'?: string; + public constructor() { + } + public withInstalledTime(installedTime: number): PatchDetail { + this['installed_time'] = installedTime; + return this; + } + public set installedTime(installedTime: number | undefined) { + this['installed_time'] = installedTime; + } + public get installedTime(): number | undefined { + return this['installed_time']; + } + public withPatchBaselineId(patchBaselineId: string): PatchDetail { + this['patch_baseline_id'] = patchBaselineId; + return this; + } + public set patchBaselineId(patchBaselineId: string | undefined) { + this['patch_baseline_id'] = patchBaselineId; + } + public get patchBaselineId(): string | undefined { + return this['patch_baseline_id']; + } + public withPatchBaselineName(patchBaselineName: string): PatchDetail { + this['patch_baseline_name'] = patchBaselineName; + return this; + } + public set patchBaselineName(patchBaselineName: string | undefined) { + this['patch_baseline_name'] = patchBaselineName; + } + public get patchBaselineName(): string | undefined { + return this['patch_baseline_name']; + } + public withPatchStatus(patchStatus: string): PatchDetail { + this['patch_status'] = patchStatus; + return this; + } + public set patchStatus(patchStatus: string | undefined) { + this['patch_status'] = patchStatus; + } + public get patchStatus(): string | undefined { + return this['patch_status']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/PublicScriptDetailModel.ts b/services/coc/v1/model/PublicScriptDetailModel.ts new file mode 100644 index 000000000..07ce16950 --- /dev/null +++ b/services/coc/v1/model/PublicScriptDetailModel.ts @@ -0,0 +1,83 @@ +import { PublicScriptPropertiesModel } from './PublicScriptPropertiesModel'; +import { ScriptParamDefine } from './ScriptParamDefine'; + + +export class PublicScriptDetailModel { + private 'script_uuid'?: string; + public name?: string; + public description?: string; + public type?: PublicScriptDetailModelTypeEnum | string; + public content?: string; + private 'script_params'?: Array; + private 'gmt_created'?: number; + public properties?: PublicScriptPropertiesModel; + public constructor(scriptUuid?: string, name?: string, description?: string, type?: string, content?: string, gmtCreated?: number, properties?: PublicScriptPropertiesModel) { + this['script_uuid'] = scriptUuid; + this['name'] = name; + this['description'] = description; + this['type'] = type; + this['content'] = content; + this['gmt_created'] = gmtCreated; + this['properties'] = properties; + } + public withScriptUuid(scriptUuid: string): PublicScriptDetailModel { + this['script_uuid'] = scriptUuid; + return this; + } + public set scriptUuid(scriptUuid: string | undefined) { + this['script_uuid'] = scriptUuid; + } + public get scriptUuid(): string | undefined { + return this['script_uuid']; + } + public withName(name: string): PublicScriptDetailModel { + this['name'] = name; + return this; + } + public withDescription(description: string): PublicScriptDetailModel { + this['description'] = description; + return this; + } + public withType(type: PublicScriptDetailModelTypeEnum | string): PublicScriptDetailModel { + this['type'] = type; + return this; + } + public withContent(content: string): PublicScriptDetailModel { + this['content'] = content; + return this; + } + public withScriptParams(scriptParams: Array): PublicScriptDetailModel { + this['script_params'] = scriptParams; + return this; + } + public set scriptParams(scriptParams: Array | undefined) { + this['script_params'] = scriptParams; + } + public get scriptParams(): Array | undefined { + return this['script_params']; + } + public withGmtCreated(gmtCreated: number): PublicScriptDetailModel { + this['gmt_created'] = gmtCreated; + return this; + } + public set gmtCreated(gmtCreated: number | undefined) { + this['gmt_created'] = gmtCreated; + } + public get gmtCreated(): number | undefined { + return this['gmt_created']; + } + public withProperties(properties: PublicScriptPropertiesModel): PublicScriptDetailModel { + this['properties'] = properties; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum PublicScriptDetailModelTypeEnum { + SHELL = 'SHELL', + PYTHON = 'PYTHON', + BAT = 'BAT' +} diff --git a/services/coc/v1/model/PublicScriptListModel.ts b/services/coc/v1/model/PublicScriptListModel.ts new file mode 100644 index 000000000..55ac4dec3 --- /dev/null +++ b/services/coc/v1/model/PublicScriptListModel.ts @@ -0,0 +1,71 @@ +import { PublicScriptPropertiesModel } from './PublicScriptPropertiesModel'; + + +export class PublicScriptListModel { + public id?: number; + private 'script_uuid'?: string; + public name?: string; + public type?: PublicScriptListModelTypeEnum | string; + private 'gmt_created'?: number; + public description?: string; + public properties?: PublicScriptPropertiesModel; + public constructor(id?: number, scriptUuid?: string, name?: string, type?: string, gmtCreated?: number, description?: string, properties?: PublicScriptPropertiesModel) { + this['id'] = id; + this['script_uuid'] = scriptUuid; + this['name'] = name; + this['type'] = type; + this['gmt_created'] = gmtCreated; + this['description'] = description; + this['properties'] = properties; + } + public withId(id: number): PublicScriptListModel { + this['id'] = id; + return this; + } + public withScriptUuid(scriptUuid: string): PublicScriptListModel { + this['script_uuid'] = scriptUuid; + return this; + } + public set scriptUuid(scriptUuid: string | undefined) { + this['script_uuid'] = scriptUuid; + } + public get scriptUuid(): string | undefined { + return this['script_uuid']; + } + public withName(name: string): PublicScriptListModel { + this['name'] = name; + return this; + } + public withType(type: PublicScriptListModelTypeEnum | string): PublicScriptListModel { + this['type'] = type; + return this; + } + public withGmtCreated(gmtCreated: number): PublicScriptListModel { + this['gmt_created'] = gmtCreated; + return this; + } + public set gmtCreated(gmtCreated: number | undefined) { + this['gmt_created'] = gmtCreated; + } + public get gmtCreated(): number | undefined { + return this['gmt_created']; + } + public withDescription(description: string): PublicScriptListModel { + this['description'] = description; + return this; + } + public withProperties(properties: PublicScriptPropertiesModel): PublicScriptListModel { + this['properties'] = properties; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum PublicScriptListModelTypeEnum { + SHELL = 'SHELL', + PYTHON = 'PYTHON', + BAT = 'BAT' +} diff --git a/services/coc/v1/model/PublicScriptListPage.ts b/services/coc/v1/model/PublicScriptListPage.ts new file mode 100644 index 000000000..58aeccffa --- /dev/null +++ b/services/coc/v1/model/PublicScriptListPage.ts @@ -0,0 +1,19 @@ +import { PublicScriptListModel } from './PublicScriptListModel'; + + +export class PublicScriptListPage { + public total?: number; + public data?: Array; + public constructor(total?: number, data?: Array) { + this['total'] = total; + this['data'] = data; + } + public withTotal(total: number): PublicScriptListPage { + this['total'] = total; + return this; + } + public withData(data: Array): PublicScriptListPage { + this['data'] = data; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/PublicScriptPropertiesModel.ts b/services/coc/v1/model/PublicScriptPropertiesModel.ts new file mode 100644 index 000000000..af6209749 --- /dev/null +++ b/services/coc/v1/model/PublicScriptPropertiesModel.ts @@ -0,0 +1,34 @@ + + +export class PublicScriptPropertiesModel { + private 'risk_level'?: PublicScriptPropertiesModelRiskLevelEnum | string; + public version?: string; + public constructor(riskLevel?: string, version?: string) { + this['risk_level'] = riskLevel; + this['version'] = version; + } + public withRiskLevel(riskLevel: PublicScriptPropertiesModelRiskLevelEnum | string): PublicScriptPropertiesModel { + this['risk_level'] = riskLevel; + return this; + } + public set riskLevel(riskLevel: PublicScriptPropertiesModelRiskLevelEnum | string | undefined) { + this['risk_level'] = riskLevel; + } + public get riskLevel(): PublicScriptPropertiesModelRiskLevelEnum | string | undefined { + return this['risk_level']; + } + public withVersion(version: string): PublicScriptPropertiesModel { + this['version'] = version; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum PublicScriptPropertiesModelRiskLevelEnum { + LOW = 'LOW', + MEDIUM = 'MEDIUM', + HIGH = 'HIGH' +} diff --git a/services/coc/v1/model/ReportCustomEventRequestBody.ts b/services/coc/v1/model/ReportCustomEventRequestBody.ts new file mode 100644 index 000000000..3be60e21d --- /dev/null +++ b/services/coc/v1/model/ReportCustomEventRequestBody.ts @@ -0,0 +1,108 @@ + + +export class ReportCustomEventRequestBody { + public alarmId?: string; + public alarmName?: string; + public alarmLevel?: ReportCustomEventRequestBodyAlarmLevelEnum | string; + public time?: number; + public nameSpace?: string; + public regionId?: string; + public applicationId?: string; + public resourceName?: string; + public resourceId?: string; + public alarmDesc?: string; + private 'URL'?: string; + public alarmStatus?: ReportCustomEventRequestBodyAlarmStatusEnum | string; + public alarmSource?: string; + public additional?: object; + public constructor(alarmId?: string, alarmName?: string, alarmLevel?: string, time?: number, nameSpace?: string, alarmDesc?: string, alarmSource?: string) { + this['alarmId'] = alarmId; + this['alarmName'] = alarmName; + this['alarmLevel'] = alarmLevel; + this['time'] = time; + this['nameSpace'] = nameSpace; + this['alarmDesc'] = alarmDesc; + this['alarmSource'] = alarmSource; + } + public withAlarmId(alarmId: string): ReportCustomEventRequestBody { + this['alarmId'] = alarmId; + return this; + } + public withAlarmName(alarmName: string): ReportCustomEventRequestBody { + this['alarmName'] = alarmName; + return this; + } + public withAlarmLevel(alarmLevel: ReportCustomEventRequestBodyAlarmLevelEnum | string): ReportCustomEventRequestBody { + this['alarmLevel'] = alarmLevel; + return this; + } + public withTime(time: number): ReportCustomEventRequestBody { + this['time'] = time; + return this; + } + public withNameSpace(nameSpace: string): ReportCustomEventRequestBody { + this['nameSpace'] = nameSpace; + return this; + } + public withRegionId(regionId: string): ReportCustomEventRequestBody { + this['regionId'] = regionId; + return this; + } + public withApplicationId(applicationId: string): ReportCustomEventRequestBody { + this['applicationId'] = applicationId; + return this; + } + public withResourceName(resourceName: string): ReportCustomEventRequestBody { + this['resourceName'] = resourceName; + return this; + } + public withResourceId(resourceId: string): ReportCustomEventRequestBody { + this['resourceId'] = resourceId; + return this; + } + public withAlarmDesc(alarmDesc: string): ReportCustomEventRequestBody { + this['alarmDesc'] = alarmDesc; + return this; + } + public withUrl(url: string): ReportCustomEventRequestBody { + this['URL'] = url; + return this; + } + public set url(url: string | undefined) { + this['URL'] = url; + } + public get url(): string | undefined { + return this['URL']; + } + public withAlarmStatus(alarmStatus: ReportCustomEventRequestBodyAlarmStatusEnum | string): ReportCustomEventRequestBody { + this['alarmStatus'] = alarmStatus; + return this; + } + public withAlarmSource(alarmSource: string): ReportCustomEventRequestBody { + this['alarmSource'] = alarmSource; + return this; + } + public withAdditional(additional: object): ReportCustomEventRequestBody { + this['additional'] = additional; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum ReportCustomEventRequestBodyAlarmLevelEnum { + CRITICAL = 'Critical', + MAJOR = 'Major', + MINOR = 'Minor', + INFO = 'Info' +} +/** + * @export + * @enum {string} + */ +export enum ReportCustomEventRequestBodyAlarmStatusEnum { + ALARM = 'alarm', + OK = 'ok' +} diff --git a/services/coc/v1/model/ResourceInstance.ts b/services/coc/v1/model/ResourceInstance.ts new file mode 100644 index 000000000..016adb2b1 --- /dev/null +++ b/services/coc/v1/model/ResourceInstance.ts @@ -0,0 +1,90 @@ +import { Customttribute } from './Customttribute'; +import { ResourceInstanceProp } from './ResourceInstanceProp'; + + +export class ResourceInstance { + private 'resource_id'?: string; + public provider?: string; + private 'region_id'?: string; + public type?: ResourceInstanceTypeEnum | string; + private 'custom_attributes'?: Array; + private 'agent_sn'?: string; + private 'agent_status'?: string; + public properties?: ResourceInstanceProp; + public constructor(resourceId?: string, provider?: string, regionId?: string, type?: string) { + this['resource_id'] = resourceId; + this['provider'] = provider; + this['region_id'] = regionId; + this['type'] = type; + } + public withResourceId(resourceId: string): ResourceInstance { + this['resource_id'] = resourceId; + return this; + } + public set resourceId(resourceId: string | undefined) { + this['resource_id'] = resourceId; + } + public get resourceId(): string | undefined { + return this['resource_id']; + } + public withProvider(provider: string): ResourceInstance { + this['provider'] = provider; + return this; + } + public withRegionId(regionId: string): ResourceInstance { + this['region_id'] = regionId; + return this; + } + public set regionId(regionId: string | undefined) { + this['region_id'] = regionId; + } + public get regionId(): string | undefined { + return this['region_id']; + } + public withType(type: ResourceInstanceTypeEnum | string): ResourceInstance { + this['type'] = type; + return this; + } + public withCustomAttributes(customAttributes: Array): ResourceInstance { + this['custom_attributes'] = customAttributes; + return this; + } + public set customAttributes(customAttributes: Array | undefined) { + this['custom_attributes'] = customAttributes; + } + public get customAttributes(): Array | undefined { + return this['custom_attributes']; + } + public withAgentSn(agentSn: string): ResourceInstance { + this['agent_sn'] = agentSn; + return this; + } + public set agentSn(agentSn: string | undefined) { + this['agent_sn'] = agentSn; + } + public get agentSn(): string | undefined { + return this['agent_sn']; + } + public withAgentStatus(agentStatus: string): ResourceInstance { + this['agent_status'] = agentStatus; + return this; + } + public set agentStatus(agentStatus: string | undefined) { + this['agent_status'] = agentStatus; + } + public get agentStatus(): string | undefined { + return this['agent_status']; + } + public withProperties(properties: ResourceInstanceProp): ResourceInstance { + this['properties'] = properties; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum ResourceInstanceTypeEnum { + CLOUDSERVER = 'CLOUDSERVER' +} diff --git a/services/coc/v1/model/ResourceInstanceProp.ts b/services/coc/v1/model/ResourceInstanceProp.ts new file mode 100644 index 000000000..d143ee9b4 --- /dev/null +++ b/services/coc/v1/model/ResourceInstanceProp.ts @@ -0,0 +1,86 @@ + + +export class ResourceInstanceProp { + private 'host_name'?: string; + private 'fixed_ip'?: string; + private 'floating_ip'?: string; + private 'region_id'?: string; + private 'zone_id'?: string; + public application?: string; + public group?: string; + private 'project_id'?: string; + public constructor(hostName?: string, fixedIp?: string, regionId?: string, zoneId?: string) { + this['host_name'] = hostName; + this['fixed_ip'] = fixedIp; + this['region_id'] = regionId; + this['zone_id'] = zoneId; + } + public withHostName(hostName: string): ResourceInstanceProp { + this['host_name'] = hostName; + return this; + } + public set hostName(hostName: string | undefined) { + this['host_name'] = hostName; + } + public get hostName(): string | undefined { + return this['host_name']; + } + public withFixedIp(fixedIp: string): ResourceInstanceProp { + this['fixed_ip'] = fixedIp; + return this; + } + public set fixedIp(fixedIp: string | undefined) { + this['fixed_ip'] = fixedIp; + } + public get fixedIp(): string | undefined { + return this['fixed_ip']; + } + public withFloatingIp(floatingIp: string): ResourceInstanceProp { + this['floating_ip'] = floatingIp; + return this; + } + public set floatingIp(floatingIp: string | undefined) { + this['floating_ip'] = floatingIp; + } + public get floatingIp(): string | undefined { + return this['floating_ip']; + } + public withRegionId(regionId: string): ResourceInstanceProp { + this['region_id'] = regionId; + return this; + } + public set regionId(regionId: string | undefined) { + this['region_id'] = regionId; + } + public get regionId(): string | undefined { + return this['region_id']; + } + public withZoneId(zoneId: string): ResourceInstanceProp { + this['zone_id'] = zoneId; + return this; + } + public set zoneId(zoneId: string | undefined) { + this['zone_id'] = zoneId; + } + public get zoneId(): string | undefined { + return this['zone_id']; + } + public withApplication(application: string): ResourceInstanceProp { + this['application'] = application; + return this; + } + public withGroup(group: string): ResourceInstanceProp { + this['group'] = group; + return this; + } + public withProjectId(projectId: string): ResourceInstanceProp { + this['project_id'] = projectId; + return this; + } + public set projectId(projectId: string | undefined) { + this['project_id'] = projectId; + } + public get projectId(): string | undefined { + return this['project_id']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ReviewerInfo.ts b/services/coc/v1/model/ReviewerInfo.ts new file mode 100644 index 000000000..26b6374fa --- /dev/null +++ b/services/coc/v1/model/ReviewerInfo.ts @@ -0,0 +1,30 @@ + + +export class ReviewerInfo { + private 'reviewer_name'?: string; + private 'reviewer_id'?: string; + public constructor(reviewerName?: string, reviewerId?: string) { + this['reviewer_name'] = reviewerName; + this['reviewer_id'] = reviewerId; + } + public withReviewerName(reviewerName: string): ReviewerInfo { + this['reviewer_name'] = reviewerName; + return this; + } + public set reviewerName(reviewerName: string | undefined) { + this['reviewer_name'] = reviewerName; + } + public get reviewerName(): string | undefined { + return this['reviewer_name']; + } + public withReviewerId(reviewerId: string): ReviewerInfo { + this['reviewer_id'] = reviewerId; + return this; + } + public set reviewerId(reviewerId: string | undefined) { + this['reviewer_id'] = reviewerId; + } + public get reviewerId(): string | undefined { + return this['reviewer_id']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ScheduleGroupInfo.ts b/services/coc/v1/model/ScheduleGroupInfo.ts new file mode 100644 index 000000000..911ef2767 --- /dev/null +++ b/services/coc/v1/model/ScheduleGroupInfo.ts @@ -0,0 +1,30 @@ + + +export class ScheduleGroupInfo { + private 'role_id'?: string; + private 'scene_id'?: string; + public constructor(roleId?: string, sceneId?: string) { + this['role_id'] = roleId; + this['scene_id'] = sceneId; + } + public withRoleId(roleId: string): ScheduleGroupInfo { + this['role_id'] = roleId; + return this; + } + public set roleId(roleId: string | undefined) { + this['role_id'] = roleId; + } + public get roleId(): string | undefined { + return this['role_id']; + } + public withSceneId(sceneId: string): ScheduleGroupInfo { + this['scene_id'] = sceneId; + return this; + } + public set sceneId(sceneId: string | undefined) { + this['scene_id'] = sceneId; + } + public get sceneId(): string | undefined { + return this['scene_id']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ScriptDetailModel.ts b/services/coc/v1/model/ScriptDetailModel.ts new file mode 100644 index 000000000..d1166a725 --- /dev/null +++ b/services/coc/v1/model/ScriptDetailModel.ts @@ -0,0 +1,148 @@ +import { ScriptParamDefine } from './ScriptParamDefine'; +import { ScriptPropertiesModel } from './ScriptPropertiesModel'; + + +export class ScriptDetailModel { + private 'script_uuid'?: string; + public name?: string; + public version?: string; + public description?: string; + public type?: ScriptDetailModelTypeEnum | string; + public content?: string; + private 'script_params'?: Array; + public status?: ScriptDetailModelStatusEnum | string; + private 'gmt_created'?: number; + private 'gmt_modified'?: number; + public creator?: string; + private 'creator_id'?: string; + public operator?: string; + public properties?: ScriptPropertiesModel; + private 'enterprise_project_id'?: string; + public constructor(scriptUuid?: string, name?: string, description?: string, type?: string, content?: string, status?: string, gmtCreated?: number, creator?: string, creatorId?: string, properties?: ScriptPropertiesModel) { + this['script_uuid'] = scriptUuid; + this['name'] = name; + this['description'] = description; + this['type'] = type; + this['content'] = content; + this['status'] = status; + this['gmt_created'] = gmtCreated; + this['creator'] = creator; + this['creator_id'] = creatorId; + this['properties'] = properties; + } + public withScriptUuid(scriptUuid: string): ScriptDetailModel { + this['script_uuid'] = scriptUuid; + return this; + } + public set scriptUuid(scriptUuid: string | undefined) { + this['script_uuid'] = scriptUuid; + } + public get scriptUuid(): string | undefined { + return this['script_uuid']; + } + public withName(name: string): ScriptDetailModel { + this['name'] = name; + return this; + } + public withVersion(version: string): ScriptDetailModel { + this['version'] = version; + return this; + } + public withDescription(description: string): ScriptDetailModel { + this['description'] = description; + return this; + } + public withType(type: ScriptDetailModelTypeEnum | string): ScriptDetailModel { + this['type'] = type; + return this; + } + public withContent(content: string): ScriptDetailModel { + this['content'] = content; + return this; + } + public withScriptParams(scriptParams: Array): ScriptDetailModel { + this['script_params'] = scriptParams; + return this; + } + public set scriptParams(scriptParams: Array | undefined) { + this['script_params'] = scriptParams; + } + public get scriptParams(): Array | undefined { + return this['script_params']; + } + public withStatus(status: ScriptDetailModelStatusEnum | string): ScriptDetailModel { + this['status'] = status; + return this; + } + public withGmtCreated(gmtCreated: number): ScriptDetailModel { + this['gmt_created'] = gmtCreated; + return this; + } + public set gmtCreated(gmtCreated: number | undefined) { + this['gmt_created'] = gmtCreated; + } + public get gmtCreated(): number | undefined { + return this['gmt_created']; + } + public withGmtModified(gmtModified: number): ScriptDetailModel { + this['gmt_modified'] = gmtModified; + return this; + } + public set gmtModified(gmtModified: number | undefined) { + this['gmt_modified'] = gmtModified; + } + public get gmtModified(): number | undefined { + return this['gmt_modified']; + } + public withCreator(creator: string): ScriptDetailModel { + this['creator'] = creator; + return this; + } + public withCreatorId(creatorId: string): ScriptDetailModel { + this['creator_id'] = creatorId; + return this; + } + public set creatorId(creatorId: string | undefined) { + this['creator_id'] = creatorId; + } + public get creatorId(): string | undefined { + return this['creator_id']; + } + public withOperator(operator: string): ScriptDetailModel { + this['operator'] = operator; + return this; + } + public withProperties(properties: ScriptPropertiesModel): ScriptDetailModel { + this['properties'] = properties; + return this; + } + public withEnterpriseProjectId(enterpriseProjectId: string): ScriptDetailModel { + this['enterprise_project_id'] = enterpriseProjectId; + return this; + } + public set enterpriseProjectId(enterpriseProjectId: string | undefined) { + this['enterprise_project_id'] = enterpriseProjectId; + } + public get enterpriseProjectId(): string | undefined { + return this['enterprise_project_id']; + } +} + +/** + * @export + * @enum {string} + */ +export enum ScriptDetailModelTypeEnum { + SHELL = 'SHELL', + PYTHON = 'PYTHON', + BAT = 'BAT' +} +/** + * @export + * @enum {string} + */ +export enum ScriptDetailModelStatusEnum { + PENDING_APPROVE = 'PENDING_APPROVE', + APPROVED = 'APPROVED', + REJECTED = 'REJECTED' +} diff --git a/services/coc/v1/model/ScriptExecuteInputParam.ts b/services/coc/v1/model/ScriptExecuteInputParam.ts new file mode 100644 index 000000000..a1fd8a7d8 --- /dev/null +++ b/services/coc/v1/model/ScriptExecuteInputParam.ts @@ -0,0 +1,63 @@ +import { ScriptExecuteParamReference } from './ScriptExecuteParamReference'; + + +export class ScriptExecuteInputParam { + private 'param_name'?: string; + private 'param_value'?: ScriptExecuteInputParamParamValueEnum | string; + private 'param_order'?: number; + private 'param_refer'?: ScriptExecuteParamReference; + public constructor(paramName?: string, paramValue?: string) { + this['param_name'] = paramName; + this['param_value'] = paramValue; + } + public withParamName(paramName: string): ScriptExecuteInputParam { + this['param_name'] = paramName; + return this; + } + public set paramName(paramName: string | undefined) { + this['param_name'] = paramName; + } + public get paramName(): string | undefined { + return this['param_name']; + } + public withParamValue(paramValue: ScriptExecuteInputParamParamValueEnum | string): ScriptExecuteInputParam { + this['param_value'] = paramValue; + return this; + } + public set paramValue(paramValue: ScriptExecuteInputParamParamValueEnum | string | undefined) { + this['param_value'] = paramValue; + } + public get paramValue(): ScriptExecuteInputParamParamValueEnum | string | undefined { + return this['param_value']; + } + public withParamOrder(paramOrder: number): ScriptExecuteInputParam { + this['param_order'] = paramOrder; + return this; + } + public set paramOrder(paramOrder: number | undefined) { + this['param_order'] = paramOrder; + } + public get paramOrder(): number | undefined { + return this['param_order']; + } + public withParamRefer(paramRefer: ScriptExecuteParamReference): ScriptExecuteInputParam { + this['param_refer'] = paramRefer; + return this; + } + public set paramRefer(paramRefer: ScriptExecuteParamReference | undefined) { + this['param_refer'] = paramRefer; + } + public get paramRefer(): ScriptExecuteParamReference | undefined { + return this['param_refer']; + } +} + +/** + * @export + * @enum {string} + */ +export enum ScriptExecuteInputParamParamValueEnum { + ___2 = '^((?!\\.{2', + A_ZA_Z0_9________X20 = '})[a-zA-Z0-9_\\-/\\.\\x20\\?:\"', + _____ = '=+@\\\\\\[\\{\\]\\}])*$' +} diff --git a/services/coc/v1/model/ScriptExecuteModel.ts b/services/coc/v1/model/ScriptExecuteModel.ts new file mode 100644 index 000000000..f3b344fc8 --- /dev/null +++ b/services/coc/v1/model/ScriptExecuteModel.ts @@ -0,0 +1,32 @@ +import { ExecuteInstancesBatchInfo } from './ExecuteInstancesBatchInfo'; +import { ScriptExecuteParam } from './ScriptExecuteParam'; + + +export class ScriptExecuteModel { + private 'execute_param'?: ScriptExecuteParam; + private 'execute_batches'?: Array; + public constructor(executeParam?: ScriptExecuteParam, executeBatches?: Array) { + this['execute_param'] = executeParam; + this['execute_batches'] = executeBatches; + } + public withExecuteParam(executeParam: ScriptExecuteParam): ScriptExecuteModel { + this['execute_param'] = executeParam; + return this; + } + public set executeParam(executeParam: ScriptExecuteParam | undefined) { + this['execute_param'] = executeParam; + } + public get executeParam(): ScriptExecuteParam | undefined { + return this['execute_param']; + } + public withExecuteBatches(executeBatches: Array): ScriptExecuteModel { + this['execute_batches'] = executeBatches; + return this; + } + public set executeBatches(executeBatches: Array | undefined) { + this['execute_batches'] = executeBatches; + } + public get executeBatches(): Array | undefined { + return this['execute_batches']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ScriptExecuteParam.ts b/services/coc/v1/model/ScriptExecuteParam.ts new file mode 100644 index 000000000..9758ab34a --- /dev/null +++ b/services/coc/v1/model/ScriptExecuteParam.ts @@ -0,0 +1,53 @@ +import { ScriptExecuteInputParam } from './ScriptExecuteInputParam'; + + +export class ScriptExecuteParam { + public resourceful?: boolean; + public timeout?: number; + private 'success_rate'?: number; + private 'execute_user'?: string; + private 'script_params'?: Array; + public constructor(timeout?: number, successRate?: number, executeUser?: string) { + this['timeout'] = timeout; + this['success_rate'] = successRate; + this['execute_user'] = executeUser; + } + public withResourceful(resourceful: boolean): ScriptExecuteParam { + this['resourceful'] = resourceful; + return this; + } + public withTimeout(timeout: number): ScriptExecuteParam { + this['timeout'] = timeout; + return this; + } + public withSuccessRate(successRate: number): ScriptExecuteParam { + this['success_rate'] = successRate; + return this; + } + public set successRate(successRate: number | undefined) { + this['success_rate'] = successRate; + } + public get successRate(): number | undefined { + return this['success_rate']; + } + public withExecuteUser(executeUser: string): ScriptExecuteParam { + this['execute_user'] = executeUser; + return this; + } + public set executeUser(executeUser: string | undefined) { + this['execute_user'] = executeUser; + } + public get executeUser(): string | undefined { + return this['execute_user']; + } + public withScriptParams(scriptParams: Array): ScriptExecuteParam { + this['script_params'] = scriptParams; + return this; + } + public set scriptParams(scriptParams: Array | undefined) { + this['script_params'] = scriptParams; + } + public get scriptParams(): Array | undefined { + return this['script_params']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ScriptExecuteParamReference.ts b/services/coc/v1/model/ScriptExecuteParamReference.ts new file mode 100644 index 000000000..38c26749b --- /dev/null +++ b/services/coc/v1/model/ScriptExecuteParamReference.ts @@ -0,0 +1,51 @@ + + +export class ScriptExecuteParamReference { + private 'refer_type'?: string; + private 'param_id'?: ScriptExecuteParamReferenceParamIdEnum | string; + private 'param_version'?: string; + public constructor(referType?: string, paramId?: string) { + this['refer_type'] = referType; + this['param_id'] = paramId; + } + public withReferType(referType: string): ScriptExecuteParamReference { + this['refer_type'] = referType; + return this; + } + public set referType(referType: string | undefined) { + this['refer_type'] = referType; + } + public get referType(): string | undefined { + return this['refer_type']; + } + public withParamId(paramId: ScriptExecuteParamReferenceParamIdEnum | string): ScriptExecuteParamReference { + this['param_id'] = paramId; + return this; + } + public set paramId(paramId: ScriptExecuteParamReferenceParamIdEnum | string | undefined) { + this['param_id'] = paramId; + } + public get paramId(): ScriptExecuteParamReferenceParamIdEnum | string | undefined { + return this['param_id']; + } + public withParamVersion(paramVersion: string): ScriptExecuteParamReference { + this['param_version'] = paramVersion; + return this; + } + public set paramVersion(paramVersion: string | undefined) { + this['param_version'] = paramVersion; + } + public get paramVersion(): string | undefined { + return this['param_version']; + } +} + +/** + * @export + * @enum {string} + */ +export enum ScriptExecuteParamReferenceParamIdEnum { + LOW = 'LOW', + MEDIUM = 'MEDIUM', + HIGH = 'HIGH' +} diff --git a/services/coc/v1/model/ScriptListModel.ts b/services/coc/v1/model/ScriptListModel.ts new file mode 100644 index 000000000..5482c9606 --- /dev/null +++ b/services/coc/v1/model/ScriptListModel.ts @@ -0,0 +1,126 @@ +import { ScriptPropertiesModel } from './ScriptPropertiesModel'; + + +export class ScriptListModel { + public id?: number; + private 'script_uuid'?: string; + private 'enterprise_project_id'?: string; + public name?: string; + public type?: ScriptListModelTypeEnum | string; + public status?: ScriptListModelStatusEnum | string; + private 'gmt_created'?: number; + private 'gmt_modified'?: number; + public creator?: string; + private 'creator_id'?: string; + public operator?: string; + public properties?: ScriptPropertiesModel; + public constructor(id?: number, scriptUuid?: string, enterpriseProjectId?: string, name?: string, type?: string, status?: string, gmtCreated?: number, creator?: string, creatorId?: string, properties?: ScriptPropertiesModel) { + this['id'] = id; + this['script_uuid'] = scriptUuid; + this['enterprise_project_id'] = enterpriseProjectId; + this['name'] = name; + this['type'] = type; + this['status'] = status; + this['gmt_created'] = gmtCreated; + this['creator'] = creator; + this['creator_id'] = creatorId; + this['properties'] = properties; + } + public withId(id: number): ScriptListModel { + this['id'] = id; + return this; + } + public withScriptUuid(scriptUuid: string): ScriptListModel { + this['script_uuid'] = scriptUuid; + return this; + } + public set scriptUuid(scriptUuid: string | undefined) { + this['script_uuid'] = scriptUuid; + } + public get scriptUuid(): string | undefined { + return this['script_uuid']; + } + public withEnterpriseProjectId(enterpriseProjectId: string): ScriptListModel { + this['enterprise_project_id'] = enterpriseProjectId; + return this; + } + public set enterpriseProjectId(enterpriseProjectId: string | undefined) { + this['enterprise_project_id'] = enterpriseProjectId; + } + public get enterpriseProjectId(): string | undefined { + return this['enterprise_project_id']; + } + public withName(name: string): ScriptListModel { + this['name'] = name; + return this; + } + public withType(type: ScriptListModelTypeEnum | string): ScriptListModel { + this['type'] = type; + return this; + } + public withStatus(status: ScriptListModelStatusEnum | string): ScriptListModel { + this['status'] = status; + return this; + } + public withGmtCreated(gmtCreated: number): ScriptListModel { + this['gmt_created'] = gmtCreated; + return this; + } + public set gmtCreated(gmtCreated: number | undefined) { + this['gmt_created'] = gmtCreated; + } + public get gmtCreated(): number | undefined { + return this['gmt_created']; + } + public withGmtModified(gmtModified: number): ScriptListModel { + this['gmt_modified'] = gmtModified; + return this; + } + public set gmtModified(gmtModified: number | undefined) { + this['gmt_modified'] = gmtModified; + } + public get gmtModified(): number | undefined { + return this['gmt_modified']; + } + public withCreator(creator: string): ScriptListModel { + this['creator'] = creator; + return this; + } + public withCreatorId(creatorId: string): ScriptListModel { + this['creator_id'] = creatorId; + return this; + } + public set creatorId(creatorId: string | undefined) { + this['creator_id'] = creatorId; + } + public get creatorId(): string | undefined { + return this['creator_id']; + } + public withOperator(operator: string): ScriptListModel { + this['operator'] = operator; + return this; + } + public withProperties(properties: ScriptPropertiesModel): ScriptListModel { + this['properties'] = properties; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum ScriptListModelTypeEnum { + SHELL = 'SHELL', + PYTHON = 'PYTHON', + BAT = 'BAT' +} +/** + * @export + * @enum {string} + */ +export enum ScriptListModelStatusEnum { + PENDING_APPROVE = 'PENDING_APPROVE', + APPROVED = 'APPROVED', + REJECTED = 'REJECTED' +} diff --git a/services/coc/v1/model/ScriptListPage.ts b/services/coc/v1/model/ScriptListPage.ts new file mode 100644 index 000000000..6d860ab6d --- /dev/null +++ b/services/coc/v1/model/ScriptListPage.ts @@ -0,0 +1,19 @@ +import { ScriptListModel } from './ScriptListModel'; + + +export class ScriptListPage { + public total?: number; + public data?: Array; + public constructor(total?: number, data?: Array) { + this['total'] = total; + this['data'] = data; + } + public withTotal(total: number): ScriptListPage { + this['total'] = total; + return this; + } + public withData(data: Array): ScriptListPage { + this['data'] = data; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ScriptParamDefine.ts b/services/coc/v1/model/ScriptParamDefine.ts new file mode 100644 index 000000000..51ea225ac --- /dev/null +++ b/services/coc/v1/model/ScriptParamDefine.ts @@ -0,0 +1,58 @@ + + +export class ScriptParamDefine { + private 'param_name'?: string; + private 'param_value'?: string; + private 'param_description'?: string; + private 'param_order'?: number; + public sensitive?: boolean; + public constructor(paramName?: string, paramDescription?: string, sensitive?: boolean) { + this['param_name'] = paramName; + this['param_description'] = paramDescription; + this['sensitive'] = sensitive; + } + public withParamName(paramName: string): ScriptParamDefine { + this['param_name'] = paramName; + return this; + } + public set paramName(paramName: string | undefined) { + this['param_name'] = paramName; + } + public get paramName(): string | undefined { + return this['param_name']; + } + public withParamValue(paramValue: string): ScriptParamDefine { + this['param_value'] = paramValue; + return this; + } + public set paramValue(paramValue: string | undefined) { + this['param_value'] = paramValue; + } + public get paramValue(): string | undefined { + return this['param_value']; + } + public withParamDescription(paramDescription: string): ScriptParamDefine { + this['param_description'] = paramDescription; + return this; + } + public set paramDescription(paramDescription: string | undefined) { + this['param_description'] = paramDescription; + } + public get paramDescription(): string | undefined { + return this['param_description']; + } + public withParamOrder(paramOrder: number): ScriptParamDefine { + this['param_order'] = paramOrder; + return this; + } + public set paramOrder(paramOrder: number | undefined) { + this['param_order'] = paramOrder; + } + public get paramOrder(): number | undefined { + return this['param_order']; + } + public withSensitive(sensitive: boolean): ScriptParamDefine { + this['sensitive'] = sensitive; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ScriptPropertiesModel.ts b/services/coc/v1/model/ScriptPropertiesModel.ts new file mode 100644 index 000000000..14e50b985 --- /dev/null +++ b/services/coc/v1/model/ScriptPropertiesModel.ts @@ -0,0 +1,59 @@ +import { ReviewerInfo } from './ReviewerInfo'; + + +export class ScriptPropertiesModel { + private 'risk_level'?: ScriptPropertiesModelRiskLevelEnum | string; + public version?: string; + public reviewers?: Array; + public protocol?: ScriptPropertiesModelProtocolEnum | string; + public constructor(riskLevel?: string, version?: string) { + this['risk_level'] = riskLevel; + this['version'] = version; + } + public withRiskLevel(riskLevel: ScriptPropertiesModelRiskLevelEnum | string): ScriptPropertiesModel { + this['risk_level'] = riskLevel; + return this; + } + public set riskLevel(riskLevel: ScriptPropertiesModelRiskLevelEnum | string | undefined) { + this['risk_level'] = riskLevel; + } + public get riskLevel(): ScriptPropertiesModelRiskLevelEnum | string | undefined { + return this['risk_level']; + } + public withVersion(version: string): ScriptPropertiesModel { + this['version'] = version; + return this; + } + public withReviewers(reviewers: Array): ScriptPropertiesModel { + this['reviewers'] = reviewers; + return this; + } + public withProtocol(protocol: ScriptPropertiesModelProtocolEnum | string): ScriptPropertiesModel { + this['protocol'] = protocol; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum ScriptPropertiesModelRiskLevelEnum { + LOW = 'LOW', + MEDIUM = 'MEDIUM', + HIGH = 'HIGH' +} +/** + * @export + * @enum {string} + */ +export enum ScriptPropertiesModelProtocolEnum { + DEFAULT = 'DEFAULT', + SMS = 'SMS', + EMAIL = 'EMAIL', + DING_TALK = 'DING_TALK', + WE_LINK = 'WE_LINK', + WECHAT = 'WECHAT', + CALLNOTIFY = 'CALLNOTIFY', + NOT_TO_NOTIFY = 'NOT_TO_NOTIFY' +} diff --git a/services/coc/v1/model/SeveritySummary.ts b/services/coc/v1/model/SeveritySummary.ts new file mode 100644 index 000000000..9c9706e86 --- /dev/null +++ b/services/coc/v1/model/SeveritySummary.ts @@ -0,0 +1,72 @@ + + +export class SeveritySummary { + private 'critical_count'?: number; + private 'high_count'?: number; + private 'informational_count'?: number; + private 'low_count'?: number; + private 'medium_count'?: number; + private 'unspecified_count'?: number; + public constructor() { + } + public withCriticalCount(criticalCount: number): SeveritySummary { + this['critical_count'] = criticalCount; + return this; + } + public set criticalCount(criticalCount: number | undefined) { + this['critical_count'] = criticalCount; + } + public get criticalCount(): number | undefined { + return this['critical_count']; + } + public withHighCount(highCount: number): SeveritySummary { + this['high_count'] = highCount; + return this; + } + public set highCount(highCount: number | undefined) { + this['high_count'] = highCount; + } + public get highCount(): number | undefined { + return this['high_count']; + } + public withInformationalCount(informationalCount: number): SeveritySummary { + this['informational_count'] = informationalCount; + return this; + } + public set informationalCount(informationalCount: number | undefined) { + this['informational_count'] = informationalCount; + } + public get informationalCount(): number | undefined { + return this['informational_count']; + } + public withLowCount(lowCount: number): SeveritySummary { + this['low_count'] = lowCount; + return this; + } + public set lowCount(lowCount: number | undefined) { + this['low_count'] = lowCount; + } + public get lowCount(): number | undefined { + return this['low_count']; + } + public withMediumCount(mediumCount: number): SeveritySummary { + this['medium_count'] = mediumCount; + return this; + } + public set mediumCount(mediumCount: number | undefined) { + this['medium_count'] = mediumCount; + } + public get mediumCount(): number | undefined { + return this['medium_count']; + } + public withUnspecifiedCount(unspecifiedCount: number): SeveritySummary { + this['unspecified_count'] = unspecifiedCount; + return this; + } + public set unspecifiedCount(unspecifiedCount: number | undefined) { + this['unspecified_count'] = unspecifiedCount; + } + public get unspecifiedCount(): number | undefined { + return this['unspecified_count']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ShowCocIncidentDetailRequest.ts b/services/coc/v1/model/ShowCocIncidentDetailRequest.ts new file mode 100644 index 000000000..636183bcd --- /dev/null +++ b/services/coc/v1/model/ShowCocIncidentDetailRequest.ts @@ -0,0 +1,18 @@ + + +export class ShowCocIncidentDetailRequest { + private 'incident_num'?: string; + public constructor(incidentNum?: string) { + this['incident_num'] = incidentNum; + } + public withIncidentNum(incidentNum: string): ShowCocIncidentDetailRequest { + this['incident_num'] = incidentNum; + return this; + } + public set incidentNum(incidentNum: string | undefined) { + this['incident_num'] = incidentNum; + } + public get incidentNum(): string | undefined { + return this['incident_num']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ShowCocIncidentDetailResponse.ts b/services/coc/v1/model/ShowCocIncidentDetailResponse.ts new file mode 100644 index 000000000..16f25f07f --- /dev/null +++ b/services/coc/v1/model/ShowCocIncidentDetailResponse.ts @@ -0,0 +1,50 @@ +import { BaseResponse } from './BaseResponse'; +import { IncidentTicketInfoResponseData } from './IncidentTicketInfoResponseData'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ShowCocIncidentDetailResponse extends SdkResponse { + private 'provider_code'?: string; + private 'error_code'?: string; + private 'error_msg'?: string; + public data?: IncidentTicketInfoResponseData; + public constructor(providerCode?: string, errorCode?: string) { + super(); + this['provider_code'] = providerCode; + this['error_code'] = errorCode; + } + public withProviderCode(providerCode: string): ShowCocIncidentDetailResponse { + this['provider_code'] = providerCode; + return this; + } + public set providerCode(providerCode: string | undefined) { + this['provider_code'] = providerCode; + } + public get providerCode(): string | undefined { + return this['provider_code']; + } + public withErrorCode(errorCode: string): ShowCocIncidentDetailResponse { + this['error_code'] = errorCode; + return this; + } + public set errorCode(errorCode: string | undefined) { + this['error_code'] = errorCode; + } + public get errorCode(): string | undefined { + return this['error_code']; + } + public withErrorMsg(errorMsg: string): ShowCocIncidentDetailResponse { + this['error_msg'] = errorMsg; + return this; + } + public set errorMsg(errorMsg: string | undefined) { + this['error_msg'] = errorMsg; + } + public get errorMsg(): string | undefined { + return this['error_msg']; + } + public withData(data: IncidentTicketInfoResponseData): ShowCocIncidentDetailResponse { + this['data'] = data; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ShowCocIssuesDetailRequest.ts b/services/coc/v1/model/ShowCocIssuesDetailRequest.ts new file mode 100644 index 000000000..920c06cd6 --- /dev/null +++ b/services/coc/v1/model/ShowCocIssuesDetailRequest.ts @@ -0,0 +1,18 @@ + + +export class ShowCocIssuesDetailRequest { + private 'ticket_id'?: string; + public constructor(ticketId?: string) { + this['ticket_id'] = ticketId; + } + public withTicketId(ticketId: string): ShowCocIssuesDetailRequest { + this['ticket_id'] = ticketId; + return this; + } + public set ticketId(ticketId: string | undefined) { + this['ticket_id'] = ticketId; + } + public get ticketId(): string | undefined { + return this['ticket_id']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ShowCocIssuesDetailResponse.ts b/services/coc/v1/model/ShowCocIssuesDetailResponse.ts new file mode 100644 index 000000000..53c96ca48 --- /dev/null +++ b/services/coc/v1/model/ShowCocIssuesDetailResponse.ts @@ -0,0 +1,50 @@ +import { BaseResponse } from './BaseResponse'; +import { CocIssuesTicketDetailInfoResponseData } from './CocIssuesTicketDetailInfoResponseData'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ShowCocIssuesDetailResponse extends SdkResponse { + private 'provider_code'?: string; + private 'error_code'?: string; + private 'error_msg'?: string; + public data?: CocIssuesTicketDetailInfoResponseData; + public constructor(providerCode?: string, errorCode?: string) { + super(); + this['provider_code'] = providerCode; + this['error_code'] = errorCode; + } + public withProviderCode(providerCode: string): ShowCocIssuesDetailResponse { + this['provider_code'] = providerCode; + return this; + } + public set providerCode(providerCode: string | undefined) { + this['provider_code'] = providerCode; + } + public get providerCode(): string | undefined { + return this['provider_code']; + } + public withErrorCode(errorCode: string): ShowCocIssuesDetailResponse { + this['error_code'] = errorCode; + return this; + } + public set errorCode(errorCode: string | undefined) { + this['error_code'] = errorCode; + } + public get errorCode(): string | undefined { + return this['error_code']; + } + public withErrorMsg(errorMsg: string): ShowCocIssuesDetailResponse { + this['error_msg'] = errorMsg; + return this; + } + public set errorMsg(errorMsg: string | undefined) { + this['error_msg'] = errorMsg; + } + public get errorMsg(): string | undefined { + return this['error_msg']; + } + public withData(data: CocIssuesTicketDetailInfoResponseData): ShowCocIssuesDetailResponse { + this['data'] = data; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ShowInstancePatchItemsRequest.ts b/services/coc/v1/model/ShowInstancePatchItemsRequest.ts new file mode 100644 index 000000000..ce2ffe4a4 --- /dev/null +++ b/services/coc/v1/model/ShowInstancePatchItemsRequest.ts @@ -0,0 +1,93 @@ + + +export class ShowInstancePatchItemsRequest { + private 'instance_compliant_id'?: string; + public offset?: number; + public limit?: number; + public title?: string; + private 'sort_dir'?: string; + private 'sort_key'?: string; + private 'patch_status'?: string; + public classification?: string; + private 'severity_level'?: string; + private 'compliance_level'?: string; + public constructor(instanceCompliantId?: string) { + this['instance_compliant_id'] = instanceCompliantId; + } + public withInstanceCompliantId(instanceCompliantId: string): ShowInstancePatchItemsRequest { + this['instance_compliant_id'] = instanceCompliantId; + return this; + } + public set instanceCompliantId(instanceCompliantId: string | undefined) { + this['instance_compliant_id'] = instanceCompliantId; + } + public get instanceCompliantId(): string | undefined { + return this['instance_compliant_id']; + } + public withOffset(offset: number): ShowInstancePatchItemsRequest { + this['offset'] = offset; + return this; + } + public withLimit(limit: number): ShowInstancePatchItemsRequest { + this['limit'] = limit; + return this; + } + public withTitle(title: string): ShowInstancePatchItemsRequest { + this['title'] = title; + return this; + } + public withSortDir(sortDir: string): ShowInstancePatchItemsRequest { + this['sort_dir'] = sortDir; + return this; + } + public set sortDir(sortDir: string | undefined) { + this['sort_dir'] = sortDir; + } + public get sortDir(): string | undefined { + return this['sort_dir']; + } + public withSortKey(sortKey: string): ShowInstancePatchItemsRequest { + this['sort_key'] = sortKey; + return this; + } + public set sortKey(sortKey: string | undefined) { + this['sort_key'] = sortKey; + } + public get sortKey(): string | undefined { + return this['sort_key']; + } + public withPatchStatus(patchStatus: string): ShowInstancePatchItemsRequest { + this['patch_status'] = patchStatus; + return this; + } + public set patchStatus(patchStatus: string | undefined) { + this['patch_status'] = patchStatus; + } + public get patchStatus(): string | undefined { + return this['patch_status']; + } + public withClassification(classification: string): ShowInstancePatchItemsRequest { + this['classification'] = classification; + return this; + } + public withSeverityLevel(severityLevel: string): ShowInstancePatchItemsRequest { + this['severity_level'] = severityLevel; + return this; + } + public set severityLevel(severityLevel: string | undefined) { + this['severity_level'] = severityLevel; + } + public get severityLevel(): string | undefined { + return this['severity_level']; + } + public withComplianceLevel(complianceLevel: string): ShowInstancePatchItemsRequest { + this['compliance_level'] = complianceLevel; + return this; + } + public set complianceLevel(complianceLevel: string | undefined) { + this['compliance_level'] = complianceLevel; + } + public get complianceLevel(): string | undefined { + return this['compliance_level']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/ShowInstancePatchItemsResponse.ts b/services/coc/v1/model/ShowInstancePatchItemsResponse.ts new file mode 100644 index 000000000..68d043e0f --- /dev/null +++ b/services/coc/v1/model/ShowInstancePatchItemsResponse.ts @@ -0,0 +1,25 @@ +import { ComplianceItem } from './ComplianceItem'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class ShowInstancePatchItemsResponse extends SdkResponse { + public count?: number; + private 'compliance_items'?: Array; + public constructor() { + super(); + } + public withCount(count: number): ShowInstancePatchItemsResponse { + this['count'] = count; + return this; + } + public withComplianceItems(complianceItems: Array): ShowInstancePatchItemsResponse { + this['compliance_items'] = complianceItems; + return this; + } + public set complianceItems(complianceItems: Array | undefined) { + this['compliance_items'] = complianceItems; + } + public get complianceItems(): Array | undefined { + return this['compliance_items']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/SyncResourceReq.ts b/services/coc/v1/model/SyncResourceReq.ts new file mode 100644 index 000000000..ced6936e3 --- /dev/null +++ b/services/coc/v1/model/SyncResourceReq.ts @@ -0,0 +1,18 @@ + + +export class SyncResourceReq { + public provider?: string; + public type?: string; + public constructor(provider?: string, type?: string) { + this['provider'] = provider; + this['type'] = type; + } + public withProvider(provider: string): SyncResourceReq { + this['provider'] = provider; + return this; + } + public withType(type: string): SyncResourceReq { + this['type'] = type; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/SyncResourceRequest.ts b/services/coc/v1/model/SyncResourceRequest.ts new file mode 100644 index 000000000..cbb11a6d7 --- /dev/null +++ b/services/coc/v1/model/SyncResourceRequest.ts @@ -0,0 +1,12 @@ +import { SyncResourceReq } from './SyncResourceReq'; + + +export class SyncResourceRequest { + public body?: SyncResourceReq; + public constructor() { + } + public withBody(body: SyncResourceReq): SyncResourceRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/SyncResourceResponse.ts b/services/coc/v1/model/SyncResourceResponse.ts new file mode 100644 index 000000000..be3694f32 --- /dev/null +++ b/services/coc/v1/model/SyncResourceResponse.ts @@ -0,0 +1,8 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class SyncResourceResponse extends SdkResponse { + public constructor() { + super(); + } +} \ No newline at end of file diff --git a/services/coc/v1/model/Tag.ts b/services/coc/v1/model/Tag.ts new file mode 100644 index 000000000..d6465fd97 --- /dev/null +++ b/services/coc/v1/model/Tag.ts @@ -0,0 +1,16 @@ + + +export class Tag { + public key?: string; + public value?: string; + public constructor() { + } + public withKey(key: string): Tag { + this['key'] = key; + return this; + } + public withValue(value: string): Tag { + this['value'] = value; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/TicketHistoryInfo.ts b/services/coc/v1/model/TicketHistoryInfo.ts new file mode 100644 index 000000000..4a232ec60 --- /dev/null +++ b/services/coc/v1/model/TicketHistoryInfo.ts @@ -0,0 +1,285 @@ +import { EnumDataInfo } from './EnumDataInfo'; +import { UpdateTicketHistoryInfo } from './UpdateTicketHistoryInfo'; + + +export class TicketHistoryInfo { + private 'current_cloud_service_id'?: string; + public description?: string; + private 'level_id'?: string; + private 'mtm_region'?: string; + private 'mtm_type'?: string; + private 'source_id'?: string; + public title?: string; + private 'is_change_event'?: boolean; + private 'is_service_interrupt'?: boolean; + private 'action_id'?: string; + public action?: string; + private 'sub_action'?: string; + public operator?: string; + public comment?: string; + public id?: string; + private 'ticket_id'?: string; + private 'start_time'?: number; + private 'stop_time'?: number; + private 'target_type'?: string; + private 'target_value'?: string; + private 'is_deteted'?: boolean; + private 'update_time'?: number; + private 'action_name_zh'?: string; + private 'action_name_en'?: string; + private 'action_template_zh'?: string; + private 'action_template_en'?: string; + public status?: string; + private 'final_sub_action'?: string; + private 'enum_data_list'?: Array; + public constructor() { + } + public withCurrentCloudServiceId(currentCloudServiceId: string): TicketHistoryInfo { + this['current_cloud_service_id'] = currentCloudServiceId; + return this; + } + public set currentCloudServiceId(currentCloudServiceId: string | undefined) { + this['current_cloud_service_id'] = currentCloudServiceId; + } + public get currentCloudServiceId(): string | undefined { + return this['current_cloud_service_id']; + } + public withDescription(description: string): TicketHistoryInfo { + this['description'] = description; + return this; + } + public withLevelId(levelId: string): TicketHistoryInfo { + this['level_id'] = levelId; + return this; + } + public set levelId(levelId: string | undefined) { + this['level_id'] = levelId; + } + public get levelId(): string | undefined { + return this['level_id']; + } + public withMtmRegion(mtmRegion: string): TicketHistoryInfo { + this['mtm_region'] = mtmRegion; + return this; + } + public set mtmRegion(mtmRegion: string | undefined) { + this['mtm_region'] = mtmRegion; + } + public get mtmRegion(): string | undefined { + return this['mtm_region']; + } + public withMtmType(mtmType: string): TicketHistoryInfo { + this['mtm_type'] = mtmType; + return this; + } + public set mtmType(mtmType: string | undefined) { + this['mtm_type'] = mtmType; + } + public get mtmType(): string | undefined { + return this['mtm_type']; + } + public withSourceId(sourceId: string): TicketHistoryInfo { + this['source_id'] = sourceId; + return this; + } + public set sourceId(sourceId: string | undefined) { + this['source_id'] = sourceId; + } + public get sourceId(): string | undefined { + return this['source_id']; + } + public withTitle(title: string): TicketHistoryInfo { + this['title'] = title; + return this; + } + public withIsChangeEvent(isChangeEvent: boolean): TicketHistoryInfo { + this['is_change_event'] = isChangeEvent; + return this; + } + public set isChangeEvent(isChangeEvent: boolean | undefined) { + this['is_change_event'] = isChangeEvent; + } + public get isChangeEvent(): boolean | undefined { + return this['is_change_event']; + } + public withIsServiceInterrupt(isServiceInterrupt: boolean): TicketHistoryInfo { + this['is_service_interrupt'] = isServiceInterrupt; + return this; + } + public set isServiceInterrupt(isServiceInterrupt: boolean | undefined) { + this['is_service_interrupt'] = isServiceInterrupt; + } + public get isServiceInterrupt(): boolean | undefined { + return this['is_service_interrupt']; + } + public withActionId(actionId: string): TicketHistoryInfo { + this['action_id'] = actionId; + return this; + } + public set actionId(actionId: string | undefined) { + this['action_id'] = actionId; + } + public get actionId(): string | undefined { + return this['action_id']; + } + public withAction(action: string): TicketHistoryInfo { + this['action'] = action; + return this; + } + public withSubAction(subAction: string): TicketHistoryInfo { + this['sub_action'] = subAction; + return this; + } + public set subAction(subAction: string | undefined) { + this['sub_action'] = subAction; + } + public get subAction(): string | undefined { + return this['sub_action']; + } + public withOperator(operator: string): TicketHistoryInfo { + this['operator'] = operator; + return this; + } + public withComment(comment: string): TicketHistoryInfo { + this['comment'] = comment; + return this; + } + public withId(id: string): TicketHistoryInfo { + this['id'] = id; + return this; + } + public withTicketId(ticketId: string): TicketHistoryInfo { + this['ticket_id'] = ticketId; + return this; + } + public set ticketId(ticketId: string | undefined) { + this['ticket_id'] = ticketId; + } + public get ticketId(): string | undefined { + return this['ticket_id']; + } + public withStartTime(startTime: number): TicketHistoryInfo { + this['start_time'] = startTime; + return this; + } + public set startTime(startTime: number | undefined) { + this['start_time'] = startTime; + } + public get startTime(): number | undefined { + return this['start_time']; + } + public withStopTime(stopTime: number): TicketHistoryInfo { + this['stop_time'] = stopTime; + return this; + } + public set stopTime(stopTime: number | undefined) { + this['stop_time'] = stopTime; + } + public get stopTime(): number | undefined { + return this['stop_time']; + } + public withTargetType(targetType: string): TicketHistoryInfo { + this['target_type'] = targetType; + return this; + } + public set targetType(targetType: string | undefined) { + this['target_type'] = targetType; + } + public get targetType(): string | undefined { + return this['target_type']; + } + public withTargetValue(targetValue: string): TicketHistoryInfo { + this['target_value'] = targetValue; + return this; + } + public set targetValue(targetValue: string | undefined) { + this['target_value'] = targetValue; + } + public get targetValue(): string | undefined { + return this['target_value']; + } + public withIsDeteted(isDeteted: boolean): TicketHistoryInfo { + this['is_deteted'] = isDeteted; + return this; + } + public set isDeteted(isDeteted: boolean | undefined) { + this['is_deteted'] = isDeteted; + } + public get isDeteted(): boolean | undefined { + return this['is_deteted']; + } + public withUpdateTime(updateTime: number): TicketHistoryInfo { + this['update_time'] = updateTime; + return this; + } + public set updateTime(updateTime: number | undefined) { + this['update_time'] = updateTime; + } + public get updateTime(): number | undefined { + return this['update_time']; + } + public withActionNameZh(actionNameZh: string): TicketHistoryInfo { + this['action_name_zh'] = actionNameZh; + return this; + } + public set actionNameZh(actionNameZh: string | undefined) { + this['action_name_zh'] = actionNameZh; + } + public get actionNameZh(): string | undefined { + return this['action_name_zh']; + } + public withActionNameEn(actionNameEn: string): TicketHistoryInfo { + this['action_name_en'] = actionNameEn; + return this; + } + public set actionNameEn(actionNameEn: string | undefined) { + this['action_name_en'] = actionNameEn; + } + public get actionNameEn(): string | undefined { + return this['action_name_en']; + } + public withActionTemplateZh(actionTemplateZh: string): TicketHistoryInfo { + this['action_template_zh'] = actionTemplateZh; + return this; + } + public set actionTemplateZh(actionTemplateZh: string | undefined) { + this['action_template_zh'] = actionTemplateZh; + } + public get actionTemplateZh(): string | undefined { + return this['action_template_zh']; + } + public withActionTemplateEn(actionTemplateEn: string): TicketHistoryInfo { + this['action_template_en'] = actionTemplateEn; + return this; + } + public set actionTemplateEn(actionTemplateEn: string | undefined) { + this['action_template_en'] = actionTemplateEn; + } + public get actionTemplateEn(): string | undefined { + return this['action_template_en']; + } + public withStatus(status: string): TicketHistoryInfo { + this['status'] = status; + return this; + } + public withFinalSubAction(finalSubAction: string): TicketHistoryInfo { + this['final_sub_action'] = finalSubAction; + return this; + } + public set finalSubAction(finalSubAction: string | undefined) { + this['final_sub_action'] = finalSubAction; + } + public get finalSubAction(): string | undefined { + return this['final_sub_action']; + } + public withEnumDataList(enumDataList: Array): TicketHistoryInfo { + this['enum_data_list'] = enumDataList; + return this; + } + public set enumDataList(enumDataList: Array | undefined) { + this['enum_data_list'] = enumDataList; + } + public get enumDataList(): Array | undefined { + return this['enum_data_list']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/TicketInfoEnumData.ts b/services/coc/v1/model/TicketInfoEnumData.ts new file mode 100644 index 000000000..cbbafe8d2 --- /dev/null +++ b/services/coc/v1/model/TicketInfoEnumData.ts @@ -0,0 +1,54 @@ + + +export class TicketInfoEnumData { + private 'filed_key'?: string; + private 'enum_key'?: string; + private 'name_zh'?: string; + private 'name_en'?: string; + public constructor(filedKey?: string, enumKey?: string, nameZh?: string, nameEn?: string) { + this['filed_key'] = filedKey; + this['enum_key'] = enumKey; + this['name_zh'] = nameZh; + this['name_en'] = nameEn; + } + public withFiledKey(filedKey: string): TicketInfoEnumData { + this['filed_key'] = filedKey; + return this; + } + public set filedKey(filedKey: string | undefined) { + this['filed_key'] = filedKey; + } + public get filedKey(): string | undefined { + return this['filed_key']; + } + public withEnumKey(enumKey: string): TicketInfoEnumData { + this['enum_key'] = enumKey; + return this; + } + public set enumKey(enumKey: string | undefined) { + this['enum_key'] = enumKey; + } + public get enumKey(): string | undefined { + return this['enum_key']; + } + public withNameZh(nameZh: string): TicketInfoEnumData { + this['name_zh'] = nameZh; + return this; + } + public set nameZh(nameZh: string | undefined) { + this['name_zh'] = nameZh; + } + public get nameZh(): string | undefined { + return this['name_zh']; + } + public withNameEn(nameEn: string): TicketInfoEnumData { + this['name_en'] = nameEn; + return this; + } + public set nameEn(nameEn: string | undefined) { + this['name_en'] = nameEn; + } + public get nameEn(): string | undefined { + return this['name_en']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/UpdateScriptRequest.ts b/services/coc/v1/model/UpdateScriptRequest.ts new file mode 100644 index 000000000..61836db79 --- /dev/null +++ b/services/coc/v1/model/UpdateScriptRequest.ts @@ -0,0 +1,57 @@ +import { EditScriptModel } from './EditScriptModel'; + + +export class UpdateScriptRequest { + private 'script_uuid'?: string; + private 'X-Language'?: string; + private 'x-project-id'?: string; + private 'x-user-profile'?: string; + public body?: EditScriptModel; + public constructor(scriptUuid?: string) { + this['script_uuid'] = scriptUuid; + } + public withScriptUuid(scriptUuid: string): UpdateScriptRequest { + this['script_uuid'] = scriptUuid; + return this; + } + public set scriptUuid(scriptUuid: string | undefined) { + this['script_uuid'] = scriptUuid; + } + public get scriptUuid(): string | undefined { + return this['script_uuid']; + } + public withXLanguage(xLanguage: string): UpdateScriptRequest { + this['X-Language'] = xLanguage; + return this; + } + public set xLanguage(xLanguage: string | undefined) { + this['X-Language'] = xLanguage; + } + public get xLanguage(): string | undefined { + return this['X-Language']; + } + public withXProjectId(xProjectId: string): UpdateScriptRequest { + this['x-project-id'] = xProjectId; + return this; + } + public set xProjectId(xProjectId: string | undefined) { + this['x-project-id'] = xProjectId; + } + public get xProjectId(): string | undefined { + return this['x-project-id']; + } + public withXUserProfile(xUserProfile: string): UpdateScriptRequest { + this['x-user-profile'] = xUserProfile; + return this; + } + public set xUserProfile(xUserProfile: string | undefined) { + this['x-user-profile'] = xUserProfile; + } + public get xUserProfile(): string | undefined { + return this['x-user-profile']; + } + public withBody(body: EditScriptModel): UpdateScriptRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/UpdateScriptResponse.ts b/services/coc/v1/model/UpdateScriptResponse.ts new file mode 100644 index 000000000..ce1de73e3 --- /dev/null +++ b/services/coc/v1/model/UpdateScriptResponse.ts @@ -0,0 +1,13 @@ + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class UpdateScriptResponse extends SdkResponse { + public data?: string; + public constructor() { + super(); + } + public withData(data: string): UpdateScriptResponse { + this['data'] = data; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/UpdateTicketHistoryInfo.ts b/services/coc/v1/model/UpdateTicketHistoryInfo.ts new file mode 100644 index 000000000..d9310f310 --- /dev/null +++ b/services/coc/v1/model/UpdateTicketHistoryInfo.ts @@ -0,0 +1,131 @@ +import { ExtraFieldInfo } from './ExtraFieldInfo'; + + +export class UpdateTicketHistoryInfo { + private 'current_cloud_service_id'?: string; + public description?: string; + private 'level_id'?: string; + private 'mtm_region'?: string; + private 'mtm_type'?: string; + private 'source_id'?: string; + public title?: string; + private 'is_change_event'?: boolean; + private 'is_service_interrupt'?: boolean; + private 'action_id'?: string; + public action?: string; + private 'sub_action'?: string; + public operator?: string; + public comment?: string; + public constructor() { + } + public withCurrentCloudServiceId(currentCloudServiceId: string): UpdateTicketHistoryInfo { + this['current_cloud_service_id'] = currentCloudServiceId; + return this; + } + public set currentCloudServiceId(currentCloudServiceId: string | undefined) { + this['current_cloud_service_id'] = currentCloudServiceId; + } + public get currentCloudServiceId(): string | undefined { + return this['current_cloud_service_id']; + } + public withDescription(description: string): UpdateTicketHistoryInfo { + this['description'] = description; + return this; + } + public withLevelId(levelId: string): UpdateTicketHistoryInfo { + this['level_id'] = levelId; + return this; + } + public set levelId(levelId: string | undefined) { + this['level_id'] = levelId; + } + public get levelId(): string | undefined { + return this['level_id']; + } + public withMtmRegion(mtmRegion: string): UpdateTicketHistoryInfo { + this['mtm_region'] = mtmRegion; + return this; + } + public set mtmRegion(mtmRegion: string | undefined) { + this['mtm_region'] = mtmRegion; + } + public get mtmRegion(): string | undefined { + return this['mtm_region']; + } + public withMtmType(mtmType: string): UpdateTicketHistoryInfo { + this['mtm_type'] = mtmType; + return this; + } + public set mtmType(mtmType: string | undefined) { + this['mtm_type'] = mtmType; + } + public get mtmType(): string | undefined { + return this['mtm_type']; + } + public withSourceId(sourceId: string): UpdateTicketHistoryInfo { + this['source_id'] = sourceId; + return this; + } + public set sourceId(sourceId: string | undefined) { + this['source_id'] = sourceId; + } + public get sourceId(): string | undefined { + return this['source_id']; + } + public withTitle(title: string): UpdateTicketHistoryInfo { + this['title'] = title; + return this; + } + public withIsChangeEvent(isChangeEvent: boolean): UpdateTicketHistoryInfo { + this['is_change_event'] = isChangeEvent; + return this; + } + public set isChangeEvent(isChangeEvent: boolean | undefined) { + this['is_change_event'] = isChangeEvent; + } + public get isChangeEvent(): boolean | undefined { + return this['is_change_event']; + } + public withIsServiceInterrupt(isServiceInterrupt: boolean): UpdateTicketHistoryInfo { + this['is_service_interrupt'] = isServiceInterrupt; + return this; + } + public set isServiceInterrupt(isServiceInterrupt: boolean | undefined) { + this['is_service_interrupt'] = isServiceInterrupt; + } + public get isServiceInterrupt(): boolean | undefined { + return this['is_service_interrupt']; + } + public withActionId(actionId: string): UpdateTicketHistoryInfo { + this['action_id'] = actionId; + return this; + } + public set actionId(actionId: string | undefined) { + this['action_id'] = actionId; + } + public get actionId(): string | undefined { + return this['action_id']; + } + public withAction(action: string): UpdateTicketHistoryInfo { + this['action'] = action; + return this; + } + public withSubAction(subAction: string): UpdateTicketHistoryInfo { + this['sub_action'] = subAction; + return this; + } + public set subAction(subAction: string | undefined) { + this['sub_action'] = subAction; + } + public get subAction(): string | undefined { + return this['sub_action']; + } + public withOperator(operator: string): UpdateTicketHistoryInfo { + this['operator'] = operator; + return this; + } + public withComment(comment: string): UpdateTicketHistoryInfo { + this['comment'] = comment; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/WarRoomEnumeration.ts b/services/coc/v1/model/WarRoomEnumeration.ts new file mode 100644 index 000000000..f0564e5db --- /dev/null +++ b/services/coc/v1/model/WarRoomEnumeration.ts @@ -0,0 +1,38 @@ + + +export class WarRoomEnumeration { + public id?: string; + private 'name_zh'?: string; + private 'name_en'?: string; + public type?: string; + public constructor() { + } + public withId(id: string): WarRoomEnumeration { + this['id'] = id; + return this; + } + public withNameZh(nameZh: string): WarRoomEnumeration { + this['name_zh'] = nameZh; + return this; + } + public set nameZh(nameZh: string | undefined) { + this['name_zh'] = nameZh; + } + public get nameZh(): string | undefined { + return this['name_zh']; + } + public withNameEn(nameEn: string): WarRoomEnumeration { + this['name_en'] = nameEn; + return this; + } + public set nameEn(nameEn: string | undefined) { + this['name_en'] = nameEn; + } + public get nameEn(): string | undefined { + return this['name_en']; + } + public withType(type: string): WarRoomEnumeration { + this['type'] = type; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/WarRoomIncident.ts b/services/coc/v1/model/WarRoomIncident.ts new file mode 100644 index 000000000..050dd3327 --- /dev/null +++ b/services/coc/v1/model/WarRoomIncident.ts @@ -0,0 +1,56 @@ + + +export class WarRoomIncident { + public id?: string; + private 'incident_id'?: string; + private 'is_change_event'?: boolean; + private 'failure_level'?: string; + private 'incident_url'?: string; + public constructor(id?: string) { + this['id'] = id; + } + public withId(id: string): WarRoomIncident { + this['id'] = id; + return this; + } + public withIncidentId(incidentId: string): WarRoomIncident { + this['incident_id'] = incidentId; + return this; + } + public set incidentId(incidentId: string | undefined) { + this['incident_id'] = incidentId; + } + public get incidentId(): string | undefined { + return this['incident_id']; + } + public withIsChangeEvent(isChangeEvent: boolean): WarRoomIncident { + this['is_change_event'] = isChangeEvent; + return this; + } + public set isChangeEvent(isChangeEvent: boolean | undefined) { + this['is_change_event'] = isChangeEvent; + } + public get isChangeEvent(): boolean | undefined { + return this['is_change_event']; + } + public withFailureLevel(failureLevel: string): WarRoomIncident { + this['failure_level'] = failureLevel; + return this; + } + public set failureLevel(failureLevel: string | undefined) { + this['failure_level'] = failureLevel; + } + public get failureLevel(): string | undefined { + return this['failure_level']; + } + public withIncidentUrl(incidentUrl: string): WarRoomIncident { + this['incident_url'] = incidentUrl; + return this; + } + public set incidentUrl(incidentUrl: string | undefined) { + this['incident_url'] = incidentUrl; + } + public get incidentUrl(): string | undefined { + return this['incident_url']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/WarRoomTenantInfo.ts b/services/coc/v1/model/WarRoomTenantInfo.ts new file mode 100644 index 000000000..98a87a48e --- /dev/null +++ b/services/coc/v1/model/WarRoomTenantInfo.ts @@ -0,0 +1,232 @@ +import { WarRoomEnumeration } from './WarRoomEnumeration'; +import { WarRoomIncident } from './WarRoomIncident'; +import { WarRoomTenantInfoImpactedApplication } from './WarRoomTenantInfoImpactedApplication'; +import { WarRoomTenantInfoRegions } from './WarRoomTenantInfoRegions'; + + +export class WarRoomTenantInfo { + public id?: string; + public title?: string; + public admin?: string; + private 'recover_member'?: Array; + private 'recover_leader'?: Array; + public incident?: WarRoomIncident; + public source?: string; + public regions?: Array; + private 'change_num'?: string; + private 'occur_time'?: number; + private 'recover_time'?: number; + private 'fault_cause'?: string; + private 'create_time'?: number; + private 'first_report_time'?: number; + private 'recovery_notification_time'?: number; + private 'fault_impact'?: string; + public description?: string; + private 'circular_level'?: string; + private 'war_room_status'?: WarRoomEnumeration; + private 'impacted_application'?: Array; + private 'processing_duration'?: number; + private 'restoration_duration'?: number; + private 'war_room_num'?: string; + private 'enterprise_project_id'?: string; + public constructor() { + } + public withId(id: string): WarRoomTenantInfo { + this['id'] = id; + return this; + } + public withTitle(title: string): WarRoomTenantInfo { + this['title'] = title; + return this; + } + public withAdmin(admin: string): WarRoomTenantInfo { + this['admin'] = admin; + return this; + } + public withRecoverMember(recoverMember: Array): WarRoomTenantInfo { + this['recover_member'] = recoverMember; + return this; + } + public set recoverMember(recoverMember: Array | undefined) { + this['recover_member'] = recoverMember; + } + public get recoverMember(): Array | undefined { + return this['recover_member']; + } + public withRecoverLeader(recoverLeader: Array): WarRoomTenantInfo { + this['recover_leader'] = recoverLeader; + return this; + } + public set recoverLeader(recoverLeader: Array | undefined) { + this['recover_leader'] = recoverLeader; + } + public get recoverLeader(): Array | undefined { + return this['recover_leader']; + } + public withIncident(incident: WarRoomIncident): WarRoomTenantInfo { + this['incident'] = incident; + return this; + } + public withSource(source: string): WarRoomTenantInfo { + this['source'] = source; + return this; + } + public withRegions(regions: Array): WarRoomTenantInfo { + this['regions'] = regions; + return this; + } + public withChangeNum(changeNum: string): WarRoomTenantInfo { + this['change_num'] = changeNum; + return this; + } + public set changeNum(changeNum: string | undefined) { + this['change_num'] = changeNum; + } + public get changeNum(): string | undefined { + return this['change_num']; + } + public withOccurTime(occurTime: number): WarRoomTenantInfo { + this['occur_time'] = occurTime; + return this; + } + public set occurTime(occurTime: number | undefined) { + this['occur_time'] = occurTime; + } + public get occurTime(): number | undefined { + return this['occur_time']; + } + public withRecoverTime(recoverTime: number): WarRoomTenantInfo { + this['recover_time'] = recoverTime; + return this; + } + public set recoverTime(recoverTime: number | undefined) { + this['recover_time'] = recoverTime; + } + public get recoverTime(): number | undefined { + return this['recover_time']; + } + public withFaultCause(faultCause: string): WarRoomTenantInfo { + this['fault_cause'] = faultCause; + return this; + } + public set faultCause(faultCause: string | undefined) { + this['fault_cause'] = faultCause; + } + public get faultCause(): string | undefined { + return this['fault_cause']; + } + public withCreateTime(createTime: number): WarRoomTenantInfo { + this['create_time'] = createTime; + return this; + } + public set createTime(createTime: number | undefined) { + this['create_time'] = createTime; + } + public get createTime(): number | undefined { + return this['create_time']; + } + public withFirstReportTime(firstReportTime: number): WarRoomTenantInfo { + this['first_report_time'] = firstReportTime; + return this; + } + public set firstReportTime(firstReportTime: number | undefined) { + this['first_report_time'] = firstReportTime; + } + public get firstReportTime(): number | undefined { + return this['first_report_time']; + } + public withRecoveryNotificationTime(recoveryNotificationTime: number): WarRoomTenantInfo { + this['recovery_notification_time'] = recoveryNotificationTime; + return this; + } + public set recoveryNotificationTime(recoveryNotificationTime: number | undefined) { + this['recovery_notification_time'] = recoveryNotificationTime; + } + public get recoveryNotificationTime(): number | undefined { + return this['recovery_notification_time']; + } + public withFaultImpact(faultImpact: string): WarRoomTenantInfo { + this['fault_impact'] = faultImpact; + return this; + } + public set faultImpact(faultImpact: string | undefined) { + this['fault_impact'] = faultImpact; + } + public get faultImpact(): string | undefined { + return this['fault_impact']; + } + public withDescription(description: string): WarRoomTenantInfo { + this['description'] = description; + return this; + } + public withCircularLevel(circularLevel: string): WarRoomTenantInfo { + this['circular_level'] = circularLevel; + return this; + } + public set circularLevel(circularLevel: string | undefined) { + this['circular_level'] = circularLevel; + } + public get circularLevel(): string | undefined { + return this['circular_level']; + } + public withWarRoomStatus(warRoomStatus: WarRoomEnumeration): WarRoomTenantInfo { + this['war_room_status'] = warRoomStatus; + return this; + } + public set warRoomStatus(warRoomStatus: WarRoomEnumeration | undefined) { + this['war_room_status'] = warRoomStatus; + } + public get warRoomStatus(): WarRoomEnumeration | undefined { + return this['war_room_status']; + } + public withImpactedApplication(impactedApplication: Array): WarRoomTenantInfo { + this['impacted_application'] = impactedApplication; + return this; + } + public set impactedApplication(impactedApplication: Array | undefined) { + this['impacted_application'] = impactedApplication; + } + public get impactedApplication(): Array | undefined { + return this['impacted_application']; + } + public withProcessingDuration(processingDuration: number): WarRoomTenantInfo { + this['processing_duration'] = processingDuration; + return this; + } + public set processingDuration(processingDuration: number | undefined) { + this['processing_duration'] = processingDuration; + } + public get processingDuration(): number | undefined { + return this['processing_duration']; + } + public withRestorationDuration(restorationDuration: number): WarRoomTenantInfo { + this['restoration_duration'] = restorationDuration; + return this; + } + public set restorationDuration(restorationDuration: number | undefined) { + this['restoration_duration'] = restorationDuration; + } + public get restorationDuration(): number | undefined { + return this['restoration_duration']; + } + public withWarRoomNum(warRoomNum: string): WarRoomTenantInfo { + this['war_room_num'] = warRoomNum; + return this; + } + public set warRoomNum(warRoomNum: string | undefined) { + this['war_room_num'] = warRoomNum; + } + public get warRoomNum(): string | undefined { + return this['war_room_num']; + } + public withEnterpriseProjectId(enterpriseProjectId: string): WarRoomTenantInfo { + this['enterprise_project_id'] = enterpriseProjectId; + return this; + } + public set enterpriseProjectId(enterpriseProjectId: string | undefined) { + this['enterprise_project_id'] = enterpriseProjectId; + } + public get enterpriseProjectId(): string | undefined { + return this['enterprise_project_id']; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/WarRoomTenantInfoImpactedApplication.ts b/services/coc/v1/model/WarRoomTenantInfoImpactedApplication.ts new file mode 100644 index 000000000..f644d2d1c --- /dev/null +++ b/services/coc/v1/model/WarRoomTenantInfoImpactedApplication.ts @@ -0,0 +1,16 @@ + + +export class WarRoomTenantInfoImpactedApplication { + public id?: string; + public name?: string; + public constructor() { + } + public withId(id: string): WarRoomTenantInfoImpactedApplication { + this['id'] = id; + return this; + } + public withName(name: string): WarRoomTenantInfoImpactedApplication { + this['name'] = name; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/model/WarRoomTenantInfoRegions.ts b/services/coc/v1/model/WarRoomTenantInfoRegions.ts new file mode 100644 index 000000000..3a60a7602 --- /dev/null +++ b/services/coc/v1/model/WarRoomTenantInfoRegions.ts @@ -0,0 +1,16 @@ + + +export class WarRoomTenantInfoRegions { + public code?: string; + public name?: string; + public constructor() { + } + public withCode(code: string): WarRoomTenantInfoRegions { + this['code'] = code; + return this; + } + public withName(name: string): WarRoomTenantInfoRegions { + this['name'] = name; + return this; + } +} \ No newline at end of file diff --git a/services/coc/v1/public-api.ts b/services/coc/v1/public-api.ts new file mode 100644 index 000000000..0c8ac7523 --- /dev/null +++ b/services/coc/v1/public-api.ts @@ -0,0 +1,139 @@ +export * from './CocClient'; + +export * from './model/AddScriptModel'; +export * from './model/ApplicationQueryResponseData'; +export * from './model/AuthorizableTicketBody'; +export * from './model/AuthorizeTicketCommonInfo'; +export * from './model/AuthorizeTicketInfo'; +export * from './model/BaseResponse'; +export * from './model/BatchListResourceResponseData'; +export * from './model/CocIssuesTicketDetailInfoResponseData'; +export * from './model/ComplianceItem'; +export * from './model/CompliantSummary'; +export * from './model/CreateCocIncidentRequest'; +export * from './model/CreateCocIncidentResponse'; +export * from './model/CreateCocIssuesRequest'; +export * from './model/CreateCocIssuesResponse'; +export * from './model/CreateExternalIncidentRequest'; +export * from './model/CreateExternalIncidentResponseData'; +export * from './model/CreateExternalIssuesRequest'; +export * from './model/CreateExternalIssuesResponseData'; +export * from './model/CreateReportCustomEventRequest'; +export * from './model/CreateReportCustomEventResponse'; +export * from './model/CreateReportPrometheusEventRequest'; +export * from './model/CreateReportPrometheusEventResponse'; +export * from './model/CreateScriptRequest'; +export * from './model/CreateScriptResponse'; +export * from './model/CreateWarRoomRequest'; +export * from './model/CreateWarRoomRequestBody'; +export * from './model/CreateWarRoomResponse'; +export * from './model/Customttribute'; +export * from './model/DeleteScriptRequest'; +export * from './model/DeleteScriptResponse'; +export * from './model/EditScriptModel'; +export * from './model/EnumDataInfo'; +export * from './model/ExectionInstanceModel'; +export * from './model/ExectuionStatistic'; +export * from './model/ExecuteInstancesBatchInfo'; +export * from './model/ExecutePublicScriptRequest'; +export * from './model/ExecutePublicScriptResponse'; +export * from './model/ExecuteResourceInstance'; +export * from './model/ExecuteScriptRequest'; +export * from './model/ExecuteScriptResponse'; +export * from './model/ExecutionSummary'; +export * from './model/ExtraFieldInfo'; +export * from './model/GetPublicScriptRequest'; +export * from './model/GetPublicScriptResponse'; +export * from './model/GetScriptJobBatchRequest'; +export * from './model/GetScriptJobBatchResponse'; +export * from './model/GetScriptJobInfoRequest'; +export * from './model/GetScriptJobInfoResponse'; +export * from './model/GetScriptJobStatisticsRequest'; +export * from './model/GetScriptJobStatisticsResponse'; +export * from './model/GetScriptRequest'; +export * from './model/GetScriptResponse'; +export * from './model/HandleCocIncidentRequest'; +export * from './model/HandleCocIncidentResponse'; +export * from './model/HandleExternalIncidentRequest'; +export * from './model/HandleExternalIncidentResponseData'; +export * from './model/IncidentTicketInfoResponseData'; +export * from './model/InstanceCompliant'; +export * from './model/JobScriptBatchDetailModel'; +export * from './model/JobScriptBatchListModel'; +export * from './model/JobScriptOrderInfoModel'; +export * from './model/JobScriptOrderInfoProp'; +export * from './model/JobScriptOrderListModel'; +export * from './model/JobScriptOrderListPage'; +export * from './model/JobScriptOrderListProp'; +export * from './model/JobScriptOrderOperationBody'; +export * from './model/JobScriptOrderStatisticsModel'; +export * from './model/ListApplicationsRequest'; +export * from './model/ListApplicationsResponse'; +export * from './model/ListAuthorizableTicketsExternalRequest'; +export * from './model/ListAuthorizableTicketsExternalResponse'; +export * from './model/ListAuthorizableTicketsReq'; +export * from './model/ListBaseRequest'; +export * from './model/ListBaseResponse'; +export * from './model/ListCocTicketOperationHistoriesRequest'; +export * from './model/ListCocTicketOperationHistoriesResponse'; +export * from './model/ListInstanceCompliantRequest'; +export * from './model/ListInstanceCompliantResponse'; +export * from './model/ListPublicScriptsRequest'; +export * from './model/ListPublicScriptsResponse'; +export * from './model/ListResourceRequest'; +export * from './model/ListResourceResponse'; +export * from './model/ListScriptJobBatchesRequest'; +export * from './model/ListScriptJobBatchesResponse'; +export * from './model/ListScriptJobsRequest'; +export * from './model/ListScriptJobsResponse'; +export * from './model/ListScriptsRequest'; +export * from './model/ListScriptsResponse'; +export * from './model/ListTenantWarRoomRequestBody'; +export * from './model/ListTicketParams'; +export * from './model/ListWarRoomsRequest'; +export * from './model/ListWarRoomsResponse'; +export * from './model/NonCompliantSummary'; +export * from './model/ObjectFilter'; +export * from './model/OperateScriptJobRequest'; +export * from './model/OperateScriptJobResponse'; +export * from './model/PatchDetail'; +export * from './model/PublicScriptDetailModel'; +export * from './model/PublicScriptListModel'; +export * from './model/PublicScriptListPage'; +export * from './model/PublicScriptPropertiesModel'; +export * from './model/ReportCustomEventRequestBody'; +export * from './model/ResourceInstance'; +export * from './model/ResourceInstanceProp'; +export * from './model/ReviewerInfo'; +export * from './model/ScheduleGroupInfo'; +export * from './model/ScriptDetailModel'; +export * from './model/ScriptExecuteInputParam'; +export * from './model/ScriptExecuteModel'; +export * from './model/ScriptExecuteParam'; +export * from './model/ScriptExecuteParamReference'; +export * from './model/ScriptListModel'; +export * from './model/ScriptListPage'; +export * from './model/ScriptParamDefine'; +export * from './model/ScriptPropertiesModel'; +export * from './model/SeveritySummary'; +export * from './model/ShowCocIncidentDetailRequest'; +export * from './model/ShowCocIncidentDetailResponse'; +export * from './model/ShowCocIssuesDetailRequest'; +export * from './model/ShowCocIssuesDetailResponse'; +export * from './model/ShowInstancePatchItemsRequest'; +export * from './model/ShowInstancePatchItemsResponse'; +export * from './model/SyncResourceReq'; +export * from './model/SyncResourceRequest'; +export * from './model/SyncResourceResponse'; +export * from './model/Tag'; +export * from './model/TicketHistoryInfo'; +export * from './model/TicketInfoEnumData'; +export * from './model/UpdateScriptRequest'; +export * from './model/UpdateScriptResponse'; +export * from './model/UpdateTicketHistoryInfo'; +export * from './model/WarRoomEnumeration'; +export * from './model/WarRoomIncident'; +export * from './model/WarRoomTenantInfo'; +export * from './model/WarRoomTenantInfoImpactedApplication'; +export * from './model/WarRoomTenantInfoRegions'; +export * from './CocRegion'; diff --git a/services/config/v1/ConfigClient.ts b/services/config/v1/ConfigClient.ts index 678a87877..f0e2533a4 100644 --- a/services/config/v1/ConfigClient.ts +++ b/services/config/v1/ConfigClient.ts @@ -27,6 +27,8 @@ import { CollectAllResourcesSummaryRequest } from './model/CollectAllResourcesSu import { CollectAllResourcesSummaryResponse } from './model/CollectAllResourcesSummaryResponse'; import { CollectConformancePackComplianceSummaryRequest } from './model/CollectConformancePackComplianceSummaryRequest'; import { CollectConformancePackComplianceSummaryResponse } from './model/CollectConformancePackComplianceSummaryResponse'; +import { CollectRemediationExecutionStatusesSummaryRequest } from './model/CollectRemediationExecutionStatusesSummaryRequest'; +import { CollectRemediationExecutionStatusesSummaryResponse } from './model/CollectRemediationExecutionStatusesSummaryResponse'; import { CollectTrackedResourcesSummaryRequest } from './model/CollectTrackedResourcesSummaryRequest'; import { CollectTrackedResourcesSummaryResponse } from './model/CollectTrackedResourcesSummaryResponse'; import { Compliance } from './model/Compliance'; @@ -184,6 +186,9 @@ import { RemediationConfigurationRequestBody } from './model/RemediationConfigur import { RemediationException } from './model/RemediationException'; import { RemediationExceptionRequest } from './model/RemediationExceptionRequest'; import { RemediationExecution } from './model/RemediationExecution'; +import { RemediationExecutionStatus } from './model/RemediationExecutionStatus'; +import { RemediationExecutionStatusesSummaryRequestBody } from './model/RemediationExecutionStatusesSummaryRequestBody'; +import { RemediationResourceKey } from './model/RemediationResourceKey'; import { RemediationResourceParameter } from './model/RemediationResourceParameter'; import { RemediationRunRequestBody } from './model/RemediationRunRequestBody'; import { RemediationStaticParameter } from './model/RemediationStaticParameter'; @@ -1131,6 +1136,28 @@ export class ConfigClient { return this.hcClient.sendRequest(options); } + /** + * 列举合规规则修正最新记录。 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 列举修正最新记录 + * @param {string} policyAssignmentId 规则ID + * @param {number} [limit] 最大的返回数量 + * @param {string} [marker] 分页参数,通过上一个请求中返回的marker信息作为输入,获取当前页 + * @param {RemediationExecutionStatusesSummaryRequestBody} [remediationExecutionStatusesSummaryRequestBody] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public collectRemediationExecutionStatusesSummary(collectRemediationExecutionStatusesSummaryRequest?: CollectRemediationExecutionStatusesSummaryRequest): Promise { + const options = ParamCreater().collectRemediationExecutionStatusesSummary(collectRemediationExecutionStatusesSummaryRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + /** * 创建或更新合规规则修正配置。 * @@ -4300,6 +4327,64 @@ export const ParamCreater = function () { return options; }, + /** + * 列举合规规则修正最新记录。 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + collectRemediationExecutionStatusesSummary(collectRemediationExecutionStatusesSummaryRequest?: CollectRemediationExecutionStatusesSummaryRequest) { + const options = { + method: "POST", + url: "/v1/resource-manager/domains/{domain_id}/policy-assignments/{policy_assignment_id}/remediation-execution-statuses/summary", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + let body: any; + + let policyAssignmentId; + + let limit; + + let marker; + + if (collectRemediationExecutionStatusesSummaryRequest !== null && collectRemediationExecutionStatusesSummaryRequest !== undefined) { + if (collectRemediationExecutionStatusesSummaryRequest instanceof CollectRemediationExecutionStatusesSummaryRequest) { + policyAssignmentId = collectRemediationExecutionStatusesSummaryRequest.policyAssignmentId; + limit = collectRemediationExecutionStatusesSummaryRequest.limit; + marker = collectRemediationExecutionStatusesSummaryRequest.marker; + body = collectRemediationExecutionStatusesSummaryRequest.body + } else { + policyAssignmentId = collectRemediationExecutionStatusesSummaryRequest['policy_assignment_id']; + limit = collectRemediationExecutionStatusesSummaryRequest['limit']; + marker = collectRemediationExecutionStatusesSummaryRequest['marker']; + body = collectRemediationExecutionStatusesSummaryRequest['body']; + } + } + + + if (policyAssignmentId === null || policyAssignmentId === undefined) { + throw new RequiredError('policyAssignmentId','Required parameter policyAssignmentId was null or undefined when calling collectRemediationExecutionStatusesSummary.'); + } + if (limit !== null && limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + if (marker !== null && marker !== undefined) { + localVarQueryParameter['marker'] = marker; + } + localVarHeaderParameter['Content-Type'] = 'application/json'; + + options.data = body !== undefined ? body : {}; + options.queryParams = localVarQueryParameter; + options.pathParams = { 'policy_assignment_id': policyAssignmentId, }; + options.headers = localVarHeaderParameter; + return options; + }, + /** * 创建或更新合规规则修正配置。 * diff --git a/services/config/v1/model/CollectRemediationExecutionStatusesSummaryRequest.ts b/services/config/v1/model/CollectRemediationExecutionStatusesSummaryRequest.ts new file mode 100644 index 000000000..dfd73282f --- /dev/null +++ b/services/config/v1/model/CollectRemediationExecutionStatusesSummaryRequest.ts @@ -0,0 +1,34 @@ +import { RemediationExecutionStatusesSummaryRequestBody } from './RemediationExecutionStatusesSummaryRequestBody'; + + +export class CollectRemediationExecutionStatusesSummaryRequest { + private 'policy_assignment_id'?: string; + public limit?: number; + public marker?: string; + public body?: RemediationExecutionStatusesSummaryRequestBody; + public constructor(policyAssignmentId?: string) { + this['policy_assignment_id'] = policyAssignmentId; + } + public withPolicyAssignmentId(policyAssignmentId: string): CollectRemediationExecutionStatusesSummaryRequest { + this['policy_assignment_id'] = policyAssignmentId; + return this; + } + public set policyAssignmentId(policyAssignmentId: string | undefined) { + this['policy_assignment_id'] = policyAssignmentId; + } + public get policyAssignmentId(): string | undefined { + return this['policy_assignment_id']; + } + public withLimit(limit: number): CollectRemediationExecutionStatusesSummaryRequest { + this['limit'] = limit; + return this; + } + public withMarker(marker: string): CollectRemediationExecutionStatusesSummaryRequest { + this['marker'] = marker; + return this; + } + public withBody(body: RemediationExecutionStatusesSummaryRequestBody): CollectRemediationExecutionStatusesSummaryRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/config/v1/model/CollectRemediationExecutionStatusesSummaryResponse.ts b/services/config/v1/model/CollectRemediationExecutionStatusesSummaryResponse.ts new file mode 100644 index 000000000..235c4ab11 --- /dev/null +++ b/services/config/v1/model/CollectRemediationExecutionStatusesSummaryResponse.ts @@ -0,0 +1,26 @@ +import { PageInfo } from './PageInfo'; +import { RemediationExecutionStatus } from './RemediationExecutionStatus'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class CollectRemediationExecutionStatusesSummaryResponse extends SdkResponse { + public value?: Array; + private 'page_info'?: PageInfo; + public constructor() { + super(); + } + public withValue(value: Array): CollectRemediationExecutionStatusesSummaryResponse { + this['value'] = value; + return this; + } + public withPageInfo(pageInfo: PageInfo): CollectRemediationExecutionStatusesSummaryResponse { + this['page_info'] = pageInfo; + return this; + } + public set pageInfo(pageInfo: PageInfo | undefined) { + this['page_info'] = pageInfo; + } + public get pageInfo(): PageInfo | undefined { + return this['page_info']; + } +} \ No newline at end of file diff --git a/services/config/v1/model/RemediationExecutionStatus.ts b/services/config/v1/model/RemediationExecutionStatus.ts new file mode 100644 index 000000000..40bc5931c --- /dev/null +++ b/services/config/v1/model/RemediationExecutionStatus.ts @@ -0,0 +1,50 @@ +import { RemediationResourceKey } from './RemediationResourceKey'; + + +export class RemediationExecutionStatus { + private 'resource_key'?: RemediationResourceKey; + private 'invocation_time'?: string; + public state?: RemediationExecutionStatusStateEnum | string; + public message?: string; + public constructor() { + } + public withResourceKey(resourceKey: RemediationResourceKey): RemediationExecutionStatus { + this['resource_key'] = resourceKey; + return this; + } + public set resourceKey(resourceKey: RemediationResourceKey | undefined) { + this['resource_key'] = resourceKey; + } + public get resourceKey(): RemediationResourceKey | undefined { + return this['resource_key']; + } + public withInvocationTime(invocationTime: string): RemediationExecutionStatus { + this['invocation_time'] = invocationTime; + return this; + } + public set invocationTime(invocationTime: string | undefined) { + this['invocation_time'] = invocationTime; + } + public get invocationTime(): string | undefined { + return this['invocation_time']; + } + public withState(state: RemediationExecutionStatusStateEnum | string): RemediationExecutionStatus { + this['state'] = state; + return this; + } + public withMessage(message: string): RemediationExecutionStatus { + this['message'] = message; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum RemediationExecutionStatusStateEnum { + IN_QUEUE = 'IN_QUEUE', + IN_PROGRESS = 'IN_PROGRESS', + SUCCEEDED = 'SUCCEEDED', + FAILED = 'FAILED' +} diff --git a/services/config/v1/model/RemediationExecutionStatusesSummaryRequestBody.ts b/services/config/v1/model/RemediationExecutionStatusesSummaryRequestBody.ts new file mode 100644 index 000000000..a7dcc4f0d --- /dev/null +++ b/services/config/v1/model/RemediationExecutionStatusesSummaryRequestBody.ts @@ -0,0 +1,19 @@ +import { RemediationResourceKey } from './RemediationResourceKey'; + + +export class RemediationExecutionStatusesSummaryRequestBody { + private 'resource_keys'?: Array; + public constructor(resourceKeys?: Array) { + this['resource_keys'] = resourceKeys; + } + public withResourceKeys(resourceKeys: Array): RemediationExecutionStatusesSummaryRequestBody { + this['resource_keys'] = resourceKeys; + return this; + } + public set resourceKeys(resourceKeys: Array | undefined) { + this['resource_keys'] = resourceKeys; + } + public get resourceKeys(): Array | undefined { + return this['resource_keys']; + } +} \ No newline at end of file diff --git a/services/config/v1/model/RemediationResourceKey.ts b/services/config/v1/model/RemediationResourceKey.ts new file mode 100644 index 000000000..00f915251 --- /dev/null +++ b/services/config/v1/model/RemediationResourceKey.ts @@ -0,0 +1,42 @@ + + +export class RemediationResourceKey { + private 'resource_id'?: string; + private 'resource_provider'?: string; + private 'resource_type'?: string; + public constructor(resourceId?: string, resourceProvider?: string, resourceType?: string) { + this['resource_id'] = resourceId; + this['resource_provider'] = resourceProvider; + this['resource_type'] = resourceType; + } + public withResourceId(resourceId: string): RemediationResourceKey { + this['resource_id'] = resourceId; + return this; + } + public set resourceId(resourceId: string | undefined) { + this['resource_id'] = resourceId; + } + public get resourceId(): string | undefined { + return this['resource_id']; + } + public withResourceProvider(resourceProvider: string): RemediationResourceKey { + this['resource_provider'] = resourceProvider; + return this; + } + public set resourceProvider(resourceProvider: string | undefined) { + this['resource_provider'] = resourceProvider; + } + public get resourceProvider(): string | undefined { + return this['resource_provider']; + } + public withResourceType(resourceType: string): RemediationResourceKey { + this['resource_type'] = resourceType; + return this; + } + public set resourceType(resourceType: string | undefined) { + this['resource_type'] = resourceType; + } + public get resourceType(): string | undefined { + return this['resource_type']; + } +} \ No newline at end of file diff --git a/services/config/v1/public-api.ts b/services/config/v1/public-api.ts index 8a73d2e61..743b852af 100644 --- a/services/config/v1/public-api.ts +++ b/services/config/v1/public-api.ts @@ -25,6 +25,8 @@ export * from './model/CollectAllResourcesSummaryRequest'; export * from './model/CollectAllResourcesSummaryResponse'; export * from './model/CollectConformancePackComplianceSummaryRequest'; export * from './model/CollectConformancePackComplianceSummaryResponse'; +export * from './model/CollectRemediationExecutionStatusesSummaryRequest'; +export * from './model/CollectRemediationExecutionStatusesSummaryResponse'; export * from './model/CollectTrackedResourcesSummaryRequest'; export * from './model/CollectTrackedResourcesSummaryResponse'; export * from './model/Compliance'; @@ -182,6 +184,9 @@ export * from './model/RemediationConfigurationRequestBody'; export * from './model/RemediationException'; export * from './model/RemediationExceptionRequest'; export * from './model/RemediationExecution'; +export * from './model/RemediationExecutionStatus'; +export * from './model/RemediationExecutionStatusesSummaryRequestBody'; +export * from './model/RemediationResourceKey'; export * from './model/RemediationResourceParameter'; export * from './model/RemediationRunRequestBody'; export * from './model/RemediationStaticParameter'; diff --git a/services/dcs/v2/DcsClient.ts b/services/dcs/v2/DcsClient.ts index 7f5fdb84a..2b512c0cf 100644 --- a/services/dcs/v2/DcsClient.ts +++ b/services/dcs/v2/DcsClient.ts @@ -21,6 +21,10 @@ import { BatchDeleteBody } from './model/BatchDeleteBody'; import { BatchDeleteInstancesRequest } from './model/BatchDeleteInstancesRequest'; import { BatchDeleteInstancesResponse } from './model/BatchDeleteInstancesResponse'; import { BatchOpsResult } from './model/BatchOpsResult'; +import { BatchRestartMigrationTaskResult } from './model/BatchRestartMigrationTaskResult'; +import { BatchRestartOnlineMigrationTasksBody } from './model/BatchRestartOnlineMigrationTasksBody'; +import { BatchRestartOnlineMigrationTasksRequest } from './model/BatchRestartOnlineMigrationTasksRequest'; +import { BatchRestartOnlineMigrationTasksResponse } from './model/BatchRestartOnlineMigrationTasksResponse'; import { BatchShowNodesInformationRequest } from './model/BatchShowNodesInformationRequest'; import { BatchShowNodesInformationResponse } from './model/BatchShowNodesInformationResponse'; import { BatchStopMigrationTasksBody } from './model/BatchStopMigrationTasksBody'; @@ -409,6 +413,25 @@ export class DcsClient { return this.hcClient.sendRequest(options); } + /** + * 批量重启在线迁移任务,接口响应成功,返回重启在线迁移任务下发结果。 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 批量重启在线迁移任务 + * @param {BatchRestartOnlineMigrationTasksBody} restartMigrationTasksRequestBody 迁移任务ID列表。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public batchRestartOnlineMigrationTasks(batchRestartOnlineMigrationTasksRequest?: BatchRestartOnlineMigrationTasksRequest): Promise { + const options = ParamCreater().batchRestartOnlineMigrationTasks(batchRestartOnlineMigrationTasksRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + /** * 批量查询指定项目所有实例的节点信息、有效实例个数及节点个数。 * 创建中实例不返回节点信息。 @@ -2838,6 +2861,44 @@ export const ParamCreater = function () { return options; }, + /** + * 批量重启在线迁移任务,接口响应成功,返回重启在线迁移任务下发结果。 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + batchRestartOnlineMigrationTasks(batchRestartOnlineMigrationTasksRequest?: BatchRestartOnlineMigrationTasksRequest) { + const options = { + method: "POST", + url: "/v2/{project_id}/migration-tasks/batch-restart", + contentType: "application/json;charset=UTF-8", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let body: any; + + if (batchRestartOnlineMigrationTasksRequest !== null && batchRestartOnlineMigrationTasksRequest !== undefined) { + if (batchRestartOnlineMigrationTasksRequest instanceof BatchRestartOnlineMigrationTasksRequest) { + body = batchRestartOnlineMigrationTasksRequest.body + } else { + body = batchRestartOnlineMigrationTasksRequest['body']; + } + } + + + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8'; + + options.data = body !== undefined ? body : {}; + options.headers = localVarHeaderParameter; + return options; + }, + /** * 批量查询指定项目所有实例的节点信息、有效实例个数及节点个数。 * 创建中实例不返回节点信息。 diff --git a/services/dcs/v2/model/BatchRestartMigrationTaskResult.ts b/services/dcs/v2/model/BatchRestartMigrationTaskResult.ts new file mode 100644 index 000000000..263e333ea --- /dev/null +++ b/services/dcs/v2/model/BatchRestartMigrationTaskResult.ts @@ -0,0 +1,53 @@ + + +export class BatchRestartMigrationTaskResult { + public result?: BatchRestartMigrationTaskResultResultEnum | string; + private 'task_id'?: string; + private 'error_msg'?: string; + private 'error_code'?: string; + public constructor() { + } + public withResult(result: BatchRestartMigrationTaskResultResultEnum | string): BatchRestartMigrationTaskResult { + this['result'] = result; + return this; + } + public withTaskId(taskId: string): BatchRestartMigrationTaskResult { + this['task_id'] = taskId; + return this; + } + public set taskId(taskId: string | undefined) { + this['task_id'] = taskId; + } + public get taskId(): string | undefined { + return this['task_id']; + } + public withErrorMsg(errorMsg: string): BatchRestartMigrationTaskResult { + this['error_msg'] = errorMsg; + return this; + } + public set errorMsg(errorMsg: string | undefined) { + this['error_msg'] = errorMsg; + } + public get errorMsg(): string | undefined { + return this['error_msg']; + } + public withErrorCode(errorCode: string): BatchRestartMigrationTaskResult { + this['error_code'] = errorCode; + return this; + } + public set errorCode(errorCode: string | undefined) { + this['error_code'] = errorCode; + } + public get errorCode(): string | undefined { + return this['error_code']; + } +} + +/** + * @export + * @enum {string} + */ +export enum BatchRestartMigrationTaskResultResultEnum { + SUCCESS = 'success', + FAILED = 'failed' +} diff --git a/services/dcs/v2/model/BatchRestartOnlineMigrationTasksBody.ts b/services/dcs/v2/model/BatchRestartOnlineMigrationTasksBody.ts new file mode 100644 index 000000000..4cccd4651 --- /dev/null +++ b/services/dcs/v2/model/BatchRestartOnlineMigrationTasksBody.ts @@ -0,0 +1,19 @@ +import { BatchStopMigrationTasksBody } from './BatchStopMigrationTasksBody'; + + +export class BatchRestartOnlineMigrationTasksBody { + private 'migration_tasks'?: Array; + public constructor(migrationTasks?: Array) { + this['migration_tasks'] = migrationTasks; + } + public withMigrationTasks(migrationTasks: Array): BatchRestartOnlineMigrationTasksBody { + this['migration_tasks'] = migrationTasks; + return this; + } + public set migrationTasks(migrationTasks: Array | undefined) { + this['migration_tasks'] = migrationTasks; + } + public get migrationTasks(): Array | undefined { + return this['migration_tasks']; + } +} \ No newline at end of file diff --git a/services/dcs/v2/model/BatchRestartOnlineMigrationTasksRequest.ts b/services/dcs/v2/model/BatchRestartOnlineMigrationTasksRequest.ts new file mode 100644 index 000000000..7d0f524ac --- /dev/null +++ b/services/dcs/v2/model/BatchRestartOnlineMigrationTasksRequest.ts @@ -0,0 +1,12 @@ +import { BatchRestartOnlineMigrationTasksBody } from './BatchRestartOnlineMigrationTasksBody'; + + +export class BatchRestartOnlineMigrationTasksRequest { + public body?: BatchRestartOnlineMigrationTasksBody; + public constructor() { + } + public withBody(body: BatchRestartOnlineMigrationTasksBody): BatchRestartOnlineMigrationTasksRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/dcs/v2/model/BatchRestartOnlineMigrationTasksResponse.ts b/services/dcs/v2/model/BatchRestartOnlineMigrationTasksResponse.ts new file mode 100644 index 000000000..15d9745e0 --- /dev/null +++ b/services/dcs/v2/model/BatchRestartOnlineMigrationTasksResponse.ts @@ -0,0 +1,20 @@ +import { BatchRestartMigrationTaskResult } from './BatchRestartMigrationTaskResult'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class BatchRestartOnlineMigrationTasksResponse extends SdkResponse { + private 'migration_tasks'?: Array; + public constructor() { + super(); + } + public withMigrationTasks(migrationTasks: Array): BatchRestartOnlineMigrationTasksResponse { + this['migration_tasks'] = migrationTasks; + return this; + } + public set migrationTasks(migrationTasks: Array | undefined) { + this['migration_tasks'] = migrationTasks; + } + public get migrationTasks(): Array | undefined { + return this['migration_tasks']; + } +} \ No newline at end of file diff --git a/services/dcs/v2/model/StopMigrationTaskResult.ts b/services/dcs/v2/model/StopMigrationTaskResult.ts index c82c5fdfe..6ffb13916 100644 --- a/services/dcs/v2/model/StopMigrationTaskResult.ts +++ b/services/dcs/v2/model/StopMigrationTaskResult.ts @@ -3,6 +3,8 @@ export class StopMigrationTaskResult { public result?: StopMigrationTaskResultResultEnum | string; private 'task_id'?: string; + private 'error_msg'?: string; + private 'error_code'?: string; public constructor() { } public withResult(result: StopMigrationTaskResultResultEnum | string): StopMigrationTaskResult { @@ -19,6 +21,26 @@ export class StopMigrationTaskResult { public get taskId(): string | undefined { return this['task_id']; } + public withErrorMsg(errorMsg: string): StopMigrationTaskResult { + this['error_msg'] = errorMsg; + return this; + } + public set errorMsg(errorMsg: string | undefined) { + this['error_msg'] = errorMsg; + } + public get errorMsg(): string | undefined { + return this['error_msg']; + } + public withErrorCode(errorCode: string): StopMigrationTaskResult { + this['error_code'] = errorCode; + return this; + } + public set errorCode(errorCode: string | undefined) { + this['error_code'] = errorCode; + } + public get errorCode(): string | undefined { + return this['error_code']; + } } /** diff --git a/services/dcs/v2/public-api.ts b/services/dcs/v2/public-api.ts index bf9c65cf8..149f2d1e6 100644 --- a/services/dcs/v2/public-api.ts +++ b/services/dcs/v2/public-api.ts @@ -19,6 +19,10 @@ export * from './model/BatchDeleteBody'; export * from './model/BatchDeleteInstancesRequest'; export * from './model/BatchDeleteInstancesResponse'; export * from './model/BatchOpsResult'; +export * from './model/BatchRestartMigrationTaskResult'; +export * from './model/BatchRestartOnlineMigrationTasksBody'; +export * from './model/BatchRestartOnlineMigrationTasksRequest'; +export * from './model/BatchRestartOnlineMigrationTasksResponse'; export * from './model/BatchShowNodesInformationRequest'; export * from './model/BatchShowNodesInformationResponse'; export * from './model/BatchStopMigrationTasksBody'; diff --git a/services/dli/v1/model/Queue.ts b/services/dli/v1/model/Queue.ts index 72d2b6f0c..4005f85f9 100644 --- a/services/dli/v1/model/Queue.ts +++ b/services/dli/v1/model/Queue.ts @@ -24,6 +24,14 @@ export class Queue { private 'cu_scale_out_limit'?: number; private 'cu_scale_in_limit'?: number; private 'elastic_resource_pool_name'?: string; + private 'support_spark_versions'?: Array; + private 'default_spark_version'?: string; + private 'support_hetu_engine_versions'?: Array; + private 'default_hetu_engine_version'?: string; + private 'support_flink_sql_versions'?: Array; + private 'default_flink_sql_version'?: string; + private 'support_flink_jar_versions'?: Array; + private 'default_flink_jar_version'?: string; public constructor() { } public withQueueId(queueId: number): Queue { @@ -226,4 +234,84 @@ export class Queue { public get elasticResourcePoolName(): string | undefined { return this['elastic_resource_pool_name']; } + public withSupportSparkVersions(supportSparkVersions: Array): Queue { + this['support_spark_versions'] = supportSparkVersions; + return this; + } + public set supportSparkVersions(supportSparkVersions: Array | undefined) { + this['support_spark_versions'] = supportSparkVersions; + } + public get supportSparkVersions(): Array | undefined { + return this['support_spark_versions']; + } + public withDefaultSparkVersion(defaultSparkVersion: string): Queue { + this['default_spark_version'] = defaultSparkVersion; + return this; + } + public set defaultSparkVersion(defaultSparkVersion: string | undefined) { + this['default_spark_version'] = defaultSparkVersion; + } + public get defaultSparkVersion(): string | undefined { + return this['default_spark_version']; + } + public withSupportHetuEngineVersions(supportHetuEngineVersions: Array): Queue { + this['support_hetu_engine_versions'] = supportHetuEngineVersions; + return this; + } + public set supportHetuEngineVersions(supportHetuEngineVersions: Array | undefined) { + this['support_hetu_engine_versions'] = supportHetuEngineVersions; + } + public get supportHetuEngineVersions(): Array | undefined { + return this['support_hetu_engine_versions']; + } + public withDefaultHetuEngineVersion(defaultHetuEngineVersion: string): Queue { + this['default_hetu_engine_version'] = defaultHetuEngineVersion; + return this; + } + public set defaultHetuEngineVersion(defaultHetuEngineVersion: string | undefined) { + this['default_hetu_engine_version'] = defaultHetuEngineVersion; + } + public get defaultHetuEngineVersion(): string | undefined { + return this['default_hetu_engine_version']; + } + public withSupportFlinkSqlVersions(supportFlinkSqlVersions: Array): Queue { + this['support_flink_sql_versions'] = supportFlinkSqlVersions; + return this; + } + public set supportFlinkSqlVersions(supportFlinkSqlVersions: Array | undefined) { + this['support_flink_sql_versions'] = supportFlinkSqlVersions; + } + public get supportFlinkSqlVersions(): Array | undefined { + return this['support_flink_sql_versions']; + } + public withDefaultFlinkSqlVersion(defaultFlinkSqlVersion: string): Queue { + this['default_flink_sql_version'] = defaultFlinkSqlVersion; + return this; + } + public set defaultFlinkSqlVersion(defaultFlinkSqlVersion: string | undefined) { + this['default_flink_sql_version'] = defaultFlinkSqlVersion; + } + public get defaultFlinkSqlVersion(): string | undefined { + return this['default_flink_sql_version']; + } + public withSupportFlinkJarVersions(supportFlinkJarVersions: Array): Queue { + this['support_flink_jar_versions'] = supportFlinkJarVersions; + return this; + } + public set supportFlinkJarVersions(supportFlinkJarVersions: Array | undefined) { + this['support_flink_jar_versions'] = supportFlinkJarVersions; + } + public get supportFlinkJarVersions(): Array | undefined { + return this['support_flink_jar_versions']; + } + public withDefaultFlinkJarVersion(defaultFlinkJarVersion: string): Queue { + this['default_flink_jar_version'] = defaultFlinkJarVersion; + return this; + } + public set defaultFlinkJarVersion(defaultFlinkJarVersion: string | undefined) { + this['default_flink_jar_version'] = defaultFlinkJarVersion; + } + public get defaultFlinkJarVersion(): string | undefined { + return this['default_flink_jar_version']; + } } \ No newline at end of file diff --git a/services/dli/v1/model/ShowQueueResponse.ts b/services/dli/v1/model/ShowQueueResponse.ts index 5b2cd4d15..d43877fb3 100644 --- a/services/dli/v1/model/ShowQueueResponse.ts +++ b/services/dli/v1/model/ShowQueueResponse.ts @@ -20,6 +20,14 @@ export class ShowQueueResponse extends SdkResponse { private 'cu_scale_out_limit'?: number; private 'cu_scale_in_limit'?: number; private 'elastic_resource_pool_name'?: string; + private 'support_spark_versions'?: Array; + private 'default_spark_version'?: string; + private 'support_hetu_engine_versions'?: Array; + private 'default_hetu_engine_version'?: string; + private 'support_flink_sql_versions'?: Array; + private 'default_flink_sql_version'?: string; + private 'support_flink_jar_versions'?: Array; + private 'default_flink_jar_version'?: string; public constructor() { super(); } @@ -161,4 +169,84 @@ export class ShowQueueResponse extends SdkResponse { public get elasticResourcePoolName(): string | undefined { return this['elastic_resource_pool_name']; } + public withSupportSparkVersions(supportSparkVersions: Array): ShowQueueResponse { + this['support_spark_versions'] = supportSparkVersions; + return this; + } + public set supportSparkVersions(supportSparkVersions: Array | undefined) { + this['support_spark_versions'] = supportSparkVersions; + } + public get supportSparkVersions(): Array | undefined { + return this['support_spark_versions']; + } + public withDefaultSparkVersion(defaultSparkVersion: string): ShowQueueResponse { + this['default_spark_version'] = defaultSparkVersion; + return this; + } + public set defaultSparkVersion(defaultSparkVersion: string | undefined) { + this['default_spark_version'] = defaultSparkVersion; + } + public get defaultSparkVersion(): string | undefined { + return this['default_spark_version']; + } + public withSupportHetuEngineVersions(supportHetuEngineVersions: Array): ShowQueueResponse { + this['support_hetu_engine_versions'] = supportHetuEngineVersions; + return this; + } + public set supportHetuEngineVersions(supportHetuEngineVersions: Array | undefined) { + this['support_hetu_engine_versions'] = supportHetuEngineVersions; + } + public get supportHetuEngineVersions(): Array | undefined { + return this['support_hetu_engine_versions']; + } + public withDefaultHetuEngineVersion(defaultHetuEngineVersion: string): ShowQueueResponse { + this['default_hetu_engine_version'] = defaultHetuEngineVersion; + return this; + } + public set defaultHetuEngineVersion(defaultHetuEngineVersion: string | undefined) { + this['default_hetu_engine_version'] = defaultHetuEngineVersion; + } + public get defaultHetuEngineVersion(): string | undefined { + return this['default_hetu_engine_version']; + } + public withSupportFlinkSqlVersions(supportFlinkSqlVersions: Array): ShowQueueResponse { + this['support_flink_sql_versions'] = supportFlinkSqlVersions; + return this; + } + public set supportFlinkSqlVersions(supportFlinkSqlVersions: Array | undefined) { + this['support_flink_sql_versions'] = supportFlinkSqlVersions; + } + public get supportFlinkSqlVersions(): Array | undefined { + return this['support_flink_sql_versions']; + } + public withDefaultFlinkSqlVersion(defaultFlinkSqlVersion: string): ShowQueueResponse { + this['default_flink_sql_version'] = defaultFlinkSqlVersion; + return this; + } + public set defaultFlinkSqlVersion(defaultFlinkSqlVersion: string | undefined) { + this['default_flink_sql_version'] = defaultFlinkSqlVersion; + } + public get defaultFlinkSqlVersion(): string | undefined { + return this['default_flink_sql_version']; + } + public withSupportFlinkJarVersions(supportFlinkJarVersions: Array): ShowQueueResponse { + this['support_flink_jar_versions'] = supportFlinkJarVersions; + return this; + } + public set supportFlinkJarVersions(supportFlinkJarVersions: Array | undefined) { + this['support_flink_jar_versions'] = supportFlinkJarVersions; + } + public get supportFlinkJarVersions(): Array | undefined { + return this['support_flink_jar_versions']; + } + public withDefaultFlinkJarVersion(defaultFlinkJarVersion: string): ShowQueueResponse { + this['default_flink_jar_version'] = defaultFlinkJarVersion; + return this; + } + public set defaultFlinkJarVersion(defaultFlinkJarVersion: string | undefined) { + this['default_flink_jar_version'] = defaultFlinkJarVersion; + } + public get defaultFlinkJarVersion(): string | undefined { + return this['default_flink_jar_version']; + } } \ No newline at end of file diff --git a/services/eip/v2/model/UpdatePrePaidBandwidthExtendParamOption.ts b/services/eip/v2/model/UpdatePrePaidBandwidthExtendParamOption.ts index 51901a827..5626f52cf 100644 --- a/services/eip/v2/model/UpdatePrePaidBandwidthExtendParamOption.ts +++ b/services/eip/v2/model/UpdatePrePaidBandwidthExtendParamOption.ts @@ -1,9 +1,31 @@ export class UpdatePrePaidBandwidthExtendParamOption { + private 'period_type'?: UpdatePrePaidBandwidthExtendParamOptionPeriodTypeEnum | string; + private 'period_num'?: number; private 'is_auto_pay'?: boolean; public constructor() { } + public withPeriodType(periodType: UpdatePrePaidBandwidthExtendParamOptionPeriodTypeEnum | string): UpdatePrePaidBandwidthExtendParamOption { + this['period_type'] = periodType; + return this; + } + public set periodType(periodType: UpdatePrePaidBandwidthExtendParamOptionPeriodTypeEnum | string | undefined) { + this['period_type'] = periodType; + } + public get periodType(): UpdatePrePaidBandwidthExtendParamOptionPeriodTypeEnum | string | undefined { + return this['period_type']; + } + public withPeriodNum(periodNum: number): UpdatePrePaidBandwidthExtendParamOption { + this['period_num'] = periodNum; + return this; + } + public set periodNum(periodNum: number | undefined) { + this['period_num'] = periodNum; + } + public get periodNum(): number | undefined { + return this['period_num']; + } public withIsAutoPay(isAutoPay: boolean): UpdatePrePaidBandwidthExtendParamOption { this['is_auto_pay'] = isAutoPay; return this; @@ -14,4 +36,13 @@ export class UpdatePrePaidBandwidthExtendParamOption { public get isAutoPay(): boolean | undefined { return this['is_auto_pay']; } -} \ No newline at end of file +} + +/** + * @export + * @enum {string} + */ +export enum UpdatePrePaidBandwidthExtendParamOptionPeriodTypeEnum { + MONTH = 'month', + YEAR = 'year' +} diff --git a/services/eip/v3/model/InstanceVnicResp.ts b/services/eip/v3/model/InstanceVnicResp.ts index 8cbf36013..3ad7c52df 100644 --- a/services/eip/v3/model/InstanceVnicResp.ts +++ b/services/eip/v3/model/InstanceVnicResp.ts @@ -8,7 +8,7 @@ export class InstanceVnicResp { private 'port_id'?: string; public mac?: string; public vtep?: string; - public vni?: number; + public vni?: string; private 'instance_id'?: string; private 'instance_type'?: string; private 'port_profile'?: string; @@ -72,7 +72,7 @@ export class InstanceVnicResp { this['vtep'] = vtep; return this; } - public withVni(vni: number): InstanceVnicResp { + public withVni(vni: string): InstanceVnicResp { this['vni'] = vni; return this; } diff --git a/services/elb/v3/ElbClient.ts b/services/elb/v3/ElbClient.ts index 0ddbc734b..15ce4ee4e 100644 --- a/services/elb/v3/ElbClient.ts +++ b/services/elb/v3/ElbClient.ts @@ -385,7 +385,7 @@ export class ElbClient { * Please refer to HUAWEI cloud API Explorer for details. * * @summary 批量创建后端服务器 - * @param {string} poolId 后端服务器组ID。 + * @param {string} poolId 参数解释:后端服务器组ID。 * @param {BatchCreateMembersRequestBody} batchCreateMembersRequestBody This is a auto create Body Object * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -405,7 +405,7 @@ export class ElbClient { * Please refer to HUAWEI cloud API Explorer for details. * * @summary 批量删除后端服务器 - * @param {string} poolId 后端服务器组ID。 + * @param {string} poolId 参数解释:后端服务器组ID。 * @param {BatchDeleteMembersRequestBody} batchDeleteMembersRequestBody This is a auto create Body Object * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -446,7 +446,7 @@ export class ElbClient { * Please refer to HUAWEI cloud API Explorer for details. * * @summary 批量更新后端服务器 - * @param {string} poolId 后端服务器组ID。 + * @param {string} poolId 参数解释:后端服务器组ID。 * @param {BatchUpdateMembersRequestBody} batchUpdateMembersRequestBody This is a auto create Body Object * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -583,7 +583,7 @@ export class ElbClient { * Please refer to HUAWEI cloud API Explorer for details. * * @summary 创建转发规则 - * @param {string} l7policyId 转发策略ID。 + * @param {string} l7policyId 参数解释:转发策略ID。 * @param {CreateL7RuleRequestBody} createL7RuleRequestBody This is a auto create Body Object * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -626,7 +626,7 @@ export class ElbClient { * 6. 若要创建网络型负载均衡器,则需要传入l4_flavor_id(网络型规格ID);若要创建应用型负载均衡器,则需要传入l7_flavor_id(应用型规格ID);若要创建网络型+应用型负载均衡器,则需要传入l4_flavor_id和l7_flavor_id。 * 7. 若要创建包周期负载均衡器,则需要传入prepaid_options,否则创建按需计费负载均衡器。 * 8. 按需计费分为固定规格计费和弹性规格计费,根据创建时所选规格的类型决定计费方式。具体规格说明见创建LB请求参数l4_flavor_id和l7_flavor_id。 - * [9.若要创建gateway类型的负载均衡器,指定loadbalancer_type=“gateway”,不支持指定vip_address,ipv6_vip_address, 不支持公网类型。如果要指定规格,则从请求参数gw_flavor_id传入。](tag:hws_eu) + * [9.若要创建gateway类型的负载均衡器,指定loadbalancer_type=“gateway”,不支持指定vip_address,ipv6_vip_address;vip_subnet_cidr_id和ipv6_subnet_cidr_id两者不能同时为空,如果两者都传入,必须属于同一子网。 不支持公网类型。如果要指定规格,则从请求参数gw_flavor_id传入。](tag:hws_eu) * * Please refer to HUAWEI cloud API Explorer for details. * @@ -688,7 +688,7 @@ export class ElbClient { * Please refer to HUAWEI cloud API Explorer for details. * * @summary 创建后端服务器 - * @param {string} poolId 后端服务器组ID。 + * @param {string} poolId 参数解释:后端服务器组ID。 * @param {CreateMemberRequestBody} createMemberRequestBody This is a auto create Body Object * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -786,7 +786,7 @@ export class ElbClient { * Please refer to HUAWEI cloud API Explorer for details. * * @summary 删除转发策略 - * @param {string} l7policyId 转发策略ID。 + * @param {string} l7policyId 参数解释:转发策略ID。 * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -920,7 +920,7 @@ export class ElbClient { * Please refer to HUAWEI cloud API Explorer for details. * * @summary 删除主备后端服务器组 - * @param {string} poolId 后端服务器组ID。 + * @param {string} poolId 参数解释:后端服务器组ID。 * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -939,7 +939,7 @@ export class ElbClient { * Please refer to HUAWEI cloud API Explorer for details. * * @summary 删除后端服务器 - * @param {string} poolId 后端服务器组ID。 + * @param {string} poolId 参数解释:后端服务器组ID。 * @param {string} memberId 后端服务器ID。 >说明: 此处并非ECS服务器的ID,而是ELB为绑定的后端服务器自动生成的member ID。 member ID可以通过[查询后端云服务器列表](ListMembers.xml)获取。 * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -959,7 +959,7 @@ export class ElbClient { * Please refer to HUAWEI cloud API Explorer for details. * * @summary 删除后端服务器组 - * @param {string} poolId 后端服务器组ID。 + * @param {string} poolId 参数解释:后端服务器组ID。 * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1038,7 +1038,7 @@ export class ElbClient { * Please refer to HUAWEI cloud API Explorer for details. * * @summary 查询可用区列表 - * @param {string} [publicBorderGroup] AZ组。 + * @param {string} [publicBorderGroup] 参数解释:AZ组。 * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1088,10 +1088,10 @@ export class ElbClient { * @summary 查询规格列表 * @param {string} [marker] 参数解释:上一页最后一条记录的ID。 使用说明: - 必须与limit一起使用。 - 不指定时表示查询第一页。 - 该字段不允许为空或无效的ID。 * @param {number} [limit] 参数解释:每页返回的个数。 取值范围:0-2000 默认取值:2000 - * @param {boolean} [pageReverse] 参数解释:是否反向查询。 取值: - true:查询上一页。 - false:查询下一页,默认。 使用说明: - 必须与limit一起使用。 - 当page_reverse=true时,若要查询上一页,marker取值为当前页返回值的previous_marker。 + * @param {boolean} [pageReverse] 参数解释:是否反向查询。 约束限制: - 必须与limit一起使用。 - 当page_reverse=true时,若要查询上一页,marker取值为当前页返回值的previous_marker。 取值范围: - true:查询上一页。 - false:查询下一页,默认。 * @param {Array} [id] 参数解释:规格ID。 支持多值查询,查询条件格式:*id=xxx&id=xxx*。 - * @param {Array} [name] 参数解释:规格名称。 支持多值查询,查询条件格式:*name=xxx&name=xxx*。 - * @param {Array} [type] 参数解释:规格类别。 取值: - L4和L7 表示四层网络型和七层应用型flavor。 [- gateway 表示网关型LB的flavor,目前只支持弹性计费类型。当前仅支持欧洲局点。](tag:hws_eu) - L4_elastic和L7_elastic 表示弹性扩缩容实例的下限规格。 - L4_elastic_max、L7_elastic_max[和gateway_elastic_max](tag:hws_eu) 表示弹性扩缩容实例的上限规格。 支持多值查询,查询条件格式:*type=xxx&type=xxx*。 + * @param {Array} [name] 参数解释:规格名称。 支持多值查询,查询条件格式:*name=xxx&name=xxx*。 + * @param {Array} [type] 参数解释:规格类别。 取值范围: - L4和L7 表示四层网络型和七层应用型flavor。 [- gateway 表示网关型LB的flavor,目前只支持弹性计费类型。当前仅支持欧洲局点。](tag:hws_eu) - L4_elastic和L7_elastic 表示弹性扩缩容实例的下限规格。 - L4_elastic_max、L7_elastic_max[和gateway_elastic_max](tag:hws_eu) 表示弹性扩缩容实例的上限规格。 支持多值查询,查询条件格式:*type=xxx&type=xxx*。 * @param {boolean} [shared] 参数解释:是否查询公共规格。 取值范围:true表示公共规格,所有租户可见。false表示私有规格,为当前租户所有。 * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -1120,11 +1120,11 @@ export class ElbClient { * @param {Array} [name] 健康检查名称。 支持多值查询,查询条件格式:*name=xxx&name=xxx*。 * @param {Array} [delay] 健康检查间隔。 取值:1-50s。 支持多值查询,查询条件格式:*delay=xxx&delay=xxx*。 * @param {Array} [maxRetries] 健康检查连续成功多少次后,将后端服务器的健康检查状态由OFFLINE判定为ONLINE。取值范围:1-10。 支持多值查询,查询条件格式:*******max_retries=xxx&max_retries=xxx*******。 - * @param {boolean} [adminStateUp] 健康检查的管理状态。 取值: - true:表示开启健康检查,默认为true。 - false表示关闭健康检查。 + * @param {boolean} [adminStateUp] 参数解释:健康检查的管理状态。 取值范围: - true:表示开启健康检查。 - false表示关闭健康检查。 * @param {Array} [maxRetriesDown] 健康检查连续失败多少次后,将后端服务器的健康检查状态由ONLINE判定为OFFLINE。取值范围:1-10。 支持多值查询,查询条件格式:******max_retries_down=xxx&max_retries_down=xxx******。 * @param {number} [timeout] 一次健康检查请求的超时时间。 - * @param {Array} [type] 健康检查请求协议。 取值:TCP、UDP_CONNECT、HTTP、HTTPS、TLS和GRPC。 支持多值查询,查询条件格式:*****type=xxx&type=xxx*****。 - * @param {Array} [expectedCodes] 期望响应状态码。 取值: - 单值:单个返回码,例如200。 - 列表:多个特定返回码,例如200,202。 - 区间:一个返回码区间,例如200-204。 默认值:200。 仅支持HTTP/HTTPS/GRPC设置该字段,其他协议设置不会生效。 支持多值查询,查询条件格式:****expected_codes=xxx&expected_codes=xxx****。 + * @param {Array} [type] 健康检查请求协议。 取值:TCP、UDP_CONNECT、HTTP、HTTPS、TLS和gRPC。 支持多值查询,查询条件格式:*****type=xxx&type=xxx*****。 + * @param {Array} [expectedCodes] 期望响应状态码。 取值: - 单值:单个返回码,例如200。 - 列表:多个特定返回码,例如200,202。 - 区间:一个返回码区间,例如200-204。 默认值:200。 仅支持HTTP/HTTPS/gRPC设置该字段,其他协议设置不会生效。 支持多值查询,查询条件格式:****expected_codes=xxx&expected_codes=xxx****。 * @param {Array} [urlPath] 健康检查测试member健康时发送的http请求路径。默认为“/”。 使用说明:以“/”开头。当type为HTTP/HTTPS时生效。 支持多值查询,查询条件格式:***url_path=xxx&url_path=xxx***。 * @param {Array} [httpMethod] HTTP请求方法。 取值:GET、HEAD、POST。 支持多值查询,查询条件格式:**http_method=xxx&http_method=xxx**。 * @param {Array} [enterpriseProjectId] 企业项目ID。不传时查询default企业项目\"0\"下的资源,鉴权按照default企业项目鉴权; 如果传值,则传已存在的企业项目ID或all_granted_eps(表示查询所有企业项目)进行查询。 支持多值查询,查询条件格式: *enterprise_project_id=xxx&enterprise_project_id=xxx*。 [不支持该字段,请勿使用。](tag:dt,dt_test,hcso_dt) @@ -1146,23 +1146,23 @@ export class ElbClient { * Please refer to HUAWEI cloud API Explorer for details. * * @summary 查询转发策略列表 - * @param {string} [marker] 上一页最后一条记录的ID。 使用说明: - 必须与limit一起使用。 - 不指定时表示查询第一页。 - 该字段不允许为空或无效的ID。 + * @param {string} [marker] 参数解释:上一页最后一条记录的ID。 约束限制: - 必须与limit一起使用。 - 不指定时表示查询第一页。 - 该字段不允许为空或无效的ID。 * @param {number} [limit] 参数解释:每页返回的个数。 取值范围:0-2000 默认取值:2000 - * @param {boolean} [pageReverse] 是否反向查询。 取值: - true:查询上一页。 - false:查询下一页,默认。 使用说明: - 必须与limit一起使用。 - 当page_reverse=true时,若要查询上一页,marker取值为当前页返回值的previous_marker。 - * @param {Array} [enterpriseProjectId] 企业项目ID。不传时查询default企业项目\"0\"下的资源,鉴权按照default企业项目鉴权; 如果传值,则传已存在的企业项目ID或all_granted_eps(表示查询所有企业项目)进行查询。 支持多值查询,查询条件格式: *enterprise_project_id=xxx&enterprise_project_id=xxx*。 [不支持该字段,请勿使用。](tag:dt,dt_test,hcso_dt) - * @param {Array} [id] 转发策略ID。 支持多值查询,查询条件格式:*id=xxx&id=xxx*。 - * @param {Array} [name] 转发策略名称。 支持多值查询,查询条件格式:**name=xxx&name=xxx**。 - * @param {Array} [description] 转发策略额描述信息。 支持多值查询,查询条件格式:*description=xxx&description=xxx*。 - * @param {boolean} [adminStateUp] 转发策略的管理状态,默认为true。 不支持该字段,请勿使用。 - * @param {Array} [listenerId] 转发策略所属的监听器ID。 支持多值查询,查询条件格式:*******listener_id=xxx&listener_id=xxx*******。 - * @param {Array} [position] 转发策略的优先级。 支持多值查询,查询条件格式:****position=xxx&position=xxx****。 不支持该字段,请勿使用。 - * @param {Array} [action] 转发策略的转发动作。 取值: - REDIRECT_TO_POOL:转发到后端云服务器组。 - REDIRECT_TO_LISTENER:重定向到监听器。 - REDIRECT_TO_URL:重定向到URL。 - FIXED_RESPONSE:返回固定响应体。 支持多值查询,查询条件格式:*****action=xxx&action=xxx*****。 [不支持REDIRECT_TO_URL和FIXED_RESPONSE](tag:hcso_dt) - * @param {Array} [redirectUrl] 转发到的url。必须满足格式: protocol://host:port/path?query。 支持多值查询,查询条件格式:****redirect_url=xxx&redirect_url=xxx****。 不支持该字段,请勿使用。 - * @param {Array} [redirectPoolId] 转发到pool的ID。 支持多值查询,查询条件格式:***redirect_pool_id=xxx&redirect_pool_id=xxx***。 - * @param {Array} [redirectListenerId] 转发到的listener的ID。 支持多值查询,查询条件格式:**redirect_listener_id=xxx&redirect_listener_id=xxx**。 - * @param {Array} [provisioningStatus] 转发策略的配置状态。 取值范围: - ACTIVE: 默认值,表示正常。 - ERROR: 表示当前策略与同一监听器下的其他策略存在相同的规则配置。 支持多值查询,查询条件格式:*provisioning_status=xxx&provisioning_status=xxx*。 - * @param {boolean} [displayAllRules] 是否显示转发策略下的rule详细信息。 取值: - true:显示policy下面的rule的详细信息。 - false:只显示policy下面的rule的id信息 - * @param {Array} [priority] 转发策略的优先级。数值越小,优先级越高。 支持多值查询,查询条件格式:*priority=xxx&priority=xxx*。 [不支持该字段,请勿使用。](tag:hcso_dt) + * @param {boolean} [pageReverse] 参数解释:是否反向查询。 约束限制: - 必须与limit一起使用。 - 当page_reverse=true时,若要查询上一页,marker取值为当前页返回值的previous_marker。 取值范围: - true:查询上一页。 - false:查询下一页。 默认取值:false + * @param {Array} [enterpriseProjectId] 参数解释:企业项目ID。不传时查询default企业项目\"0\"下的资源,鉴权按照default企业项目鉴权。 如果传值,则传已存在的企业项目ID或all_granted_eps(表示查询所有企业项目)进行查询。 支持多值查询,查询条件格式: *enterprise_project_id=xxx&enterprise_project_id=xxx*。 [不支持该字段,请勿使用。](tag:dt,dt_test,hcso_dt) + * @param {Array} [id] 参数解释:转发策略ID。 支持多值查询,查询条件格式:*id=xxx&id=xxx*。 + * @param {Array} [name] 参数解释:转发策略名称。 支持多值查询,查询条件格式:**name=xxx&name=xxx**。 + * @param {Array} [description] 参数解释:转发策略额描述信息。 支持多值查询,查询条件格式:*description=xxx&description=xxx*。 + * @param {boolean} [adminStateUp] 参数解释:转发策略的管理状态。 + * @param {Array} [listenerId] 参数解释:转发策略所属的监听器ID。 支持多值查询,查询条件格式:*******listener_id=xxx&listener_id=xxx*******。 + * @param {Array} [position] 参数解释:转发策略的优先级。 支持多值查询,查询条件格式:****position=xxx&position=xxx****。 不支持该字段,请勿使用。 + * @param {Array} [action] 参数解释:转发策略的转发动作。 取值范围: - REDIRECT_TO_POOL:转发到后端云服务器组。 - REDIRECT_TO_LISTENER:重定向到监听器。 - REDIRECT_TO_URL:重定向到URL。 - FIXED_RESPONSE:返回固定响应体。 支持多值查询,查询条件格式:*****action=xxx&action=xxx*****。 [不支持REDIRECT_TO_URL和FIXED_RESPONSE](tag:hcso_dt) + * @param {Array} [redirectUrl] 参数解释:转发到的url。 支持多值查询,查询条件格式:****redirect_url=xxx&redirect_url=xxx****。 不支持该字段,请勿使用。 + * @param {Array} [redirectPoolId] 参数解释:转发到pool的ID。 支持多值查询,查询条件格式:***redirect_pool_id=xxx&redirect_pool_id=xxx***。 + * @param {Array} [redirectListenerId] 参数解释:转发到的listener的ID。 支持多值查询,查询条件格式:**redirect_listener_id=xxx&redirect_listener_id=xxx**。 + * @param {Array} [provisioningStatus] 参数解释:转发策略的配置状态。 取值范围: - ACTIVE: 表示正常。 - ERROR: 表示当前策略与同一监听器下的其他策略存在相同的规则配置。 支持多值查询,查询条件格式:*provisioning_status=xxx&provisioning_status=xxx*。 + * @param {boolean} [displayAllRules] 参数解释:是否显示转发策略下的rule详细信息。 取值范围: - true:显示policy下面的rule的详细信息。 - false:只显示policy下面的rule的id信息 + * @param {Array} [priority] 参数解释:转发策略的优先级。数值越小,优先级越高。 支持多值查询,查询条件格式:*priority=xxx&priority=xxx*。 [不支持该字段,请勿使用。](tag:hcso_dt) * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1189,7 +1189,7 @@ export class ElbClient { * @param {Array} [compareType] 转发匹配方式。 取值: - EQUAL_TO 表示精确匹配。 - REGEX 表示正则匹配。 - STARTS_WITH 表示前缀匹配。 支持多值查询,查询条件格式:*compare_type=xxx&compare_type=xxx*。 * @param {Array} [provisioningStatus] 转发规则的配置状态。 取值:ACTIVE 表示正常。 支持多值查询,查询条件格式:*provisioning_status=xxx&provisioning_status=xxx*。 * @param {boolean} [invert] 是否反向匹配。使用说明:固定为false。该字段能更新但不会生效。 - * @param {boolean} [adminStateUp] 转发规则的管理状态,默认为true。 不支持该字段,请勿使用。 + * @param {boolean} [adminStateUp] 转发规则的管理状态。 不支持该字段,请勿使用。 * @param {Array} [value] 匹配内容的值。 支持多值查询,查询条件格式:*value=xxx&value=xxx*。 * @param {Array} [key] 匹配内容的键值,用于标识规则。 支持多值查询,查询条件格式:*key=xxx&key=xxx*。 不支持该字段,请勿使用。 * @param {Array} [type] 匹配类别,可以为HOST_NAME,PATH。 一个l7policy下创建的l7rule的type不能重复。 支持多值查询,查询条件格式:*type=xxx&type=xxx*。 @@ -1216,7 +1216,7 @@ export class ElbClient { * @param {string} [marker] 上一页最后一条记录的ID。 使用说明: - 必须与limit一起使用。 - 不指定时表示查询第一页。 - 该字段不允许为空或无效的ID。 * @param {boolean} [pageReverse] 是否反向查询。 取值: - true:查询上一页。 - false:查询下一页,默认。 使用说明: - 必须与limit一起使用。 - 当page_reverse=true时,若要查询上一页,marker取值为当前页返回值的previous_marker。 * @param {Array} [protocolPort] 监听器的前端监听端口。 [当监听器的protocol为IP时,前端端口固定为0。](tag:hws_eu) 支持多值查询,查询条件格式:*protocol_port=xxx&protocol_port=xxx*。 - * @param {Array} [protocol] 监听器的监听协议。 [取值:TCP、UDP、HTTP、HTTPS、TERMINATED_HTTPS、QUIC、TLS。 说明:TERMINATED_HTTPS为共享型LB上的监听器独有的协议。](tag:hws,hws_hk,ocb,ctc,hcs,g42,tm,cmcc,hk_g42,hws_ocb,fcs,dt) [取值:TCP、UDP、IP、HTTP、HTTPS。IP为网关型LB上的监听器独有的协议。](tag:hws_eu,hcso_dt) 支持多值查询,查询条件格式:*protocol=xxx&protocol=xxx*。 [不支持QUIC。](tag:tm,hws_eu,g42,hk_g42,hcso_dt,dt,dt_test) + * @param {Array} [protocol] 监听器的监听协议。 [取值:TCP、UDP、HTTP、HTTPS、TERMINATED_HTTPS、QUIC、TLS。 说明:TERMINATED_HTTPS为共享型LB上的监听器独有的协议。](tag:hws,hws_hk,ocb,ctc,hcs,g42,tm,cmcc,hk_g42,hws_ocb,fcs,dt) [取值:TCP、UDP、HTTP、HTTPS。](tag:hcso_dt) [取值:TCP、UDP、IP、HTTP、HTTPS。IP为网关型LB上的监听器独有的协议。](tag:hws_eu) 支持多值查询,查询条件格式:*protocol=xxx&protocol=xxx*。 [不支持QUIC。](tag:tm,hws_eu,g42,hk_g42,hcso_dt,dt,dt_test) * @param {Array} [description] 监听器的描述信息。 支持多值查询,查询条件格式:*description=xxx&description=xxx*。 * @param {Array} [defaultTlsContainerRef] 监听器的服务器证书ID。 支持多值查询,查询条件格式: *default_tls_container_ref=xxx&default_tls_container_ref=xxx*。 * @param {Array} [clientCaTlsContainerRef] 监听器的CA证书ID。 支持多值查询,查询条件格式: *client_ca_tls_container_ref=xxx&client_ca_tls_container_ref=xxx*。 @@ -1232,8 +1232,8 @@ export class ElbClient { * @param {Array} [memberDeviceId] 后端云服务器对应的弹性云服务器的ID。仅用于查询条件,不作为响应参数字段。 支持多值查询,查询条件格式:*member_device_id=xxx&member_device_id=xxx*。 * @param {Array} [enterpriseProjectId] 企业项目ID。不传时查询default企业项目\"0\"下的资源,鉴权按照default企业项目鉴权; 如果传值,则传已存在的企业项目ID或all_granted_eps(表示查询所有企业项目)进行查询。 支持多值查询,查询条件格式:*enterprise_project_id=xxx&enterprise_project_id=xxx*。 [不支持该字段,请勿使用。](tag:dt,dt_test,hcso_dt) * @param {boolean} [enableMemberRetry] 是否开启后端服务器的重试。 取值:true 开启重试,false 不开启重试。 - * @param {Array} [memberTimeout] 等待后端服务器响应超时时间。请求转发后端服务器后,在等待超时member_timeout时长没有响应,负载均衡将终止等待,并返回 HTTP504错误码。 取值:1-300s。 支持多值查询,查询条件格式:*member_timeout=xxx&member_timeout=xxx*。 - * @param {Array} [clientTimeout] 等待客户端请求超时时间,包括两种情况: - 读取整个客户端请求头的超时时长:如果客户端未在超时时长内发送完整个请求头,则请求将被中断 - 两个连续body体的数据包到达LB的时间间隔,超出client_timeout将会断开连接。 取值:1-300s。 支持多值查询,查询条件格式:*client_timeout=xxx&client_timeout=xxx*。 + * @param {Array} [memberTimeout] 等待后端服务器响应超时时间。请求转发后端服务器后,在等待超时member_timeout时长没有响应,负载均衡将终止等待,并返回 HTTP504错误码。 取值:1-3600s。 支持多值查询,查询条件格式:*member_timeout=xxx&member_timeout=xxx*。 + * @param {Array} [clientTimeout] 等待客户端请求超时时间,包括两种情况: - 读取整个客户端请求头的超时时长:如果客户端未在超时时长内发送完整个请求头,则请求将被中断 - 两个连续body体的数据包到达LB的时间间隔,超出client_timeout将会断开连接。 取值:1-3600s。 支持多值查询,查询条件格式:*client_timeout=xxx&client_timeout=xxx*。 * @param {Array} [keepaliveTimeout] 客户端连接空闲超时时间。在超过keepalive_timeout时长一直没有请求, 负载均衡会暂时中断当前连接,直到下一次请求时重新建立新的连接。 取值: - TCP监听器[和IP监听器](tag:hws_eu):10-4000s。 - HTTP/HTTPS/TERMINATED_HTTPS监听器:0-4000s。 [- 共享型实例的UDP监听器不支持此字段。](tag:hws,hws_hk,ocb,ctc,g42,tm,cmcc,hk_g42,hws_ocb,fcs,dt,dt_test,hk_tm) 支持多值查询,查询条件格式:*keepalive_timeout=xxx&keepalive_timeout=xxx*。 * @param {boolean} [transparentClientIpEnable] 是否透传客户端IP地址。开启后客户端IP地址将透传到后端服务器。 [仅作用于共享型LB的TCP/UDP监听器。取值:true开启,false不开启。 ](tag:hws,hws_hk,ocb,ctc,g42,tm,cmcc,hk_g42,hws_ocb,hk_vdf,fcs,dt,hk_tm) * @param {boolean} [proxyProtocolEnable] 是否开启proxy_protocol。仅TLS监听器可指定,其他协议的监听器该字段不生效,proxy_protocol不开启。 @@ -1264,14 +1264,14 @@ export class ElbClient { * @param {Array} [id] 负载均衡器ID。 支持多值查询,查询条件格式:*id=xxx&id=xxx*。 * @param {Array} [name] 负载均衡器名称。 支持多值查询,查询条件格式:*name=xxx&name=xxx*。 * @param {Array} [description] 负载均衡器的描述信息。 支持多值查询,查询条件格式:*description=xxx&description=xxx*。 - * @param {boolean} [adminStateUp] 参数解释:负载均衡器的启用状态。 取值范围:布尔类型。 - true :启用。 - false:停用。 [不支持该字段,请勿使用。](tag:dt,dt_test) + * @param {boolean} [adminStateUp] 参数解释:负载均衡器的启用状态。 取值范围: - true :启用。 - false:停用。 [不支持该字段,请勿使用。](tag:dt,dt_test) * @param {Array} [provisioningStatus] 负载均衡器的配置状态。 取值: - ACTIVE:使用中。 - PENDING_DELETE:删除中。 支持多值查询,查询条件格式:*provisioning_status=xxx&provisioning_status=xxx*。 * @param {Array} [operatingStatus] 负载均衡器的操作状态。 取值: - ONLINE:正常运行。 - FROZEN:已冻结。 支持多值查询,查询条件格式:*operating_status=xxx&operating_status=xxx*。 * @param {boolean} [guaranteed] 是否独享型LB。 取值: - false:共享型 - true:独享型 [仅支持独享型,固定为true。](tag:hws_eu,hcso_dt) * @param {Array} [vpcId] 负载均衡器所在的VPC ID。 支持多值查询,查询条件格式:*vpc_id=xxx&vpc_id=xxx*。 * @param {Array} [vipPortId] 负载均衡器的IPv4对应的port ID。 支持多值查询,查询条件格式:*vip_port_id=xxx&vip_port_id=xxx*。 * @param {Array} [vipAddress] 负载均衡器的IPv4虚拟IP地址。 支持多值查询,查询条件格式:*vip_address=xxx&vip_address=xxx*。 - * @param {Array} [vipSubnetCidrId] 负载均衡器所在子网的IPv4子网ID,也称为该负载均衡器实例的前端子网。 支持多值查询,查询条件格式:*vip_subnet_cidr_id=xxx&vip_subnet_cidr_id=xxx*。 + * @param {Array} [vipSubnetCidrId] 负载均衡器所在子网的IPv4子网ID,也称为该负载均衡器实例的前端子网。 支持多值查询,查询条件格式:*vip_subnet_cidr_id=xxx&vip_subnet_cidr_id=xxx*。 * @param {Array} [ipv6VipPortId] 双栈类型负载均衡器的IPv6对应的port ID。 支持多值查询,查询条件格式:*ipv6_vip_port_id=xxx&ipv6_vip_port_id=xxx*。 [不支持IPv6,请勿使用。](tag:dt,dt_test) * @param {Array} [ipv6VipAddress] 双栈类型负载均衡器的IPv6地址。 支持多值查询,查询条件格式:*ipv6_vip_address=xxx&ipv6_vip_address=xxx*。 [不支持IPv6,请勿使用。](tag:dt,dt_test) * @param {Array} [ipv6VipVirsubnetId] 双栈类型负载均衡器所在的子网IPv6网络ID,也称为该负载均衡器实例的前端子网。 支持多值查询,查询条件格式:*ipv6_vip_virsubnet_id=xxx&ipv6_vip_virsubnet_id=xxx*。 [不支持IPv6,请勿使用。](tag:dt,dt_test) @@ -1346,7 +1346,7 @@ export class ElbClient { * @param {Array} [id] 后端云服务器组的ID。 支持多值查询,查询条件格式:*id=xxx&id=xxx*。 * @param {Array} [name] 后端云服务器组的名称。 支持多值查询,查询条件格式:*name=xxx&name=xxx*。 * @param {Array} [loadbalancerId] 后端云服务器组绑定的负载均衡器ID。 支持多值查询,查询条件格式:*loadbalancer_id=xxx&loadbalancer_id=xxx*。 - * @param {Array} [protocol] 后端云服务器组的后端协议。 取值:TCP、UDP、[IP、](tag:hws_eu)TLS、GRPC、HTTP、HTTPS和QUIC。 IP类型为网关型LB独有的后端服务器组协议。 支持多值查询,查询条件格式:*protocol=xxx&protocol=xxx*。 [不支持QUIC。](tag:tm,hws_eu,g42,hk_g42,hcso_dt) [荷兰region不支持QUIC。](tag:dt,dt_test) + * @param {Array} [protocol] 后端云服务器组的后端协议。 取值:TCP、UDP、[IP、](tag:hws_eu)TLS、gRPC、HTTP、HTTPS和QUIC。 [IP类型为网关型LB独有的后端服务器组协议。](tag:hws_eu) 支持多值查询,查询条件格式:*protocol=xxx&protocol=xxx*。 [不支持QUIC。](tag:tm,hws_eu,g42,hk_g42,hcso_dt) [荷兰region不支持QUIC。](tag:dt,dt_test) * @param {Array} [lbAlgorithm] 后端云服务器组的负载均衡算法。 取值: 1、ROUND_ROBIN:加权轮询算法。 2、LEAST_CONNECTIONS:加权最少连接算法。 3、SOURCE_IP:源IP算法。 4、QUIC_CID:连接ID算法。 支持多值查询,查询条件格式:*lb_algorithm=xxx&lb_algorithm=xxx*。 [不支持QUIC_CID。](tag:tm,hws_eu,g42,hk_g42,hcso_dt) [荷兰region不支持QUIC_CID。](tag:dt,dt_test) * @param {Array} [enterpriseProjectId] 企业项目ID。不传时查询default企业项目\"0\"下的资源,鉴权按照default企业项目鉴权; 如果传值,则传已存在的企业项目ID或all_granted_eps(表示查询所有企业项目)进行查询。 支持多值查询,查询条件格式: *enterprise_project_id=xxx&enterprise_project_id=xxx*。 [不支持该字段,请勿使用。](tag:dt,dt_test,hcso_dt) * @param {Array} [ipVersion] 后端云服务器组支持的IP版本。 支持多值查询,查询条件格式:*ip_version=xxx&ip_version=xxx*。 @@ -1375,7 +1375,7 @@ export class ElbClient { * Please refer to HUAWEI cloud API Explorer for details. * * @summary 查询后端服务器列表 - * @param {string} poolId 后端服务器组ID。 + * @param {string} poolId 参数解释:后端服务器组ID。 * @param {string} [marker] 上一页最后一条记录的ID。 使用说明: - 必须与limit一起使用。 - 不指定时表示查询第一页。 - 该字段不允许为空或无效的ID。 * @param {number} [limit] 参数解释:每页返回的个数。 取值范围:0-2000 默认取值:2000 * @param {boolean} [pageReverse] 是否反向查询。 取值: - true:查询上一页。 - false:查询下一页,默认。 使用说明: - 必须与limit一起使用。 - 当page_reverse=true时,若要查询上一页,marker取值为当前页返回值的previous_marker。 @@ -1418,7 +1418,7 @@ export class ElbClient { * @param {Array} [id] 后端云服务器组的ID。 支持多值查询,查询条件格式:*id=xxx&id=xxx*。 * @param {Array} [name] 后端云服务器组的名称。 支持多值查询,查询条件格式:*name=xxx&name=xxx*。 * @param {Array} [loadbalancerId] 后端云服务器组绑定的负载均衡器ID。 支持多值查询,查询条件格式:*loadbalancer_id=xxx&loadbalancer_id=xxx*。 - * @param {Array} [protocol] 后端云服务器组的后端协议。 取值:TCP、UDP、[IP、](tag:hws_eu)TLS、HTTP、HTTPS、QUIC和GRPC。 支持多值查询,查询条件格式:*protocol=xxx&protocol=xxx*。 [不支持QUIC协议。](tag:hws_eu,g42,hk_g42,hcso_dt) [荷兰region不支持QUIC。](tag:dt,dt_test) + * @param {Array} [protocol] 后端云服务器组的后端协议。 取值:TCP、UDP、[IP、](tag:hws_eu)TLS、HTTP、HTTPS、QUIC和gRPC。 支持多值查询,查询条件格式:*protocol=xxx&protocol=xxx*。 [不支持QUIC协议。](tag:hws_eu,g42,hk_g42,hcso_dt) [荷兰region不支持QUIC。](tag:dt,dt_test) * @param {Array} [lbAlgorithm] 后端云服务器组的负载均衡算法。 取值: - ROUND_ROBIN:加权轮询算法。 - LEAST_CONNECTIONS:加权最少连接算法。 - SOURCE_IP:源IP算法。 - QUIC_CID:连接ID算法。 [- 2_TUPLE_HASH:二元组hash算法,仅IP类型的pool支持。 - 3_TUPLE_HASH:三元组hash算法,仅IP类型的pool支持。 - 4_TUPLE_HASH:五元组hash算法,仅IP类型的pool支持。](tag:hws_eu) 支持多值查询,查询条件格式:*lb_algorithm=xxx&lb_algorithm=xxx*。 [不支持QUIC_CID。](tag:hws_eu,g42,hk_g42,hcso_dt) [荷兰region不支持QUIC_CID。](tag:dt,dt_test) * @param {Array} [enterpriseProjectId] 企业项目ID。不传时查询default企业项目\"0\"下的资源,鉴权按照default企业项目鉴权; 如果传值,则传已存在的企业项目ID或all_granted_eps(表示查询所有企业项目)进行查询。 支持多值查询,查询条件格式:*enterprise_project_id=xxx&enterprise_project_id=xxx*。 [不支持该字段,请勿使用。](tag:dt,dt_test,hcso_dt) * @param {Array} [ipVersion] 后端云服务器组支持的IP版本。 支持多值查询,查询条件格式:*ip_version=xxx&ip_version=xxx*。 @@ -1592,7 +1592,7 @@ export class ElbClient { * Please refer to HUAWEI cloud API Explorer for details. * * @summary 查询转发策略详情 - * @param {string} l7policyId 转发策略ID。 + * @param {string} l7policyId 参数解释:转发策略ID。 * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1710,7 +1710,7 @@ export class ElbClient { * Please refer to HUAWEI cloud API Explorer for details. * * @summary 查询主备后端服务器组详情 - * @param {string} poolId 后端服务器组ID。 + * @param {string} poolId 参数解释:后端服务器组ID。 * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1729,7 +1729,7 @@ export class ElbClient { * Please refer to HUAWEI cloud API Explorer for details. * * @summary 查询后端服务器详情 - * @param {string} poolId 后端服务器组ID。 + * @param {string} poolId 参数解释:后端服务器组ID。 * @param {string} memberId 后端服务器ID。 >说明: 此处并非ECS服务器的ID,而是ELB为绑定的后端服务器自动生成的member ID。 * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -1749,7 +1749,7 @@ export class ElbClient { * Please refer to HUAWEI cloud API Explorer for details. * * @summary 查询后端服务器组详情 - * @param {string} poolId 后端服务器组ID。 + * @param {string} poolId 参数解释:后端服务器组ID。 * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1845,7 +1845,7 @@ export class ElbClient { * Please refer to HUAWEI cloud API Explorer for details. * * @summary 更新转发策略 - * @param {string} l7policyId 转发策略ID。 + * @param {string} l7policyId 参数解释:转发策略ID。 * @param {UpdateL7PolicyRequestBody} updateL7PolicyRequestBody This is a auto create Body Object * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -1947,7 +1947,7 @@ export class ElbClient { * * @summary 更新后端服务器 * @param {string} memberId 后端服务器ID。 >说明: 此处并非ECS服务器的ID,而是ELB为绑定的后端服务器自动生成的member ID。 - * @param {string} poolId 后端服务器组ID。 + * @param {string} poolId 参数解释:后端服务器组ID。 * @param {UpdateMemberRequestBody} updateMemberRequestBody This is a auto create Body Object * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -1967,7 +1967,7 @@ export class ElbClient { * Please refer to HUAWEI cloud API Explorer for details. * * @summary 更新后端服务器组 - * @param {string} poolId 后端服务器组ID。 + * @param {string} poolId 参数解释:后端服务器组ID。 * @param {UpdatePoolRequestBody} updatePoolRequestBody This is a auto create Body Object * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -2766,7 +2766,7 @@ export const ParamCreater = function () { * 6. 若要创建网络型负载均衡器,则需要传入l4_flavor_id(网络型规格ID);若要创建应用型负载均衡器,则需要传入l7_flavor_id(应用型规格ID);若要创建网络型+应用型负载均衡器,则需要传入l4_flavor_id和l7_flavor_id。 * 7. 若要创建包周期负载均衡器,则需要传入prepaid_options,否则创建按需计费负载均衡器。 * 8. 按需计费分为固定规格计费和弹性规格计费,根据创建时所选规格的类型决定计费方式。具体规格说明见创建LB请求参数l4_flavor_id和l7_flavor_id。 - * [9.若要创建gateway类型的负载均衡器,指定loadbalancer_type=“gateway”,不支持指定vip_address,ipv6_vip_address, 不支持公网类型。如果要指定规格,则从请求参数gw_flavor_id传入。](tag:hws_eu) + * [9.若要创建gateway类型的负载均衡器,指定loadbalancer_type=“gateway”,不支持指定vip_address,ipv6_vip_address;vip_subnet_cidr_id和ipv6_subnet_cidr_id两者不能同时为空,如果两者都传入,必须属于同一子网。 不支持公网类型。如果要指定规格,则从请求参数gw_flavor_id传入。](tag:hws_eu) * * Please refer to HUAWEI cloud API Explorer for details. */ diff --git a/services/elb/v3/model/ListAvailabilityZonesResponse.ts b/services/elb/v3/model/ListAvailabilityZonesResponse.ts index d382d74d7..c1ea6b182 100644 --- a/services/elb/v3/model/ListAvailabilityZonesResponse.ts +++ b/services/elb/v3/model/ListAvailabilityZonesResponse.ts @@ -5,6 +5,7 @@ import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; export class ListAvailabilityZonesResponse extends SdkResponse { private 'request_id'?: string; private 'availability_zones'?: Array>; + private 'spec_code'?: string; public constructor() { super(); } @@ -28,4 +29,14 @@ export class ListAvailabilityZonesResponse extends SdkResponse { public get availabilityZones(): Array> | undefined { return this['availability_zones']; } + public withSpecCode(specCode: string): ListAvailabilityZonesResponse { + this['spec_code'] = specCode; + return this; + } + public set specCode(specCode: string | undefined) { + this['spec_code'] = specCode; + } + public get specCode(): string | undefined { + return this['spec_code']; + } } \ No newline at end of file diff --git a/services/gaussdbforopengauss/v3/GaussDBforopenGaussClient.ts b/services/gaussdbforopengauss/v3/GaussDBforopenGaussClient.ts index 315b3cbab..c41d3232a 100644 --- a/services/gaussdbforopengauss/v3/GaussDBforopenGaussClient.ts +++ b/services/gaussdbforopengauss/v3/GaussDBforopenGaussClient.ts @@ -1944,13 +1944,13 @@ export class GaussDBforopenGaussClient { } /** - * 查询批量实例可升级的版本和升级类型 + * 查询批量实例可升级的版本和升级类型。 * * Please refer to HUAWEI cloud API Explorer for details. * - * @summary 查询批量实例可升级的版本和升级类型 + * @summary 查询批量实例可升级的版本和升级类型。 * @param {UpgradeInstancesRequestBody} showBatchUpgradeCandidateVersionsRequestBody 请求体 - * @param {'zh-cn' | 'en-us'} [xLanguage] 语言[zh-cn, en-us] + * @param {'zh-cn' | 'en-us'} [xLanguage] 语言[zh-cn, en-us]。 * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -2204,13 +2204,13 @@ export class GaussDBforopenGaussClient { } /** - * 查询实例可升级版本 + * 查询实例可升级版本。 * * Please refer to HUAWEI cloud API Explorer for details. * * @summary 查询实例可升级版本 * @param {string} instanceId 实例ID。 - * @param {'zh-cn' | 'en-us'} [xLanguage] 语言[zh-cn, en-us] + * @param {'zh-cn' | 'en-us'} [xLanguage] 语言[zh-cn, en-us]。 * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -2366,7 +2366,7 @@ export class GaussDBforopenGaussClient { * @summary 实例内核版本升级 * @param {string} instanceId 实例ID。 * @param {OpenGaussUpgradeRequest} upgradeInstanceVersionRequestBody 请求体 - * @param {string} [xLanguage] 语言 + * @param {string} [xLanguage] 语言。 * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -2397,7 +2397,7 @@ export class GaussDBforopenGaussClient { * * @summary 批量实例内核版本升级 * @param {GaussDBUpgradeInstancesVersionRequest} upgradeInstancesVersionRequestBody 请求体 - * @param {string} [xLanguage] 语言 + * @param {string} [xLanguage] 语言。 * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -6546,7 +6546,7 @@ export const ParamCreater = function () { }, /** - * 查询批量实例可升级的版本和升级类型 + * 查询批量实例可升级的版本和升级类型。 * * Please refer to HUAWEI cloud API Explorer for details. */ @@ -7127,7 +7127,7 @@ export const ParamCreater = function () { }, /** - * 查询实例可升级版本 + * 查询实例可升级版本。 * * Please refer to HUAWEI cloud API Explorer for details. */ diff --git a/services/gaussdbforopengauss/v3/model/OpenGaussHa.ts b/services/gaussdbforopengauss/v3/model/OpenGaussHa.ts index ecc99599a..584854b56 100644 --- a/services/gaussdbforopengauss/v3/model/OpenGaussHa.ts +++ b/services/gaussdbforopengauss/v3/model/OpenGaussHa.ts @@ -4,6 +4,7 @@ export class OpenGaussHa { public mode?: OpenGaussHaModeEnum | string; public consistency?: OpenGaussHaConsistencyEnum | string; private 'replication_mode'?: OpenGaussHaReplicationModeEnum | string; + private 'instance_mode'?: OpenGaussHaInstanceModeEnum | string; public constructor(mode?: string, consistency?: string, replicationMode?: string) { this['mode'] = mode; this['consistency'] = consistency; @@ -27,6 +28,16 @@ export class OpenGaussHa { public get replicationMode(): OpenGaussHaReplicationModeEnum | string | undefined { return this['replication_mode']; } + public withInstanceMode(instanceMode: OpenGaussHaInstanceModeEnum | string): OpenGaussHa { + this['instance_mode'] = instanceMode; + return this; + } + public set instanceMode(instanceMode: OpenGaussHaInstanceModeEnum | string | undefined) { + this['instance_mode'] = instanceMode; + } + public get instanceMode(): OpenGaussHaInstanceModeEnum | string | undefined { + return this['instance_mode']; + } } /** @@ -52,3 +63,12 @@ export enum OpenGaussHaConsistencyEnum { export enum OpenGaussHaReplicationModeEnum { SYNC = 'sync' } +/** + * @export + * @enum {string} + */ +export enum OpenGaussHaInstanceModeEnum { + ENTERPRISE = 'enterprise', + BASIC = 'basic', + ECOLOGY = 'ecology' +} diff --git a/services/gaussdbforopengauss/v3/model/ShowBatchUpgradeCandidateVersionsResponse.ts b/services/gaussdbforopengauss/v3/model/ShowBatchUpgradeCandidateVersionsResponse.ts index 9b27d589f..0611d929d 100644 --- a/services/gaussdbforopengauss/v3/model/ShowBatchUpgradeCandidateVersionsResponse.ts +++ b/services/gaussdbforopengauss/v3/model/ShowBatchUpgradeCandidateVersionsResponse.ts @@ -8,6 +8,7 @@ export class ShowBatchUpgradeCandidateVersionsResponse extends SdkResponse { private 'target_version'?: string; private 'upgrade_candidate_versions'?: Array; private 'hotfix_upgrade_infos'?: Array; + private 'hotfix_rollback_infos'?: Array; public constructor() { super(); } @@ -51,4 +52,14 @@ export class ShowBatchUpgradeCandidateVersionsResponse extends SdkResponse { public get hotfixUpgradeInfos(): Array | undefined { return this['hotfix_upgrade_infos']; } + public withHotfixRollbackInfos(hotfixRollbackInfos: Array): ShowBatchUpgradeCandidateVersionsResponse { + this['hotfix_rollback_infos'] = hotfixRollbackInfos; + return this; + } + public set hotfixRollbackInfos(hotfixRollbackInfos: Array | undefined) { + this['hotfix_rollback_infos'] = hotfixRollbackInfos; + } + public get hotfixRollbackInfos(): Array | undefined { + return this['hotfix_rollback_infos']; + } } \ No newline at end of file diff --git a/services/iam/v3/IamClient.ts b/services/iam/v3/IamClient.ts index 3c0635970..8d1d29a19 100644 --- a/services/iam/v3/IamClient.ts +++ b/services/iam/v3/IamClient.ts @@ -802,6 +802,27 @@ export class IamClient { return this.hcClient.sendRequest(options); } + /** + * 该接口可以用于绑定MFA设备。 + * + * 该接口可以使用全局区域的Endpoint和其他区域的Endpoint调用。IAM的Endpoint请参见:[地区和终端节点](https://developer.huaweicloud.com/endpoint?IAM)。 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 绑定MFA设备 + * @param {BindMfaDevice} createBindingDeviceRequestBody 绑定mfa Device + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public createBindingDevice(createBindingDeviceRequest?: CreateBindingDeviceRequest): Promise { + const options = ParamCreater().createBindingDevice(createBindingDeviceRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + /** * 该接口可以用于[管理员](https://support.huaweicloud.com/usermanual-iam/iam_01_0001.html)创建云服务自定义策略。 * @@ -871,6 +892,27 @@ export class IamClient { return this.hcClient.sendRequest(options); } + /** + * 该接口可以用于创建MFA设备。 + * + * 该接口可以使用全局区域的Endpoint和其他区域的Endpoint调用。IAM的Endpoint请参见:[地区和终端节点](https://developer.huaweicloud.com/endpoint?IAM)。 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 创建MFA设备 + * @param {CreateMfaDeviceReq} createMfaDeviceRequestBody 创建mfa_device的请求体 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public createMfaDevice(createMfaDeviceRequest?: CreateMfaDeviceRequest): Promise { + const options = ParamCreater().createMfaDevice(createMfaDeviceRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + /** * 创建OpenId Connect身份提供商配置 * @@ -953,6 +995,27 @@ export class IamClient { return this.hcClient.sendRequest(options); } + /** + * 该接口可以用于解绑MFA设备 + * + * 该接口可以使用全局区域的Endpoint和其他区域的Endpoint调用。IAM的Endpoint请参见:[地区和终端节点](https://developer.huaweicloud.com/endpoint?IAM)。 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 解绑MFA设备 + * @param {UnbindMfaDevice} deleteBindingDeviceRequestBody 解绑的请求体 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public deleteBindingDevice(deleteBindingDeviceRequest?: DeleteBindingDeviceRequest): Promise { + const options = ParamCreater().deleteBindingDevice(deleteBindingDeviceRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + /** * 该接口可以用于[管理员](https://support.huaweicloud.com/usermanual-iam/iam_01_0001.html)删除自定义策略。 * @@ -997,6 +1060,28 @@ export class IamClient { return this.hcClient.sendRequest(options); } + /** + * 该接口可以用于[管理员](https://support.huaweicloud.com/usermanual-iam/iam_01_0001.html)删除MFA设备。 + * + * 该接口可以使用全局区域的Endpoint和其他区域的Endpoint调用。IAM的Endpoint请参见:[地区和终端节点](https://developer.huaweicloud.com/endpoint?IAM)。 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 删除MFA设备 + * @param {string} userId 绑定MFA设备的IAM 用户ID。 + * @param {string} serialNumber MFA设备序列号。 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public deleteMfaDevice(deleteMfaDeviceRequest?: DeleteMfaDeviceRequest): Promise { + const options = ParamCreater().deleteMfaDevice(deleteMfaDeviceRequest); + + // @ts-ignore + options['responseHeaders'] = ['']; + + return this.hcClient.sendRequest(options); + } + /** * 该接口可以用于[管理员](https://support.huaweicloud.com/usermanual-iam/iam_01_0001.html)添加IAM用户到用户组。 * @@ -2302,7 +2387,7 @@ export class IamClient { * * Please refer to HUAWEI cloud API Explorer for details. * - * @summary 查询用户关联的企业项目 + * @summary 查询用户直接关联的企业项目 * @param {string} userId 待查询用户ID。 * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -2365,7 +2450,7 @@ export class IamClient { * * Please refer to HUAWEI cloud API Explorer for details. * - * @summary 查询企业项目已关联用户组的权限 + * @summary 查询企业项目关联用户组的权限 * @param {string} enterpriseProjectId 待查询企业项目ID。 * @param {string} groupId 待查询用户组。 * @param {*} [options] Override http request option. @@ -3231,48 +3316,6 @@ export class IamClient { return this.hcClient.sendRequest(options); } - /** - * 该接口可以用于绑定MFA设备。 - * - * 该接口可以使用全局区域的Endpoint和其他区域的Endpoint调用。IAM的Endpoint请参见:[地区和终端节点](https://developer.huaweicloud.com/endpoint?IAM)。 - * - * Please refer to HUAWEI cloud API Explorer for details. - * - * @summary 绑定MFA设备 - * @param {BindMfaDevice} createBindingDeviceRequestBody 绑定mfa Device - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public createBindingDevice(createBindingDeviceRequest?: CreateBindingDeviceRequest): Promise { - const options = ParamCreater().createBindingDevice(createBindingDeviceRequest); - - // @ts-ignore - options['responseHeaders'] = ['']; - - return this.hcClient.sendRequest(options); - } - - /** - * 该接口可以用于创建MFA设备。 - * - * 该接口可以使用全局区域的Endpoint和其他区域的Endpoint调用。IAM的Endpoint请参见:[地区和终端节点](https://developer.huaweicloud.com/endpoint?IAM)。 - * - * Please refer to HUAWEI cloud API Explorer for details. - * - * @summary 创建MFA设备 - * @param {CreateMfaDeviceReq} createMfaDeviceRequestBody 创建mfa_device的请求体 - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public createMfaDevice(createMfaDeviceRequest?: CreateMfaDeviceRequest): Promise { - const options = ParamCreater().createMfaDevice(createMfaDeviceRequest); - - // @ts-ignore - options['responseHeaders'] = ['']; - - return this.hcClient.sendRequest(options); - } - /** * 该接口可以用于[管理员](https://support.huaweicloud.com/usermanual-iam/iam_01_0001.html)创建IAM用户。 * @@ -3294,49 +3337,6 @@ export class IamClient { return this.hcClient.sendRequest(options); } - /** - * 该接口可以用于解绑MFA设备 - * - * 该接口可以使用全局区域的Endpoint和其他区域的Endpoint调用。IAM的Endpoint请参见:[地区和终端节点](https://developer.huaweicloud.com/endpoint?IAM)。 - * - * Please refer to HUAWEI cloud API Explorer for details. - * - * @summary 解绑MFA设备 - * @param {UnbindMfaDevice} deleteBindingDeviceRequestBody 解绑的请求体 - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public deleteBindingDevice(deleteBindingDeviceRequest?: DeleteBindingDeviceRequest): Promise { - const options = ParamCreater().deleteBindingDevice(deleteBindingDeviceRequest); - - // @ts-ignore - options['responseHeaders'] = ['']; - - return this.hcClient.sendRequest(options); - } - - /** - * 该接口可以用于[管理员](https://support.huaweicloud.com/usermanual-iam/iam_01_0001.html)删除MFA设备。 - * - * 该接口可以使用全局区域的Endpoint和其他区域的Endpoint调用。IAM的Endpoint请参见:[地区和终端节点](https://developer.huaweicloud.com/endpoint?IAM)。 - * - * Please refer to HUAWEI cloud API Explorer for details. - * - * @summary 删除MFA设备 - * @param {string} userId 绑定MFA设备的IAM 用户ID。 - * @param {string} serialNumber MFA设备序列号。 - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public deleteMfaDevice(deleteMfaDeviceRequest?: DeleteMfaDeviceRequest): Promise { - const options = ParamCreater().deleteMfaDevice(deleteMfaDeviceRequest); - - // @ts-ignore - options['responseHeaders'] = ['']; - - return this.hcClient.sendRequest(options); - } - /** * 该接口可以用于[管理员](https://support.huaweicloud.com/usermanual-iam/iam_01_0001.html)创建IAM用户。IAM用户首次登录时需要修改密码。 * @@ -3537,7 +3537,7 @@ export class IamClient { * * Please refer to HUAWEI cloud API Explorer for details. * - * @summary 该接口可以用于获取MFA设备。 + * @summary 查询IAM用户的MFA绑定信息列表 * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -4321,6 +4321,46 @@ export const ParamCreater = function () { return options; }, + /** + * 该接口可以用于绑定MFA设备。 + * + * 该接口可以使用全局区域的Endpoint和其他区域的Endpoint调用。IAM的Endpoint请参见:[地区和终端节点](https://developer.huaweicloud.com/endpoint?IAM)。 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + createBindingDevice(createBindingDeviceRequest?: CreateBindingDeviceRequest) { + const options = { + method: "PUT", + url: "/v3.0/OS-MFA/mfa-devices/bind", + contentType: "application/json;charset=UTF-8", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let body: any; + + if (createBindingDeviceRequest !== null && createBindingDeviceRequest !== undefined) { + if (createBindingDeviceRequest instanceof CreateBindingDeviceRequest) { + body = createBindingDeviceRequest.body + } else { + body = createBindingDeviceRequest['body']; + } + } + + + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8'; + + options.data = body !== undefined ? body : {}; + options.headers = localVarHeaderParameter; + return options; + }, + /** * 该接口可以用于[管理员](https://support.huaweicloud.com/usermanual-iam/iam_01_0001.html)创建云服务自定义策略。 * @@ -4460,6 +4500,46 @@ export const ParamCreater = function () { return options; }, + /** + * 该接口可以用于创建MFA设备。 + * + * 该接口可以使用全局区域的Endpoint和其他区域的Endpoint调用。IAM的Endpoint请参见:[地区和终端节点](https://developer.huaweicloud.com/endpoint?IAM)。 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + createMfaDevice(createMfaDeviceRequest?: CreateMfaDeviceRequest) { + const options = { + method: "POST", + url: "/v3.0/OS-MFA/virtual-mfa-devices", + contentType: "application/json;charset=UTF-8", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let body: any; + + if (createMfaDeviceRequest !== null && createMfaDeviceRequest !== undefined) { + if (createMfaDeviceRequest instanceof CreateMfaDeviceRequest) { + body = createMfaDeviceRequest.body + } else { + body = createMfaDeviceRequest['body']; + } + } + + + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8'; + + options.data = body !== undefined ? body : {}; + options.headers = localVarHeaderParameter; + return options; + }, + /** * 创建OpenId Connect身份提供商配置 * @@ -4603,40 +4683,80 @@ export const ParamCreater = function () { }, /** - * 该接口可以用于[管理员](https://support.huaweicloud.com/usermanual-iam/iam_01_0001.html)删除委托。 + * 该接口可以用于[管理员](https://support.huaweicloud.com/usermanual-iam/iam_01_0001.html)删除委托。 + * + * 该接口可以使用全局区域的Endpoint和其他区域的Endpoint调用。IAM的Endpoint请参见:[地区和终端节点](https://developer.huaweicloud.com/endpoint?IAM)。 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + deleteAgency(deleteAgencyRequest?: DeleteAgencyRequest) { + const options = { + method: "DELETE", + url: "/v3.0/OS-AGENCY/agencies/{agency_id}", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {} + }; + const localVarHeaderParameter = {} as any; + + + let agencyId; + + if (deleteAgencyRequest !== null && deleteAgencyRequest !== undefined) { + if (deleteAgencyRequest instanceof DeleteAgencyRequest) { + agencyId = deleteAgencyRequest.agencyId; + } else { + agencyId = deleteAgencyRequest['agency_id']; + } + } + + + if (agencyId === null || agencyId === undefined) { + throw new RequiredError('agencyId','Required parameter agencyId was null or undefined when calling deleteAgency.'); + } + + options.pathParams = { 'agency_id': agencyId, }; + options.headers = localVarHeaderParameter; + return options; + }, + + /** + * 该接口可以用于解绑MFA设备 * * 该接口可以使用全局区域的Endpoint和其他区域的Endpoint调用。IAM的Endpoint请参见:[地区和终端节点](https://developer.huaweicloud.com/endpoint?IAM)。 * * Please refer to HUAWEI cloud API Explorer for details. */ - deleteAgency(deleteAgencyRequest?: DeleteAgencyRequest) { + deleteBindingDevice(deleteBindingDeviceRequest?: DeleteBindingDeviceRequest) { const options = { - method: "DELETE", - url: "/v3.0/OS-AGENCY/agencies/{agency_id}", - contentType: "application/json", + method: "PUT", + url: "/v3.0/OS-MFA/mfa-devices/unbind", + contentType: "application/json;charset=UTF-8", queryParams: {}, pathParams: {}, - headers: {} + headers: {}, + data: {} }; const localVarHeaderParameter = {} as any; - - let agencyId; + let body: any; - if (deleteAgencyRequest !== null && deleteAgencyRequest !== undefined) { - if (deleteAgencyRequest instanceof DeleteAgencyRequest) { - agencyId = deleteAgencyRequest.agencyId; + if (deleteBindingDeviceRequest !== null && deleteBindingDeviceRequest !== undefined) { + if (deleteBindingDeviceRequest instanceof DeleteBindingDeviceRequest) { + body = deleteBindingDeviceRequest.body } else { - agencyId = deleteAgencyRequest['agency_id']; + body = deleteBindingDeviceRequest['body']; } } - if (agencyId === null || agencyId === undefined) { - throw new RequiredError('agencyId','Required parameter agencyId was null or undefined when calling deleteAgency.'); + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); } + localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8'; - options.pathParams = { 'agency_id': agencyId, }; + options.data = body !== undefined ? body : {}; options.headers = localVarHeaderParameter; return options; }, @@ -4733,6 +4853,58 @@ export const ParamCreater = function () { return options; }, + /** + * 该接口可以用于[管理员](https://support.huaweicloud.com/usermanual-iam/iam_01_0001.html)删除MFA设备。 + * + * 该接口可以使用全局区域的Endpoint和其他区域的Endpoint调用。IAM的Endpoint请参见:[地区和终端节点](https://developer.huaweicloud.com/endpoint?IAM)。 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + deleteMfaDevice(deleteMfaDeviceRequest?: DeleteMfaDeviceRequest) { + const options = { + method: "DELETE", + url: "/v3.0/OS-MFA/virtual-mfa-devices", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {} + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + let userId; + + let serialNumber; + + if (deleteMfaDeviceRequest !== null && deleteMfaDeviceRequest !== undefined) { + if (deleteMfaDeviceRequest instanceof DeleteMfaDeviceRequest) { + userId = deleteMfaDeviceRequest.userId; + serialNumber = deleteMfaDeviceRequest.serialNumber; + } else { + userId = deleteMfaDeviceRequest['user_id']; + serialNumber = deleteMfaDeviceRequest['serial_number']; + } + } + + + if (userId === null || userId === undefined) { + throw new RequiredError('userId','Required parameter userId was null or undefined when calling deleteMfaDevice.'); + } + if (userId !== null && userId !== undefined) { + localVarQueryParameter['user_id'] = userId; + } + if (serialNumber === null || serialNumber === undefined) { + throw new RequiredError('serialNumber','Required parameter serialNumber was null or undefined when calling deleteMfaDevice.'); + } + if (serialNumber !== null && serialNumber !== undefined) { + localVarQueryParameter['serial_number'] = serialNumber; + } + + options.queryParams = localVarQueryParameter; + options.headers = localVarHeaderParameter; + return options; + }, + /** * 该接口可以用于[管理员](https://support.huaweicloud.com/usermanual-iam/iam_01_0001.html)添加IAM用户到用户组。 * @@ -9216,86 +9388,6 @@ export const ParamCreater = function () { return options; }, - /** - * 该接口可以用于绑定MFA设备。 - * - * 该接口可以使用全局区域的Endpoint和其他区域的Endpoint调用。IAM的Endpoint请参见:[地区和终端节点](https://developer.huaweicloud.com/endpoint?IAM)。 - * - * Please refer to HUAWEI cloud API Explorer for details. - */ - createBindingDevice(createBindingDeviceRequest?: CreateBindingDeviceRequest) { - const options = { - method: "PUT", - url: "/v3.0/OS-MFA/mfa-devices/bind", - contentType: "application/json;charset=UTF-8", - queryParams: {}, - pathParams: {}, - headers: {}, - data: {} - }; - const localVarHeaderParameter = {} as any; - - let body: any; - - if (createBindingDeviceRequest !== null && createBindingDeviceRequest !== undefined) { - if (createBindingDeviceRequest instanceof CreateBindingDeviceRequest) { - body = createBindingDeviceRequest.body - } else { - body = createBindingDeviceRequest['body']; - } - } - - - if (body === null || body === undefined) { - throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); - } - localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8'; - - options.data = body !== undefined ? body : {}; - options.headers = localVarHeaderParameter; - return options; - }, - - /** - * 该接口可以用于创建MFA设备。 - * - * 该接口可以使用全局区域的Endpoint和其他区域的Endpoint调用。IAM的Endpoint请参见:[地区和终端节点](https://developer.huaweicloud.com/endpoint?IAM)。 - * - * Please refer to HUAWEI cloud API Explorer for details. - */ - createMfaDevice(createMfaDeviceRequest?: CreateMfaDeviceRequest) { - const options = { - method: "POST", - url: "/v3.0/OS-MFA/virtual-mfa-devices", - contentType: "application/json;charset=UTF-8", - queryParams: {}, - pathParams: {}, - headers: {}, - data: {} - }; - const localVarHeaderParameter = {} as any; - - let body: any; - - if (createMfaDeviceRequest !== null && createMfaDeviceRequest !== undefined) { - if (createMfaDeviceRequest instanceof CreateMfaDeviceRequest) { - body = createMfaDeviceRequest.body - } else { - body = createMfaDeviceRequest['body']; - } - } - - - if (body === null || body === undefined) { - throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); - } - localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8'; - - options.data = body !== undefined ? body : {}; - options.headers = localVarHeaderParameter; - return options; - }, - /** * 该接口可以用于[管理员](https://support.huaweicloud.com/usermanual-iam/iam_01_0001.html)创建IAM用户。 * @@ -9336,98 +9428,6 @@ export const ParamCreater = function () { return options; }, - /** - * 该接口可以用于解绑MFA设备 - * - * 该接口可以使用全局区域的Endpoint和其他区域的Endpoint调用。IAM的Endpoint请参见:[地区和终端节点](https://developer.huaweicloud.com/endpoint?IAM)。 - * - * Please refer to HUAWEI cloud API Explorer for details. - */ - deleteBindingDevice(deleteBindingDeviceRequest?: DeleteBindingDeviceRequest) { - const options = { - method: "PUT", - url: "/v3.0/OS-MFA/mfa-devices/unbind", - contentType: "application/json;charset=UTF-8", - queryParams: {}, - pathParams: {}, - headers: {}, - data: {} - }; - const localVarHeaderParameter = {} as any; - - let body: any; - - if (deleteBindingDeviceRequest !== null && deleteBindingDeviceRequest !== undefined) { - if (deleteBindingDeviceRequest instanceof DeleteBindingDeviceRequest) { - body = deleteBindingDeviceRequest.body - } else { - body = deleteBindingDeviceRequest['body']; - } - } - - - if (body === null || body === undefined) { - throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); - } - localVarHeaderParameter['Content-Type'] = 'application/json;charset=UTF-8'; - - options.data = body !== undefined ? body : {}; - options.headers = localVarHeaderParameter; - return options; - }, - - /** - * 该接口可以用于[管理员](https://support.huaweicloud.com/usermanual-iam/iam_01_0001.html)删除MFA设备。 - * - * 该接口可以使用全局区域的Endpoint和其他区域的Endpoint调用。IAM的Endpoint请参见:[地区和终端节点](https://developer.huaweicloud.com/endpoint?IAM)。 - * - * Please refer to HUAWEI cloud API Explorer for details. - */ - deleteMfaDevice(deleteMfaDeviceRequest?: DeleteMfaDeviceRequest) { - const options = { - method: "DELETE", - url: "/v3.0/OS-MFA/virtual-mfa-devices", - contentType: "application/json", - queryParams: {}, - pathParams: {}, - headers: {} - }; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - let userId; - - let serialNumber; - - if (deleteMfaDeviceRequest !== null && deleteMfaDeviceRequest !== undefined) { - if (deleteMfaDeviceRequest instanceof DeleteMfaDeviceRequest) { - userId = deleteMfaDeviceRequest.userId; - serialNumber = deleteMfaDeviceRequest.serialNumber; - } else { - userId = deleteMfaDeviceRequest['user_id']; - serialNumber = deleteMfaDeviceRequest['serial_number']; - } - } - - - if (userId === null || userId === undefined) { - throw new RequiredError('userId','Required parameter userId was null or undefined when calling deleteMfaDevice.'); - } - if (userId !== null && userId !== undefined) { - localVarQueryParameter['user_id'] = userId; - } - if (serialNumber === null || serialNumber === undefined) { - throw new RequiredError('serialNumber','Required parameter serialNumber was null or undefined when calling deleteMfaDevice.'); - } - if (serialNumber !== null && serialNumber !== undefined) { - localVarQueryParameter['serial_number'] = serialNumber; - } - - options.queryParams = localVarQueryParameter; - options.headers = localVarHeaderParameter; - return options; - }, - /** * 该接口可以用于[管理员](https://support.huaweicloud.com/usermanual-iam/iam_01_0001.html)创建IAM用户。IAM用户首次登录时需要修改密码。 * diff --git a/services/iam/v3/model/AgencyPolicyStatement.ts b/services/iam/v3/model/AgencyPolicyStatement.ts index a3bc3c12b..25a21050f 100644 --- a/services/iam/v3/model/AgencyPolicyStatement.ts +++ b/services/iam/v3/model/AgencyPolicyStatement.ts @@ -5,10 +5,9 @@ export class AgencyPolicyStatement { private 'Action'?: Array | Array; private 'Effect'?: AgencyPolicyStatementEffectEnum | string; private 'Resource'?: AgencyPolicyResource; - public constructor(action?: Array, effect?: string, resource?: AgencyPolicyResource) { + public constructor(action?: Array, effect?: string) { this['Action'] = action; this['Effect'] = effect; - this['Resource'] = resource; } public withAction(action: Array | Array): AgencyPolicyStatement { this['Action'] = action; diff --git a/services/iam/v3/model/ProtocolOption.ts b/services/iam/v3/model/ProtocolOption.ts index 3be10ecea..e51618b1d 100644 --- a/services/iam/v3/model/ProtocolOption.ts +++ b/services/iam/v3/model/ProtocolOption.ts @@ -2,7 +2,8 @@ export class ProtocolOption { private 'mapping_id'?: string; - public constructor() { + public constructor(mappingId?: string) { + this['mapping_id'] = mappingId; } public withMappingId(mappingId: string): ProtocolOption { this['mapping_id'] = mappingId; diff --git a/services/ims/v2/ImsClient.ts b/services/ims/v2/ImsClient.ts index ffdab0cce..8cd73963c 100644 --- a/services/ims/v2/ImsClient.ts +++ b/services/ims/v2/ImsClient.ts @@ -513,7 +513,7 @@ export class ImsClient { * @param {'queued' | 'saving' | 'deleted' | 'killed' | 'active'} [status] 镜像状态。取值如下: queued:表示镜像元数据已经创建成功,等待上传镜像文件。 saving:表示镜像正在上传文件到后端存储。 deleted:表示镜像已经删除。 killed:表示镜像上传错误。 active:表示镜像可以正常使用。 * @param {string} [tag] 标签,用户为镜像增加自定义标签后可以通过该参数过滤查询。 * @param {'FusionCompute' | 'Ironic' | 'DataImage'} [virtualEnvType] 镜像使用环境类型:FusionCompute,Ironic,DataImage。如果弹性云服务器镜像,则取值为FusionCompute,如果是数据卷镜像则取值是DataImage,如果是裸金属服务器镜像,则取值是Ironic。 - * @param {'public' | 'private'} [visibility] 是否被其他租户可见,取值为public或private + * @param {'public' | 'private' | 'shared'} [visibility] 是否被其他租户可见,取值为public、private或shared * @param {string} [xSdkDate] 请求的发生时间,格式为YYYYMMDDTHHMMSSZ。取值为当前系统的GMT时间。使用AK/SK认证时该字段必选 * @param {string} [flavorId] 用于通过云服务器规格过滤出可用公共镜像,取值为规格ID。 当前仅支持通过单个规格进行过滤。 * @param {string} [createdAt] 镜像创建时间。支持按照时间点过滤查询,取值格式为“操作符:UTC时间”。 其中操作符支持如下几种: gt:大于 gte:大于等于 lt:小于 lte:小于等于 eq:等于 neq:不等于 时间格式支持:yyyy-MM-ddThh:mm:ssZ或者yyyy-MM-dd hh:mm:ss 例如,查询创建时间在2018-10-28 10:00:00之前的镜像,可以通过如下条件过滤: created_at=gt:2018-10-28T10:00:00Z diff --git a/services/ims/v2/model/ImageInfo.ts b/services/ims/v2/model/ImageInfo.ts index 5fd137183..6fc9a5acc 100644 --- a/services/ims/v2/model/ImageInfo.ts +++ b/services/ims/v2/model/ImageInfo.ts @@ -705,7 +705,8 @@ export enum ImageInfoVirtualEnvTypeEnum { */ export enum ImageInfoVisibilityEnum { PRIVATE = 'private', - PUBLIC = 'public' + PUBLIC = 'public', + SHARED = 'shared' } /** * @export diff --git a/services/ims/v2/model/ListImagesRequest.ts b/services/ims/v2/model/ListImagesRequest.ts index bdda724de..a7ad2ba4e 100644 --- a/services/ims/v2/model/ListImagesRequest.ts +++ b/services/ims/v2/model/ListImagesRequest.ts @@ -479,7 +479,8 @@ export enum ListImagesRequestVirtualEnvTypeEnum { */ export enum ListImagesRequestVisibilityEnum { PUBLIC = 'public', - PRIVATE = 'private' + PRIVATE = 'private', + SHARED = 'shared' } /** * @export diff --git a/services/ims/v2/model/UpdateImageResponse.ts b/services/ims/v2/model/UpdateImageResponse.ts index bddec3a9b..40edd1fe9 100644 --- a/services/ims/v2/model/UpdateImageResponse.ts +++ b/services/ims/v2/model/UpdateImageResponse.ts @@ -687,7 +687,8 @@ export enum UpdateImageResponseVirtualEnvTypeEnum { */ export enum UpdateImageResponseVisibilityEnum { PRIVATE = 'private', - PUBLIC = 'public' + PUBLIC = 'public', + SHARED = 'shared' } /** * @export diff --git a/services/lts/v2/model/ListLogsResponse.ts b/services/lts/v2/model/ListLogsResponse.ts index 571974265..645d9113d 100644 --- a/services/lts/v2/model/ListLogsResponse.ts +++ b/services/lts/v2/model/ListLogsResponse.ts @@ -6,6 +6,7 @@ export class ListLogsResponse extends SdkResponse { public count?: number; public logs?: Array; public isQueryComplete?: boolean; + public analysisLogs?: Array<{ [key: string]: string; }>; public constructor() { super(); } @@ -21,4 +22,8 @@ export class ListLogsResponse extends SdkResponse { this['isQueryComplete'] = isQueryComplete; return this; } + public withAnalysisLogs(analysisLogs: Array<{ [key: string]: string; }>): ListLogsResponse { + this['analysisLogs'] = analysisLogs; + return this; + } } \ No newline at end of file diff --git a/services/lts/v2/model/QueryLtsLogParams.ts b/services/lts/v2/model/QueryLtsLogParams.ts index 501b2fae0..b6dd440dd 100644 --- a/services/lts/v2/model/QueryLtsLogParams.ts +++ b/services/lts/v2/model/QueryLtsLogParams.ts @@ -13,6 +13,8 @@ export class QueryLtsLogParams { public limit?: number; public highlight?: boolean; private 'is_iterative'?: boolean; + public query?: string; + private 'is_analysis_query'?: boolean; public constructor(startTime?: string, endTime?: string) { this['start_time'] = startTime; this['end_time'] = endTime; @@ -113,6 +115,20 @@ export class QueryLtsLogParams { public get isIterative(): boolean | undefined { return this['is_iterative']; } + public withQuery(query: string): QueryLtsLogParams { + this['query'] = query; + return this; + } + public withIsAnalysisQuery(isAnalysisQuery: boolean): QueryLtsLogParams { + this['is_analysis_query'] = isAnalysisQuery; + return this; + } + public set isAnalysisQuery(isAnalysisQuery: boolean | undefined) { + this['is_analysis_query'] = isAnalysisQuery; + } + public get isAnalysisQuery(): boolean | undefined { + return this['is_analysis_query']; + } } /** diff --git a/services/ocr/v1/model/TransportationLicenseResult.ts b/services/ocr/v1/model/TransportationLicenseResult.ts index 14e946e92..a33ae5d5a 100644 --- a/services/ocr/v1/model/TransportationLicenseResult.ts +++ b/services/ocr/v1/model/TransportationLicenseResult.ts @@ -13,6 +13,9 @@ export class TransportationLicenseResult { private 'economic_type'?: string; private 'business_certificate'?: string; private 'business_scope'?: string; + private 'expiry_date'?: string; + private 'review_expiry_date'?: string; + private 'assessed_technical_level'?: string; public confidence?: object; public constructor() { } @@ -136,6 +139,36 @@ export class TransportationLicenseResult { public get businessScope(): string | undefined { return this['business_scope']; } + public withExpiryDate(expiryDate: string): TransportationLicenseResult { + this['expiry_date'] = expiryDate; + return this; + } + public set expiryDate(expiryDate: string | undefined) { + this['expiry_date'] = expiryDate; + } + public get expiryDate(): string | undefined { + return this['expiry_date']; + } + public withReviewExpiryDate(reviewExpiryDate: string): TransportationLicenseResult { + this['review_expiry_date'] = reviewExpiryDate; + return this; + } + public set reviewExpiryDate(reviewExpiryDate: string | undefined) { + this['review_expiry_date'] = reviewExpiryDate; + } + public get reviewExpiryDate(): string | undefined { + return this['review_expiry_date']; + } + public withAssessedTechnicalLevel(assessedTechnicalLevel: string): TransportationLicenseResult { + this['assessed_technical_level'] = assessedTechnicalLevel; + return this; + } + public set assessedTechnicalLevel(assessedTechnicalLevel: string | undefined) { + this['assessed_technical_level'] = assessedTechnicalLevel; + } + public get assessedTechnicalLevel(): string | undefined { + return this['assessed_technical_level']; + } public withConfidence(confidence: object): TransportationLicenseResult { this['confidence'] = confidence; return this; diff --git a/services/servicestage/v3/ServiceStageClient.ts b/services/servicestage/v3/ServiceStageClient.ts index 3851bd153..8ac24da25 100644 --- a/services/servicestage/v3/ServiceStageClient.ts +++ b/services/servicestage/v3/ServiceStageClient.ts @@ -56,6 +56,7 @@ import { DeleteEnvironmentRequest } from './model/DeleteEnvironmentRequest'; import { DeleteEnvironmentResponse } from './model/DeleteEnvironmentResponse'; import { DeployStrategy } from './model/DeployStrategy'; import { DeployStrategyGrayRelease } from './model/DeployStrategyGrayRelease'; +import { DeployStrategyGrayReleaseRules } from './model/DeployStrategyGrayReleaseRules'; import { DeployStrategyRollingRelease } from './model/DeployStrategyRollingRelease'; import { EnvironmentCreate } from './model/EnvironmentCreate'; import { EnvironmentCreateLabels } from './model/EnvironmentCreateLabels'; diff --git a/services/servicestage/v3/model/ComponentCreate.ts b/services/servicestage/v3/model/ComponentCreate.ts index 24c1fdeb0..3ea9266f9 100644 --- a/services/servicestage/v3/model/ComponentCreate.ts +++ b/services/servicestage/v3/model/ComponentCreate.ts @@ -31,6 +31,7 @@ export class ComponentCreate { private 'request_memory'?: number; public replica?: number; public version?: string; + private 'swimlane_id'?: string; public envs?: Array; public storages?: Array; private 'deploy_strategy'?: DeployStrategy; @@ -145,6 +146,16 @@ export class ComponentCreate { this['version'] = version; return this; } + public withSwimlaneId(swimlaneId: string): ComponentCreate { + this['swimlane_id'] = swimlaneId; + return this; + } + public set swimlaneId(swimlaneId: string | undefined) { + this['swimlane_id'] = swimlaneId; + } + public get swimlaneId(): string | undefined { + return this['swimlane_id']; + } public withEnvs(envs: Array): ComponentCreate { this['envs'] = envs; return this; diff --git a/services/servicestage/v3/model/ComponentModify.ts b/services/servicestage/v3/model/ComponentModify.ts index 5dafa974e..c47d8ee2a 100644 --- a/services/servicestage/v3/model/ComponentModify.ts +++ b/services/servicestage/v3/model/ComponentModify.ts @@ -30,6 +30,7 @@ export class ComponentModify { private 'request_memory'?: number; public replica?: number; public version?: string; + private 'swimlane_id'?: string; public envs?: Array; public storages?: Array; private 'deploy_strategy'?: DeployStrategy; @@ -133,6 +134,16 @@ export class ComponentModify { this['version'] = version; return this; } + public withSwimlaneId(swimlaneId: string): ComponentModify { + this['swimlane_id'] = swimlaneId; + return this; + } + public set swimlaneId(swimlaneId: string | undefined) { + this['swimlane_id'] = swimlaneId; + } + public get swimlaneId(): string | undefined { + return this['swimlane_id']; + } public withEnvs(envs: Array): ComponentModify { this['envs'] = envs; return this; diff --git a/services/servicestage/v3/model/DeployStrategyGrayRelease.ts b/services/servicestage/v3/model/DeployStrategyGrayRelease.ts index 2a54bc88c..463e6ab13 100644 --- a/services/servicestage/v3/model/DeployStrategyGrayRelease.ts +++ b/services/servicestage/v3/model/DeployStrategyGrayRelease.ts @@ -1,20 +1,44 @@ +import { DeployStrategyGrayReleaseRules } from './DeployStrategyGrayReleaseRules'; export class DeployStrategyGrayRelease { public type?: DeployStrategyGrayReleaseTypeEnum | string; + private 'replica_surge_mode'?: DeployStrategyGrayReleaseReplicaSurgeModeEnum | string; + private 'deployment_mode'?: DeployStrategyGrayReleaseDeploymentModeEnum | number; private 'first_batch_weight'?: number; + private 'rule_match_mode'?: DeployStrategyGrayReleaseRuleMatchModeEnum | string; + public rules?: Array; private 'first_batch_replica'?: number; private 'remaining_batch'?: number; - public constructor(type?: string, firstBatchWeight?: number, firstBatchReplica?: number, remainingBatch?: number) { + public constructor(type?: string, replicaSurgeMode?: string, deploymentMode?: number) { this['type'] = type; - this['first_batch_weight'] = firstBatchWeight; - this['first_batch_replica'] = firstBatchReplica; - this['remaining_batch'] = remainingBatch; + this['replica_surge_mode'] = replicaSurgeMode; + this['deployment_mode'] = deploymentMode; } public withType(type: DeployStrategyGrayReleaseTypeEnum | string): DeployStrategyGrayRelease { this['type'] = type; return this; } + public withReplicaSurgeMode(replicaSurgeMode: DeployStrategyGrayReleaseReplicaSurgeModeEnum | string): DeployStrategyGrayRelease { + this['replica_surge_mode'] = replicaSurgeMode; + return this; + } + public set replicaSurgeMode(replicaSurgeMode: DeployStrategyGrayReleaseReplicaSurgeModeEnum | string | undefined) { + this['replica_surge_mode'] = replicaSurgeMode; + } + public get replicaSurgeMode(): DeployStrategyGrayReleaseReplicaSurgeModeEnum | string | undefined { + return this['replica_surge_mode']; + } + public withDeploymentMode(deploymentMode: DeployStrategyGrayReleaseDeploymentModeEnum | number): DeployStrategyGrayRelease { + this['deployment_mode'] = deploymentMode; + return this; + } + public set deploymentMode(deploymentMode: DeployStrategyGrayReleaseDeploymentModeEnum | number | undefined) { + this['deployment_mode'] = deploymentMode; + } + public get deploymentMode(): DeployStrategyGrayReleaseDeploymentModeEnum | number | undefined { + return this['deployment_mode']; + } public withFirstBatchWeight(firstBatchWeight: number): DeployStrategyGrayRelease { this['first_batch_weight'] = firstBatchWeight; return this; @@ -25,6 +49,20 @@ export class DeployStrategyGrayRelease { public get firstBatchWeight(): number | undefined { return this['first_batch_weight']; } + public withRuleMatchMode(ruleMatchMode: DeployStrategyGrayReleaseRuleMatchModeEnum | string): DeployStrategyGrayRelease { + this['rule_match_mode'] = ruleMatchMode; + return this; + } + public set ruleMatchMode(ruleMatchMode: DeployStrategyGrayReleaseRuleMatchModeEnum | string | undefined) { + this['rule_match_mode'] = ruleMatchMode; + } + public get ruleMatchMode(): DeployStrategyGrayReleaseRuleMatchModeEnum | string | undefined { + return this['rule_match_mode']; + } + public withRules(rules: Array): DeployStrategyGrayRelease { + this['rules'] = rules; + return this; + } public withFirstBatchReplica(firstBatchReplica: number): DeployStrategyGrayRelease { this['first_batch_replica'] = firstBatchReplica; return this; @@ -52,6 +90,33 @@ export class DeployStrategyGrayRelease { * @enum {string} */ export enum DeployStrategyGrayReleaseTypeEnum { - WEIGHT = 'weight', - CONTENT = 'content' + WEIGHT = 'WEIGHT', + CONTENT = 'CONTENT' +} +/** + * @export + * @enum {string} + */ +export enum DeployStrategyGrayReleaseReplicaSurgeModeEnum { + MIRROR = 'MIRROR', + EXTRA = 'EXTRA', + NOSURGE = 'NOSURGE' +} +/** + * @export + * @enum {string} + */ +export enum DeployStrategyGrayReleaseDeploymentModeEnum { + NUMBER_1 = 1, + NUMBER_3 = 3, + NUMBER_4 = 4, + NUMBER_6 = 6 +} +/** + * @export + * @enum {string} + */ +export enum DeployStrategyGrayReleaseRuleMatchModeEnum { + ALL = 'all', + ANY = 'any' } diff --git a/services/servicestage/v3/model/DeployStrategyGrayReleaseRules.ts b/services/servicestage/v3/model/DeployStrategyGrayReleaseRules.ts new file mode 100644 index 000000000..15ad9aa36 --- /dev/null +++ b/services/servicestage/v3/model/DeployStrategyGrayReleaseRules.ts @@ -0,0 +1,47 @@ + + +export class DeployStrategyGrayReleaseRules { + public type?: DeployStrategyGrayReleaseRulesTypeEnum | string; + public key?: string; + public value?: string; + public condition?: DeployStrategyGrayReleaseRulesConditionEnum | string; + public constructor(type?: string, key?: string, value?: string, condition?: string) { + this['type'] = type; + this['key'] = key; + this['value'] = value; + this['condition'] = condition; + } + public withType(type: DeployStrategyGrayReleaseRulesTypeEnum | string): DeployStrategyGrayReleaseRules { + this['type'] = type; + return this; + } + public withKey(key: string): DeployStrategyGrayReleaseRules { + this['key'] = key; + return this; + } + public withValue(value: string): DeployStrategyGrayReleaseRules { + this['value'] = value; + return this; + } + public withCondition(condition: DeployStrategyGrayReleaseRulesConditionEnum | string): DeployStrategyGrayReleaseRules { + this['condition'] = condition; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum DeployStrategyGrayReleaseRulesTypeEnum { + HEADER = 'header' +} +/** + * @export + * @enum {string} + */ +export enum DeployStrategyGrayReleaseRulesConditionEnum { + EQUAL = 'equal', + MATCH = 'match', + IN = 'in' +} diff --git a/services/servicestage/v3/model/ShowComponentInfoResponse.ts b/services/servicestage/v3/model/ShowComponentInfoResponse.ts index 6c40d1852..31661ab30 100644 --- a/services/servicestage/v3/model/ShowComponentInfoResponse.ts +++ b/services/servicestage/v3/model/ShowComponentInfoResponse.ts @@ -33,6 +33,7 @@ export class ShowComponentInfoResponse extends SdkResponse { private 'request_memory'?: number; public replica?: number; public version?: string; + private 'swimlane_id'?: string; public envs?: Array; public storages?: Array; public command?: ComponentCommand; @@ -152,6 +153,16 @@ export class ShowComponentInfoResponse extends SdkResponse { this['version'] = version; return this; } + public withSwimlaneId(swimlaneId: string): ShowComponentInfoResponse { + this['swimlane_id'] = swimlaneId; + return this; + } + public set swimlaneId(swimlaneId: string | undefined) { + this['swimlane_id'] = swimlaneId; + } + public get swimlaneId(): string | undefined { + return this['swimlane_id']; + } public withEnvs(envs: Array): ShowComponentInfoResponse { this['envs'] = envs; return this; diff --git a/services/servicestage/v3/public-api.ts b/services/servicestage/v3/public-api.ts index a7e90aa13..2c6430214 100644 --- a/services/servicestage/v3/public-api.ts +++ b/services/servicestage/v3/public-api.ts @@ -54,6 +54,7 @@ export * from './model/DeleteEnvironmentRequest'; export * from './model/DeleteEnvironmentResponse'; export * from './model/DeployStrategy'; export * from './model/DeployStrategyGrayRelease'; +export * from './model/DeployStrategyGrayReleaseRules'; export * from './model/DeployStrategyRollingRelease'; export * from './model/EnvironmentCreate'; export * from './model/EnvironmentCreateLabels'; diff --git a/services/sms/v3/model/PutTaskReq.ts b/services/sms/v3/model/PutTaskReq.ts index 2936869a6..a67aa1eb7 100644 --- a/services/sms/v3/model/PutTaskReq.ts +++ b/services/sms/v3/model/PutTaskReq.ts @@ -13,6 +13,7 @@ export class PutTaskReq { private 'region_id'?: string; private 'start_target_server'?: boolean; private 'enterprise_project_id'?: string; + private 'exist_server'?: boolean; private 'migration_ip'?: string; private 'region_name'?: string; private 'speed_limit'?: number; @@ -93,6 +94,16 @@ export class PutTaskReq { public get enterpriseProjectId(): string | undefined { return this['enterprise_project_id']; } + public withExistServer(existServer: boolean): PutTaskReq { + this['exist_server'] = existServer; + return this; + } + public set existServer(existServer: boolean | undefined) { + this['exist_server'] = existServer; + } + public get existServer(): boolean | undefined { + return this['exist_server']; + } public withMigrationIp(migrationIp: string): PutTaskReq { this['migration_ip'] = migrationIp; return this; diff --git a/services/sms/v3/model/ShowTaskResponse.ts b/services/sms/v3/model/ShowTaskResponse.ts index 3548e4d5d..c1a752b61 100644 --- a/services/sms/v3/model/ShowTaskResponse.ts +++ b/services/sms/v3/model/ShowTaskResponse.ts @@ -16,7 +16,6 @@ export class ShowTaskResponse extends SdkResponse { private 'region_id'?: string; private 'start_target_server'?: boolean; private 'enterprise_project_id'?: string; - private 'exist_server'?: boolean; private 'migration_ip'?: string; private 'region_name'?: string; private 'project_name'?: string; @@ -109,16 +108,6 @@ export class ShowTaskResponse extends SdkResponse { public get enterpriseProjectId(): string | undefined { return this['enterprise_project_id']; } - public withExistServer(existServer: boolean): ShowTaskResponse { - this['exist_server'] = existServer; - return this; - } - public set existServer(existServer: boolean | undefined) { - this['exist_server'] = existServer; - } - public get existServer(): boolean | undefined { - return this['exist_server']; - } public withMigrationIp(migrationIp: string): ShowTaskResponse { this['migration_ip'] = migrationIp; return this; diff --git a/services/vpcep/v1/model/PolicyStatement.ts b/services/vpcep/v1/model/PolicyStatement.ts index 5fb79f3ec..f955f4c46 100644 --- a/services/vpcep/v1/model/PolicyStatement.ts +++ b/services/vpcep/v1/model/PolicyStatement.ts @@ -47,5 +47,5 @@ export class PolicyStatement { */ export enum PolicyStatementEffectEnum { ALLOW = 'Allow', - REFUSE = 'Refuse' + DENY = 'Deny' } diff --git a/services/vpn/v5/VpnClient.ts b/services/vpn/v5/VpnClient.ts index 2ec0b5e98..20b719b4f 100644 --- a/services/vpn/v5/VpnClient.ts +++ b/services/vpn/v5/VpnClient.ts @@ -192,6 +192,8 @@ import { UpdateP2cVgwRequest } from './model/UpdateP2cVgwRequest'; import { UpdateP2cVgwRequestBody } from './model/UpdateP2cVgwRequestBody'; import { UpdateP2cVgwRequestBodyContent } from './model/UpdateP2cVgwRequestBodyContent'; import { UpdateP2cVgwResponse } from './model/UpdateP2cVgwResponse'; +import { UpdatePostpaidVgwSpecificationRequest } from './model/UpdatePostpaidVgwSpecificationRequest'; +import { UpdatePostpaidVgwSpecificationResponse } from './model/UpdatePostpaidVgwSpecificationResponse'; import { UpdateRequestPolicyTemplate } from './model/UpdateRequestPolicyTemplate'; import { UpdateResponseVpnConnection } from './model/UpdateResponseVpnConnection'; import { UpdateResponseVpnGateway } from './model/UpdateResponseVpnGateway'; @@ -207,6 +209,8 @@ import { UpdateVgwRequest } from './model/UpdateVgwRequest'; import { UpdateVgwRequestBody } from './model/UpdateVgwRequestBody'; import { UpdateVgwRequestBodyContent } from './model/UpdateVgwRequestBodyContent'; import { UpdateVgwResponse } from './model/UpdateVgwResponse'; +import { UpdateVgwSpecificationRequestBody } from './model/UpdateVgwSpecificationRequestBody'; +import { UpdateVgwSpecificationRequestBodyContent } from './model/UpdateVgwSpecificationRequestBodyContent'; import { UpdateVpnAccessPolicyRequest } from './model/UpdateVpnAccessPolicyRequest'; import { UpdateVpnAccessPolicyRequestBody } from './model/UpdateVpnAccessPolicyRequestBody'; import { UpdateVpnAccessPolicyRequestBodyContent } from './model/UpdateVpnAccessPolicyRequestBodyContent'; @@ -1052,6 +1056,26 @@ export class VpnClient { return this.hcClient.sendRequest(options); } + /** + * 对单个网关规格进行修改,可以升配或降配 + * + * Please refer to HUAWEI cloud API Explorer for details. + * + * @summary 修改网关规格 + * @param {string} vgwId VPN网关实例ID + * @param {UpdateVgwSpecificationRequestBody} updateVgwSpecificationRequestBody 请求参数对象 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public updatePostpaidVgwSpecification(updatePostpaidVgwSpecificationRequest?: UpdatePostpaidVgwSpecificationRequest): Promise { + const options = ParamCreater().updatePostpaidVgwSpecification(updatePostpaidVgwSpecificationRequest); + + // @ts-ignore + options['responseHeaders'] = ['header-response-token']; + + return this.hcClient.sendRequest(options); + } + /** * 根据VPN网关ID,更新指定的VPN网关 * @@ -3307,6 +3331,52 @@ export const ParamCreater = function () { return options; }, + /** + * 对单个网关规格进行修改,可以升配或降配 + * + * Please refer to HUAWEI cloud API Explorer for details. + */ + updatePostpaidVgwSpecification(updatePostpaidVgwSpecificationRequest?: UpdatePostpaidVgwSpecificationRequest) { + const options = { + method: "POST", + url: "/v5/{project_id}/vpn-gateways/{vgw_id}/update-specification", + contentType: "application/json", + queryParams: {}, + pathParams: {}, + headers: {}, + data: {} + }; + const localVarHeaderParameter = {} as any; + + let body: any; + + let vgwId; + + if (updatePostpaidVgwSpecificationRequest !== null && updatePostpaidVgwSpecificationRequest !== undefined) { + if (updatePostpaidVgwSpecificationRequest instanceof UpdatePostpaidVgwSpecificationRequest) { + vgwId = updatePostpaidVgwSpecificationRequest.vgwId; + body = updatePostpaidVgwSpecificationRequest.body + } else { + vgwId = updatePostpaidVgwSpecificationRequest['vgw_id']; + body = updatePostpaidVgwSpecificationRequest['body']; + } + } + + + if (vgwId === null || vgwId === undefined) { + throw new RequiredError('vgwId','Required parameter vgwId was null or undefined when calling updatePostpaidVgwSpecification.'); + } + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling body.'); + } + localVarHeaderParameter['Content-Type'] = 'application/json'; + + options.data = body !== undefined ? body : {}; + options.pathParams = { 'vgw_id': vgwId, }; + options.headers = localVarHeaderParameter; + return options; + }, + /** * 根据VPN网关ID,更新指定的VPN网关 * diff --git a/services/vpn/v5/model/UpdatePostpaidVgwSpecificationRequest.ts b/services/vpn/v5/model/UpdatePostpaidVgwSpecificationRequest.ts new file mode 100644 index 000000000..a25e1df6a --- /dev/null +++ b/services/vpn/v5/model/UpdatePostpaidVgwSpecificationRequest.ts @@ -0,0 +1,24 @@ +import { UpdateVgwSpecificationRequestBody } from './UpdateVgwSpecificationRequestBody'; + + +export class UpdatePostpaidVgwSpecificationRequest { + private 'vgw_id'?: string; + public body?: UpdateVgwSpecificationRequestBody; + public constructor(vgwId?: string) { + this['vgw_id'] = vgwId; + } + public withVgwId(vgwId: string): UpdatePostpaidVgwSpecificationRequest { + this['vgw_id'] = vgwId; + return this; + } + public set vgwId(vgwId: string | undefined) { + this['vgw_id'] = vgwId; + } + public get vgwId(): string | undefined { + return this['vgw_id']; + } + public withBody(body: UpdateVgwSpecificationRequestBody): UpdatePostpaidVgwSpecificationRequest { + this['body'] = body; + return this; + } +} \ No newline at end of file diff --git a/services/vpn/v5/model/UpdatePostpaidVgwSpecificationResponse.ts b/services/vpn/v5/model/UpdatePostpaidVgwSpecificationResponse.ts new file mode 100644 index 000000000..bcfcc8673 --- /dev/null +++ b/services/vpn/v5/model/UpdatePostpaidVgwSpecificationResponse.ts @@ -0,0 +1,42 @@ +import { UpdateResponseVpnGateway } from './UpdateResponseVpnGateway'; + +import { SdkResponse } from "@huaweicloud/huaweicloud-sdk-core/SdkResponse"; + +export class UpdatePostpaidVgwSpecificationResponse extends SdkResponse { + private 'vpn_gateway'?: UpdateResponseVpnGateway; + private 'request_id'?: string; + private 'header-response-token'?: string; + public constructor() { + super(); + } + public withVpnGateway(vpnGateway: UpdateResponseVpnGateway): UpdatePostpaidVgwSpecificationResponse { + this['vpn_gateway'] = vpnGateway; + return this; + } + public set vpnGateway(vpnGateway: UpdateResponseVpnGateway | undefined) { + this['vpn_gateway'] = vpnGateway; + } + public get vpnGateway(): UpdateResponseVpnGateway | undefined { + return this['vpn_gateway']; + } + public withRequestId(requestId: string): UpdatePostpaidVgwSpecificationResponse { + this['request_id'] = requestId; + return this; + } + public set requestId(requestId: string | undefined) { + this['request_id'] = requestId; + } + public get requestId(): string | undefined { + return this['request_id']; + } + public withHeaderResponseToken(headerResponseToken: string): UpdatePostpaidVgwSpecificationResponse { + this['header-response-token'] = headerResponseToken; + return this; + } + public set headerResponseToken(headerResponseToken: string | undefined) { + this['header-response-token'] = headerResponseToken; + } + public get headerResponseToken(): string | undefined { + return this['header-response-token']; + } +} \ No newline at end of file diff --git a/services/vpn/v5/model/UpdateVgwSpecificationRequestBody.ts b/services/vpn/v5/model/UpdateVgwSpecificationRequestBody.ts new file mode 100644 index 000000000..dcf301ddf --- /dev/null +++ b/services/vpn/v5/model/UpdateVgwSpecificationRequestBody.ts @@ -0,0 +1,19 @@ +import { UpdateVgwSpecificationRequestBodyContent } from './UpdateVgwSpecificationRequestBodyContent'; + + +export class UpdateVgwSpecificationRequestBody { + private 'vpn_gateway'?: UpdateVgwSpecificationRequestBodyContent; + public constructor(vpnGateway?: UpdateVgwSpecificationRequestBodyContent) { + this['vpn_gateway'] = vpnGateway; + } + public withVpnGateway(vpnGateway: UpdateVgwSpecificationRequestBodyContent): UpdateVgwSpecificationRequestBody { + this['vpn_gateway'] = vpnGateway; + return this; + } + public set vpnGateway(vpnGateway: UpdateVgwSpecificationRequestBodyContent | undefined) { + this['vpn_gateway'] = vpnGateway; + } + public get vpnGateway(): UpdateVgwSpecificationRequestBodyContent | undefined { + return this['vpn_gateway']; + } +} \ No newline at end of file diff --git a/services/vpn/v5/model/UpdateVgwSpecificationRequestBodyContent.ts b/services/vpn/v5/model/UpdateVgwSpecificationRequestBodyContent.ts new file mode 100644 index 000000000..f15b21cd3 --- /dev/null +++ b/services/vpn/v5/model/UpdateVgwSpecificationRequestBodyContent.ts @@ -0,0 +1,24 @@ + + +export class UpdateVgwSpecificationRequestBodyContent { + public flavor?: UpdateVgwSpecificationRequestBodyContentFlavorEnum | string; + public constructor(flavor?: string) { + this['flavor'] = flavor; + } + public withFlavor(flavor: UpdateVgwSpecificationRequestBodyContentFlavorEnum | string): UpdateVgwSpecificationRequestBodyContent { + this['flavor'] = flavor; + return this; + } +} + +/** + * @export + * @enum {string} + */ +export enum UpdateVgwSpecificationRequestBodyContentFlavorEnum { + BASIC = 'Basic', + PROFESSIONAL1 = 'Professional1', + PROFESSIONAL2 = 'Professional2', + PROFESSIONAL1_NONFIXEDIP = 'Professional1-NonFixedIP', + PROFESSIONAL2_NONFIXEDIP = 'Professional2-NonFixedIP' +} diff --git a/services/vpn/v5/public-api.ts b/services/vpn/v5/public-api.ts index 9ab40b36e..037460192 100644 --- a/services/vpn/v5/public-api.ts +++ b/services/vpn/v5/public-api.ts @@ -190,6 +190,8 @@ export * from './model/UpdateP2cVgwRequest'; export * from './model/UpdateP2cVgwRequestBody'; export * from './model/UpdateP2cVgwRequestBodyContent'; export * from './model/UpdateP2cVgwResponse'; +export * from './model/UpdatePostpaidVgwSpecificationRequest'; +export * from './model/UpdatePostpaidVgwSpecificationResponse'; export * from './model/UpdateRequestPolicyTemplate'; export * from './model/UpdateResponseVpnConnection'; export * from './model/UpdateResponseVpnGateway'; @@ -205,6 +207,8 @@ export * from './model/UpdateVgwRequest'; export * from './model/UpdateVgwRequestBody'; export * from './model/UpdateVgwRequestBodyContent'; export * from './model/UpdateVgwResponse'; +export * from './model/UpdateVgwSpecificationRequestBody'; +export * from './model/UpdateVgwSpecificationRequestBodyContent'; export * from './model/UpdateVpnAccessPolicyRequest'; export * from './model/UpdateVpnAccessPolicyRequestBody'; export * from './model/UpdateVpnAccessPolicyRequestBodyContent';