internal static ExecuteDataFlowActivityTypePropertiesCompute DeserializeExecuteDataFlowActivityTypePropertiesCompute(JsonElement element) { DataFlowComputeType?computeType = default; int?coreCount = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("computeType")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } computeType = new DataFlowComputeType(property.Value.GetString()); continue; } if (property.NameEquals("coreCount")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } coreCount = property.Value.GetInt32(); continue; } } return(new ExecuteDataFlowActivityTypePropertiesCompute(computeType, coreCount)); }
internal static ExecuteDataFlowActivityTypePropertiesCompute DeserializeExecuteDataFlowActivityTypePropertiesCompute(JsonElement element) { Optional <DataFlowComputeType> computeType = default; Optional <int> coreCount = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("computeType")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } computeType = new DataFlowComputeType(property.Value.GetString()); continue; } if (property.NameEquals("coreCount")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } coreCount = property.Value.GetInt32(); continue; } } return(new ExecuteDataFlowActivityTypePropertiesCompute(Optional.ToNullable(computeType), Optional.ToNullable(coreCount))); }
internal static IntegrationRuntimeDataFlowProperties DeserializeIntegrationRuntimeDataFlowProperties(JsonElement element) { Optional <DataFlowComputeType> computeType = default; Optional <int> coreCount = default; Optional <int> timeToLive = default; Optional <bool> cleanup = default; IDictionary <string, object> additionalProperties = default; Dictionary <string, object> additionalPropertiesDictionary = new Dictionary <string, object>(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("computeType")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } computeType = new DataFlowComputeType(property.Value.GetString()); continue; } if (property.NameEquals("coreCount")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } coreCount = property.Value.GetInt32(); continue; } if (property.NameEquals("timeToLive")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } timeToLive = property.Value.GetInt32(); continue; } if (property.NameEquals("cleanup")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } cleanup = property.Value.GetBoolean(); continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; return(new IntegrationRuntimeDataFlowProperties(Optional.ToNullable(computeType), Optional.ToNullable(coreCount), Optional.ToNullable(timeToLive), Optional.ToNullable(cleanup), additionalProperties)); }