| | 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.Text.Json; |
| | 9 | | using Azure.Core; |
| | 10 | |
|
| | 11 | | namespace Azure.Analytics.Synapse.Artifacts.Models |
| | 12 | | { |
| | 13 | | public partial class DataFlowStagingInfo : IUtf8JsonSerializable |
| | 14 | | { |
| | 15 | | void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) |
| | 16 | | { |
| 0 | 17 | | writer.WriteStartObject(); |
| 0 | 18 | | if (Optional.IsDefined(LinkedService)) |
| | 19 | | { |
| 0 | 20 | | writer.WritePropertyName("linkedService"); |
| 0 | 21 | | writer.WriteObjectValue(LinkedService); |
| | 22 | | } |
| 0 | 23 | | if (Optional.IsDefined(FolderPath)) |
| | 24 | | { |
| 0 | 25 | | writer.WritePropertyName("folderPath"); |
| 0 | 26 | | writer.WriteStringValue(FolderPath); |
| | 27 | | } |
| 0 | 28 | | writer.WriteEndObject(); |
| 0 | 29 | | } |
| | 30 | |
|
| | 31 | | internal static DataFlowStagingInfo DeserializeDataFlowStagingInfo(JsonElement element) |
| | 32 | | { |
| 0 | 33 | | Optional<LinkedServiceReference> linkedService = default; |
| 0 | 34 | | Optional<string> folderPath = default; |
| 0 | 35 | | foreach (var property in element.EnumerateObject()) |
| | 36 | | { |
| 0 | 37 | | if (property.NameEquals("linkedService")) |
| | 38 | | { |
| 0 | 39 | | linkedService = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); |
| 0 | 40 | | continue; |
| | 41 | | } |
| 0 | 42 | | if (property.NameEquals("folderPath")) |
| | 43 | | { |
| 0 | 44 | | folderPath = property.Value.GetString(); |
| | 45 | | continue; |
| | 46 | | } |
| | 47 | | } |
| 0 | 48 | | return new DataFlowStagingInfo(linkedService.Value, folderPath.Value); |
| | 49 | | } |
| | 50 | | } |
| | 51 | | } |