public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as CodeFilterComponent;

                if (dest == null)
                {
                    throw new ArgumentException("Can only copy to an object of the same type", "other");
                }

                base.CopyTo(dest);
                if (PathElement != null)
                {
                    dest.PathElement = (Hl7.Fhir.Model.FhirString)PathElement.DeepCopy();
                }
                if (ValueSet != null)
                {
                    dest.ValueSet = (Hl7.Fhir.Model.DataType)ValueSet.DeepCopy();
                }
                if (ValueCodeElement != null)
                {
                    dest.ValueCodeElement = new List <Hl7.Fhir.Model.Code>(ValueCodeElement.DeepCopy());
                }
                if (ValueCoding != null)
                {
                    dest.ValueCoding = new List <Hl7.Fhir.Model.Coding>(ValueCoding.DeepCopy());
                }
                if (ValueCodeableConcept != null)
                {
                    dest.ValueCodeableConcept = new List <Hl7.Fhir.Model.CodeableConcept>(ValueCodeableConcept.DeepCopy());
                }
                return(dest);
            }