internal static ThreeTierConfiguration DeserializeThreeTierConfiguration(JsonElement element) { Optional <NetworkConfiguration> networkConfiguration = default; CentralServerConfiguration centralServer = default; ApplicationServerConfiguration applicationServer = default; DatabaseConfiguration databaseServer = default; Optional <HighAvailabilityConfiguration> highAvailabilityConfig = default; SapDeploymentType deploymentType = default; string appResourceGroup = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("networkConfiguration")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } networkConfiguration = NetworkConfiguration.DeserializeNetworkConfiguration(property.Value); continue; } if (property.NameEquals("centralServer")) { centralServer = CentralServerConfiguration.DeserializeCentralServerConfiguration(property.Value); continue; } if (property.NameEquals("applicationServer")) { applicationServer = ApplicationServerConfiguration.DeserializeApplicationServerConfiguration(property.Value); continue; } if (property.NameEquals("databaseServer")) { databaseServer = DatabaseConfiguration.DeserializeDatabaseConfiguration(property.Value); continue; } if (property.NameEquals("highAvailabilityConfig")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } highAvailabilityConfig = HighAvailabilityConfiguration.DeserializeHighAvailabilityConfiguration(property.Value); continue; } if (property.NameEquals("deploymentType")) { deploymentType = new SapDeploymentType(property.Value.GetString()); continue; } if (property.NameEquals("appResourceGroup")) { appResourceGroup = property.Value.GetString(); continue; } } return(new ThreeTierConfiguration(deploymentType, appResourceGroup, networkConfiguration.Value, centralServer, applicationServer, databaseServer, highAvailabilityConfig.Value)); }
internal ThreeTierConfiguration(SapDeploymentType deploymentType, string appResourceGroup, NetworkConfiguration networkConfiguration, CentralServerConfiguration centralServer, ApplicationServerConfiguration applicationServer, DatabaseConfiguration databaseServer, HighAvailabilityConfiguration highAvailabilityConfig) : base(deploymentType, appResourceGroup) { NetworkConfiguration = networkConfiguration; CentralServer = centralServer; ApplicationServer = applicationServer; DatabaseServer = databaseServer; HighAvailabilityConfig = highAvailabilityConfig; DeploymentType = deploymentType; }