|
| 1 | +/* |
| 2 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 3 | + * you may not use this file except in compliance with the License. |
| 4 | + * You may obtain a copy of the License at |
| 5 | + * |
| 6 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 7 | + * |
| 8 | + * Unless required by applicable law or agreed to in writing, software |
| 9 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | + * See the License for the specific language governing permissions and |
| 12 | + * limitations under the License. |
| 13 | + */ |
| 14 | + |
| 15 | +package com.aliyuncs.brain_industrial.model.v20200920; |
| 16 | + |
| 17 | +import com.aliyuncs.RpcAcsRequest; |
| 18 | +import java.util.Map; |
| 19 | +import com.google.gson.Gson; |
| 20 | +import com.google.gson.annotations.SerializedName; |
| 21 | +import com.aliyuncs.http.ProtocolType; |
| 22 | +import com.aliyuncs.http.MethodType; |
| 23 | +import com.aliyuncs.brain_industrial.Endpoint; |
| 24 | + |
| 25 | +/** |
| 26 | + * @author auto create |
| 27 | + * @version |
| 28 | + */ |
| 29 | +public class AicsOpenApiInvokeRequest extends RpcAcsRequest<AicsOpenApiInvokeResponse> { |
| 30 | + |
| 31 | + |
| 32 | + private String type; |
| 33 | + |
| 34 | + @SerializedName("param") |
| 35 | + private Map<String,String> param; |
| 36 | + |
| 37 | + private String serviceId; |
| 38 | + |
| 39 | + private String nodeId; |
| 40 | + public AicsOpenApiInvokeRequest() { |
| 41 | + super("brain-industrial", "2020-09-20", "AicsOpenApiInvoke", "aistudio"); |
| 42 | + setProtocol(ProtocolType.HTTPS); |
| 43 | + setMethod(MethodType.POST); |
| 44 | + try { |
| 45 | + com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); |
| 46 | + com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); |
| 47 | + } catch (Exception e) {} |
| 48 | + } |
| 49 | + |
| 50 | + public String getType() { |
| 51 | + return this.type; |
| 52 | + } |
| 53 | + |
| 54 | + public void setType(String type) { |
| 55 | + this.type = type; |
| 56 | + if(type != null){ |
| 57 | + putQueryParameter("Type", type); |
| 58 | + } |
| 59 | + } |
| 60 | + |
| 61 | + public Map<String,String> getParam() { |
| 62 | + return this.param; |
| 63 | + } |
| 64 | + |
| 65 | + public void setParam(Map<String,String> param) { |
| 66 | + this.param = param; |
| 67 | + if (param != null) { |
| 68 | + putBodyParameter("Param" , new Gson().toJson(param)); |
| 69 | + } |
| 70 | + } |
| 71 | + |
| 72 | + public String getServiceId() { |
| 73 | + return this.serviceId; |
| 74 | + } |
| 75 | + |
| 76 | + public void setServiceId(String serviceId) { |
| 77 | + this.serviceId = serviceId; |
| 78 | + if(serviceId != null){ |
| 79 | + putQueryParameter("ServiceId", serviceId); |
| 80 | + } |
| 81 | + } |
| 82 | + |
| 83 | + public String getNodeId() { |
| 84 | + return this.nodeId; |
| 85 | + } |
| 86 | + |
| 87 | + public void setNodeId(String nodeId) { |
| 88 | + this.nodeId = nodeId; |
| 89 | + if(nodeId != null){ |
| 90 | + putQueryParameter("NodeId", nodeId); |
| 91 | + } |
| 92 | + } |
| 93 | + |
| 94 | + @Override |
| 95 | + public Class<AicsOpenApiInvokeResponse> getResponseClass() { |
| 96 | + return AicsOpenApiInvokeResponse.class; |
| 97 | + } |
| 98 | + |
| 99 | +} |
0 commit comments