/// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "application":
                if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read()))
                {
                    throw new JsonException();
                }

                Application = new List <MedicinalProductAuthorizationProcedure>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.MedicinalProductAuthorizationProcedure objApplication = new fhirCsR4.Models.MedicinalProductAuthorizationProcedure();
                    objApplication.DeserializeJson(ref reader, options);
                    Application.Add(objApplication);

                    if (!reader.Read())
                    {
                        throw new JsonException();
                    }
                }

                if (Application.Count == 0)
                {
                    Application = null;
                }

                break;

            case "datePeriod":
                DatePeriod = new fhirCsR4.Models.Period();
                DatePeriod.DeserializeJson(ref reader, options);
                break;

            case "dateDateTime":
                DateDateTime = reader.GetString();
                break;

            case "_dateDateTime":
                _DateDateTime = new fhirCsR4.Models.Element();
                _DateDateTime.DeserializeJson(ref reader, options);
                break;

            case "identifier":
                Identifier = new fhirCsR4.Models.Identifier();
                Identifier.DeserializeJson(ref reader, options);
                break;

            case "type":
                Type = new fhirCsR4.Models.CodeableConcept();
                Type.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "country":
                if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read()))
                {
                    throw new JsonException();
                }

                Country = new List <CodeableConcept>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.CodeableConcept objCountry = new fhirCsR4.Models.CodeableConcept();
                    objCountry.DeserializeJson(ref reader, options);
                    Country.Add(objCountry);

                    if (!reader.Read())
                    {
                        throw new JsonException();
                    }
                }

                if (Country.Count == 0)
                {
                    Country = null;
                }

                break;

            case "dataExclusivityPeriod":
                DataExclusivityPeriod = new fhirCsR4.Models.Period();
                DataExclusivityPeriod.DeserializeJson(ref reader, options);
                break;

            case "dateOfFirstAuthorization":
                DateOfFirstAuthorization = reader.GetString();
                break;

            case "_dateOfFirstAuthorization":
                _DateOfFirstAuthorization = new fhirCsR4.Models.Element();
                _DateOfFirstAuthorization.DeserializeJson(ref reader, options);
                break;

            case "holder":
                Holder = new fhirCsR4.Models.Reference();
                Holder.DeserializeJson(ref reader, options);
                break;

            case "identifier":
                if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read()))
                {
                    throw new JsonException();
                }

                Identifier = new List <Identifier>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.Identifier objIdentifier = new fhirCsR4.Models.Identifier();
                    objIdentifier.DeserializeJson(ref reader, options);
                    Identifier.Add(objIdentifier);

                    if (!reader.Read())
                    {
                        throw new JsonException();
                    }
                }

                if (Identifier.Count == 0)
                {
                    Identifier = null;
                }

                break;

            case "internationalBirthDate":
                InternationalBirthDate = reader.GetString();
                break;

            case "_internationalBirthDate":
                _InternationalBirthDate = new fhirCsR4.Models.Element();
                _InternationalBirthDate.DeserializeJson(ref reader, options);
                break;

            case "jurisdiction":
                if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read()))
                {
                    throw new JsonException();
                }

                Jurisdiction = new List <CodeableConcept>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.CodeableConcept objJurisdiction = new fhirCsR4.Models.CodeableConcept();
                    objJurisdiction.DeserializeJson(ref reader, options);
                    Jurisdiction.Add(objJurisdiction);

                    if (!reader.Read())
                    {
                        throw new JsonException();
                    }
                }

                if (Jurisdiction.Count == 0)
                {
                    Jurisdiction = null;
                }

                break;

            case "jurisdictionalAuthorization":
                if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read()))
                {
                    throw new JsonException();
                }

                JurisdictionalAuthorization = new List <MedicinalProductAuthorizationJurisdictionalAuthorization>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.MedicinalProductAuthorizationJurisdictionalAuthorization objJurisdictionalAuthorization = new fhirCsR4.Models.MedicinalProductAuthorizationJurisdictionalAuthorization();
                    objJurisdictionalAuthorization.DeserializeJson(ref reader, options);
                    JurisdictionalAuthorization.Add(objJurisdictionalAuthorization);

                    if (!reader.Read())
                    {
                        throw new JsonException();
                    }
                }

                if (JurisdictionalAuthorization.Count == 0)
                {
                    JurisdictionalAuthorization = null;
                }

                break;

            case "legalBasis":
                LegalBasis = new fhirCsR4.Models.CodeableConcept();
                LegalBasis.DeserializeJson(ref reader, options);
                break;

            case "procedure":
                Procedure = new fhirCsR4.Models.MedicinalProductAuthorizationProcedure();
                Procedure.DeserializeJson(ref reader, options);
                break;

            case "regulator":
                Regulator = new fhirCsR4.Models.Reference();
                Regulator.DeserializeJson(ref reader, options);
                break;

            case "restoreDate":
                RestoreDate = reader.GetString();
                break;

            case "_restoreDate":
                _RestoreDate = new fhirCsR4.Models.Element();
                _RestoreDate.DeserializeJson(ref reader, options);
                break;

            case "status":
                Status = new fhirCsR4.Models.CodeableConcept();
                Status.DeserializeJson(ref reader, options);
                break;

            case "statusDate":
                StatusDate = reader.GetString();
                break;

            case "_statusDate":
                _StatusDate = new fhirCsR4.Models.Element();
                _StatusDate.DeserializeJson(ref reader, options);
                break;

            case "subject":
                Subject = new fhirCsR4.Models.Reference();
                Subject.DeserializeJson(ref reader, options);
                break;

            case "validityPeriod":
                ValidityPeriod = new fhirCsR4.Models.Period();
                ValidityPeriod.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }