public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as OperationOutcomeIssueComponent; if (dest != null) { base.CopyTo(dest); if (SeverityElement != null) { dest.SeverityElement = (Code <Hl7.Fhir.Model.OperationOutcome.IssueSeverity>)SeverityElement.DeepCopy(); } if (CodeElement != null) { dest.CodeElement = (Code <Hl7.Fhir.Model.OperationOutcome.IssueType>)CodeElement.DeepCopy(); } if (Details != null) { dest.Details = (Hl7.Fhir.Model.CodeableConcept)Details.DeepCopy(); } if (DiagnosticsElement != null) { dest.DiagnosticsElement = (Hl7.Fhir.Model.FhirString)DiagnosticsElement.DeepCopy(); } if (LocationElement != null) { dest.LocationElement = new List <Hl7.Fhir.Model.FhirString>(LocationElement.DeepCopy()); } return(dest); } else { throw new ArgumentException("Can only copy to an object of the same type", "other"); } }