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

                Contact = new List <ContactDetail>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.ContactDetail objContact = new Fhir.R4.Models.ContactDetail();
                    objContact.DeserializeJson(ref reader, options);
                    Contact.Add(objContact);

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

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

                break;

            case "name":
                Name = reader.GetString();
                break;

            case "_name":
                _Name = new Fhir.R4.Models.Element();
                _Name.DeserializeJson(ref reader, options);
                break;

            case "type":
                Type = reader.GetString();
                break;

            case "_type":
                _Type = new Fhir.R4.Models.Element();
                _Type.DeserializeJson(ref reader, options);
                break;

            default:
                ((Fhir.R4.Models.Element) 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 "code":
                Code = reader.GetString();
                break;

            case "_code":
                _Code = new Fhir.R4.Models.Element();
                _Code.DeserializeJson(ref reader, options);
                break;

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

                Contact = new List <ContactDetail>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.ContactDetail objContact = new Fhir.R4.Models.ContactDetail();
                    objContact.DeserializeJson(ref reader, options);
                    Contact.Add(objContact);

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

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

                break;

            case "date":
                Date = reader.GetString();
                break;

            case "_date":
                _Date = new Fhir.R4.Models.Element();
                _Date.DeserializeJson(ref reader, options);
                break;

            case "description":
                Description = reader.GetString();
                break;

            case "_description":
                _Description = new Fhir.R4.Models.Element();
                _Description.DeserializeJson(ref reader, options);
                break;

            case "experimental":
                Experimental = reader.GetBoolean();
                break;

            case "name":
                Name = reader.GetString();
                break;

            case "_name":
                _Name = new Fhir.R4.Models.Element();
                _Name.DeserializeJson(ref reader, options);
                break;

            case "publisher":
                Publisher = reader.GetString();
                break;

            case "_publisher":
                _Publisher = new Fhir.R4.Models.Element();
                _Publisher.DeserializeJson(ref reader, options);
                break;

            case "purpose":
                Purpose = reader.GetString();
                break;

            case "_purpose":
                _Purpose = new Fhir.R4.Models.Element();
                _Purpose.DeserializeJson(ref reader, options);
                break;

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

                Resource = new List <CompartmentDefinitionResource>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.CompartmentDefinitionResource objResource = new Fhir.R4.Models.CompartmentDefinitionResource();
                    objResource.DeserializeJson(ref reader, options);
                    Resource.Add(objResource);

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

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

                break;

            case "search":
                Search = reader.GetBoolean();
                break;

            case "status":
                Status = reader.GetString();
                break;

            case "_status":
                _Status = new Fhir.R4.Models.Element();
                _Status.DeserializeJson(ref reader, options);
                break;

            case "url":
                Url = reader.GetString();
                break;

            case "_url":
                _Url = new Fhir.R4.Models.Element();
                _Url.DeserializeJson(ref reader, options);
                break;

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

                UseContext = new List <UsageContext>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.UsageContext objUseContext = new Fhir.R4.Models.UsageContext();
                    objUseContext.DeserializeJson(ref reader, options);
                    UseContext.Add(objUseContext);

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

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

                break;

            case "version":
                Version = reader.GetString();
                break;

            case "_version":
                _Version = new Fhir.R4.Models.Element();
                _Version.DeserializeJson(ref reader, options);
                break;

            default:
                ((Fhir.R4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
示例#3
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "name":
                Name = reader.GetString();
                break;

            case "_name":
                _Name = new Fhir.R4.Models.Element();
                _Name.DeserializeJson(ref reader, options);
                break;

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

                Part = new List <ParametersParameter>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.ParametersParameter objPart = new Fhir.R4.Models.ParametersParameter();
                    objPart.DeserializeJson(ref reader, options);
                    Part.Add(objPart);

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

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

                break;

            case "resource":
                Resource = JsonSerializer.Deserialize <Fhir.R4.Models.Resource>(ref reader, options);
                break;

            case "valueBase64Binary":
                ValueBase64Binary = reader.GetString();
                break;

            case "_valueBase64Binary":
                _ValueBase64Binary = new Fhir.R4.Models.Element();
                _ValueBase64Binary.DeserializeJson(ref reader, options);
                break;

            case "valueBoolean":
                ValueBoolean = reader.GetBoolean();
                break;

            case "valueCanonical":
                ValueCanonical = reader.GetString();
                break;

            case "_valueCanonical":
                _ValueCanonical = new Fhir.R4.Models.Element();
                _ValueCanonical.DeserializeJson(ref reader, options);
                break;

            case "valueCode":
                ValueCode = reader.GetString();
                break;

            case "_valueCode":
                _ValueCode = new Fhir.R4.Models.Element();
                _ValueCode.DeserializeJson(ref reader, options);
                break;

            case "valueDate":
                ValueDate = reader.GetString();
                break;

            case "_valueDate":
                _ValueDate = new Fhir.R4.Models.Element();
                _ValueDate.DeserializeJson(ref reader, options);
                break;

            case "valueDateTime":
                ValueDateTime = reader.GetString();
                break;

            case "_valueDateTime":
                _ValueDateTime = new Fhir.R4.Models.Element();
                _ValueDateTime.DeserializeJson(ref reader, options);
                break;

            case "valueDecimal":
                ValueDecimal = reader.GetDecimal();
                break;

            case "_valueDecimal":
                _ValueDecimal = new Fhir.R4.Models.Element();
                _ValueDecimal.DeserializeJson(ref reader, options);
                break;

            case "valueId":
                ValueId = reader.GetString();
                break;

            case "_valueId":
                _ValueId = new Fhir.R4.Models.Element();
                _ValueId.DeserializeJson(ref reader, options);
                break;

            case "valueInstant":
                ValueInstant = reader.GetString();
                break;

            case "_valueInstant":
                _ValueInstant = new Fhir.R4.Models.Element();
                _ValueInstant.DeserializeJson(ref reader, options);
                break;

            case "valueInteger":
                ValueInteger = reader.GetInt32();
                break;

            case "valueMarkdown":
                ValueMarkdown = reader.GetString();
                break;

            case "_valueMarkdown":
                _ValueMarkdown = new Fhir.R4.Models.Element();
                _ValueMarkdown.DeserializeJson(ref reader, options);
                break;

            case "valueOid":
                ValueOid = reader.GetString();
                break;

            case "_valueOid":
                _ValueOid = new Fhir.R4.Models.Element();
                _ValueOid.DeserializeJson(ref reader, options);
                break;

            case "valuePositiveInt":
                ValuePositiveInt = reader.GetUInt32();
                break;

            case "valueString":
                ValueString = reader.GetString();
                break;

            case "_valueString":
                _ValueString = new Fhir.R4.Models.Element();
                _ValueString.DeserializeJson(ref reader, options);
                break;

            case "valueTime":
                ValueTime = reader.GetString();
                break;

            case "_valueTime":
                _ValueTime = new Fhir.R4.Models.Element();
                _ValueTime.DeserializeJson(ref reader, options);
                break;

            case "valueUnsignedInt":
                ValueUnsignedInt = reader.GetUInt32();
                break;

            case "valueUri":
                ValueUri = reader.GetString();
                break;

            case "_valueUri":
                _ValueUri = new Fhir.R4.Models.Element();
                _ValueUri.DeserializeJson(ref reader, options);
                break;

            case "valueUrl":
                ValueUrl = reader.GetString();
                break;

            case "_valueUrl":
                _ValueUrl = new Fhir.R4.Models.Element();
                _ValueUrl.DeserializeJson(ref reader, options);
                break;

            case "valueUuid":
                ValueUuid = reader.GetGuid();
                break;

            case "valueAddress":
                ValueAddress = new Fhir.R4.Models.Address();
                ValueAddress.DeserializeJson(ref reader, options);
                break;

            case "valueAge":
                ValueAge = new Fhir.R4.Models.Age();
                ValueAge.DeserializeJson(ref reader, options);
                break;

            case "valueAnnotation":
                ValueAnnotation = new Fhir.R4.Models.Annotation();
                ValueAnnotation.DeserializeJson(ref reader, options);
                break;

            case "valueAttachment":
                ValueAttachment = new Fhir.R4.Models.Attachment();
                ValueAttachment.DeserializeJson(ref reader, options);
                break;

            case "valueCodeableConcept":
                ValueCodeableConcept = new Fhir.R4.Models.CodeableConcept();
                ValueCodeableConcept.DeserializeJson(ref reader, options);
                break;

            case "valueCoding":
                ValueCoding = new Fhir.R4.Models.Coding();
                ValueCoding.DeserializeJson(ref reader, options);
                break;

            case "valueContactPoint":
                ValueContactPoint = new Fhir.R4.Models.ContactPoint();
                ValueContactPoint.DeserializeJson(ref reader, options);
                break;

            case "valueCount":
                ValueCount = new Fhir.R4.Models.Count();
                ValueCount.DeserializeJson(ref reader, options);
                break;

            case "valueDistance":
                ValueDistance = new Fhir.R4.Models.Distance();
                ValueDistance.DeserializeJson(ref reader, options);
                break;

            case "valueDuration":
                ValueDuration = new Fhir.R4.Models.Duration();
                ValueDuration.DeserializeJson(ref reader, options);
                break;

            case "valueHumanName":
                ValueHumanName = new Fhir.R4.Models.HumanName();
                ValueHumanName.DeserializeJson(ref reader, options);
                break;

            case "valueIdentifier":
                ValueIdentifier = new Fhir.R4.Models.Identifier();
                ValueIdentifier.DeserializeJson(ref reader, options);
                break;

            case "valueMoney":
                ValueMoney = new Fhir.R4.Models.Money();
                ValueMoney.DeserializeJson(ref reader, options);
                break;

            case "valuePeriod":
                ValuePeriod = new Fhir.R4.Models.Period();
                ValuePeriod.DeserializeJson(ref reader, options);
                break;

            case "valueQuantity":
                ValueQuantity = new Fhir.R4.Models.Quantity();
                ValueQuantity.DeserializeJson(ref reader, options);
                break;

            case "valueRange":
                ValueRange = new Fhir.R4.Models.Range();
                ValueRange.DeserializeJson(ref reader, options);
                break;

            case "valueRatio":
                ValueRatio = new Fhir.R4.Models.Ratio();
                ValueRatio.DeserializeJson(ref reader, options);
                break;

            case "valueReference":
                ValueReference = new Fhir.R4.Models.Reference();
                ValueReference.DeserializeJson(ref reader, options);
                break;

            case "valueSampledData":
                ValueSampledData = new Fhir.R4.Models.SampledData();
                ValueSampledData.DeserializeJson(ref reader, options);
                break;

            case "valueSignature":
                ValueSignature = new Fhir.R4.Models.Signature();
                ValueSignature.DeserializeJson(ref reader, options);
                break;

            case "valueTiming":
                ValueTiming = new Fhir.R4.Models.Timing();
                ValueTiming.DeserializeJson(ref reader, options);
                break;

            case "valueContactDetail":
                ValueContactDetail = new Fhir.R4.Models.ContactDetail();
                ValueContactDetail.DeserializeJson(ref reader, options);
                break;

            case "valueContributor":
                ValueContributor = new Fhir.R4.Models.Contributor();
                ValueContributor.DeserializeJson(ref reader, options);
                break;

            case "valueDataRequirement":
                ValueDataRequirement = new Fhir.R4.Models.DataRequirement();
                ValueDataRequirement.DeserializeJson(ref reader, options);
                break;

            case "valueExpression":
                ValueExpression = new Fhir.R4.Models.Expression();
                ValueExpression.DeserializeJson(ref reader, options);
                break;

            case "valueParameterDefinition":
                ValueParameterDefinition = new Fhir.R4.Models.ParameterDefinition();
                ValueParameterDefinition.DeserializeJson(ref reader, options);
                break;

            case "valueRelatedArtifact":
                ValueRelatedArtifact = new Fhir.R4.Models.RelatedArtifact();
                ValueRelatedArtifact.DeserializeJson(ref reader, options);
                break;

            case "valueTriggerDefinition":
                ValueTriggerDefinition = new Fhir.R4.Models.TriggerDefinition();
                ValueTriggerDefinition.DeserializeJson(ref reader, options);
                break;

            case "valueUsageContext":
                ValueUsageContext = new Fhir.R4.Models.UsageContext();
                ValueUsageContext.DeserializeJson(ref reader, options);
                break;

            case "valueDosage":
                ValueDosage = new Fhir.R4.Models.Dosage();
                ValueDosage.DeserializeJson(ref reader, options);
                break;

            case "valueMeta":
                ValueMeta = new Fhir.R4.Models.Meta();
                ValueMeta.DeserializeJson(ref reader, options);
                break;

            default:
                ((Fhir.R4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
示例#4
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "approvalDate":
                ApprovalDate = reader.GetString();
                break;

            case "_approvalDate":
                _ApprovalDate = new Fhir.R4.Models.Element();
                _ApprovalDate.DeserializeJson(ref reader, options);
                break;

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

                Author = new List <ContactDetail>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.ContactDetail objAuthor = new Fhir.R4.Models.ContactDetail();
                    objAuthor.DeserializeJson(ref reader, options);
                    Author.Add(objAuthor);

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

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

                break;

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

                Contact = new List <ContactDetail>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.ContactDetail objContact = new Fhir.R4.Models.ContactDetail();
                    objContact.DeserializeJson(ref reader, options);
                    Contact.Add(objContact);

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

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

                break;

            case "copyright":
                Copyright = reader.GetString();
                break;

            case "_copyright":
                _Copyright = new Fhir.R4.Models.Element();
                _Copyright.DeserializeJson(ref reader, options);
                break;

            case "date":
                Date = reader.GetString();
                break;

            case "_date":
                _Date = new Fhir.R4.Models.Element();
                _Date.DeserializeJson(ref reader, options);
                break;

            case "description":
                Description = reader.GetString();
                break;

            case "_description":
                _Description = new Fhir.R4.Models.Element();
                _Description.DeserializeJson(ref reader, options);
                break;

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

                Editor = new List <ContactDetail>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.ContactDetail objEditor = new Fhir.R4.Models.ContactDetail();
                    objEditor.DeserializeJson(ref reader, options);
                    Editor.Add(objEditor);

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

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

                break;

            case "effectivePeriod":
                EffectivePeriod = new Fhir.R4.Models.Period();
                EffectivePeriod.DeserializeJson(ref reader, options);
                break;

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

                Endorser = new List <ContactDetail>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.ContactDetail objEndorser = new Fhir.R4.Models.ContactDetail();
                    objEndorser.DeserializeJson(ref reader, options);
                    Endorser.Add(objEndorser);

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

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

                break;

            case "exposureBackground":
                ExposureBackground = new Fhir.R4.Models.Reference();
                ExposureBackground.DeserializeJson(ref reader, options);
                break;

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

                ExposureVariant = new List <Reference>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.Reference objExposureVariant = new Fhir.R4.Models.Reference();
                    objExposureVariant.DeserializeJson(ref reader, options);
                    ExposureVariant.Add(objExposureVariant);

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

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

                break;

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

                Identifier = new List <Identifier>();

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

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

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

                break;

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

                Jurisdiction = new List <CodeableConcept>();

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

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

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

                break;

            case "lastReviewDate":
                LastReviewDate = reader.GetString();
                break;

            case "_lastReviewDate":
                _LastReviewDate = new Fhir.R4.Models.Element();
                _LastReviewDate.DeserializeJson(ref reader, options);
                break;

            case "name":
                Name = reader.GetString();
                break;

            case "_name":
                _Name = new Fhir.R4.Models.Element();
                _Name.DeserializeJson(ref reader, options);
                break;

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

                Note = new List <Annotation>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.Annotation objNote = new Fhir.R4.Models.Annotation();
                    objNote.DeserializeJson(ref reader, options);
                    Note.Add(objNote);

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

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

                break;

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

                Outcome = new List <Reference>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.Reference objOutcome = new Fhir.R4.Models.Reference();
                    objOutcome.DeserializeJson(ref reader, options);
                    Outcome.Add(objOutcome);

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

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

                break;

            case "publisher":
                Publisher = reader.GetString();
                break;

            case "_publisher":
                _Publisher = new Fhir.R4.Models.Element();
                _Publisher.DeserializeJson(ref reader, options);
                break;

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

                RelatedArtifact = new List <RelatedArtifact>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.RelatedArtifact objRelatedArtifact = new Fhir.R4.Models.RelatedArtifact();
                    objRelatedArtifact.DeserializeJson(ref reader, options);
                    RelatedArtifact.Add(objRelatedArtifact);

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

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

                break;

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

                Reviewer = new List <ContactDetail>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.ContactDetail objReviewer = new Fhir.R4.Models.ContactDetail();
                    objReviewer.DeserializeJson(ref reader, options);
                    Reviewer.Add(objReviewer);

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

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

                break;

            case "shortTitle":
                ShortTitle = reader.GetString();
                break;

            case "_shortTitle":
                _ShortTitle = new Fhir.R4.Models.Element();
                _ShortTitle.DeserializeJson(ref reader, options);
                break;

            case "status":
                Status = reader.GetString();
                break;

            case "_status":
                _Status = new Fhir.R4.Models.Element();
                _Status.DeserializeJson(ref reader, options);
                break;

            case "subtitle":
                Subtitle = reader.GetString();
                break;

            case "_subtitle":
                _Subtitle = new Fhir.R4.Models.Element();
                _Subtitle.DeserializeJson(ref reader, options);
                break;

            case "title":
                Title = reader.GetString();
                break;

            case "_title":
                _Title = new Fhir.R4.Models.Element();
                _Title.DeserializeJson(ref reader, options);
                break;

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

                Topic = new List <CodeableConcept>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.CodeableConcept objTopic = new Fhir.R4.Models.CodeableConcept();
                    objTopic.DeserializeJson(ref reader, options);
                    Topic.Add(objTopic);

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

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

                break;

            case "url":
                Url = reader.GetString();
                break;

            case "_url":
                _Url = new Fhir.R4.Models.Element();
                _Url.DeserializeJson(ref reader, options);
                break;

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

                UseContext = new List <UsageContext>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.UsageContext objUseContext = new Fhir.R4.Models.UsageContext();
                    objUseContext.DeserializeJson(ref reader, options);
                    UseContext.Add(objUseContext);

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

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

                break;

            case "version":
                Version = reader.GetString();
                break;

            case "_version":
                _Version = new Fhir.R4.Models.Element();
                _Version.DeserializeJson(ref reader, options);
                break;

            default:
                ((Fhir.R4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
示例#5
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "contact":
                if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read()))
                {
                    throw new JsonException();
                }

                Contact = new List <ContactDetail>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.ContactDetail objContact = new Fhir.R4.Models.ContactDetail();
                    objContact.DeserializeJson(ref reader, options);
                    Contact.Add(objContact);

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

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

                break;

            case "date":
                Date = reader.GetString();
                break;

            case "_date":
                _Date = new Fhir.R4.Models.Element();
                _Date.DeserializeJson(ref reader, options);
                break;

            case "description":
                Description = reader.GetString();
                break;

            case "_description":
                _Description = new Fhir.R4.Models.Element();
                _Description.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)
                {
                    Fhir.R4.Models.CodeableConcept objJurisdiction = new Fhir.R4.Models.CodeableConcept();
                    objJurisdiction.DeserializeJson(ref reader, options);
                    Jurisdiction.Add(objJurisdiction);

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

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

                break;

            case "kind":
                Kind = reader.GetString();
                break;

            case "_kind":
                _Kind = new Fhir.R4.Models.Element();
                _Kind.DeserializeJson(ref reader, options);
                break;

            case "name":
                Name = reader.GetString();
                break;

            case "_name":
                _Name = new Fhir.R4.Models.Element();
                _Name.DeserializeJson(ref reader, options);
                break;

            case "publisher":
                Publisher = reader.GetString();
                break;

            case "_publisher":
                _Publisher = new Fhir.R4.Models.Element();
                _Publisher.DeserializeJson(ref reader, options);
                break;

            case "responsible":
                Responsible = reader.GetString();
                break;

            case "_responsible":
                _Responsible = new Fhir.R4.Models.Element();
                _Responsible.DeserializeJson(ref reader, options);
                break;

            case "status":
                Status = reader.GetString();
                break;

            case "_status":
                _Status = new Fhir.R4.Models.Element();
                _Status.DeserializeJson(ref reader, options);
                break;

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

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

                UniqueId = new List <NamingSystemUniqueId>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.NamingSystemUniqueId objUniqueId = new Fhir.R4.Models.NamingSystemUniqueId();
                    objUniqueId.DeserializeJson(ref reader, options);
                    UniqueId.Add(objUniqueId);

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

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

                break;

            case "usage":
                Usage = reader.GetString();
                break;

            case "_usage":
                _Usage = new Fhir.R4.Models.Element();
                _Usage.DeserializeJson(ref reader, options);
                break;

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

                UseContext = new List <UsageContext>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.UsageContext objUseContext = new Fhir.R4.Models.UsageContext();
                    objUseContext.DeserializeJson(ref reader, options);
                    UseContext.Add(objUseContext);

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

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

                break;

            default:
                ((Fhir.R4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
示例#6
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "arm":
                if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read()))
                {
                    throw new JsonException();
                }

                Arm = new List <ResearchStudyArm>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.ResearchStudyArm objArm = new Fhir.R4.Models.ResearchStudyArm();
                    objArm.DeserializeJson(ref reader, options);
                    Arm.Add(objArm);

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

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

                break;

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

                Category = new List <CodeableConcept>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.CodeableConcept objCategory = new Fhir.R4.Models.CodeableConcept();
                    objCategory.DeserializeJson(ref reader, options);
                    Category.Add(objCategory);

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

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

                break;

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

                Condition = new List <CodeableConcept>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.CodeableConcept objCondition = new Fhir.R4.Models.CodeableConcept();
                    objCondition.DeserializeJson(ref reader, options);
                    Condition.Add(objCondition);

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

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

                break;

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

                Contact = new List <ContactDetail>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.ContactDetail objContact = new Fhir.R4.Models.ContactDetail();
                    objContact.DeserializeJson(ref reader, options);
                    Contact.Add(objContact);

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

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

                break;

            case "description":
                Description = reader.GetString();
                break;

            case "_description":
                _Description = new Fhir.R4.Models.Element();
                _Description.DeserializeJson(ref reader, options);
                break;

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

                Enrollment = new List <Reference>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.Reference objEnrollment = new Fhir.R4.Models.Reference();
                    objEnrollment.DeserializeJson(ref reader, options);
                    Enrollment.Add(objEnrollment);

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

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

                break;

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

                Focus = new List <CodeableConcept>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.CodeableConcept objFocus = new Fhir.R4.Models.CodeableConcept();
                    objFocus.DeserializeJson(ref reader, options);
                    Focus.Add(objFocus);

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

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

                break;

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

                Identifier = new List <Identifier>();

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

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

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

                break;

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

                Keyword = new List <CodeableConcept>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.CodeableConcept objKeyword = new Fhir.R4.Models.CodeableConcept();
                    objKeyword.DeserializeJson(ref reader, options);
                    Keyword.Add(objKeyword);

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

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

                break;

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

                Location = new List <CodeableConcept>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.CodeableConcept objLocation = new Fhir.R4.Models.CodeableConcept();
                    objLocation.DeserializeJson(ref reader, options);
                    Location.Add(objLocation);

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

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

                break;

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

                Note = new List <Annotation>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.Annotation objNote = new Fhir.R4.Models.Annotation();
                    objNote.DeserializeJson(ref reader, options);
                    Note.Add(objNote);

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

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

                break;

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

                Objective = new List <ResearchStudyObjective>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.ResearchStudyObjective objObjective = new Fhir.R4.Models.ResearchStudyObjective();
                    objObjective.DeserializeJson(ref reader, options);
                    Objective.Add(objObjective);

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

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

                break;

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

                PartOf = new List <Reference>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.Reference objPartOf = new Fhir.R4.Models.Reference();
                    objPartOf.DeserializeJson(ref reader, options);
                    PartOf.Add(objPartOf);

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

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

                break;

            case "period":
                Period = new Fhir.R4.Models.Period();
                Period.DeserializeJson(ref reader, options);
                break;

            case "phase":
                Phase = new Fhir.R4.Models.CodeableConcept();
                Phase.DeserializeJson(ref reader, options);
                break;

            case "primaryPurposeType":
                PrimaryPurposeType = new Fhir.R4.Models.CodeableConcept();
                PrimaryPurposeType.DeserializeJson(ref reader, options);
                break;

            case "principalInvestigator":
                PrincipalInvestigator = new Fhir.R4.Models.Reference();
                PrincipalInvestigator.DeserializeJson(ref reader, options);
                break;

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

                Protocol = new List <Reference>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.Reference objProtocol = new Fhir.R4.Models.Reference();
                    objProtocol.DeserializeJson(ref reader, options);
                    Protocol.Add(objProtocol);

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

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

                break;

            case "reasonStopped":
                ReasonStopped = new Fhir.R4.Models.CodeableConcept();
                ReasonStopped.DeserializeJson(ref reader, options);
                break;

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

                RelatedArtifact = new List <RelatedArtifact>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.RelatedArtifact objRelatedArtifact = new Fhir.R4.Models.RelatedArtifact();
                    objRelatedArtifact.DeserializeJson(ref reader, options);
                    RelatedArtifact.Add(objRelatedArtifact);

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

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

                break;

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

                Site = new List <Reference>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.Reference objSite = new Fhir.R4.Models.Reference();
                    objSite.DeserializeJson(ref reader, options);
                    Site.Add(objSite);

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

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

                break;

            case "sponsor":
                Sponsor = new Fhir.R4.Models.Reference();
                Sponsor.DeserializeJson(ref reader, options);
                break;

            case "status":
                Status = reader.GetString();
                break;

            case "_status":
                _Status = new Fhir.R4.Models.Element();
                _Status.DeserializeJson(ref reader, options);
                break;

            case "title":
                Title = reader.GetString();
                break;

            case "_title":
                _Title = new Fhir.R4.Models.Element();
                _Title.DeserializeJson(ref reader, options);
                break;

            default:
                ((Fhir.R4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
示例#7
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "allowedResponse":
                if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read()))
                {
                    throw new JsonException();
                }

                AllowedResponse = new List <MessageDefinitionAllowedResponse>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.MessageDefinitionAllowedResponse objAllowedResponse = new Fhir.R4.Models.MessageDefinitionAllowedResponse();
                    objAllowedResponse.DeserializeJson(ref reader, options);
                    AllowedResponse.Add(objAllowedResponse);

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

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

                break;

            case "base":
                Base = reader.GetString();
                break;

            case "_base":
                _Base = new Fhir.R4.Models.Element();
                _Base.DeserializeJson(ref reader, options);
                break;

            case "category":
                Category = reader.GetString();
                break;

            case "_category":
                _Category = new Fhir.R4.Models.Element();
                _Category.DeserializeJson(ref reader, options);
                break;

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

                Contact = new List <ContactDetail>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.ContactDetail objContact = new Fhir.R4.Models.ContactDetail();
                    objContact.DeserializeJson(ref reader, options);
                    Contact.Add(objContact);

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

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

                break;

            case "copyright":
                Copyright = reader.GetString();
                break;

            case "_copyright":
                _Copyright = new Fhir.R4.Models.Element();
                _Copyright.DeserializeJson(ref reader, options);
                break;

            case "date":
                Date = reader.GetString();
                break;

            case "_date":
                _Date = new Fhir.R4.Models.Element();
                _Date.DeserializeJson(ref reader, options);
                break;

            case "description":
                Description = reader.GetString();
                break;

            case "_description":
                _Description = new Fhir.R4.Models.Element();
                _Description.DeserializeJson(ref reader, options);
                break;

            case "eventCoding":
                EventCoding = new Fhir.R4.Models.Coding();
                EventCoding.DeserializeJson(ref reader, options);
                break;

            case "eventUri":
                EventUri = reader.GetString();
                break;

            case "_eventUri":
                _EventUri = new Fhir.R4.Models.Element();
                _EventUri.DeserializeJson(ref reader, options);
                break;

            case "experimental":
                Experimental = reader.GetBoolean();
                break;

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

                Focus = new List <MessageDefinitionFocus>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.MessageDefinitionFocus objFocus = new Fhir.R4.Models.MessageDefinitionFocus();
                    objFocus.DeserializeJson(ref reader, options);
                    Focus.Add(objFocus);

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

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

                break;

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

                Graph = new List <string>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Graph.Add(reader.GetString());

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

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

                break;

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

                _Graph = new List <Element>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.Element obj_Graph = new Fhir.R4.Models.Element();
                    obj_Graph.DeserializeJson(ref reader, options);
                    _Graph.Add(obj_Graph);

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

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

                break;

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

                Identifier = new List <Identifier>();

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

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

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

                break;

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

                Jurisdiction = new List <CodeableConcept>();

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

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

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

                break;

            case "name":
                Name = reader.GetString();
                break;

            case "_name":
                _Name = new Fhir.R4.Models.Element();
                _Name.DeserializeJson(ref reader, options);
                break;

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

                Parent = new List <string>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Parent.Add(reader.GetString());

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

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

                break;

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

                _Parent = new List <Element>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.Element obj_Parent = new Fhir.R4.Models.Element();
                    obj_Parent.DeserializeJson(ref reader, options);
                    _Parent.Add(obj_Parent);

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

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

                break;

            case "publisher":
                Publisher = reader.GetString();
                break;

            case "_publisher":
                _Publisher = new Fhir.R4.Models.Element();
                _Publisher.DeserializeJson(ref reader, options);
                break;

            case "purpose":
                Purpose = reader.GetString();
                break;

            case "_purpose":
                _Purpose = new Fhir.R4.Models.Element();
                _Purpose.DeserializeJson(ref reader, options);
                break;

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

                Replaces = new List <string>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Replaces.Add(reader.GetString());

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

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

                break;

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

                _Replaces = new List <Element>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.Element obj_Replaces = new Fhir.R4.Models.Element();
                    obj_Replaces.DeserializeJson(ref reader, options);
                    _Replaces.Add(obj_Replaces);

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

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

                break;

            case "responseRequired":
                ResponseRequired = reader.GetString();
                break;

            case "_responseRequired":
                _ResponseRequired = new Fhir.R4.Models.Element();
                _ResponseRequired.DeserializeJson(ref reader, options);
                break;

            case "status":
                Status = reader.GetString();
                break;

            case "_status":
                _Status = new Fhir.R4.Models.Element();
                _Status.DeserializeJson(ref reader, options);
                break;

            case "title":
                Title = reader.GetString();
                break;

            case "_title":
                _Title = new Fhir.R4.Models.Element();
                _Title.DeserializeJson(ref reader, options);
                break;

            case "url":
                Url = reader.GetString();
                break;

            case "_url":
                _Url = new Fhir.R4.Models.Element();
                _Url.DeserializeJson(ref reader, options);
                break;

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

                UseContext = new List <UsageContext>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.UsageContext objUseContext = new Fhir.R4.Models.UsageContext();
                    objUseContext.DeserializeJson(ref reader, options);
                    UseContext.Add(objUseContext);

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

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

                break;

            case "version":
                Version = reader.GetString();
                break;

            case "_version":
                _Version = new Fhir.R4.Models.Element();
                _Version.DeserializeJson(ref reader, options);
                break;

            default:
                ((Fhir.R4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
示例#8
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "base":
                if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read()))
                {
                    throw new JsonException();
                }

                Base = new List <string>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Base.Add(reader.GetString());

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

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

                break;

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

                _Base = new List <Element>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.Element obj_Base = new Fhir.R4.Models.Element();
                    obj_Base.DeserializeJson(ref reader, options);
                    _Base.Add(obj_Base);

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

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

                break;

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

                Chain = new List <string>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Chain.Add(reader.GetString());

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

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

                break;

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

                _Chain = new List <Element>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.Element obj_Chain = new Fhir.R4.Models.Element();
                    obj_Chain.DeserializeJson(ref reader, options);
                    _Chain.Add(obj_Chain);

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

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

                break;

            case "code":
                Code = reader.GetString();
                break;

            case "_code":
                _Code = new Fhir.R4.Models.Element();
                _Code.DeserializeJson(ref reader, options);
                break;

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

                Comparator = new List <string>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Comparator.Add(reader.GetString());

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

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

                break;

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

                _Comparator = new List <Element>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.Element obj_Comparator = new Fhir.R4.Models.Element();
                    obj_Comparator.DeserializeJson(ref reader, options);
                    _Comparator.Add(obj_Comparator);

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

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

                break;

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

                Component = new List <SearchParameterComponent>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.SearchParameterComponent objComponent = new Fhir.R4.Models.SearchParameterComponent();
                    objComponent.DeserializeJson(ref reader, options);
                    Component.Add(objComponent);

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

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

                break;

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

                Contact = new List <ContactDetail>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.ContactDetail objContact = new Fhir.R4.Models.ContactDetail();
                    objContact.DeserializeJson(ref reader, options);
                    Contact.Add(objContact);

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

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

                break;

            case "date":
                Date = reader.GetString();
                break;

            case "_date":
                _Date = new Fhir.R4.Models.Element();
                _Date.DeserializeJson(ref reader, options);
                break;

            case "derivedFrom":
                DerivedFrom = reader.GetString();
                break;

            case "_derivedFrom":
                _DerivedFrom = new Fhir.R4.Models.Element();
                _DerivedFrom.DeserializeJson(ref reader, options);
                break;

            case "description":
                Description = reader.GetString();
                break;

            case "_description":
                _Description = new Fhir.R4.Models.Element();
                _Description.DeserializeJson(ref reader, options);
                break;

            case "experimental":
                Experimental = reader.GetBoolean();
                break;

            case "expression":
                Expression = reader.GetString();
                break;

            case "_expression":
                _Expression = new Fhir.R4.Models.Element();
                _Expression.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)
                {
                    Fhir.R4.Models.CodeableConcept objJurisdiction = new Fhir.R4.Models.CodeableConcept();
                    objJurisdiction.DeserializeJson(ref reader, options);
                    Jurisdiction.Add(objJurisdiction);

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

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

                break;

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

                Modifier = new List <string>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Modifier.Add(reader.GetString());

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

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

                break;

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

                _Modifier = new List <Element>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.Element obj_Modifier = new Fhir.R4.Models.Element();
                    obj_Modifier.DeserializeJson(ref reader, options);
                    _Modifier.Add(obj_Modifier);

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

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

                break;

            case "multipleAnd":
                MultipleAnd = reader.GetBoolean();
                break;

            case "multipleOr":
                MultipleOr = reader.GetBoolean();
                break;

            case "name":
                Name = reader.GetString();
                break;

            case "_name":
                _Name = new Fhir.R4.Models.Element();
                _Name.DeserializeJson(ref reader, options);
                break;

            case "publisher":
                Publisher = reader.GetString();
                break;

            case "_publisher":
                _Publisher = new Fhir.R4.Models.Element();
                _Publisher.DeserializeJson(ref reader, options);
                break;

            case "purpose":
                Purpose = reader.GetString();
                break;

            case "_purpose":
                _Purpose = new Fhir.R4.Models.Element();
                _Purpose.DeserializeJson(ref reader, options);
                break;

            case "status":
                Status = reader.GetString();
                break;

            case "_status":
                _Status = new Fhir.R4.Models.Element();
                _Status.DeserializeJson(ref reader, options);
                break;

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

                Target = new List <string>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Target.Add(reader.GetString());

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

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

                break;

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

                _Target = new List <Element>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.Element obj_Target = new Fhir.R4.Models.Element();
                    obj_Target.DeserializeJson(ref reader, options);
                    _Target.Add(obj_Target);

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

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

                break;

            case "type":
                Type = reader.GetString();
                break;

            case "_type":
                _Type = new Fhir.R4.Models.Element();
                _Type.DeserializeJson(ref reader, options);
                break;

            case "url":
                Url = reader.GetString();
                break;

            case "_url":
                _Url = new Fhir.R4.Models.Element();
                _Url.DeserializeJson(ref reader, options);
                break;

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

                UseContext = new List <UsageContext>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.UsageContext objUseContext = new Fhir.R4.Models.UsageContext();
                    objUseContext.DeserializeJson(ref reader, options);
                    UseContext.Add(objUseContext);

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

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

                break;

            case "version":
                Version = reader.GetString();
                break;

            case "_version":
                _Version = new Fhir.R4.Models.Element();
                _Version.DeserializeJson(ref reader, options);
                break;

            case "xpath":
                Xpath = reader.GetString();
                break;

            case "_xpath":
                _Xpath = new Fhir.R4.Models.Element();
                _Xpath.DeserializeJson(ref reader, options);
                break;

            case "xpathUsage":
                XpathUsage = reader.GetString();
                break;

            case "_xpathUsage":
                _XpathUsage = new Fhir.R4.Models.Element();
                _XpathUsage.DeserializeJson(ref reader, options);
                break;

            default:
                ((Fhir.R4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
示例#9
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "contact":
                if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read()))
                {
                    throw new JsonException();
                }

                Contact = new List <ContactDetail>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.ContactDetail objContact = new Fhir.R4.Models.ContactDetail();
                    objContact.DeserializeJson(ref reader, options);
                    Contact.Add(objContact);

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

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

                break;

            case "date":
                Date = reader.GetString();
                break;

            case "_date":
                _Date = new Fhir.R4.Models.Element();
                _Date.DeserializeJson(ref reader, options);
                break;

            case "description":
                Description = reader.GetString();
                break;

            case "_description":
                _Description = new Fhir.R4.Models.Element();
                _Description.DeserializeJson(ref reader, options);
                break;

            case "experimental":
                Experimental = reader.GetBoolean();
                break;

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

                Jurisdiction = new List <CodeableConcept>();

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

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

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

                break;

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

                Link = new List <GraphDefinitionLink>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.GraphDefinitionLink objLink = new Fhir.R4.Models.GraphDefinitionLink();
                    objLink.DeserializeJson(ref reader, options);
                    Link.Add(objLink);

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

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

                break;

            case "name":
                Name = reader.GetString();
                break;

            case "_name":
                _Name = new Fhir.R4.Models.Element();
                _Name.DeserializeJson(ref reader, options);
                break;

            case "profile":
                Profile = reader.GetString();
                break;

            case "_profile":
                _Profile = new Fhir.R4.Models.Element();
                _Profile.DeserializeJson(ref reader, options);
                break;

            case "publisher":
                Publisher = reader.GetString();
                break;

            case "_publisher":
                _Publisher = new Fhir.R4.Models.Element();
                _Publisher.DeserializeJson(ref reader, options);
                break;

            case "purpose":
                Purpose = reader.GetString();
                break;

            case "_purpose":
                _Purpose = new Fhir.R4.Models.Element();
                _Purpose.DeserializeJson(ref reader, options);
                break;

            case "start":
                Start = reader.GetString();
                break;

            case "_start":
                _Start = new Fhir.R4.Models.Element();
                _Start.DeserializeJson(ref reader, options);
                break;

            case "status":
                Status = reader.GetString();
                break;

            case "_status":
                _Status = new Fhir.R4.Models.Element();
                _Status.DeserializeJson(ref reader, options);
                break;

            case "url":
                Url = reader.GetString();
                break;

            case "_url":
                _Url = new Fhir.R4.Models.Element();
                _Url.DeserializeJson(ref reader, options);
                break;

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

                UseContext = new List <UsageContext>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.UsageContext objUseContext = new Fhir.R4.Models.UsageContext();
                    objUseContext.DeserializeJson(ref reader, options);
                    UseContext.Add(objUseContext);

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

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

                break;

            case "version":
                Version = reader.GetString();
                break;

            case "_version":
                _Version = new Fhir.R4.Models.Element();
                _Version.DeserializeJson(ref reader, options);
                break;

            default:
                ((Fhir.R4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
示例#10
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "url":
                Url = reader.GetString();
                break;

            case "_url":
                _Url = new Fhir.R4.Models.Element();
                _Url.DeserializeJson(ref reader, options);
                break;

            case "valueBase64Binary":
                ValueBase64Binary = reader.GetString();
                break;

            case "_valueBase64Binary":
                _ValueBase64Binary = new Fhir.R4.Models.Element();
                _ValueBase64Binary.DeserializeJson(ref reader, options);
                break;

            case "valueBoolean":
                ValueBoolean = reader.GetBoolean();
                break;

            case "valueCanonical":
                ValueCanonical = reader.GetString();
                break;

            case "_valueCanonical":
                _ValueCanonical = new Fhir.R4.Models.Element();
                _ValueCanonical.DeserializeJson(ref reader, options);
                break;

            case "valueCode":
                ValueCode = reader.GetString();
                break;

            case "_valueCode":
                _ValueCode = new Fhir.R4.Models.Element();
                _ValueCode.DeserializeJson(ref reader, options);
                break;

            case "valueDate":
                ValueDate = reader.GetString();
                break;

            case "_valueDate":
                _ValueDate = new Fhir.R4.Models.Element();
                _ValueDate.DeserializeJson(ref reader, options);
                break;

            case "valueDateTime":
                ValueDateTime = reader.GetString();
                break;

            case "_valueDateTime":
                _ValueDateTime = new Fhir.R4.Models.Element();
                _ValueDateTime.DeserializeJson(ref reader, options);
                break;

            case "valueDecimal":
                ValueDecimal = reader.GetDecimal();
                break;

            case "_valueDecimal":
                _ValueDecimal = new Fhir.R4.Models.Element();
                _ValueDecimal.DeserializeJson(ref reader, options);
                break;

            case "valueId":
                ValueId = reader.GetString();
                break;

            case "_valueId":
                _ValueId = new Fhir.R4.Models.Element();
                _ValueId.DeserializeJson(ref reader, options);
                break;

            case "valueInstant":
                ValueInstant = reader.GetString();
                break;

            case "_valueInstant":
                _ValueInstant = new Fhir.R4.Models.Element();
                _ValueInstant.DeserializeJson(ref reader, options);
                break;

            case "valueInteger":
                ValueInteger = reader.GetInt32();
                break;

            case "valueMarkdown":
                ValueMarkdown = reader.GetString();
                break;

            case "_valueMarkdown":
                _ValueMarkdown = new Fhir.R4.Models.Element();
                _ValueMarkdown.DeserializeJson(ref reader, options);
                break;

            case "valueOid":
                ValueOid = reader.GetString();
                break;

            case "_valueOid":
                _ValueOid = new Fhir.R4.Models.Element();
                _ValueOid.DeserializeJson(ref reader, options);
                break;

            case "valuePositiveInt":
                ValuePositiveInt = reader.GetUInt32();
                break;

            case "valueString":
                ValueString = reader.GetString();
                break;

            case "_valueString":
                _ValueString = new Fhir.R4.Models.Element();
                _ValueString.DeserializeJson(ref reader, options);
                break;

            case "valueTime":
                ValueTime = reader.GetString();
                break;

            case "_valueTime":
                _ValueTime = new Fhir.R4.Models.Element();
                _ValueTime.DeserializeJson(ref reader, options);
                break;

            case "valueUnsignedInt":
                ValueUnsignedInt = reader.GetUInt32();
                break;

            case "valueUri":
                ValueUri = reader.GetString();
                break;

            case "_valueUri":
                _ValueUri = new Fhir.R4.Models.Element();
                _ValueUri.DeserializeJson(ref reader, options);
                break;

            case "valueUrl":
                ValueUrl = reader.GetString();
                break;

            case "_valueUrl":
                _ValueUrl = new Fhir.R4.Models.Element();
                _ValueUrl.DeserializeJson(ref reader, options);
                break;

            case "valueUuid":
                ValueUuid = reader.GetGuid();
                break;

            case "valueAddress":
                ValueAddress = new Fhir.R4.Models.Address();
                ValueAddress.DeserializeJson(ref reader, options);
                break;

            case "valueAge":
                ValueAge = new Fhir.R4.Models.Age();
                ValueAge.DeserializeJson(ref reader, options);
                break;

            case "valueAnnotation":
                ValueAnnotation = new Fhir.R4.Models.Annotation();
                ValueAnnotation.DeserializeJson(ref reader, options);
                break;

            case "valueAttachment":
                ValueAttachment = new Fhir.R4.Models.Attachment();
                ValueAttachment.DeserializeJson(ref reader, options);
                break;

            case "valueCodeableConcept":
                ValueCodeableConcept = new Fhir.R4.Models.CodeableConcept();
                ValueCodeableConcept.DeserializeJson(ref reader, options);
                break;

            case "valueCoding":
                ValueCoding = new Fhir.R4.Models.Coding();
                ValueCoding.DeserializeJson(ref reader, options);
                break;

            case "valueContactPoint":
                ValueContactPoint = new Fhir.R4.Models.ContactPoint();
                ValueContactPoint.DeserializeJson(ref reader, options);
                break;

            case "valueCount":
                ValueCount = new Fhir.R4.Models.Count();
                ValueCount.DeserializeJson(ref reader, options);
                break;

            case "valueDistance":
                ValueDistance = new Fhir.R4.Models.Distance();
                ValueDistance.DeserializeJson(ref reader, options);
                break;

            case "valueDuration":
                ValueDuration = new Fhir.R4.Models.Duration();
                ValueDuration.DeserializeJson(ref reader, options);
                break;

            case "valueHumanName":
                ValueHumanName = new Fhir.R4.Models.HumanName();
                ValueHumanName.DeserializeJson(ref reader, options);
                break;

            case "valueIdentifier":
                ValueIdentifier = new Fhir.R4.Models.Identifier();
                ValueIdentifier.DeserializeJson(ref reader, options);
                break;

            case "valueMoney":
                ValueMoney = new Fhir.R4.Models.Money();
                ValueMoney.DeserializeJson(ref reader, options);
                break;

            case "valuePeriod":
                ValuePeriod = new Fhir.R4.Models.Period();
                ValuePeriod.DeserializeJson(ref reader, options);
                break;

            case "valueQuantity":
                ValueQuantity = new Fhir.R4.Models.Quantity();
                ValueQuantity.DeserializeJson(ref reader, options);
                break;

            case "valueRange":
                ValueRange = new Fhir.R4.Models.Range();
                ValueRange.DeserializeJson(ref reader, options);
                break;

            case "valueRatio":
                ValueRatio = new Fhir.R4.Models.Ratio();
                ValueRatio.DeserializeJson(ref reader, options);
                break;

            case "valueReference":
                ValueReference = new Fhir.R4.Models.Reference();
                ValueReference.DeserializeJson(ref reader, options);
                break;

            case "valueSampledData":
                ValueSampledData = new Fhir.R4.Models.SampledData();
                ValueSampledData.DeserializeJson(ref reader, options);
                break;

            case "valueSignature":
                ValueSignature = new Fhir.R4.Models.Signature();
                ValueSignature.DeserializeJson(ref reader, options);
                break;

            case "valueTiming":
                ValueTiming = new Fhir.R4.Models.Timing();
                ValueTiming.DeserializeJson(ref reader, options);
                break;

            case "valueContactDetail":
                ValueContactDetail = new Fhir.R4.Models.ContactDetail();
                ValueContactDetail.DeserializeJson(ref reader, options);
                break;

            case "valueContributor":
                ValueContributor = new Fhir.R4.Models.Contributor();
                ValueContributor.DeserializeJson(ref reader, options);
                break;

            case "valueDataRequirement":
                ValueDataRequirement = new Fhir.R4.Models.DataRequirement();
                ValueDataRequirement.DeserializeJson(ref reader, options);
                break;

            case "valueExpression":
                ValueExpression = new Fhir.R4.Models.Expression();
                ValueExpression.DeserializeJson(ref reader, options);
                break;

            case "valueParameterDefinition":
                ValueParameterDefinition = new Fhir.R4.Models.ParameterDefinition();
                ValueParameterDefinition.DeserializeJson(ref reader, options);
                break;

            case "valueRelatedArtifact":
                ValueRelatedArtifact = new Fhir.R4.Models.RelatedArtifact();
                ValueRelatedArtifact.DeserializeJson(ref reader, options);
                break;

            case "valueTriggerDefinition":
                ValueTriggerDefinition = new Fhir.R4.Models.TriggerDefinition();
                ValueTriggerDefinition.DeserializeJson(ref reader, options);
                break;

            case "valueUsageContext":
                ValueUsageContext = new Fhir.R4.Models.UsageContext();
                ValueUsageContext.DeserializeJson(ref reader, options);
                break;

            case "valueDosage":
                ValueDosage = new Fhir.R4.Models.Dosage();
                ValueDosage.DeserializeJson(ref reader, options);
                break;

            case "valueMeta":
                ValueMeta = new Fhir.R4.Models.Meta();
                ValueMeta.DeserializeJson(ref reader, options);
                break;

            default:
                ((Fhir.R4.Models.Element) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }