internal IntegrationRuntimeComputeProperties(string location, string nodeSize, int?numberOfNodes, int?maxParallelExecutionsPerNode, IntegrationRuntimeDataFlowProperties dataFlowProperties, IntegrationRuntimeVNetProperties vNetProperties, IDictionary <string, object> additionalProperties) { Location = location; NodeSize = nodeSize; NumberOfNodes = numberOfNodes; MaxParallelExecutionsPerNode = maxParallelExecutionsPerNode; DataFlowProperties = dataFlowProperties; VNetProperties = vNetProperties; AdditionalProperties = additionalProperties; }
internal static IntegrationRuntimeComputeProperties DeserializeIntegrationRuntimeComputeProperties(JsonElement element) { Optional <string> location = default; Optional <string> nodeSize = default; Optional <int> numberOfNodes = default; Optional <int> maxParallelExecutionsPerNode = default; Optional <IntegrationRuntimeDataFlowProperties> dataFlowProperties = default; Optional <IntegrationRuntimeVNetProperties> vNetProperties = default; IDictionary <string, object> additionalProperties = default; Dictionary <string, object> additionalPropertiesDictionary = new Dictionary <string, object>(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("location")) { location = property.Value.GetString(); continue; } if (property.NameEquals("nodeSize")) { nodeSize = property.Value.GetString(); continue; } if (property.NameEquals("numberOfNodes")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } numberOfNodes = property.Value.GetInt32(); continue; } if (property.NameEquals("maxParallelExecutionsPerNode")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } maxParallelExecutionsPerNode = property.Value.GetInt32(); continue; } if (property.NameEquals("dataFlowProperties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } dataFlowProperties = IntegrationRuntimeDataFlowProperties.DeserializeIntegrationRuntimeDataFlowProperties(property.Value); continue; } if (property.NameEquals("vNetProperties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } vNetProperties = IntegrationRuntimeVNetProperties.DeserializeIntegrationRuntimeVNetProperties(property.Value); continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; return(new IntegrationRuntimeComputeProperties(location.Value, nodeSize.Value, Optional.ToNullable(numberOfNodes), Optional.ToNullable(maxParallelExecutionsPerNode), dataFlowProperties.Value, vNetProperties.Value, additionalProperties)); }