internal static OperationTypeApiModel DeserializeOperationTypeApiModel(JsonElement element)
        {
            Optional <string> description = default;
            Optional <OperationTypeApiModelOperation> operation = default;
            Optional <string> transaction = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("description"))
                {
                    description = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("operation"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    operation = new OperationTypeApiModelOperation(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("transaction"))
                {
                    transaction = property.Value.GetString();
                    continue;
                }
            }
            return(new OperationTypeApiModel(description.Value, Optional.ToNullable(operation), transaction.Value));
        }
        internal static OperationTypeApiModel DeserializeOperationTypeApiModel(XElement element)
        {
            string description = default;
            OperationTypeApiModelOperation?operation = default;
            string transaction = default;

            if (element.Element("description") is XElement descriptionElement)
            {
                description = (string)descriptionElement;
            }
            if (element.Element("operation") is XElement operationElement)
            {
                operation = new OperationTypeApiModelOperation(operationElement.Value);
            }
            if (element.Element("transaction") is XElement transactionElement)
            {
                transaction = (string)transactionElement;
            }
            return(new OperationTypeApiModel(description, operation, transaction));
        }