internal static SensitivityLabelListResult DeserializeSensitivityLabelListResult(JsonElement element) { Optional <IReadOnlyList <SensitivityLabelData> > value = default; Optional <string> nextLink = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } List <SensitivityLabelData> array = new List <SensitivityLabelData>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(SensitivityLabelData.DeserializeSensitivityLabelData(item)); } value = array; continue; } if (property.NameEquals("nextLink")) { nextLink = property.Value.GetString(); continue; } } return(new SensitivityLabelListResult(Optional.ToList(value), nextLink.Value)); }
internal SensitivityLabelUpdate(ResourceIdentifier id, string name, ResourceType type, SystemData systemData, SensitivityLabelUpdateKind?op, string schema, string table, string column, SensitivityLabelData sensitivityLabel) : base(id, name, type, systemData) { Op = op; Schema = schema; Table = table; Column = column; SensitivityLabel = sensitivityLabel; }
internal static SensitivityLabelUpdate DeserializeSensitivityLabelUpdate(JsonElement element) { ResourceIdentifier id = default; string name = default; ResourceType type = default; SystemData systemData = default; Optional <SensitivityLabelUpdateKind> op = default; Optional <string> schema = default; Optional <string> table = default; Optional <string> column = default; Optional <SensitivityLabelData> sensitivityLabel = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id")) { id = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("name")) { name = property.Value.GetString(); continue; } if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("systemData")) { systemData = JsonSerializer.Deserialize <SystemData>(property.Value.ToString()); continue; } if (property.NameEquals("properties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("op")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } op = property0.Value.GetString().ToSensitivityLabelUpdateKind(); continue; } if (property0.NameEquals("schema")) { schema = property0.Value.GetString(); continue; } if (property0.NameEquals("table")) { table = property0.Value.GetString(); continue; } if (property0.NameEquals("column")) { column = property0.Value.GetString(); continue; } if (property0.NameEquals("sensitivityLabel")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } sensitivityLabel = SensitivityLabelData.DeserializeSensitivityLabelData(property0.Value); continue; } } continue; } } return(new SensitivityLabelUpdate(id, name, type, systemData, Optional.ToNullable(op), schema.Value, table.Value, column.Value, sensitivityLabel.Value)); }