public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as Organization; 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 (ActiveElement != null) { dest.ActiveElement = (Hl7.Fhir.Model.FhirBoolean)ActiveElement.DeepCopy(); } if (Type != null) { dest.Type = new List <Hl7.Fhir.Model.CodeableConcept>(Type.DeepCopy()); } if (NameElement != null) { dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy(); } if (AliasElement != null) { dest.AliasElement = new List <Hl7.Fhir.Model.FhirString>(AliasElement.DeepCopy()); } if (Telecom != null) { dest.Telecom = new List <Hl7.Fhir.Model.ContactPoint>(Telecom.DeepCopy()); } if (Address != null) { dest.Address = new List <Hl7.Fhir.Model.Address>(Address.DeepCopy()); } if (PartOf != null) { dest.PartOf = (Hl7.Fhir.Model.ResourceReference)PartOf.DeepCopy(); } if (Contact != null) { dest.Contact = new List <Hl7.Fhir.Model.Organization.ContactComponent>(Contact.DeepCopy()); } if (Endpoint != null) { dest.Endpoint = new List <Hl7.Fhir.Model.ResourceReference>(Endpoint.DeepCopy()); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as Location; 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 (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.Location.LocationStatus>)StatusElement.DeepCopy(); } if (OperationalStatus != null) { dest.OperationalStatus = (Hl7.Fhir.Model.Coding)OperationalStatus.DeepCopy(); } if (NameElement != null) { dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy(); } if (AliasElement != null) { dest.AliasElement = new List <Hl7.Fhir.Model.FhirString>(AliasElement.DeepCopy()); } if (DescriptionElement != null) { dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy(); } if (ModeElement != null) { dest.ModeElement = (Code <Hl7.Fhir.Model.Location.LocationMode>)ModeElement.DeepCopy(); } if (Type != null) { dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy(); } if (Telecom != null) { dest.Telecom = new List <Hl7.Fhir.Model.ContactPoint>(Telecom.DeepCopy()); } if (Address != null) { dest.Address = (Hl7.Fhir.Model.Address)Address.DeepCopy(); } if (PhysicalType != null) { dest.PhysicalType = (Hl7.Fhir.Model.CodeableConcept)PhysicalType.DeepCopy(); } if (Position != null) { dest.Position = (Hl7.Fhir.Model.Location.PositionComponent)Position.DeepCopy(); } if (ManagingOrganization != null) { dest.ManagingOrganization = (Hl7.Fhir.Model.ResourceReference)ManagingOrganization.DeepCopy(); } if (PartOf != null) { dest.PartOf = (Hl7.Fhir.Model.ResourceReference)PartOf.DeepCopy(); } if (Endpoint != null) { dest.Endpoint = new List <Hl7.Fhir.Model.ResourceReference>(Endpoint.DeepCopy()); } return(dest); }