|
| 1 | +// This file is auto-generated, don't edit it. Thanks. |
| 2 | +package com.aliyun.ccc20200527; |
| 3 | + |
| 4 | +import com.aliyun.tea.*; |
| 5 | +import com.aliyun.ccc20200527.models.*; |
| 6 | + |
| 7 | +public class Client extends com.aliyun.teaopenapi.Client { |
| 8 | + |
| 9 | + public Client(com.aliyun.teaopenapi.models.Config config) throws Exception { |
| 10 | + super(config); |
| 11 | + this._endpointRule = "regional"; |
| 12 | + this._endpointMap = TeaConverter.buildMap( |
| 13 | + new TeaPair("ap-northeast-1", "ccc.aliyuncs.com"), |
| 14 | + new TeaPair("ap-south-1", "ccc.aliyuncs.com"), |
| 15 | + new TeaPair("ap-southeast-1", "ccc.aliyuncs.com"), |
| 16 | + new TeaPair("ap-southeast-2", "ccc.aliyuncs.com"), |
| 17 | + new TeaPair("ap-southeast-3", "ccc.aliyuncs.com"), |
| 18 | + new TeaPair("ap-southeast-5", "ccc.aliyuncs.com"), |
| 19 | + new TeaPair("cn-beijing", "ccc.aliyuncs.com"), |
| 20 | + new TeaPair("cn-chengdu", "ccc.aliyuncs.com"), |
| 21 | + new TeaPair("cn-hongkong", "ccc.aliyuncs.com"), |
| 22 | + new TeaPair("cn-huhehaote", "ccc.aliyuncs.com"), |
| 23 | + new TeaPair("cn-qingdao", "ccc.aliyuncs.com"), |
| 24 | + new TeaPair("cn-shenzhen", "ccc.aliyuncs.com"), |
| 25 | + new TeaPair("cn-zhangjiakou", "ccc.aliyuncs.com"), |
| 26 | + new TeaPair("eu-central-1", "ccc.aliyuncs.com"), |
| 27 | + new TeaPair("eu-west-1", "ccc.aliyuncs.com"), |
| 28 | + new TeaPair("me-east-1", "ccc.aliyuncs.com"), |
| 29 | + new TeaPair("us-east-1", "ccc.aliyuncs.com"), |
| 30 | + new TeaPair("us-west-1", "ccc.aliyuncs.com"), |
| 31 | + new TeaPair("cn-hangzhou-finance", "ccc.aliyuncs.com"), |
| 32 | + new TeaPair("cn-shenzhen-finance-1", "ccc.aliyuncs.com"), |
| 33 | + new TeaPair("cn-shanghai-finance-1", "ccc.aliyuncs.com"), |
| 34 | + new TeaPair("cn-north-2-gov-1", "ccc.aliyuncs.com") |
| 35 | + ); |
| 36 | + this.checkConfig(config); |
| 37 | + this._endpoint = this.getEndpoint("ccc", _regionId, _endpointRule, _network, _suffix, _endpointMap, _endpoint); |
| 38 | + } |
| 39 | + |
| 40 | + |
| 41 | + public String getEndpoint(String productId, String regionId, String endpointRule, String network, String suffix, java.util.Map<String, String> endpointMap, String endpoint) throws Exception { |
| 42 | + if (!com.aliyun.teautil.Common.empty(endpoint)) { |
| 43 | + return endpoint; |
| 44 | + } |
| 45 | + |
| 46 | + if (!com.aliyun.teautil.Common.isUnset(endpointMap) && !com.aliyun.teautil.Common.empty(endpointMap.get(regionId))) { |
| 47 | + return endpointMap.get(regionId); |
| 48 | + } |
| 49 | + |
| 50 | + return com.aliyun.endpointutil.Client.getEndpointRules(productId, regionId, endpointRule, network, suffix); |
| 51 | + } |
| 52 | + |
| 53 | + /** |
| 54 | + * @param request CheckServiceLinkedRoleForDeletingRequest |
| 55 | + * @param runtime runtime options for this request RuntimeOptions |
| 56 | + * @return CheckServiceLinkedRoleForDeletingResponse |
| 57 | + */ |
| 58 | + public CheckServiceLinkedRoleForDeletingResponse checkServiceLinkedRoleForDeletingWithOptions(CheckServiceLinkedRoleForDeletingRequest request, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { |
| 59 | + com.aliyun.teautil.Common.validateModel(request); |
| 60 | + java.util.Map<String, Object> query = new java.util.HashMap<>(); |
| 61 | + if (!com.aliyun.teautil.Common.isUnset(request.deletionTaskId)) { |
| 62 | + query.put("DeletionTaskId", request.deletionTaskId); |
| 63 | + } |
| 64 | + |
| 65 | + if (!com.aliyun.teautil.Common.isUnset(request.roleArn)) { |
| 66 | + query.put("RoleArn", request.roleArn); |
| 67 | + } |
| 68 | + |
| 69 | + if (!com.aliyun.teautil.Common.isUnset(request.SPIRegionId)) { |
| 70 | + query.put("SPIRegionId", request.SPIRegionId); |
| 71 | + } |
| 72 | + |
| 73 | + if (!com.aliyun.teautil.Common.isUnset(request.serviceName)) { |
| 74 | + query.put("ServiceName", request.serviceName); |
| 75 | + } |
| 76 | + |
| 77 | + com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( |
| 78 | + new TeaPair("query", com.aliyun.openapiutil.Client.query(query)) |
| 79 | + )); |
| 80 | + com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( |
| 81 | + new TeaPair("action", "CheckServiceLinkedRoleForDeleting"), |
| 82 | + new TeaPair("version", "2020-05-27"), |
| 83 | + new TeaPair("protocol", "HTTPS"), |
| 84 | + new TeaPair("pathname", "/"), |
| 85 | + new TeaPair("method", "POST"), |
| 86 | + new TeaPair("authType", "AK"), |
| 87 | + new TeaPair("style", "RPC"), |
| 88 | + new TeaPair("reqBodyType", "formData"), |
| 89 | + new TeaPair("bodyType", "json") |
| 90 | + )); |
| 91 | + return TeaModel.toModel(this.callApi(params, req, runtime), new CheckServiceLinkedRoleForDeletingResponse()); |
| 92 | + } |
| 93 | + |
| 94 | + /** |
| 95 | + * @param request CheckServiceLinkedRoleForDeletingRequest |
| 96 | + * @return CheckServiceLinkedRoleForDeletingResponse |
| 97 | + */ |
| 98 | + public CheckServiceLinkedRoleForDeletingResponse checkServiceLinkedRoleForDeleting(CheckServiceLinkedRoleForDeletingRequest request) throws Exception { |
| 99 | + com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); |
| 100 | + return this.checkServiceLinkedRoleForDeletingWithOptions(request, runtime); |
| 101 | + } |
| 102 | +} |
0 commit comments