| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | // <auto-generated/> |
| | 5 | |
|
| | 6 | | #nullable disable |
| | 7 | |
|
| | 8 | | using System.Collections.Generic; |
| | 9 | | using System.Text.Json; |
| | 10 | | using Azure.Core; |
| | 11 | |
|
| | 12 | | namespace Azure.Analytics.Synapse.Artifacts.Models |
| | 13 | | { |
| | 14 | | public partial class SapTableLinkedService : IUtf8JsonSerializable |
| | 15 | | { |
| | 16 | | void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) |
| | 17 | | { |
| 0 | 18 | | writer.WriteStartObject(); |
| 0 | 19 | | writer.WritePropertyName("type"); |
| 0 | 20 | | writer.WriteStringValue(Type); |
| 0 | 21 | | if (Optional.IsDefined(ConnectVia)) |
| | 22 | | { |
| 0 | 23 | | writer.WritePropertyName("connectVia"); |
| 0 | 24 | | writer.WriteObjectValue(ConnectVia); |
| | 25 | | } |
| 0 | 26 | | if (Optional.IsDefined(Description)) |
| | 27 | | { |
| 0 | 28 | | writer.WritePropertyName("description"); |
| 0 | 29 | | writer.WriteStringValue(Description); |
| | 30 | | } |
| 0 | 31 | | if (Optional.IsCollectionDefined(Parameters)) |
| | 32 | | { |
| 0 | 33 | | writer.WritePropertyName("parameters"); |
| 0 | 34 | | writer.WriteStartObject(); |
| 0 | 35 | | foreach (var item in Parameters) |
| | 36 | | { |
| 0 | 37 | | writer.WritePropertyName(item.Key); |
| 0 | 38 | | writer.WriteObjectValue(item.Value); |
| | 39 | | } |
| 0 | 40 | | writer.WriteEndObject(); |
| | 41 | | } |
| 0 | 42 | | if (Optional.IsCollectionDefined(Annotations)) |
| | 43 | | { |
| 0 | 44 | | writer.WritePropertyName("annotations"); |
| 0 | 45 | | writer.WriteStartArray(); |
| 0 | 46 | | foreach (var item in Annotations) |
| | 47 | | { |
| 0 | 48 | | writer.WriteObjectValue(item); |
| | 49 | | } |
| 0 | 50 | | writer.WriteEndArray(); |
| | 51 | | } |
| 0 | 52 | | writer.WritePropertyName("typeProperties"); |
| 0 | 53 | | writer.WriteStartObject(); |
| 0 | 54 | | if (Optional.IsDefined(Server)) |
| | 55 | | { |
| 0 | 56 | | writer.WritePropertyName("server"); |
| 0 | 57 | | writer.WriteObjectValue(Server); |
| | 58 | | } |
| 0 | 59 | | if (Optional.IsDefined(SystemNumber)) |
| | 60 | | { |
| 0 | 61 | | writer.WritePropertyName("systemNumber"); |
| 0 | 62 | | writer.WriteObjectValue(SystemNumber); |
| | 63 | | } |
| 0 | 64 | | if (Optional.IsDefined(ClientId)) |
| | 65 | | { |
| 0 | 66 | | writer.WritePropertyName("clientId"); |
| 0 | 67 | | writer.WriteObjectValue(ClientId); |
| | 68 | | } |
| 0 | 69 | | if (Optional.IsDefined(Language)) |
| | 70 | | { |
| 0 | 71 | | writer.WritePropertyName("language"); |
| 0 | 72 | | writer.WriteObjectValue(Language); |
| | 73 | | } |
| 0 | 74 | | if (Optional.IsDefined(SystemId)) |
| | 75 | | { |
| 0 | 76 | | writer.WritePropertyName("systemId"); |
| 0 | 77 | | writer.WriteObjectValue(SystemId); |
| | 78 | | } |
| 0 | 79 | | if (Optional.IsDefined(UserName)) |
| | 80 | | { |
| 0 | 81 | | writer.WritePropertyName("userName"); |
| 0 | 82 | | writer.WriteObjectValue(UserName); |
| | 83 | | } |
| 0 | 84 | | if (Optional.IsDefined(Password)) |
| | 85 | | { |
| 0 | 86 | | writer.WritePropertyName("password"); |
| 0 | 87 | | writer.WriteObjectValue(Password); |
| | 88 | | } |
| 0 | 89 | | if (Optional.IsDefined(MessageServer)) |
| | 90 | | { |
| 0 | 91 | | writer.WritePropertyName("messageServer"); |
| 0 | 92 | | writer.WriteObjectValue(MessageServer); |
| | 93 | | } |
| 0 | 94 | | if (Optional.IsDefined(MessageServerService)) |
| | 95 | | { |
| 0 | 96 | | writer.WritePropertyName("messageServerService"); |
| 0 | 97 | | writer.WriteObjectValue(MessageServerService); |
| | 98 | | } |
| 0 | 99 | | if (Optional.IsDefined(SncMode)) |
| | 100 | | { |
| 0 | 101 | | writer.WritePropertyName("sncMode"); |
| 0 | 102 | | writer.WriteObjectValue(SncMode); |
| | 103 | | } |
| 0 | 104 | | if (Optional.IsDefined(SncMyName)) |
| | 105 | | { |
| 0 | 106 | | writer.WritePropertyName("sncMyName"); |
| 0 | 107 | | writer.WriteObjectValue(SncMyName); |
| | 108 | | } |
| 0 | 109 | | if (Optional.IsDefined(SncPartnerName)) |
| | 110 | | { |
| 0 | 111 | | writer.WritePropertyName("sncPartnerName"); |
| 0 | 112 | | writer.WriteObjectValue(SncPartnerName); |
| | 113 | | } |
| 0 | 114 | | if (Optional.IsDefined(SncLibraryPath)) |
| | 115 | | { |
| 0 | 116 | | writer.WritePropertyName("sncLibraryPath"); |
| 0 | 117 | | writer.WriteObjectValue(SncLibraryPath); |
| | 118 | | } |
| 0 | 119 | | if (Optional.IsDefined(SncQop)) |
| | 120 | | { |
| 0 | 121 | | writer.WritePropertyName("sncQop"); |
| 0 | 122 | | writer.WriteObjectValue(SncQop); |
| | 123 | | } |
| 0 | 124 | | if (Optional.IsDefined(LogonGroup)) |
| | 125 | | { |
| 0 | 126 | | writer.WritePropertyName("logonGroup"); |
| 0 | 127 | | writer.WriteObjectValue(LogonGroup); |
| | 128 | | } |
| 0 | 129 | | if (Optional.IsDefined(EncryptedCredential)) |
| | 130 | | { |
| 0 | 131 | | writer.WritePropertyName("encryptedCredential"); |
| 0 | 132 | | writer.WriteObjectValue(EncryptedCredential); |
| | 133 | | } |
| 0 | 134 | | writer.WriteEndObject(); |
| 0 | 135 | | foreach (var item in AdditionalProperties) |
| | 136 | | { |
| 0 | 137 | | writer.WritePropertyName(item.Key); |
| 0 | 138 | | writer.WriteObjectValue(item.Value); |
| | 139 | | } |
| 0 | 140 | | writer.WriteEndObject(); |
| 0 | 141 | | } |
| | 142 | |
|
| | 143 | | internal static SapTableLinkedService DeserializeSapTableLinkedService(JsonElement element) |
| | 144 | | { |
| 0 | 145 | | string type = default; |
| 0 | 146 | | Optional<IntegrationRuntimeReference> connectVia = default; |
| 0 | 147 | | Optional<string> description = default; |
| 0 | 148 | | Optional<IDictionary<string, ParameterSpecification>> parameters = default; |
| 0 | 149 | | Optional<IList<object>> annotations = default; |
| 0 | 150 | | Optional<object> server = default; |
| 0 | 151 | | Optional<object> systemNumber = default; |
| 0 | 152 | | Optional<object> clientId = default; |
| 0 | 153 | | Optional<object> language = default; |
| 0 | 154 | | Optional<object> systemId = default; |
| 0 | 155 | | Optional<object> userName = default; |
| 0 | 156 | | Optional<SecretBase> password = default; |
| 0 | 157 | | Optional<object> messageServer = default; |
| 0 | 158 | | Optional<object> messageServerService = default; |
| 0 | 159 | | Optional<object> sncMode = default; |
| 0 | 160 | | Optional<object> sncMyName = default; |
| 0 | 161 | | Optional<object> sncPartnerName = default; |
| 0 | 162 | | Optional<object> sncLibraryPath = default; |
| 0 | 163 | | Optional<object> sncQop = default; |
| 0 | 164 | | Optional<object> logonGroup = default; |
| 0 | 165 | | Optional<object> encryptedCredential = default; |
| 0 | 166 | | IDictionary<string, object> additionalProperties = default; |
| 0 | 167 | | Dictionary<string, object> additionalPropertiesDictionary = default; |
| 0 | 168 | | foreach (var property in element.EnumerateObject()) |
| | 169 | | { |
| 0 | 170 | | if (property.NameEquals("type")) |
| | 171 | | { |
| 0 | 172 | | type = property.Value.GetString(); |
| 0 | 173 | | continue; |
| | 174 | | } |
| 0 | 175 | | if (property.NameEquals("connectVia")) |
| | 176 | | { |
| 0 | 177 | | connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value); |
| 0 | 178 | | continue; |
| | 179 | | } |
| 0 | 180 | | if (property.NameEquals("description")) |
| | 181 | | { |
| 0 | 182 | | description = property.Value.GetString(); |
| 0 | 183 | | continue; |
| | 184 | | } |
| 0 | 185 | | if (property.NameEquals("parameters")) |
| | 186 | | { |
| 0 | 187 | | Dictionary<string, ParameterSpecification> dictionary = new Dictionary<string, ParameterSpecificatio |
| 0 | 188 | | foreach (var property0 in property.Value.EnumerateObject()) |
| | 189 | | { |
| 0 | 190 | | dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property |
| | 191 | | } |
| 0 | 192 | | parameters = dictionary; |
| 0 | 193 | | continue; |
| | 194 | | } |
| 0 | 195 | | if (property.NameEquals("annotations")) |
| | 196 | | { |
| 0 | 197 | | List<object> array = new List<object>(); |
| 0 | 198 | | foreach (var item in property.Value.EnumerateArray()) |
| | 199 | | { |
| 0 | 200 | | array.Add(item.GetObject()); |
| | 201 | | } |
| 0 | 202 | | annotations = array; |
| 0 | 203 | | continue; |
| | 204 | | } |
| 0 | 205 | | if (property.NameEquals("typeProperties")) |
| | 206 | | { |
| 0 | 207 | | foreach (var property0 in property.Value.EnumerateObject()) |
| | 208 | | { |
| 0 | 209 | | if (property0.NameEquals("server")) |
| | 210 | | { |
| 0 | 211 | | server = property0.Value.GetObject(); |
| 0 | 212 | | continue; |
| | 213 | | } |
| 0 | 214 | | if (property0.NameEquals("systemNumber")) |
| | 215 | | { |
| 0 | 216 | | systemNumber = property0.Value.GetObject(); |
| 0 | 217 | | continue; |
| | 218 | | } |
| 0 | 219 | | if (property0.NameEquals("clientId")) |
| | 220 | | { |
| 0 | 221 | | clientId = property0.Value.GetObject(); |
| 0 | 222 | | continue; |
| | 223 | | } |
| 0 | 224 | | if (property0.NameEquals("language")) |
| | 225 | | { |
| 0 | 226 | | language = property0.Value.GetObject(); |
| 0 | 227 | | continue; |
| | 228 | | } |
| 0 | 229 | | if (property0.NameEquals("systemId")) |
| | 230 | | { |
| 0 | 231 | | systemId = property0.Value.GetObject(); |
| 0 | 232 | | continue; |
| | 233 | | } |
| 0 | 234 | | if (property0.NameEquals("userName")) |
| | 235 | | { |
| 0 | 236 | | userName = property0.Value.GetObject(); |
| 0 | 237 | | continue; |
| | 238 | | } |
| 0 | 239 | | if (property0.NameEquals("password")) |
| | 240 | | { |
| 0 | 241 | | password = SecretBase.DeserializeSecretBase(property0.Value); |
| 0 | 242 | | continue; |
| | 243 | | } |
| 0 | 244 | | if (property0.NameEquals("messageServer")) |
| | 245 | | { |
| 0 | 246 | | messageServer = property0.Value.GetObject(); |
| 0 | 247 | | continue; |
| | 248 | | } |
| 0 | 249 | | if (property0.NameEquals("messageServerService")) |
| | 250 | | { |
| 0 | 251 | | messageServerService = property0.Value.GetObject(); |
| 0 | 252 | | continue; |
| | 253 | | } |
| 0 | 254 | | if (property0.NameEquals("sncMode")) |
| | 255 | | { |
| 0 | 256 | | sncMode = property0.Value.GetObject(); |
| 0 | 257 | | continue; |
| | 258 | | } |
| 0 | 259 | | if (property0.NameEquals("sncMyName")) |
| | 260 | | { |
| 0 | 261 | | sncMyName = property0.Value.GetObject(); |
| 0 | 262 | | continue; |
| | 263 | | } |
| 0 | 264 | | if (property0.NameEquals("sncPartnerName")) |
| | 265 | | { |
| 0 | 266 | | sncPartnerName = property0.Value.GetObject(); |
| 0 | 267 | | continue; |
| | 268 | | } |
| 0 | 269 | | if (property0.NameEquals("sncLibraryPath")) |
| | 270 | | { |
| 0 | 271 | | sncLibraryPath = property0.Value.GetObject(); |
| 0 | 272 | | continue; |
| | 273 | | } |
| 0 | 274 | | if (property0.NameEquals("sncQop")) |
| | 275 | | { |
| 0 | 276 | | sncQop = property0.Value.GetObject(); |
| 0 | 277 | | continue; |
| | 278 | | } |
| 0 | 279 | | if (property0.NameEquals("logonGroup")) |
| | 280 | | { |
| 0 | 281 | | logonGroup = property0.Value.GetObject(); |
| 0 | 282 | | continue; |
| | 283 | | } |
| 0 | 284 | | if (property0.NameEquals("encryptedCredential")) |
| | 285 | | { |
| 0 | 286 | | encryptedCredential = property0.Value.GetObject(); |
| | 287 | | continue; |
| | 288 | | } |
| | 289 | | } |
| | 290 | | continue; |
| | 291 | | } |
| 0 | 292 | | additionalPropertiesDictionary ??= new Dictionary<string, object>(); |
| 0 | 293 | | additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); |
| | 294 | | } |
| 0 | 295 | | additionalProperties = additionalPropertiesDictionary; |
| 0 | 296 | | return new SapTableLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters |
| | 297 | | } |
| | 298 | | } |
| | 299 | | } |