/// <summary> /// Deserialize a JSON property /// </summary> public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName) { switch (propertyName) { case "attestationSignature": AttestationSignature = new fhirCsR4.Models.Signature(); AttestationSignature.DeserializeJson(ref reader, options); break; case "identityCertificate": IdentityCertificate = reader.GetString(); break; case "_identityCertificate": _IdentityCertificate = new fhirCsR4.Models.Element(); _IdentityCertificate.DeserializeJson(ref reader, options); break; case "organization": Organization = new fhirCsR4.Models.Reference(); Organization.DeserializeJson(ref reader, options); break; default: ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName); break; } }
/// <summary> /// Deserialize a JSON property /// </summary> public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName) { switch (propertyName) { case "communicationMethod": CommunicationMethod = new fhirCsR4.Models.CodeableConcept(); CommunicationMethod.DeserializeJson(ref reader, options); break; case "date": Date = reader.GetString(); break; case "_date": _Date = new fhirCsR4.Models.Element(); _Date.DeserializeJson(ref reader, options); break; case "onBehalfOf": OnBehalfOf = new fhirCsR4.Models.Reference(); OnBehalfOf.DeserializeJson(ref reader, options); break; case "proxyIdentityCertificate": ProxyIdentityCertificate = reader.GetString(); break; case "_proxyIdentityCertificate": _ProxyIdentityCertificate = new fhirCsR4.Models.Element(); _ProxyIdentityCertificate.DeserializeJson(ref reader, options); break; case "proxySignature": ProxySignature = new fhirCsR4.Models.Signature(); ProxySignature.DeserializeJson(ref reader, options); break; case "sourceIdentityCertificate": SourceIdentityCertificate = reader.GetString(); break; case "_sourceIdentityCertificate": _SourceIdentityCertificate = new fhirCsR4.Models.Element(); _SourceIdentityCertificate.DeserializeJson(ref reader, options); break; case "sourceSignature": SourceSignature = new fhirCsR4.Models.Signature(); SourceSignature.DeserializeJson(ref reader, options); break; case "who": Who = new fhirCsR4.Models.Reference(); Who.DeserializeJson(ref reader, options); break; default: ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName); break; } }
/// <summary> /// Deserialize a JSON property /// </summary> public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName) { switch (propertyName) { case "entry": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Entry = new List <BundleEntry>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.BundleEntry objEntry = new fhirCsR4.Models.BundleEntry(); objEntry.DeserializeJson(ref reader, options); Entry.Add(objEntry); if (!reader.Read()) { throw new JsonException(); } } if (Entry.Count == 0) { Entry = null; } break; case "identifier": Identifier = new fhirCsR4.Models.Identifier(); Identifier.DeserializeJson(ref reader, options); break; case "link": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Link = new List <BundleLink>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.BundleLink objLink = new fhirCsR4.Models.BundleLink(); objLink.DeserializeJson(ref reader, options); Link.Add(objLink); if (!reader.Read()) { throw new JsonException(); } } if (Link.Count == 0) { Link = null; } break; case "signature": Signature = new fhirCsR4.Models.Signature(); Signature.DeserializeJson(ref reader, options); break; case "timestamp": Timestamp = reader.GetString(); break; case "_timestamp": _Timestamp = new fhirCsR4.Models.Element(); _Timestamp.DeserializeJson(ref reader, options); break; case "total": Total = reader.GetUInt32(); break; case "type": Type = reader.GetString(); break; case "_type": _Type = new fhirCsR4.Models.Element(); _Type.DeserializeJson(ref reader, options); break; default: ((fhirCsR4.Models.Resource) 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 "url": Url = reader.GetString(); break; case "_url": _Url = new fhirCsR4.Models.Element(); _Url.DeserializeJson(ref reader, options); break; case "valueBase64Binary": ValueBase64Binary = System.Convert.FromBase64String(reader.GetString()); break; case "valueBoolean": ValueBoolean = reader.GetBoolean(); break; case "valueCanonical": ValueCanonical = reader.GetString(); break; case "_valueCanonical": _ValueCanonical = new fhirCsR4.Models.Element(); _ValueCanonical.DeserializeJson(ref reader, options); break; case "valueCode": ValueCode = reader.GetString(); break; case "_valueCode": _ValueCode = new fhirCsR4.Models.Element(); _ValueCode.DeserializeJson(ref reader, options); break; case "valueDate": ValueDate = reader.GetString(); break; case "_valueDate": _ValueDate = new fhirCsR4.Models.Element(); _ValueDate.DeserializeJson(ref reader, options); break; case "valueDateTime": ValueDateTime = reader.GetString(); break; case "_valueDateTime": _ValueDateTime = new fhirCsR4.Models.Element(); _ValueDateTime.DeserializeJson(ref reader, options); break; case "valueDecimal": ValueDecimal = reader.GetDecimal(); break; case "_valueDecimal": _ValueDecimal = new fhirCsR4.Models.Element(); _ValueDecimal.DeserializeJson(ref reader, options); break; case "valueId": ValueId = reader.GetString(); break; case "_valueId": _ValueId = new fhirCsR4.Models.Element(); _ValueId.DeserializeJson(ref reader, options); break; case "valueInstant": ValueInstant = reader.GetString(); break; case "_valueInstant": _ValueInstant = new fhirCsR4.Models.Element(); _ValueInstant.DeserializeJson(ref reader, options); break; case "valueInteger": ValueInteger = reader.GetInt32(); break; case "valueMarkdown": ValueMarkdown = reader.GetString(); break; case "_valueMarkdown": _ValueMarkdown = new fhirCsR4.Models.Element(); _ValueMarkdown.DeserializeJson(ref reader, options); break; case "valueOid": ValueOid = reader.GetString(); break; case "_valueOid": _ValueOid = new fhirCsR4.Models.Element(); _ValueOid.DeserializeJson(ref reader, options); break; case "valuePositiveInt": ValuePositiveInt = reader.GetUInt32(); break; case "valueString": ValueString = reader.GetString(); break; case "_valueString": _ValueString = new fhirCsR4.Models.Element(); _ValueString.DeserializeJson(ref reader, options); break; case "valueTime": ValueTime = reader.GetString(); break; case "_valueTime": _ValueTime = new fhirCsR4.Models.Element(); _ValueTime.DeserializeJson(ref reader, options); break; case "valueUnsignedInt": ValueUnsignedInt = reader.GetUInt32(); break; case "valueUri": ValueUri = reader.GetString(); break; case "_valueUri": _ValueUri = new fhirCsR4.Models.Element(); _ValueUri.DeserializeJson(ref reader, options); break; case "valueUrl": ValueUrl = reader.GetString(); break; case "_valueUrl": _ValueUrl = new fhirCsR4.Models.Element(); _ValueUrl.DeserializeJson(ref reader, options); break; case "valueUuid": ValueUuid = reader.GetGuid(); break; case "valueAddress": ValueAddress = new fhirCsR4.Models.Address(); ValueAddress.DeserializeJson(ref reader, options); break; case "valueAge": ValueAge = new fhirCsR4.Models.Age(); ValueAge.DeserializeJson(ref reader, options); break; case "valueAnnotation": ValueAnnotation = new fhirCsR4.Models.Annotation(); ValueAnnotation.DeserializeJson(ref reader, options); break; case "valueAttachment": ValueAttachment = new fhirCsR4.Models.Attachment(); ValueAttachment.DeserializeJson(ref reader, options); break; case "valueCodeableConcept": ValueCodeableConcept = new fhirCsR4.Models.CodeableConcept(); ValueCodeableConcept.DeserializeJson(ref reader, options); break; case "valueCoding": ValueCoding = new fhirCsR4.Models.Coding(); ValueCoding.DeserializeJson(ref reader, options); break; case "valueContactPoint": ValueContactPoint = new fhirCsR4.Models.ContactPoint(); ValueContactPoint.DeserializeJson(ref reader, options); break; case "valueCount": ValueCount = new fhirCsR4.Models.Count(); ValueCount.DeserializeJson(ref reader, options); break; case "valueDistance": ValueDistance = new fhirCsR4.Models.Distance(); ValueDistance.DeserializeJson(ref reader, options); break; case "valueDuration": ValueDuration = new fhirCsR4.Models.Duration(); ValueDuration.DeserializeJson(ref reader, options); break; case "valueHumanName": ValueHumanName = new fhirCsR4.Models.HumanName(); ValueHumanName.DeserializeJson(ref reader, options); break; case "valueIdentifier": ValueIdentifier = new fhirCsR4.Models.Identifier(); ValueIdentifier.DeserializeJson(ref reader, options); break; case "valueMoney": ValueMoney = new fhirCsR4.Models.Money(); ValueMoney.DeserializeJson(ref reader, options); break; case "valuePeriod": ValuePeriod = new fhirCsR4.Models.Period(); ValuePeriod.DeserializeJson(ref reader, options); break; case "valueQuantity": ValueQuantity = new fhirCsR4.Models.Quantity(); ValueQuantity.DeserializeJson(ref reader, options); break; case "valueRange": ValueRange = new fhirCsR4.Models.Range(); ValueRange.DeserializeJson(ref reader, options); break; case "valueRatio": ValueRatio = new fhirCsR4.Models.Ratio(); ValueRatio.DeserializeJson(ref reader, options); break; case "valueReference": ValueReference = new fhirCsR4.Models.Reference(); ValueReference.DeserializeJson(ref reader, options); break; case "valueSampledData": ValueSampledData = new fhirCsR4.Models.SampledData(); ValueSampledData.DeserializeJson(ref reader, options); break; case "valueSignature": ValueSignature = new fhirCsR4.Models.Signature(); ValueSignature.DeserializeJson(ref reader, options); break; case "valueTiming": ValueTiming = new fhirCsR4.Models.Timing(); ValueTiming.DeserializeJson(ref reader, options); break; case "valueContactDetail": ValueContactDetail = new fhirCsR4.Models.ContactDetail(); ValueContactDetail.DeserializeJson(ref reader, options); break; case "valueContributor": ValueContributor = new fhirCsR4.Models.Contributor(); ValueContributor.DeserializeJson(ref reader, options); break; case "valueDataRequirement": ValueDataRequirement = new fhirCsR4.Models.DataRequirement(); ValueDataRequirement.DeserializeJson(ref reader, options); break; case "valueExpression": ValueExpression = new fhirCsR4.Models.Expression(); ValueExpression.DeserializeJson(ref reader, options); break; case "valueParameterDefinition": ValueParameterDefinition = new fhirCsR4.Models.ParameterDefinition(); ValueParameterDefinition.DeserializeJson(ref reader, options); break; case "valueRelatedArtifact": ValueRelatedArtifact = new fhirCsR4.Models.RelatedArtifact(); ValueRelatedArtifact.DeserializeJson(ref reader, options); break; case "valueTriggerDefinition": ValueTriggerDefinition = new fhirCsR4.Models.TriggerDefinition(); ValueTriggerDefinition.DeserializeJson(ref reader, options); break; case "valueUsageContext": ValueUsageContext = new fhirCsR4.Models.UsageContext(); ValueUsageContext.DeserializeJson(ref reader, options); break; case "valueDosage": ValueDosage = new fhirCsR4.Models.Dosage(); ValueDosage.DeserializeJson(ref reader, options); break; case "valueMeta": ValueMeta = new fhirCsR4.Models.Meta(); ValueMeta.DeserializeJson(ref reader, options); break; default: ((fhirCsR4.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 "activity": Activity = new fhirCsR4.Models.CodeableConcept(); Activity.DeserializeJson(ref reader, options); break; case "agent": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Agent = new List <ProvenanceAgent>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.ProvenanceAgent objAgent = new fhirCsR4.Models.ProvenanceAgent(); objAgent.DeserializeJson(ref reader, options); Agent.Add(objAgent); if (!reader.Read()) { throw new JsonException(); } } if (Agent.Count == 0) { Agent = null; } break; case "entity": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Entity = new List <ProvenanceEntity>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.ProvenanceEntity objEntity = new fhirCsR4.Models.ProvenanceEntity(); objEntity.DeserializeJson(ref reader, options); Entity.Add(objEntity); if (!reader.Read()) { throw new JsonException(); } } if (Entity.Count == 0) { Entity = null; } break; case "location": Location = new fhirCsR4.Models.Reference(); Location.DeserializeJson(ref reader, options); break; case "occurredPeriod": OccurredPeriod = new fhirCsR4.Models.Period(); OccurredPeriod.DeserializeJson(ref reader, options); break; case "occurredDateTime": OccurredDateTime = reader.GetString(); break; case "_occurredDateTime": _OccurredDateTime = new fhirCsR4.Models.Element(); _OccurredDateTime.DeserializeJson(ref reader, options); break; case "policy": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Policy = new List <string>(); while (reader.TokenType != JsonTokenType.EndArray) { Policy.Add(reader.GetString()); if (!reader.Read()) { throw new JsonException(); } } if (Policy.Count == 0) { Policy = null; } break; case "_policy": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } _Policy = new List <Element>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Element obj_Policy = new fhirCsR4.Models.Element(); obj_Policy.DeserializeJson(ref reader, options); _Policy.Add(obj_Policy); if (!reader.Read()) { throw new JsonException(); } } if (_Policy.Count == 0) { _Policy = null; } break; case "reason": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Reason = new List <CodeableConcept>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.CodeableConcept objReason = new fhirCsR4.Models.CodeableConcept(); objReason.DeserializeJson(ref reader, options); Reason.Add(objReason); if (!reader.Read()) { throw new JsonException(); } } if (Reason.Count == 0) { Reason = null; } break; case "recorded": Recorded = reader.GetString(); break; case "_recorded": _Recorded = new fhirCsR4.Models.Element(); _Recorded.DeserializeJson(ref reader, options); break; case "signature": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Signature = new List <Signature>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Signature objSignature = new fhirCsR4.Models.Signature(); objSignature.DeserializeJson(ref reader, options); Signature.Add(objSignature); if (!reader.Read()) { throw new JsonException(); } } if (Signature.Count == 0) { Signature = null; } break; case "target": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Target = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Reference objTarget = new fhirCsR4.Models.Reference(); objTarget.DeserializeJson(ref reader, options); Target.Add(objTarget); if (!reader.Read()) { throw new JsonException(); } } if (Target.Count == 0) { Target = null; } break; default: ((fhirCsR4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName); break; } }