public Project ToModel() { return(new Project( ToModelName(), Description, IsDisabled, AutoCreateRelease, DefaultToSkipIfAlreadyInstalled, DeploymentProcess.ToModel(), Variables.EnsureNotNull().Select(v => v.ToModel()), IncludedLibraryVariableSetRefs.EnsureNotNull().Select(reference => new ElementReference(reference)), new ElementReference(LifecycleRef), new ElementReference(ProjectGroupRef), VersioningStrategy?.ToModel(), Triggers.EnsureNotNull().Select(t => t.ToModel()), (TenantedDeploymentMode)Enum.Parse(typeof(TenantedDeploymentMode), TenantedDeploymentMode), Channels.EnsureNotNull().Select(c => c.ToModel()))); }