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

            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 (Subject != null)
            {
                dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy();
            }
            if (Country != null)
            {
                dest.Country = new List <Hl7.Fhir.Model.CodeableConcept>(Country.DeepCopy());
            }
            if (Jurisdiction != null)
            {
                dest.Jurisdiction = new List <Hl7.Fhir.Model.CodeableConcept>(Jurisdiction.DeepCopy());
            }
            if (Status != null)
            {
                dest.Status = (Hl7.Fhir.Model.CodeableConcept)Status.DeepCopy();
            }
            if (StatusDateElement != null)
            {
                dest.StatusDateElement = (Hl7.Fhir.Model.FhirDateTime)StatusDateElement.DeepCopy();
            }
            if (RestoreDateElement != null)
            {
                dest.RestoreDateElement = (Hl7.Fhir.Model.FhirDateTime)RestoreDateElement.DeepCopy();
            }
            if (ValidityPeriod != null)
            {
                dest.ValidityPeriod = (Hl7.Fhir.Model.Period)ValidityPeriod.DeepCopy();
            }
            if (DataExclusivityPeriod != null)
            {
                dest.DataExclusivityPeriod = (Hl7.Fhir.Model.Period)DataExclusivityPeriod.DeepCopy();
            }
            if (DateOfFirstAuthorizationElement != null)
            {
                dest.DateOfFirstAuthorizationElement = (Hl7.Fhir.Model.FhirDateTime)DateOfFirstAuthorizationElement.DeepCopy();
            }
            if (InternationalBirthDateElement != null)
            {
                dest.InternationalBirthDateElement = (Hl7.Fhir.Model.FhirDateTime)InternationalBirthDateElement.DeepCopy();
            }
            if (LegalBasis != null)
            {
                dest.LegalBasis = (Hl7.Fhir.Model.CodeableConcept)LegalBasis.DeepCopy();
            }
            if (JurisdictionalAuthorization != null)
            {
                dest.JurisdictionalAuthorization = new List <Hl7.Fhir.Model.MedicinalProductAuthorization.JurisdictionalAuthorizationComponent>(JurisdictionalAuthorization.DeepCopy());
            }
            if (Holder != null)
            {
                dest.Holder = (Hl7.Fhir.Model.ResourceReference)Holder.DeepCopy();
            }
            if (Regulator != null)
            {
                dest.Regulator = (Hl7.Fhir.Model.ResourceReference)Regulator.DeepCopy();
            }
            if (Procedure != null)
            {
                dest.Procedure = (Hl7.Fhir.Model.MedicinalProductAuthorization.ProcedureComponent)Procedure.DeepCopy();
            }
            return(dest);
        }
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as RegulatedAuthorization;

            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 (Subject != null)
            {
                dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy();
            }
            if (Type != null)
            {
                dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy();
            }
            if (Description != null)
            {
                dest.Description = (Hl7.Fhir.Model.Markdown)Description.DeepCopy();
            }
            if (Region != null)
            {
                dest.Region = new List <Hl7.Fhir.Model.CodeableConcept>(Region.DeepCopy());
            }
            if (Status != null)
            {
                dest.Status = (Hl7.Fhir.Model.CodeableConcept)Status.DeepCopy();
            }
            if (StatusDateElement != null)
            {
                dest.StatusDateElement = (Hl7.Fhir.Model.FhirDateTime)StatusDateElement.DeepCopy();
            }
            if (ValidityPeriod != null)
            {
                dest.ValidityPeriod = (Hl7.Fhir.Model.Period)ValidityPeriod.DeepCopy();
            }
            if (Indication != null)
            {
                dest.Indication = (Hl7.Fhir.Model.Element)Indication.DeepCopy();
            }
            if (IntendedUse != null)
            {
                dest.IntendedUse = (Hl7.Fhir.Model.CodeableConcept)IntendedUse.DeepCopy();
            }
            if (Basis != null)
            {
                dest.Basis = new List <Hl7.Fhir.Model.CodeableConcept>(Basis.DeepCopy());
            }
            if (RelatedDate != null)
            {
                dest.RelatedDate = new List <Hl7.Fhir.Model.RegulatedAuthorization.RelatedDateComponent>(RelatedDate.DeepCopy());
            }
            if (JurisdictionalAuthorization != null)
            {
                dest.JurisdictionalAuthorization = new List <Hl7.Fhir.Model.ResourceReference>(JurisdictionalAuthorization.DeepCopy());
            }
            if (Holder != null)
            {
                dest.Holder = (Hl7.Fhir.Model.ResourceReference)Holder.DeepCopy();
            }
            if (Regulator != null)
            {
                dest.Regulator = (Hl7.Fhir.Model.ResourceReference)Regulator.DeepCopy();
            }
            if (Case != null)
            {
                dest.Case = (Hl7.Fhir.Model.RegulatedAuthorization.CaseComponent)Case.DeepCopy();
            }
            return(dest);
        }