public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as Coding; if (dest != null) { base.CopyTo(dest); if (SystemElement != null) { dest.SystemElement = (Hl7.Fhir.Model.FhirUri)SystemElement.DeepCopy(); } if (VersionElement != null) { dest.VersionElement = (Hl7.Fhir.Model.FhirString)VersionElement.DeepCopy(); } if (CodeElement != null) { dest.CodeElement = (Hl7.Fhir.Model.Code)CodeElement.DeepCopy(); } if (DisplayElement != null) { dest.DisplayElement = (Hl7.Fhir.Model.FhirString)DisplayElement.DeepCopy(); } if (PrimaryElement != null) { dest.PrimaryElement = (Hl7.Fhir.Model.FhirBoolean)PrimaryElement.DeepCopy(); } return(dest); } else { throw new ArgumentException("Can only copy to an object of the same type", "other"); } }