public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as MessageHeader; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (Event != null) { dest.Event = (Hl7.Fhir.Model.Coding)Event.DeepCopy(); } if (Destination != null) { dest.Destination = new List <Hl7.Fhir.Model.MessageHeader.MessageDestinationComponent>(Destination.DeepCopy()); } if (Receiver != null) { dest.Receiver = (Hl7.Fhir.Model.ResourceReference)Receiver.DeepCopy(); } if (Sender != null) { dest.Sender = (Hl7.Fhir.Model.ResourceReference)Sender.DeepCopy(); } if (TimestampElement != null) { dest.TimestampElement = (Hl7.Fhir.Model.Instant)TimestampElement.DeepCopy(); } if (Enterer != null) { dest.Enterer = (Hl7.Fhir.Model.ResourceReference)Enterer.DeepCopy(); } if (Author != null) { dest.Author = (Hl7.Fhir.Model.ResourceReference)Author.DeepCopy(); } if (Source != null) { dest.Source = (Hl7.Fhir.Model.MessageHeader.MessageSourceComponent)Source.DeepCopy(); } if (Responsible != null) { dest.Responsible = (Hl7.Fhir.Model.ResourceReference)Responsible.DeepCopy(); } if (Reason != null) { dest.Reason = (Hl7.Fhir.Model.CodeableConcept)Reason.DeepCopy(); } if (Response != null) { dest.Response = (Hl7.Fhir.Model.MessageHeader.ResponseComponent)Response.DeepCopy(); } if (Focus != null) { dest.Focus = new List <Hl7.Fhir.Model.ResourceReference>(Focus.DeepCopy()); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as DetailsComponent; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (Identifier != null) { dest.Identifier = (Hl7.Fhir.Model.Identifier)Identifier.DeepCopy(); } if (Predecessor != null) { dest.Predecessor = (Hl7.Fhir.Model.Identifier)Predecessor.DeepCopy(); } if (Type != null) { dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy(); } if (Request != null) { dest.Request = (Hl7.Fhir.Model.ResourceReference)Request.DeepCopy(); } if (Submitter != null) { dest.Submitter = (Hl7.Fhir.Model.ResourceReference)Submitter.DeepCopy(); } if (Response != null) { dest.Response = (Hl7.Fhir.Model.ResourceReference)Response.DeepCopy(); } if (DateElement != null) { dest.DateElement = (Hl7.Fhir.Model.Date)DateElement.DeepCopy(); } if (Responsible != null) { dest.Responsible = (Hl7.Fhir.Model.ResourceReference)Responsible.DeepCopy(); } if (Payee != null) { dest.Payee = (Hl7.Fhir.Model.ResourceReference)Payee.DeepCopy(); } if (Amount != null) { dest.Amount = (Hl7.Fhir.Model.Money)Amount.DeepCopy(); } return(dest); }