コード例 #1
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "allowedUnsignedInt":
                AllowedUnsignedInt = reader.GetUInt32();
                break;

            case "allowedString":
                AllowedString = reader.GetString();
                break;

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

            case "allowedMoney":
                AllowedMoney = new fhirCsR4.Models.Money();
                AllowedMoney.DeserializeJson(ref reader, options);
                break;

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

            case "usedUnsignedInt":
                UsedUnsignedInt = reader.GetUInt32();
                break;

            case "usedString":
                UsedString = reader.GetString();
                break;

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

            case "usedMoney":
                UsedMoney = new fhirCsR4.Models.Money();
                UsedMoney.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
コード例 #2
0
ファイル: Invoice.cs プロジェクト: microsoft/fhir-codegen
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "amount":
                Amount = new fhirCsR4.Models.Money();
                Amount.DeserializeJson(ref reader, options);
                break;

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

            case "factor":
                Factor = reader.GetDecimal();
                break;

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

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

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

            default:
                ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
コード例 #3
0
ファイル: ChargeItem.cs プロジェクト: microsoft/fhir-codegen
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "account":
                if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read()))
                {
                    throw new JsonException();
                }

                Account = new List <Reference>();

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

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

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

                break;

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

                Bodysite = new List <CodeableConcept>();

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

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

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

                break;

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

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

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

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

                DefinitionCanonical = new List <string>();

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

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

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

                break;

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

                _DefinitionCanonical = new List <Element>();

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

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

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

                break;

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

                DefinitionUri = new List <string>();

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

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

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

                break;

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

                _DefinitionUri = new List <Element>();

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

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

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

                break;

            case "enteredDate":
                EnteredDate = reader.GetString();
                break;

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

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

            case "factorOverride":
                FactorOverride = reader.GetDecimal();
                break;

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

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

                Identifier = new List <Identifier>();

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

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

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

                break;

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

                Note = new List <Annotation>();

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

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

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

                break;

            case "occurrenceDateTime":
                OccurrenceDateTime = reader.GetString();
                break;

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

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

            case "occurrenceTiming":
                OccurrenceTiming = new fhirCsR4.Models.Timing();
                OccurrenceTiming.DeserializeJson(ref reader, options);
                break;

            case "overrideReason":
                OverrideReason = reader.GetString();
                break;

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

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

                PartOf = new List <Reference>();

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

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

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

                break;

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

                Performer = new List <ChargeItemPerformer>();

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

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

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

                break;

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

            case "priceOverride":
                PriceOverride = new fhirCsR4.Models.Money();
                PriceOverride.DeserializeJson(ref reader, options);
                break;

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

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

            case "quantity":
                Quantity = new fhirCsR4.Models.Quantity();
                Quantity.DeserializeJson(ref reader, options);
                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 "requestingOrganization":
                RequestingOrganization = new fhirCsR4.Models.Reference();
                RequestingOrganization.DeserializeJson(ref reader, options);
                break;

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

                Service = new List <Reference>();

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

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

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

                break;

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

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

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

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

                SupportingInformation = new List <Reference>();

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

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

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

                break;

            default:
                ((fhirCsR4.Models.DomainResource) 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 "amount":
                Amount = new fhirCsR4.Models.Money();
                Amount.DeserializeJson(ref reader, options);
                break;

            case "created":
                Created = reader.GetString();
                break;

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

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

                Identifier = new List <Identifier>();

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

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

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

                break;

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

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

            case "paymentDate":
                PaymentDate = reader.GetString();
                break;

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

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

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

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

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

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

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

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

            default:
                ((fhirCsR4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
コード例 #5
0
ファイル: Invoice.cs プロジェクト: microsoft/fhir-codegen
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "account":
                Account = new fhirCsR4.Models.Reference();
                Account.DeserializeJson(ref reader, options);
                break;

            case "cancelledReason":
                CancelledReason = reader.GetString();
                break;

            case "_cancelledReason":
                _CancelledReason = new fhirCsR4.Models.Element();
                _CancelledReason.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 "identifier":
                if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read()))
                {
                    throw new JsonException();
                }

                Identifier = new List <Identifier>();

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

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

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

                break;

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

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

                LineItem = new List <InvoiceLineItem>();

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

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

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

                break;

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

                Note = new List <Annotation>();

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

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

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

                break;

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

                Participant = new List <InvoiceParticipant>();

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

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

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

                break;

            case "paymentTerms":
                PaymentTerms = reader.GetString();
                break;

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

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

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

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

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

            case "totalGross":
                TotalGross = new fhirCsR4.Models.Money();
                TotalGross.DeserializeJson(ref reader, options);
                break;

            case "totalNet":
                TotalNet = new fhirCsR4.Models.Money();
                TotalNet.DeserializeJson(ref reader, options);
                break;

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

                TotalPriceComponent = new List <InvoiceLineItemPriceComponent>();

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

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

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

                break;

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

            default:
                ((fhirCsR4.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 "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;
            }
        }
コード例 #7
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "created":
                Created = reader.GetString();
                break;

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

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

                Detail = new List <PaymentReconciliationDetail>();

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

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

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

                break;

            case "disposition":
                Disposition = reader.GetString();
                break;

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

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

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

                Identifier = new List <Identifier>();

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

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

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

                break;

            case "outcome":
                Outcome = reader.GetString();
                break;

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

            case "paymentAmount":
                PaymentAmount = new fhirCsR4.Models.Money();
                PaymentAmount.DeserializeJson(ref reader, options);
                break;

            case "paymentDate":
                PaymentDate = reader.GetString();
                break;

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

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

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

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

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

                ProcessNote = new List <PaymentReconciliationProcessNote>();

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

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

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

                break;

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

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

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

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

            default:
                ((fhirCsR4.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 "amount":
                Amount = new fhirCsR4.Models.Money();
                Amount.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 "identifier":
                Identifier = new fhirCsR4.Models.Identifier();
                Identifier.DeserializeJson(ref reader, options);
                break;

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

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

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

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

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

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

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

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