// Copyright (C) Stichting Deltares 2017. All rights reserved. // // This file is part of Ringtoets. // // Ringtoets is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // All names, logos, and references to "Deltares" are registered trademarks of // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. using System; using System.Xml.Serialization; using Ringtoets.AssemblyTool.IO.Model.DataTypes; namespace Ringtoets.AssemblyTool.IO.Model { /// /// Class describing a serializable total assembly result. /// [XmlType(AssemblyXmlIdentifiers.TotalAssemblyResult)] public class SerializableTotalAssemblyResult : SerializableFeatureMember { /// /// Creates a new instance of . /// public SerializableTotalAssemblyResult() {} /// /// Creates a new instance of . /// /// The unique ID of the assembly result. /// The assessment process this result belongs to. /// The assembly result for failure mechanisms with a probability. /// The assembly result for failure mechanisms without a probability. /// The assembly result for the assessment section. /// Thrown when any parameter is null. public SerializableTotalAssemblyResult(string id, SerializableAssessmentProcess assessmentProcess, SerializableFailureMechanismAssemblyResult assemblyResultWithoutProbability, SerializableFailureMechanismAssemblyResult assemblyResultWithProbability, SerializableAssessmentSectionAssemblyResult assessmentSectionAssemblyResult) : this() { if (id == null) { throw new ArgumentNullException(nameof(id)); } if (assessmentProcess == null) { throw new ArgumentNullException(nameof(assessmentProcess)); } if (assemblyResultWithoutProbability == null) { throw new ArgumentNullException(nameof(assemblyResultWithoutProbability)); } if (assemblyResultWithProbability == null) { throw new ArgumentNullException(nameof(assemblyResultWithProbability)); } if (assessmentSectionAssemblyResult == null) { throw new ArgumentNullException(nameof(assessmentSectionAssemblyResult)); } Id = id; AssessmentProcessId = assessmentProcess.Id; AssemblyResultWithoutProbability = assemblyResultWithoutProbability; AssemblyResultWithProbability = assemblyResultWithProbability; AssessmentSectionAssemblyResult = assessmentSectionAssemblyResult; } /// /// Gets or sets the ID. /// [XmlAttribute(AssemblyXmlIdentifiers.TotalAssemblyResultId)] public string Id { get; set; } /// /// Gets or sets the parent assessment process ID. /// [XmlAttribute(AssemblyXmlIdentifiers.AssessmentProcessIdRef)] public string AssessmentProcessId { get; set; } /// /// Gets or sets the assembly result with probability. /// [XmlElement(AssemblyXmlIdentifiers.AssemblyResultWithProbability)] public SerializableFailureMechanismAssemblyResult AssemblyResultWithProbability { get; set; } /// /// Gets or sets the assembly result without probability. /// [XmlElement(AssemblyXmlIdentifiers.AssemblyResultWithoutProbability)] public SerializableFailureMechanismAssemblyResult AssemblyResultWithoutProbability { get; set; } /// /// Gets or sets the assessment section assembly result. /// [XmlElement(AssemblyXmlIdentifiers.AssessmentSectionAssemblyResult)] public SerializableAssessmentSectionAssemblyResult AssessmentSectionAssemblyResult { get; set; } } }