public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as Permission; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.Permission.PermissionStatus>)StatusElement.DeepCopy(); } if (Intent != null) { dest.Intent = (Hl7.Fhir.Model.CodeableConcept)Intent.DeepCopy(); } if (Asserter != null) { dest.Asserter = (Hl7.Fhir.Model.ResourceReference)Asserter.DeepCopy(); } if (AssertionDateElement != null) { dest.AssertionDateElement = new List <Hl7.Fhir.Model.FhirDateTime>(AssertionDateElement.DeepCopy()); } if (Validity != null) { dest.Validity = (Hl7.Fhir.Model.Period)Validity.DeepCopy(); } if (Purpose != null) { dest.Purpose = new List <Hl7.Fhir.Model.CodeableConcept>(Purpose.DeepCopy()); } if (DataScope != null) { dest.DataScope = new List <Hl7.Fhir.Model.Expression>(DataScope.DeepCopy()); } if (ProcessingActivity != null) { dest.ProcessingActivity = new List <Hl7.Fhir.Model.Permission.ProcessingActivityComponent>(ProcessingActivity.DeepCopy()); } if (Justification != null) { dest.Justification = (Hl7.Fhir.Model.Permission.JustificationComponent)Justification.DeepCopy(); } if (UsageLimitations != null) { dest.UsageLimitations = new List <Hl7.Fhir.Model.CodeableConcept>(UsageLimitations.DeepCopy()); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as DeviceRequest; 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 = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (Definition != null) { dest.Definition = new List <Hl7.Fhir.Model.ResourceReference>(Definition.DeepCopy()); } if (BasedOn != null) { dest.BasedOn = new List <Hl7.Fhir.Model.ResourceReference>(BasedOn.DeepCopy()); } if (PriorRequest != null) { dest.PriorRequest = new List <Hl7.Fhir.Model.ResourceReference>(PriorRequest.DeepCopy()); } if (GroupIdentifier != null) { dest.GroupIdentifier = (Hl7.Fhir.Model.Identifier)GroupIdentifier.DeepCopy(); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.RequestStatus>)StatusElement.DeepCopy(); } if (Intent != null) { dest.Intent = (Hl7.Fhir.Model.CodeableConcept)Intent.DeepCopy(); } if (PriorityElement != null) { dest.PriorityElement = (Code <Hl7.Fhir.Model.RequestPriority>)PriorityElement.DeepCopy(); } if (Code != null) { dest.Code = (Hl7.Fhir.Model.DataType)Code.DeepCopy(); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Context != null) { dest.Context = (Hl7.Fhir.Model.ResourceReference)Context.DeepCopy(); } if (Occurrence != null) { dest.Occurrence = (Hl7.Fhir.Model.DataType)Occurrence.DeepCopy(); } if (AuthoredOnElement != null) { dest.AuthoredOnElement = (Hl7.Fhir.Model.FhirDateTime)AuthoredOnElement.DeepCopy(); } if (Requester != null) { dest.Requester = (Hl7.Fhir.Model.DeviceRequest.RequesterComponent)Requester.DeepCopy(); } if (PerformerType != null) { dest.PerformerType = (Hl7.Fhir.Model.CodeableConcept)PerformerType.DeepCopy(); } if (Performer != null) { dest.Performer = (Hl7.Fhir.Model.ResourceReference)Performer.DeepCopy(); } if (ReasonCode != null) { dest.ReasonCode = new List <Hl7.Fhir.Model.CodeableConcept>(ReasonCode.DeepCopy()); } if (ReasonReference != null) { dest.ReasonReference = new List <Hl7.Fhir.Model.ResourceReference>(ReasonReference.DeepCopy()); } if (SupportingInfo != null) { dest.SupportingInfo = new List <Hl7.Fhir.Model.ResourceReference>(SupportingInfo.DeepCopy()); } if (Note != null) { dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy()); } if (RelevantHistory != null) { dest.RelevantHistory = new List <Hl7.Fhir.Model.ResourceReference>(RelevantHistory.DeepCopy()); } return(dest); }