public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as ParametersParameterPartComponent; if (dest != null) { base.CopyTo(dest); if (NameElement != null) { dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy(); } if (Value != null) { dest.Value = (Hl7.Fhir.Model.Element)Value.DeepCopy(); } if (Resource != null) { dest.Resource = (Hl7.Fhir.Model.Resource)Resource.DeepCopy(); } return(dest); } else { throw new ArgumentException("Can only copy to an object of the same type", "other"); } }