|
| 1 | +/* |
| 2 | + * Licensed to the Apache Software Foundation (ASF) under one |
| 3 | + * or more contributor license agreements. See the NOTICE file |
| 4 | + * distributed with this work for additional information |
| 5 | + * regarding copyright ownership. The ASF licenses this file |
| 6 | + * to you under the Apache License, Version 2.0 (the |
| 7 | + * "License"); you may not use this file except in compliance |
| 8 | + * with the License. You may obtain a copy of the License at |
| 9 | + * |
| 10 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | + * |
| 12 | + * Unless required by applicable law or agreed to in writing, |
| 13 | + * software distributed under the License is distributed on an |
| 14 | + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | + * KIND, either express or implied. See the License for the |
| 16 | + * specific language governing permissions and limitations |
| 17 | + * under the License. |
| 18 | + */ |
| 19 | +using System.Collections.Generic; |
| 20 | + |
| 21 | +using Aliyun.Acs.Core; |
| 22 | +using Aliyun.Acs.Core.Http; |
| 23 | +using Aliyun.Acs.Core.Transform; |
| 24 | +using Aliyun.Acs.Core.Utils; |
| 25 | +using Aliyun.Acs.BailianChatBot; |
| 26 | +using Aliyun.Acs.BailianChatBot.Transform; |
| 27 | +using Aliyun.Acs.BailianChatBot.Transform.V20241105; |
| 28 | + |
| 29 | +namespace Aliyun.Acs.BailianChatBot.Model.V20241105 |
| 30 | +{ |
| 31 | + public class SseChatRequest : RpcAcsRequest<SseChatResponse> |
| 32 | + { |
| 33 | + public SseChatRequest() |
| 34 | + : base("BailianChatBot", "2024-11-05", "SseChat") |
| 35 | + { |
| 36 | + Method = MethodType.POST; |
| 37 | + } |
| 38 | + |
| 39 | + private string sessionId; |
| 40 | + |
| 41 | + private string command; |
| 42 | + |
| 43 | + private string vendorParam; |
| 44 | + |
| 45 | + private string senderId; |
| 46 | + |
| 47 | + private string appId; |
| 48 | + |
| 49 | + private string senderNick; |
| 50 | + |
| 51 | + private string utterance; |
| 52 | + |
| 53 | + private string workspaceId; |
| 54 | + |
| 55 | + public string SessionId |
| 56 | + { |
| 57 | + get |
| 58 | + { |
| 59 | + return sessionId; |
| 60 | + } |
| 61 | + set |
| 62 | + { |
| 63 | + sessionId = value; |
| 64 | + DictionaryUtil.Add(QueryParameters, "SessionId", value); |
| 65 | + } |
| 66 | + } |
| 67 | + |
| 68 | + public string Command |
| 69 | + { |
| 70 | + get |
| 71 | + { |
| 72 | + return command; |
| 73 | + } |
| 74 | + set |
| 75 | + { |
| 76 | + command = value; |
| 77 | + DictionaryUtil.Add(QueryParameters, "Command", value); |
| 78 | + } |
| 79 | + } |
| 80 | + |
| 81 | + public string VendorParam |
| 82 | + { |
| 83 | + get |
| 84 | + { |
| 85 | + return vendorParam; |
| 86 | + } |
| 87 | + set |
| 88 | + { |
| 89 | + vendorParam = value; |
| 90 | + DictionaryUtil.Add(QueryParameters, "VendorParam", value); |
| 91 | + } |
| 92 | + } |
| 93 | + |
| 94 | + public string SenderId |
| 95 | + { |
| 96 | + get |
| 97 | + { |
| 98 | + return senderId; |
| 99 | + } |
| 100 | + set |
| 101 | + { |
| 102 | + senderId = value; |
| 103 | + DictionaryUtil.Add(QueryParameters, "SenderId", value); |
| 104 | + } |
| 105 | + } |
| 106 | + |
| 107 | + public string AppId |
| 108 | + { |
| 109 | + get |
| 110 | + { |
| 111 | + return appId; |
| 112 | + } |
| 113 | + set |
| 114 | + { |
| 115 | + appId = value; |
| 116 | + DictionaryUtil.Add(QueryParameters, "AppId", value); |
| 117 | + } |
| 118 | + } |
| 119 | + |
| 120 | + public string SenderNick |
| 121 | + { |
| 122 | + get |
| 123 | + { |
| 124 | + return senderNick; |
| 125 | + } |
| 126 | + set |
| 127 | + { |
| 128 | + senderNick = value; |
| 129 | + DictionaryUtil.Add(QueryParameters, "SenderNick", value); |
| 130 | + } |
| 131 | + } |
| 132 | + |
| 133 | + public string Utterance |
| 134 | + { |
| 135 | + get |
| 136 | + { |
| 137 | + return utterance; |
| 138 | + } |
| 139 | + set |
| 140 | + { |
| 141 | + utterance = value; |
| 142 | + DictionaryUtil.Add(QueryParameters, "Utterance", value); |
| 143 | + } |
| 144 | + } |
| 145 | + |
| 146 | + public string WorkspaceId |
| 147 | + { |
| 148 | + get |
| 149 | + { |
| 150 | + return workspaceId; |
| 151 | + } |
| 152 | + set |
| 153 | + { |
| 154 | + workspaceId = value; |
| 155 | + DictionaryUtil.Add(QueryParameters, "WorkspaceId", value); |
| 156 | + } |
| 157 | + } |
| 158 | + |
| 159 | + public override bool CheckShowJsonItemName() |
| 160 | + { |
| 161 | + return false; |
| 162 | + } |
| 163 | + |
| 164 | + public override SseChatResponse GetResponse(UnmarshallerContext unmarshallerContext) |
| 165 | + { |
| 166 | + return SseChatResponseUnmarshaller.Unmarshall(unmarshallerContext); |
| 167 | + } |
| 168 | + } |
| 169 | +} |
0 commit comments