From 304f20cbfdb9e919f702be1be45c6651cf43103e Mon Sep 17 00:00:00 2001 From: Steve Gordon Date: Thu, 13 Oct 2022 18:03:52 +0100 Subject: [PATCH] Remove unsupported types and refactor namespaces (#6755) * WIP * Namespace changes * Bump integration test version for 8.4.x --- .github/workflows/integration-jobs.yml | 2 +- .../HandleNestTypesOnSourceJsonConverter.cs | 2 +- .../Api/BulkRequest.cs | 1 + .../Api/BulkResponse.cs | 1 + .../Api/BulkResponseItemBase.cs | 2 +- .../Api/ScrollResponse.cs | 2 +- .../Api/SearchRequest.cs | 2 +- .../Api/SearchResponse.cs | 2 +- .../Client/ElasticsearchClient-BulkAll.cs | 1 - .../Client/IndexManyExtensions.cs | 1 + .../Helpers/BulkAllObservable.cs | 3 +- .../Helpers/BulkAllRequest.cs | 4 +- .../Helpers/BulkAllResponse.cs | 1 + .../Helpers/IBulkAllRequest.cs | 1 + .../ResponseItemConverterFactory.cs | 2 + .../Serialization/UnionConverter.cs | 2 +- .../Types/AsyncSearch/AsyncSearch.cs | 2 +- .../Types/Bulk/BulkCreateOperation.cs | 128 ----- .../Bulk/BulkCreateOperationDescriptor.cs | 81 ---- .../Types/Bulk/BulkDeleteOperation.cs | 83 ---- .../Bulk/BulkDeleteOperationDescriptor.cs | 63 --- .../Types/Bulk/BulkIndexOperation.cs | 111 ----- .../Bulk/BulkIndexOperationDescriptor.cs | 88 ---- .../Types/Bulk/BulkOperationBase.cs | 114 ----- .../Types/Bulk/BulkOperationDescriptorBase.cs | 144 ------ .../Types/Bulk/BulkOperationsCollection.cs | 256 ---------- .../Types/Bulk/BulkResponseItemConverter.cs | 67 --- .../Types/Bulk/BulkUpdateBody.cs | 62 --- .../Types/Bulk/BulkUpdateBodyBase.cs | 38 -- .../Types/Bulk/BulkUpdateOperationBase.cs | 138 ------ .../Bulk/BulkUpdateOperationWithPartial.cs | 44 -- .../Bulk/BulkUpdateOperationWithScript.cs | 53 -- .../Types/Bulk/IBulkOperation.cs | 15 - .../Types/Bulk/PartialBulkUpdateBody.cs | 30 -- .../Types/Bulk/ScriptedBulkUpdateBody.cs | 42 -- .../Types/Core/Bulk/BulkCreateOperation.cs | 127 +++++ .../Bulk/BulkCreateOperationDescriptor.cs | 80 +++ .../Types/Core/Bulk/BulkDeleteOperation.cs | 82 ++++ .../Bulk/BulkDeleteOperationDescriptor.cs | 62 +++ .../Types/Core/Bulk/BulkIndexOperation.cs | 110 +++++ .../Core/Bulk/BulkIndexOperationDescriptor.cs | 87 ++++ .../Types/Core/Bulk/BulkOperationBase.cs | 113 +++++ .../Core/Bulk/BulkOperationDescriptorBase.cs | 143 ++++++ .../Core/Bulk/BulkOperationsCollection.cs | 255 ++++++++++ .../Core/Bulk/BulkResponseItemConverter.cs | 66 +++ .../Types/Core/Bulk/BulkUpdateBody.cs | 62 +++ .../Types/Core/Bulk/BulkUpdateBodyBase.cs | 37 ++ .../{ => Core}/Bulk/BulkUpdateOperation.cs | 3 +- .../Core/Bulk/BulkUpdateOperationBase.cs | 137 ++++++ .../Bulk/BulkUpdateOperationDescriptor.cs | 3 +- .../Bulk/BulkUpdateOperationWithPartial.cs | 43 ++ .../Bulk/BulkUpdateOperationWithScript.cs | 52 ++ .../Types/Core/Bulk/IBulkOperation.cs | 14 + .../Types/Core/Bulk/PartialBulkUpdateBody.cs | 29 ++ .../Bulk/Response/BulkCreateResponseItem.cs | 9 +- .../Bulk/Response/BulkDeleteResponseItem.cs} | 9 +- .../Bulk/Response/BulkIndexResponseItem.cs} | 9 +- .../Bulk/Response/BulkUpdateResponseItem.cs} | 9 +- .../Types/Core/Bulk/ScriptedBulkUpdateBody.cs | 41 ++ .../MultiSearch/MultiSearchRequest.cs | 85 +--- .../MultiSearch/SearchRequestItem.cs | 56 +++ .../Types/MultiSearchItem.cs | 4 +- .../Types/PointInTimeReferenceDescriptor.cs | 2 +- .../Types/SourceConfig.cs | 2 +- .../AsyncSearch/AsyncSearchSubmitRequest.g.cs | 196 ++++---- .../_Generated/Api/BulkRequest.g.cs | 8 +- .../_Generated/Api/ExistsRequest.g.cs | 8 +- .../_Generated/Api/ExistsSourceRequest.g.cs | 8 +- .../_Generated/Api/ExplainRequest.g.cs | 8 +- .../_Generated/Api/ExplainResponse.g.cs | 2 +- .../_Generated/Api/FieldCapsResponse.g.cs | 2 +- .../_Generated/Api/GetRequest.g.cs | 8 +- .../_Generated/Api/MultiGetRequest.g.cs | 50 +- .../_Generated/Api/MultiGetResponse.g.cs | 2 +- .../_Generated/Api/MultiSearchRequest.g.cs | 10 +- .../_Generated/Api/MultiSearchResponse.g.cs | 2 +- .../Api/MultiSearchTemplateRequest.g.cs | 10 +- .../Api/MultiSearchTemplateResponse.g.cs | 2 +- .../_Generated/Api/RankEvalRequest.g.cs | 72 +-- .../_Generated/Api/RankEvalResponse.g.cs | 2 +- .../_Generated/Api/ReindexRequest.g.cs | 60 +-- .../Api/ReindexRethrottleResponse.g.cs | 2 +- .../_Generated/Api/ScriptContextResponse.g.cs | 2 +- .../Api/ScriptLanguagesResponse.g.cs | 2 +- .../_Generated/Api/ScrollResponse.g.cs | 4 +- .../_Generated/Api/SearchRequest.g.cs | 196 ++++---- .../_Generated/Api/SearchResponse.g.cs | 4 +- .../_Generated/Api/SearchShardsResponse.g.cs | 2 +- .../_Generated/Api/SourceRequest.g.cs | 8 +- .../Api/UpdateByQueryRethrottleResponse.g.cs | 2 +- .../_Generated/Api/UpdateRequest.g.cs | 6 +- .../Types/Aggregations/BucketsPath.g.cs | 31 -- .../CumulativeCardinalityAggregation.g.cs | 34 -- .../Aggregations/DerivativeAggregation.g.cs | 34 -- .../ExtendedStatsBucketAggregation.g.cs | 34 -- .../Aggregations/InferenceAggregation.g.cs | 48 -- .../PercentilesBucketAggregation.g.cs | 34 -- .../Aggregations/StatsBucketAggregation.g.cs | 34 -- .../Types/Aggregations/TermsAggregation.g.cs | 48 -- .../Types/Aggregations/TermsInclude.g.cs | 31 -- .../Types/Aggregations/TermsPartition.g.cs | 71 --- .../Types/Aggregations/TopHitsAggregate.g.cs | 2 +- .../Aggregations/TopHitsAggregation.g.cs | 44 +- .../Types/AsyncSearch/AsyncSearch.g.cs | 4 +- .../_Generated/Types/CoordsGeoBounds.g.cs | 99 ---- .../{ => Core}/AggregationBreakdown.g.cs | 2 +- .../Types/{ => Core}/AggregationProfile.g.cs | 8 +- .../{ => Core}/AggregationProfileDebug.g.cs | 6 +- ...AggregationProfileDelegateDebugFilter.g.cs | 2 +- .../{ => Core}/BulkResponseItemBase.g.cs | 2 +- .../Types/{ => Core}/Collector.g.cs | 4 +- .../Types/{ => Core}/CompletionContext.g.cs | 16 +- .../Types/{ => Core}/CompletionSuggester.g.cs | 26 +- .../_Generated/Types/{ => Core}/Context.g.cs | 17 +- .../Types/{ => Core}/ContextMethod.g.cs | 4 +- .../Types/{ => Core}/ContextMethodParam.g.cs | 2 +- .../Types/{ => Core}/Destination.g.cs | 2 +- .../Types/{ => Core}/DirectGenerator.g.cs | 2 +- .../Types/{ => Core}/DocumentRating.g.cs | 2 +- .../Types/{ => Core}/Explanation.g.cs | 4 +- .../Types/{ => Core}/ExplanationDetail.g.cs | 4 +- .../Types/{ => Core}/FetchProfile.g.cs | 8 +- .../{ => Core}/FetchProfileBreakdown.g.cs | 2 +- .../Types/{ => Core}/FetchProfileDebug.g.cs | 2 +- .../Types/{ => Core}/FieldCapability.g.cs | 2 +- .../Types/{ => Core}/FieldCollapse.g.cs | 22 +- .../Types/{ => Core}/FieldSuggester.g.cs | 20 +- .../Types/{ => Core}/GetResult.g.cs | 2 +- .../Types/{ => Core}/Highlight.g.cs | 76 +-- .../Types/{ => Core}/HighlightField.g.cs | 52 +- .../_Generated/Types/{ => Core}/Hit.g.cs | 8 +- .../Types/{ => Core}/HitsMetadata.g.cs | 6 +- .../Types/{ => Core}/InnerHits.g.cs | 32 +- .../Types/{ => Core}/InnerHitsResult.g.cs | 4 +- .../Types/{ => Core}/LanguageContext.g.cs | 2 +- .../{ => Core}/LaplaceSmoothingModel.g.cs | 2 +- .../LinearInterpolationSmoothingModel.g.cs | 2 +- .../Types/{ => Core}/MultiGetError.g.cs | 2 +- .../Types/{ => Core}/MultiSearchItem.g.cs | 6 +- .../Types/{ => Core}/MultisearchBody.g.cs | 198 ++++---- .../Types/{ => Core}/MultisearchHeader.g.cs | 2 +- .../Types/{ => Core}/NestedIdentity.g.cs | 4 +- .../Types/{ => Core}/Operation.g.cs | 8 +- .../{ => Core}/PhraseSuggestCollate.g.cs | 8 +- .../{ => Core}/PhraseSuggestCollateQuery.g.cs | 2 +- .../{ => Core}/PhraseSuggestHighlight.g.cs | 2 +- .../Types/{ => Core}/PhraseSuggester.g.cs | 42 +- .../{ => Core}/PointInTimeReference.g.cs | 2 +- .../_Generated/Types/{ => Core}/Profile.g.cs | 4 +- .../Types/{ => Core}/QueryBreakdown.g.cs | 2 +- .../Types/{ => Core}/QueryProfile.g.cs | 6 +- .../Types/{ => Core}/RankEvalHit.g.cs | 2 +- .../Types/{ => Core}/RankEvalHitItem.g.cs | 4 +- .../Types/{ => Core}/RankEvalMetric.g.cs | 32 +- .../{ => Core}/RankEvalMetricDetail.g.cs | 6 +- ...ankEvalMetricDiscountedCumulativeGain.g.cs | 2 +- .../RankEvalMetricExpectedReciprocalRank.g.cs | 2 +- .../RankEvalMetricMeanReciprocalRank.g.cs | 2 +- .../{ => Core}/RankEvalMetricPrecision.g.cs | 2 +- .../{ => Core}/RankEvalMetricRecall.g.cs | 2 +- .../Types/{ => Core}/RankEvalQuery.g.cs | 2 +- .../Types/{ => Core}/RankEvalRequestItem.g.cs | 22 +- .../Types/{ => Core}/ReindexNode.g.cs | 4 +- .../Types/{ => Core}/ReindexStatus.g.cs | 2 +- .../Types/{ => Core}/ReindexTask.g.cs | 4 +- .../Types/{ => Core}/RemoteSource.g.cs | 2 +- .../Types/{ => Core}/RequestItem.g.cs | 8 +- .../_Generated/Types/{ => Core}/Rescore.g.cs | 12 +- .../Types/{ => Core}/RescoreQuery.g.cs | 12 +- .../Types/{ => Core}/ResponseItem.g.cs | 8 +- .../Types/{ => Core}/SearchProfile.g.cs | 6 +- .../Types/{ => Core}/SearchResponseItem.g.cs | 6 +- .../Types/{ => Core}/ShardProfile.g.cs | 8 +- .../Types/{ => Core}/ShardStoreIndex.g.cs | 2 +- .../{ => Core}/SmoothingModelContainer.g.cs | 20 +- .../_Generated/Types/{ => Core}/Source.g.cs | 12 +- .../Types/{ => Core}/SourceConfig.g.cs | 6 +- .../Types/{ => Core}/SourceConfigParam.g.cs | 2 +- .../Types/{ => Core}/SourceFilter.g.cs | 2 +- .../StupidBackoffSmoothingModel.g.cs | 2 +- .../Types/{ => Core}/SuggestFuzziness.g.cs | 2 +- .../Types/{ => Core}/Suggester.g.cs | 16 +- .../Types/{ => Core}/TemplateConfig.g.cs | 2 +- .../Types/{ => Core}/TermSuggester.g.cs | 22 +- .../Types/{ => Core}/TotalHits.g.cs | 4 +- .../Types/{ => Core}/TrackHits.g.cs | 2 +- .../Types/{ => Core}/UnratedDocument.g.cs | 2 +- .../UpdateByQueryRethrottleNode.g.cs | 2 +- .../Types/Enums/Enums.Core.Search.g.cs | 458 ++++++++++++++++++ .../Types/Enums/Enums.NoNamespace.g.cs | 432 ----------------- .../_Generated/Types/Eql/EqlHits.g.cs | 2 +- .../_Generated/Types/GeoBounds.g.cs | 31 -- .../_Generated/Types/GeoDistanceSort.g.cs | 78 --- .../_Generated/Types/GeoHashLocation.g.cs | 57 --- .../_Generated/Types/GeoLocation.g.cs | 31 -- .../_Generated/Types/LatLonGeoLocation.g.cs | 71 --- .../Types/Mapping/GeoPointProperty.g.cs | 36 +- .../Types/QueryDsl/GeoBoundingBoxQuery.g.cs | 78 --- .../Types/QueryDsl/GeoDistanceQuery.g.cs | 78 --- .../Types/QueryDsl/GeoPolygonPoints.g.cs | 15 - .../Types/QueryDsl/HasChildQuery.g.cs | 30 +- .../Types/QueryDsl/HasParentQuery.g.cs | 30 +- .../Types/QueryDsl/NestedQuery.g.cs | 30 +- .../_Generated/Types/QueryDsl/PinnedDoc.g.cs | 71 --- .../Types/QueryDsl/PinnedQuery.g.cs | 429 ---------------- .../Types/QueryDsl/QueryContainer.g.cs | 16 - .../Types/TopLeftBottomRightGeoBounds.g.cs | 71 --- .../Types/TopRightBottomLeftGeoBounds.g.cs | 71 --- .../_Generated/Types/WktGeoBounds.g.cs | 57 --- tests/Tests.Configuration/tests.default.yaml | 2 +- .../Document/Multiple/Bulk/BulkApiTests.cs | 1 + .../Multiple/Bulk/BulkInvalidApiTests.cs | 1 + .../Bulk/BulkInvalidVersionApiTests.cs | 1 + .../Multiple/Bulk/BulkUpdateManyTests.cs | 1 + .../Tests/PointInTime/PointInTimeApiTests.cs | 1 + tests/Tests/Search/Search/SearchApiTests.cs | 1 + ...lkOperationCollectionSerializationTests.cs | 1 + .../BulkUpdateOperationSerializationTests.cs | 1 + .../Serialization/BulkSerialisationTests.cs | 1 + .../Documents/MGetSerialization.cs | 1 + .../Documents/MSearchSerialization.cs | 1 + .../SearchResponseDeserialisationTests.cs | 1 + .../SuggesterSerializationTests.cs | 1 + 223 files changed, 2973 insertions(+), 4640 deletions(-) delete mode 100644 src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkCreateOperation.cs delete mode 100644 src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkCreateOperationDescriptor.cs delete mode 100644 src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkDeleteOperation.cs delete mode 100644 src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkDeleteOperationDescriptor.cs delete mode 100644 src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkIndexOperation.cs delete mode 100644 src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkIndexOperationDescriptor.cs delete mode 100644 src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkOperationBase.cs delete mode 100644 src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkOperationDescriptorBase.cs delete mode 100644 src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkOperationsCollection.cs delete mode 100644 src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkResponseItemConverter.cs delete mode 100644 src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkUpdateBody.cs delete mode 100644 src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkUpdateBodyBase.cs delete mode 100644 src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkUpdateOperationBase.cs delete mode 100644 src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkUpdateOperationWithPartial.cs delete mode 100644 src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkUpdateOperationWithScript.cs delete mode 100644 src/Elastic.Clients.Elasticsearch/Types/Bulk/IBulkOperation.cs delete mode 100644 src/Elastic.Clients.Elasticsearch/Types/Bulk/PartialBulkUpdateBody.cs delete mode 100644 src/Elastic.Clients.Elasticsearch/Types/Bulk/ScriptedBulkUpdateBody.cs create mode 100644 src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkCreateOperation.cs create mode 100644 src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkCreateOperationDescriptor.cs create mode 100644 src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkDeleteOperation.cs create mode 100644 src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkDeleteOperationDescriptor.cs create mode 100644 src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkIndexOperation.cs create mode 100644 src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkIndexOperationDescriptor.cs create mode 100644 src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkOperationBase.cs create mode 100644 src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkOperationDescriptorBase.cs create mode 100644 src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkOperationsCollection.cs create mode 100644 src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkResponseItemConverter.cs create mode 100644 src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkUpdateBody.cs create mode 100644 src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkUpdateBodyBase.cs rename src/Elastic.Clients.Elasticsearch/Types/{ => Core}/Bulk/BulkUpdateOperation.cs (97%) create mode 100644 src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkUpdateOperationBase.cs rename src/Elastic.Clients.Elasticsearch/Types/{ => Core}/Bulk/BulkUpdateOperationDescriptor.cs (98%) create mode 100644 src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkUpdateOperationWithPartial.cs create mode 100644 src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkUpdateOperationWithScript.cs create mode 100644 src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/IBulkOperation.cs create mode 100644 src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/PartialBulkUpdateBody.cs rename src/Elastic.Clients.Elasticsearch/Types/{ => Core}/Bulk/Response/BulkCreateResponseItem.cs (56%) rename src/Elastic.Clients.Elasticsearch/Types/{Bulk/Response/BulkIndexResponseItem.cs => Core/Bulk/Response/BulkDeleteResponseItem.cs} (56%) rename src/Elastic.Clients.Elasticsearch/Types/{Bulk/Response/BulkUpdateResponseItem.cs => Core/Bulk/Response/BulkIndexResponseItem.cs} (56%) rename src/Elastic.Clients.Elasticsearch/Types/{Bulk/Response/BulkDeleteResponseItem.cs => Core/Bulk/Response/BulkUpdateResponseItem.cs} (56%) create mode 100644 src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/ScriptedBulkUpdateBody.cs create mode 100644 src/Elastic.Clients.Elasticsearch/Types/Documents/MultiSearch/SearchRequestItem.cs delete mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketsPath.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsInclude.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsPartition.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/CoordsGeoBounds.g.cs rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/AggregationBreakdown.g.cs (98%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/AggregationProfile.g.cs (83%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/AggregationProfileDebug.g.cs (93%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/AggregationProfileDelegateDebugFilter.g.cs (97%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/BulkResponseItemBase.g.cs (98%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/Collector.g.cs (91%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/CompletionContext.g.cs (88%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/CompletionSuggester.g.cs (89%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/Context.g.cs (79%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/ContextMethod.g.cs (89%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/ContextMethodParam.g.cs (96%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/Destination.g.cs (98%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/DirectGenerator.g.cs (99%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/DocumentRating.g.cs (98%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/Explanation.g.cs (90%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/ExplanationDetail.g.cs (90%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/FetchProfile.g.cs (83%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/FetchProfileBreakdown.g.cs (97%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/FetchProfileDebug.g.cs (96%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/FieldCapability.g.cs (98%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/FieldCollapse.g.cs (93%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/FieldSuggester.g.cs (91%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/GetResult.g.cs (97%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/Highlight.g.cs (87%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/HighlightField.g.cs (91%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/Hit.g.cs (90%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/HitsMetadata.g.cs (86%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/InnerHits.g.cs (95%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/InnerHitsResult.g.cs (90%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/LanguageContext.g.cs (96%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/LaplaceSmoothingModel.g.cs (97%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/LinearInterpolationSmoothingModel.g.cs (98%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/MultiGetError.g.cs (97%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/MultiSearchItem.g.cs (92%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/MultisearchBody.g.cs (87%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/MultisearchHeader.g.cs (99%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/NestedIdentity.g.cs (91%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/Operation.g.cs (94%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/PhraseSuggestCollate.g.cs (92%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/PhraseSuggestCollateQuery.g.cs (98%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/PhraseSuggestHighlight.g.cs (97%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/PhraseSuggester.g.cs (93%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/PointInTimeReference.g.cs (98%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/Profile.g.cs (89%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/QueryBreakdown.g.cs (98%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/QueryProfile.g.cs (87%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/RankEvalHit.g.cs (96%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/RankEvalHitItem.g.cs (91%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/RankEvalMetric.g.cs (85%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/RankEvalMetricDetail.g.cs (85%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/RankEvalMetricDiscountedCumulativeGain.g.cs (98%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/RankEvalMetricExpectedReciprocalRank.g.cs (98%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/RankEvalMetricMeanReciprocalRank.g.cs (98%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/RankEvalMetricPrecision.g.cs (98%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/RankEvalMetricRecall.g.cs (98%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/RankEvalQuery.g.cs (99%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/RankEvalRequestItem.g.cs (92%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/ReindexNode.g.cs (93%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/ReindexStatus.g.cs (97%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/ReindexTask.g.cs (93%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/RemoteSource.g.cs (98%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/RequestItem.g.cs (77%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/Rescore.g.cs (92%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/RescoreQuery.g.cs (94%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/ResponseItem.g.cs (78%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/SearchProfile.g.cs (85%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/SearchResponseItem.g.cs (83%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/ShardProfile.g.cs (81%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/ShardStoreIndex.g.cs (96%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/SmoothingModelContainer.g.cs (86%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/Source.g.cs (97%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/SourceConfig.g.cs (87%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/SourceConfigParam.g.cs (96%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/SourceFilter.g.cs (98%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/StupidBackoffSmoothingModel.g.cs (97%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/SuggestFuzziness.g.cs (98%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/Suggester.g.cs (84%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/TemplateConfig.g.cs (98%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/TermSuggester.g.cs (94%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/TotalHits.g.cs (91%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/TrackHits.g.cs (96%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/UnratedDocument.g.cs (96%) rename src/Elastic.Clients.Elasticsearch/_Generated/Types/{ => Core}/UpdateByQueryRethrottleNode.g.cs (96%) create mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Core.Search.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/GeoBounds.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/GeoHashLocation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/GeoLocation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/LatLonGeoLocation.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PinnedDoc.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PinnedQuery.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/TopLeftBottomRightGeoBounds.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/TopRightBottomLeftGeoBounds.g.cs delete mode 100644 src/Elastic.Clients.Elasticsearch/_Generated/Types/WktGeoBounds.g.cs diff --git a/.github/workflows/integration-jobs.yml b/.github/workflows/integration-jobs.yml index 476d69b43f9..05eb1bc647f 100644 --- a/.github/workflows/integration-jobs.yml +++ b/.github/workflows/integration-jobs.yml @@ -25,7 +25,7 @@ jobs: '8.1.3', '8.2.3', '8.3.3', - '8.4.2', + '8.4.3', '8.5.0-SNAPSHOT', 'latest-8' ] diff --git a/src/Elastic.Clients.Elasticsearch.JsonNetSerializer/Converters/HandleNestTypesOnSourceJsonConverter.cs b/src/Elastic.Clients.Elasticsearch.JsonNetSerializer/Converters/HandleNestTypesOnSourceJsonConverter.cs index 09be35a7063..71e67a863f8 100644 --- a/src/Elastic.Clients.Elasticsearch.JsonNetSerializer/Converters/HandleNestTypesOnSourceJsonConverter.cs +++ b/src/Elastic.Clients.Elasticsearch.JsonNetSerializer/Converters/HandleNestTypesOnSourceJsonConverter.cs @@ -23,7 +23,7 @@ public class HandleNestTypesOnSourceJsonConverter : JsonConverter //typeof(Attachment), typeof(LazyJson), //typeof(GeoCoordinate), - typeof(GeoLocation), + //typeof(GeoLocation), //typeof(CartesianPoint), }; diff --git a/src/Elastic.Clients.Elasticsearch/Api/BulkRequest.cs b/src/Elastic.Clients.Elasticsearch/Api/BulkRequest.cs index 11d00fce89b..be6647b7fd4 100644 --- a/src/Elastic.Clients.Elasticsearch/Api/BulkRequest.cs +++ b/src/Elastic.Clients.Elasticsearch/Api/BulkRequest.cs @@ -8,6 +8,7 @@ using System.IO; using System.Collections.Generic; using System.Linq; +using Elastic.Clients.Elasticsearch.Core.Bulk; namespace Elastic.Clients.Elasticsearch { diff --git a/src/Elastic.Clients.Elasticsearch/Api/BulkResponse.cs b/src/Elastic.Clients.Elasticsearch/Api/BulkResponse.cs index ca405bf7495..f5924aa3f74 100644 --- a/src/Elastic.Clients.Elasticsearch/Api/BulkResponse.cs +++ b/src/Elastic.Clients.Elasticsearch/Api/BulkResponse.cs @@ -6,6 +6,7 @@ using System.Text.Json.Serialization; using System.Text; using System.Linq; +using Elastic.Clients.Elasticsearch.Core.Bulk; namespace Elastic.Clients.Elasticsearch { diff --git a/src/Elastic.Clients.Elasticsearch/Api/BulkResponseItemBase.cs b/src/Elastic.Clients.Elasticsearch/Api/BulkResponseItemBase.cs index 2ed4a565961..4a885d8e3b4 100644 --- a/src/Elastic.Clients.Elasticsearch/Api/BulkResponseItemBase.cs +++ b/src/Elastic.Clients.Elasticsearch/Api/BulkResponseItemBase.cs @@ -2,7 +2,7 @@ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information. -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Bulk { public abstract partial class BulkResponseItemBase { diff --git a/src/Elastic.Clients.Elasticsearch/Api/ScrollResponse.cs b/src/Elastic.Clients.Elasticsearch/Api/ScrollResponse.cs index 3f54faa4a24..fbf43da382d 100644 --- a/src/Elastic.Clients.Elasticsearch/Api/ScrollResponse.cs +++ b/src/Elastic.Clients.Elasticsearch/Api/ScrollResponse.cs @@ -11,7 +11,7 @@ namespace Elastic.Clients.Elasticsearch; public partial class ScrollResponse { [JsonIgnore] - public IReadOnlyCollection> Hits => HitsMetadata.Hits; + public IReadOnlyCollection> Hits => HitsMetadata.Hits; [JsonIgnore] public IReadOnlyCollection Documents => HitsMetadata.Hits.Select(s => s.Source).ToReadOnlyCollection(); diff --git a/src/Elastic.Clients.Elasticsearch/Api/SearchRequest.cs b/src/Elastic.Clients.Elasticsearch/Api/SearchRequest.cs index cb1edd64b82..f3f35222db0 100644 --- a/src/Elastic.Clients.Elasticsearch/Api/SearchRequest.cs +++ b/src/Elastic.Clients.Elasticsearch/Api/SearchRequest.cs @@ -42,7 +42,7 @@ public SearchRequestDescriptor Index(Indices indices) return Self; } - public SearchRequestDescriptor Pit(string id, Action configure) + public SearchRequestDescriptor Pit(string id, Action configure) { PitValue = null; PitDescriptorAction = null; diff --git a/src/Elastic.Clients.Elasticsearch/Api/SearchResponse.cs b/src/Elastic.Clients.Elasticsearch/Api/SearchResponse.cs index 165b5d39287..c438a763706 100644 --- a/src/Elastic.Clients.Elasticsearch/Api/SearchResponse.cs +++ b/src/Elastic.Clients.Elasticsearch/Api/SearchResponse.cs @@ -11,7 +11,7 @@ namespace Elastic.Clients.Elasticsearch; public partial class SearchResponse { [JsonIgnore] - public IReadOnlyCollection> Hits => HitsMetadata.Hits; + public IReadOnlyCollection> Hits => HitsMetadata.Hits; [JsonIgnore] public IReadOnlyCollection Documents => HitsMetadata.Hits.Select(s => s.Source).ToReadOnlyCollection(); diff --git a/src/Elastic.Clients.Elasticsearch/Client/ElasticsearchClient-BulkAll.cs b/src/Elastic.Clients.Elasticsearch/Client/ElasticsearchClient-BulkAll.cs index d55a6ed1fa5..069c74d32f4 100644 --- a/src/Elastic.Clients.Elasticsearch/Client/ElasticsearchClient-BulkAll.cs +++ b/src/Elastic.Clients.Elasticsearch/Client/ElasticsearchClient-BulkAll.cs @@ -5,7 +5,6 @@ using System; using System.Collections.Generic; using System.Threading; -using Elastic.Clients.Elasticsearch; namespace Elastic.Clients.Elasticsearch; diff --git a/src/Elastic.Clients.Elasticsearch/Client/IndexManyExtensions.cs b/src/Elastic.Clients.Elasticsearch/Client/IndexManyExtensions.cs index 4749130a706..f9dc6a5b95b 100644 --- a/src/Elastic.Clients.Elasticsearch/Client/IndexManyExtensions.cs +++ b/src/Elastic.Clients.Elasticsearch/Client/IndexManyExtensions.cs @@ -6,6 +6,7 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; +using Elastic.Clients.Elasticsearch.Core.Bulk; namespace Elastic.Clients.Elasticsearch; diff --git a/src/Elastic.Clients.Elasticsearch/Helpers/BulkAllObservable.cs b/src/Elastic.Clients.Elasticsearch/Helpers/BulkAllObservable.cs index 7a77ef9ae38..d3beb293db6 100644 --- a/src/Elastic.Clients.Elasticsearch/Helpers/BulkAllObservable.cs +++ b/src/Elastic.Clients.Elasticsearch/Helpers/BulkAllObservable.cs @@ -12,6 +12,7 @@ using Elastic.Transport.Diagnostics.Auditing; using Elastic.Transport.Extensions; using Elastic.Transport.Products.Elasticsearch; +using Elastic.Clients.Elasticsearch.Core.Bulk; namespace Elastic.Clients.Elasticsearch; @@ -176,7 +177,7 @@ private async Task BulkAsync(IList buffer, long page, int ba return await RetryDocumentsAsync(page, ++backOffRetries, retryableDocuments).ConfigureAwait(false); if (retryableDocuments.Count > 0) - throw ThrowOnBadBulk(response, $"Bulk indexing failed and after retrying {backOffRetries} times"); + throw ThrowOnBadBulk(response, $"Bulk indexing failed and after retrying {backOffRetries} times."); request.BackPressure?.Release(); diff --git a/src/Elastic.Clients.Elasticsearch/Helpers/BulkAllRequest.cs b/src/Elastic.Clients.Elasticsearch/Helpers/BulkAllRequest.cs index 94de66e5c94..b6369d6f1a2 100644 --- a/src/Elastic.Clients.Elasticsearch/Helpers/BulkAllRequest.cs +++ b/src/Elastic.Clients.Elasticsearch/Helpers/BulkAllRequest.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.Text.Json; using Elastic.Transport; +using Elastic.Clients.Elasticsearch.Core.Bulk; namespace Elastic.Clients.Elasticsearch; @@ -57,7 +58,6 @@ public BulkAllRequest(IEnumerable documents) RequestMetaData IHelperCallable.ParentMetaData { get => ParentMetaData; set => ParentMetaData = value; } } - public sealed class BulkAllRequestDescriptor : SerializableDescriptorBase>, IBulkAllRequest, IHelperCallable { private readonly IEnumerable _documents; @@ -150,5 +150,3 @@ public BulkAllRequestDescriptor RetryDocumentPredicate(Func throw new NotImplementedException(); } - - diff --git a/src/Elastic.Clients.Elasticsearch/Helpers/BulkAllResponse.cs b/src/Elastic.Clients.Elasticsearch/Helpers/BulkAllResponse.cs index d0333fa3a40..e3ffade304a 100644 --- a/src/Elastic.Clients.Elasticsearch/Helpers/BulkAllResponse.cs +++ b/src/Elastic.Clients.Elasticsearch/Helpers/BulkAllResponse.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; +using Elastic.Clients.Elasticsearch.Core.Bulk; namespace Elastic.Clients.Elasticsearch; diff --git a/src/Elastic.Clients.Elasticsearch/Helpers/IBulkAllRequest.cs b/src/Elastic.Clients.Elasticsearch/Helpers/IBulkAllRequest.cs index fd647b793e8..51de060e65d 100644 --- a/src/Elastic.Clients.Elasticsearch/Helpers/IBulkAllRequest.cs +++ b/src/Elastic.Clients.Elasticsearch/Helpers/IBulkAllRequest.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; +using Elastic.Clients.Elasticsearch.Core.Bulk; namespace Elastic.Clients.Elasticsearch { diff --git a/src/Elastic.Clients.Elasticsearch/Serialization/ResponseItemConverterFactory.cs b/src/Elastic.Clients.Elasticsearch/Serialization/ResponseItemConverterFactory.cs index c622bf87365..0da3418eb03 100644 --- a/src/Elastic.Clients.Elasticsearch/Serialization/ResponseItemConverterFactory.cs +++ b/src/Elastic.Clients.Elasticsearch/Serialization/ResponseItemConverterFactory.cs @@ -5,6 +5,8 @@ using System; using System.Text.Json; using System.Text.Json.Serialization; +using Elastic.Clients.Elasticsearch.Core.Get; +using Elastic.Clients.Elasticsearch.Core.MGet; namespace Elastic.Clients.Elasticsearch { diff --git a/src/Elastic.Clients.Elasticsearch/Serialization/UnionConverter.cs b/src/Elastic.Clients.Elasticsearch/Serialization/UnionConverter.cs index edf5251fafa..f1000616f0d 100644 --- a/src/Elastic.Clients.Elasticsearch/Serialization/UnionConverter.cs +++ b/src/Elastic.Clients.Elasticsearch/Serialization/UnionConverter.cs @@ -17,7 +17,7 @@ internal sealed class UnionConverter : JsonConverterFactory // found. private static readonly HashSet TypesToSkip = new() { - typeof(SourceConfig), + typeof(Core.Search.SourceConfig), typeof(Script) }; diff --git a/src/Elastic.Clients.Elasticsearch/Types/AsyncSearch/AsyncSearch.cs b/src/Elastic.Clients.Elasticsearch/Types/AsyncSearch/AsyncSearch.cs index b774c25c5cf..a5d6b8ad9f8 100644 --- a/src/Elastic.Clients.Elasticsearch/Types/AsyncSearch/AsyncSearch.cs +++ b/src/Elastic.Clients.Elasticsearch/Types/AsyncSearch/AsyncSearch.cs @@ -14,7 +14,7 @@ public partial class AsyncSearch /// Shortcut to the hits returned for this search. /// [JsonIgnore] - public IReadOnlyCollection> Hits => HitsMetadata.Hits; + public IReadOnlyCollection> Hits => HitsMetadata.Hits; /// /// The source documents from the matching hits. diff --git a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkCreateOperation.cs b/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkCreateOperation.cs deleted file mode 100644 index 9f115bfb032..00000000000 --- a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkCreateOperation.cs +++ /dev/null @@ -1,128 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; -using System.IO; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.Threading.Tasks; - -namespace Elastic.Clients.Elasticsearch -{ - /// - /// Represents a bulk operation to create a document. - /// - /// The type representing the document being created. - public sealed class BulkCreateOperation : BulkOperationBase - { - /// - /// Creates an instance of with the provided document serialized - /// as source data. - /// - /// The document to index. - public BulkCreateOperation(T document) => Document = document; - - /// - /// Creates an instance of with the provided document serialized - /// as source data. - /// - /// When an is provided, even if the value is null, no further inference will occur. - /// Setting null using this overload is considered explicit intent not to set an index for the operation. In this case - /// it is expected that the bulk request will have defined an index to operate on. - /// - /// The document to index. - /// The which can represent an index, alias or data stream. - public BulkCreateOperation(T document, IndexName index) : this(document) => Index = index; - - /// - /// ID of the pipeline to use to preprocess incoming documents. - /// - [JsonPropertyName("pipeline")] - public string? Pipeline { get; set; } - - /// - /// A dictionary from the full name of fields to the name of dynamic templates. - /// If a name matches a dynamic template, then that template will be applied regardless of other match predicates - /// defined in the template. And if a field is already defined in the mapping, then this parameter won’t be used. - /// - [JsonPropertyName("dynamic_templates")] - public Dictionary? DynamicTemplates { get; set; } - - /// - protected override string Operation => "create"; - - /// - /// The source document. - /// - [JsonIgnore] - public T Document { get; set; } - - protected override Type ClrType => typeof(T); - - /// - protected override void Serialize(Stream stream, IElasticsearchClientSettings settings) - { - SetValues(settings); - using var writer = new Utf8JsonWriter(stream); - SerializeOperationAction(settings, writer); - writer.Flush(); - stream.WriteByte(SerializationConstants.Newline); - settings.SourceSerializer.Serialize(Document, stream); - } - - /// - protected override async Task SerializeAsync(Stream stream, IElasticsearchClientSettings settings) - { - SetValues(settings); - var writer = new Utf8JsonWriter(stream); - await using (writer.ConfigureAwait(false)) - { - SerializeOperationAction(settings, writer); - await writer.FlushAsync().ConfigureAwait(false); - stream.WriteByte(SerializationConstants.Newline); - await settings.SourceSerializer.SerializeAsync(Document, stream).ConfigureAwait(false); - } - } - - private void SetValues(IElasticsearchClientSettings settings) - { - // This allocates but avoids serialising "routing":null etc. into the operation action - // Unfortunately, the alternative is we always set to new Routing(Document) which is then - // never null even if the inferrer will be unable to return a value for the Routing during serialization - - if (settings.ExperimentalEnableSerializeNullInferredValues) - { - Routing ??= new Routing(Document); - } - else if (Routing is null) - { - var routing = new Routing(Document); - if (!string.IsNullOrEmpty(routing.GetString(settings))) - Routing = routing; - } - - if (settings.ExperimentalEnableSerializeNullInferredValues) - { - Id ??= new Id(Document); - } - else if (Id is null) - { - var id = new Id(Document); - if (!string.IsNullOrEmpty(id.GetString(settings))) - Id = id; - } - } - - private void SerializeOperationAction(IElasticsearchClientSettings settings, Utf8JsonWriter writer) - { - var requestResponseSerializer = settings.RequestResponseSerializer; - writer.WriteStartObject(); - writer.WritePropertyName(Operation); - requestResponseSerializer.TryGetJsonSerializerOptions(out var options); - JsonSerializer.Serialize>(writer, this, options); - writer.WriteEndObject(); - } - } -} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkCreateOperationDescriptor.cs b/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkCreateOperationDescriptor.cs deleted file mode 100644 index 6c4744f2628..00000000000 --- a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkCreateOperationDescriptor.cs +++ /dev/null @@ -1,81 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; -using System.IO; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Elastic.Transport; - -namespace Elastic.Clients.Elasticsearch -{ - public sealed class BulkCreateOperationDescriptor : BulkOperationDescriptorBase> - { - private string _pipeline; - private Dictionary _dynamicTemplates; - - private static byte _newline => (byte)'\n'; - - private readonly TSource _document; - - public BulkCreateOperationDescriptor(TSource source) => _document = source; - - public BulkCreateOperationDescriptor(TSource source, IndexName index) : this(source) => IndexNameValue = index; - - public BulkCreateOperationDescriptor Pipeline(string pipeline) => Assign(pipeline, (a, v) => a._pipeline = v); - - public BulkCreateOperationDescriptor DynamicTemplates(Func, FluentDictionary> selector) => Assign(selector, (a, v) => a._dynamicTemplates = v?.Invoke(new FluentDictionary())); - - protected override string Operation => "create"; - - protected override Type ClrType => typeof(TSource); - - protected override void Serialize(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) - { - var requestResponseSerializer = settings.RequestResponseSerializer; - var internalWriter = new Utf8JsonWriter(stream); - internalWriter.WriteStartObject(); - internalWriter.WritePropertyName(Operation); - requestResponseSerializer.TryGetJsonSerializerOptions(out var options); - JsonSerializer.Serialize>(internalWriter, this, options); - internalWriter.WriteEndObject(); - internalWriter.Flush(); - stream.WriteByte(_newline); - settings.SourceSerializer.Serialize(GetBody(), stream); - } - - protected override async Task SerializeAsync(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting, CancellationToken cancellationToken = default) - { - var requestResponseSerializer = settings.RequestResponseSerializer; - var internalWriter = new Utf8JsonWriter(stream); - internalWriter.WriteStartObject(); - internalWriter.WritePropertyName(Operation); - requestResponseSerializer.TryGetJsonSerializerOptions(out var options); - JsonSerializer.Serialize>(internalWriter, this, options); - internalWriter.WriteEndObject(); - await internalWriter.FlushAsync().ConfigureAwait(false); - stream.WriteByte(_newline); - await settings.SourceSerializer.SerializeAsync(GetBody(), stream).ConfigureAwait(false); - } - - protected override void SerializeInternal(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (!string.IsNullOrEmpty(_pipeline)) - { - writer.WritePropertyName("pipeline"); - JsonSerializer.Serialize(writer, _pipeline, options); - } - - if (_dynamicTemplates is not null) - { - writer.WritePropertyName("dynamic_templates"); - JsonSerializer.Serialize(writer, _dynamicTemplates, options); - } - } - - protected override object GetBody() => _document; - } -} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkDeleteOperation.cs b/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkDeleteOperation.cs deleted file mode 100644 index 734299fbcb9..00000000000 --- a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkDeleteOperation.cs +++ /dev/null @@ -1,83 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. - -using System; -using System.IO; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.Threading.Tasks; - -namespace Elastic.Clients.Elasticsearch -{ - public class BulkDeleteOperation : BulkOperationBase - { - public BulkDeleteOperation(Id id) => Id = id; - - protected override void Serialize(Stream stream, IElasticsearchClientSettings settings) - { - SetValues(settings); - using var writer = new Utf8JsonWriter(stream); - SerializeInternal(settings, writer); - writer.Flush(); - } - - protected override async Task SerializeAsync(Stream stream, IElasticsearchClientSettings settings) - { - SetValues(settings); - var writer = new Utf8JsonWriter(stream); - await using (writer.ConfigureAwait(false)) - { - SerializeInternal(settings, writer); - await writer.FlushAsync().ConfigureAwait(false); - } - } - - protected virtual void SetValues(IElasticsearchClientSettings settings) - { - } - - private void SerializeInternal(IElasticsearchClientSettings settings, Utf8JsonWriter writer) - { - var requestResponseSerializer = settings.RequestResponseSerializer; - writer.WriteStartObject(); - writer.WritePropertyName(Operation); - requestResponseSerializer.TryGetJsonSerializerOptions(out var options); - JsonSerializer.Serialize(writer, this, options); - writer.WriteEndObject(); - } - - protected override string Operation => "delete"; - - protected override Type ClrType => null; - } - - public sealed class BulkDeleteOperation : BulkDeleteOperation - { - public BulkDeleteOperation(T document) : base (new Id(document)) - => Document = document; - - public BulkDeleteOperation(Id id) : base(id) { } - - [JsonIgnore] - public T Document { get; set; } - - protected override void SetValues(IElasticsearchClientSettings settings) - { - if (settings.ExperimentalEnableSerializeNullInferredValues) - { - Routing ??= new Routing(Document); - } - else if (Routing is null) - { - var routing = new Routing(Document); - if (!string.IsNullOrEmpty(routing.GetString(settings))) - Routing = routing; - } - - Index ??= typeof(T); - } - - protected override Type ClrType => typeof(T); - } -} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkDeleteOperationDescriptor.cs b/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkDeleteOperationDescriptor.cs deleted file mode 100644 index 75b7173769e..00000000000 --- a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkDeleteOperationDescriptor.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. - -using System; -using System.IO; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Elastic.Transport; - -namespace Elastic.Clients.Elasticsearch -{ - public class BulkDeleteOperationDescriptor : BulkOperationDescriptorBase - { - public BulkDeleteOperationDescriptor() { } - - public BulkDeleteOperationDescriptor(Id id) => Id(id); - - protected override string Operation => "delete"; - - protected override Type ClrType => null; - - protected override object GetBody() => null; - - protected override void Serialize(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) - { - var requestResponseSerializer = settings.RequestResponseSerializer; - var internalWriter = new Utf8JsonWriter(stream); - internalWriter.WriteStartObject(); - internalWriter.WritePropertyName(Operation); - requestResponseSerializer.TryGetJsonSerializerOptions(out var options); - JsonSerializer.Serialize(internalWriter, this, options); - internalWriter.WriteEndObject(); - internalWriter.Flush(); - } - - protected override async Task SerializeAsync(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting, CancellationToken cancellationToken = default) - { - var requestResponseSerializer = settings.RequestResponseSerializer; - var internalWriter = new Utf8JsonWriter(stream); - internalWriter.WriteStartObject(); - internalWriter.WritePropertyName(Operation); - requestResponseSerializer.TryGetJsonSerializerOptions(out var options); - JsonSerializer.Serialize(internalWriter, this, options); - internalWriter.WriteEndObject(); - await internalWriter.FlushAsync().ConfigureAwait(false); - } - - protected override void SerializeInternal(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - } - } - - public sealed class BulkDeleteOperationDescriptor : BulkDeleteOperationDescriptor - { - public BulkDeleteOperationDescriptor(TDocument documentToDelete) : base (new Id(documentToDelete)) - { - RoutingValue = new Routing(documentToDelete); - IndexNameValue = IndexName.From(); - } - } -} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkIndexOperation.cs b/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkIndexOperation.cs deleted file mode 100644 index 55683338f8a..00000000000 --- a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkIndexOperation.cs +++ /dev/null @@ -1,111 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; -using System.IO; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.Threading.Tasks; - -namespace Elastic.Clients.Elasticsearch -{ - public sealed class BulkIndexOperation : BulkOperationBase - { - /// - /// Creates an instance of with the provided document serialized - /// as source data. - /// - /// The document to index. - public BulkIndexOperation(T document) => Document = document; - - /// - /// Creates an instance of with the provided document serialized - /// as source data. - /// - /// When an is provided, even if the value is null, no further inference will occur. - /// Setting null using this overload is considered explicit intent not to set an index for the operation. In this case - /// it is expected that the bulk request will have defined an index to operate on. - /// - /// The document to index. - /// The which can represent an index, alias or data stream. - public BulkIndexOperation(T document, IndexName index) : this(document) => Index = index; - - [JsonPropertyName("pipeline")] - public string? Pipeline { get; set; } - - [JsonPropertyName("dynamic_templates")] - public Dictionary? DynamicTemplates { get; set; } - - [JsonIgnore] - public T Document { get; set; } - - protected override string Operation => "index"; - - protected override Type ClrType => typeof(T); - - private void SetValues(IElasticsearchClientSettings settings) - { - // This allocates but avoids serialising "routing":null etc. into the operation action - // Unfortunately, the alternative is we always set to new Routing(Document) which is then - // never null even if the inferrer will be unable to return a value for the Routing during serialization - - if (settings.ExperimentalEnableSerializeNullInferredValues) - { - Routing ??= new Routing(Document); - } - else if (Routing is null) - { - var routing = new Routing(Document); - if (!string.IsNullOrEmpty(routing.GetString(settings))) - Routing = routing; - } - - if (settings.ExperimentalEnableSerializeNullInferredValues) - { - Id ??= new Id(Document); - } - else if (Id is null) - { - var id = new Id(Document); - if (!string.IsNullOrEmpty(id.GetString(settings))) - Id = id; - } - } - - protected override void Serialize(Stream stream, IElasticsearchClientSettings settings) - { - SetValues(settings); - var writer = new Utf8JsonWriter(stream); - SerializeOperationAction(writer, settings); - writer.Flush(); - stream.WriteByte(SerializationConstants.Newline); - settings.SourceSerializer.Serialize(Document, stream); - } - - protected override async Task SerializeAsync(Stream stream, IElasticsearchClientSettings settings) - { - SetValues(settings); - var writer = new Utf8JsonWriter(stream); - await using (writer.ConfigureAwait(false)) - { - SerializeOperationAction(writer, settings); - await writer.FlushAsync().ConfigureAwait(false); - stream.WriteByte(SerializationConstants.Newline); - await settings.SourceSerializer.SerializeAsync(Document, stream).ConfigureAwait(false); - } - } - - private void SerializeOperationAction(Utf8JsonWriter writer, IElasticsearchClientSettings settings) - { - var requestResponseSerializer = settings.RequestResponseSerializer; - - writer.WriteStartObject(); - writer.WritePropertyName(Operation); - requestResponseSerializer.TryGetJsonSerializerOptions(out var options); - JsonSerializer.Serialize>(writer, this, options); - writer.WriteEndObject(); - } - } -} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkIndexOperationDescriptor.cs b/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkIndexOperationDescriptor.cs deleted file mode 100644 index 8f4460d0e98..00000000000 --- a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkIndexOperationDescriptor.cs +++ /dev/null @@ -1,88 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; -using System.IO; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Elastic.Transport; - -namespace Elastic.Clients.Elasticsearch -{ - public sealed class BulkIndexOperationDescriptor : BulkOperationDescriptorBase> - { - private string _pipeline; - - private Dictionary _dynamicTemplates; - - private static byte _newline => (byte)'\n'; - - private readonly TSource _document; - - public BulkIndexOperationDescriptor(TSource source) => _document = source; - - public BulkIndexOperationDescriptor(TSource source, IndexName index) : this(source) => IndexNameValue = index; - - public BulkIndexOperationDescriptor Pipeline(string pipeline) => Assign(pipeline, (a, v) => a._pipeline = v); - - - public BulkIndexOperationDescriptor DynamicTemplates(Func, FluentDictionary> selector) => - Assign(selector, (a, v) => a._dynamicTemplates = v?.Invoke(new FluentDictionary())); - - protected override string Operation => "index"; - - protected override Type ClrType => typeof(TSource); - - protected override void Serialize(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) - { - var requestResponseSerializer = settings.RequestResponseSerializer; - var internalWriter = new Utf8JsonWriter(stream); - internalWriter.WriteStartObject(); - internalWriter.WritePropertyName(Operation); - requestResponseSerializer.TryGetJsonSerializerOptions(out var options); - JsonSerializer.Serialize>(internalWriter, this, options); - internalWriter.WriteEndObject(); - internalWriter.Flush(); - stream.WriteByte(_newline); - settings.SourceSerializer.Serialize(_document, stream); - } - - protected override async Task SerializeAsync(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting, CancellationToken cancellationToken = default) - { - var requestResponseSerializer = settings.RequestResponseSerializer; - var internalWriter = new Utf8JsonWriter(stream); - internalWriter.WriteStartObject(); - internalWriter.WritePropertyName(Operation); - requestResponseSerializer.TryGetJsonSerializerOptions(out var options); - JsonSerializer.Serialize>(internalWriter, this, options); - internalWriter.WriteEndObject(); - await internalWriter.FlushAsync().ConfigureAwait(false); - stream.WriteByte(_newline); - await settings.SourceSerializer.SerializeAsync(_document, stream).ConfigureAwait(false); - } - - protected override void SerializeInternal(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (!string.IsNullOrEmpty(_pipeline)) - { - writer.WritePropertyName("pipeline"); - JsonSerializer.Serialize(writer, _pipeline, options); - } - - if (_dynamicTemplates is not null) - { - writer.WritePropertyName("dynamic_templates"); - JsonSerializer.Serialize(writer, _dynamicTemplates, options); - } - } - - protected override object GetBody() => _document; - - protected override Id GetIdForOperation(Inferrer inferrer) => IdValue ?? new Id(_document); - - protected override Routing GetRoutingForOperation(Inferrer inferrer) => RoutingValue ?? new Routing(_document); - } -} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkOperationBase.cs b/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkOperationBase.cs deleted file mode 100644 index 8cfbf66dfdc..00000000000 --- a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkOperationBase.cs +++ /dev/null @@ -1,114 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. - -using System; -using System.IO; -using System.Text.Json.Serialization; -using System.Threading.Tasks; -using Elastic.Transport; - -namespace Elastic.Clients.Elasticsearch -{ - /// - /// Provides the base class from which the classes that represent bulk operations are derived. - /// - /// - /// This is an abstract class. - /// - public abstract class BulkOperationBase : IBulkOperation, IStreamSerializable - { - internal BulkOperationBase() { } - - /// - /// The document ID. - /// Required for update and delete operations. - /// Optional for create and index operations. If no ID is specified, a document ID is automatically generated. - /// - [JsonPropertyName("_id")] - public Id? Id { get; set; } - - /// - /// May be set as part of optimistic concurrency control to specify the operation applies only if the primary term matches. - /// - [JsonPropertyName("if_primary_term")] - public long? IfPrimaryTerm { get; set; } - - /// - /// May be set as part of optimistic concurrency control to specify the operation applies only if the sequence number matches. - /// - [JsonPropertyName("if_seq_no")] - public long? IfSequenceNumber { get; set; } - - /// - /// Name of the data stream, index, or index alias to perform the action on. - /// This parameter is required if a target index is not specified in the request path. - /// - [JsonPropertyName("_index")] - public IndexName? Index { get; set; } - - /// - /// If true, the operation action must target an index alias. Defaults to false. - /// - [JsonPropertyName("require_alias")] - public bool? RequireAlias { get; set; } - - /// - /// May be set to specify a custom routing value for the document. - /// - /// It automatically follows the behavior of the index/delete operation based on the _routing mapping - [JsonPropertyName("routing")] - public Routing? Routing { get; set; } - - /// - /// Each bulk operation can include the version value for the document. - /// - /// This automatically follows the behavior of the index/delete operation based on the _version mapping. - [JsonPropertyName("version")] - public long? Version { get; set; } - - /// - /// The version type for the document in the current operation. - /// - /// This automatically follows the behavior of the index/delete operation based on the _version mapping. - [JsonPropertyName("version_type")] - public VersionType? VersionType { get; set; } - - /// - /// The name for the bulk operation action. - /// - protected abstract string Operation { get; } - - protected abstract Type ClrType { get; } - - /// - /// Derived operations should override this control how the operation and its payload will be serialised into the HTTP request content . - /// This supports newline delimited JSON data. - /// - /// The writable stream for the HTTP request. - /// The for the current client instance. - protected abstract void Serialize(Stream stream, IElasticsearchClientSettings settings); - - /// - /// Derived operations should override this control how the operation and its payload will be asynchronously serialised into the HTTP request content . - /// This supports newline delimited JSON data. - /// - /// The writable stream for the HTTP request. - /// The for the current client instance. - protected abstract Task SerializeAsync(Stream stream, IElasticsearchClientSettings settings); - - void IBulkOperation.PrepareIndex(IndexName bulkRequestIndex) - { - Index ??= bulkRequestIndex ?? ClrType; - - if (bulkRequestIndex is not null && Index.Equals(bulkRequestIndex)) - Index = null; - } - - /// - void IStreamSerializable.Serialize(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) => Serialize(stream, settings); - - /// - Task IStreamSerializable.SerializeAsync(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) => SerializeAsync(stream, settings); - } -} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkOperationDescriptorBase.cs b/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkOperationDescriptorBase.cs deleted file mode 100644 index fed118653e4..00000000000 --- a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkOperationDescriptorBase.cs +++ /dev/null @@ -1,144 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. - -using System; -using System.IO; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Elastic.Transport; - -namespace Elastic.Clients.Elasticsearch -{ - public abstract class BulkOperationDescriptorBase : SerializableDescriptorBase, IBulkOperation, IStreamSerializable where TDescriptor : BulkOperationDescriptorBase - { - private long? _version; - private VersionType? _versionType; - private bool? _requireAlias; - - protected IndexName IndexNameValue { get; set; } - protected Id IdValue { get; set; } - protected Routing RoutingValue { get; set; } - protected long? IfSequenceNoValue { get; set; } - protected long? IfPrimaryTermValue { get; set; } - protected abstract string Operation { get; } - protected abstract Type ClrType { get; } - - public TDescriptor Id(Id id) => Assign(id, (a, v) => a.IdValue = v); - - public TDescriptor IfSequenceNumber(long? ifSequenceNumber) => Assign(ifSequenceNumber, (a, v) => a.IfSequenceNoValue = v); - - public TDescriptor IfPrimaryTerm(long? ifPrimaryTerm) => Assign(ifPrimaryTerm, (a, v) => a.IfPrimaryTermValue = v); - - public TDescriptor Index(IndexName index) => Assign(index, (a, v) => a.IndexNameValue = v); - - public TDescriptor Index() => Assign(typeof(T), (a, v) => a.IndexNameValue = v); - public TDescriptor RequireAlias(bool? requireAlias = true) => Assign(requireAlias, (a, v) => a._requireAlias = v); - - public TDescriptor Routing(Routing routing) => Assign(routing, (a, v) => a.RoutingValue = v); - - public TDescriptor Version(long version) => Assign(version, (a, v) => a._version = v); - - public TDescriptor VersionType(VersionType? versionType) => Assign(versionType, (a, v) => a._versionType = v); - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - IdValue = GetIdForOperation(settings.Inferrer); - RoutingValue = GetRoutingForOperation(settings.Inferrer); - - writer.WriteStartObject(); - - if (IdValue is not null) - { - // TODO - This flow is a bit inefficient and annoying just to get "clean" JSON - var id = IdValue.GetString(settings); - - if (!string.IsNullOrEmpty(id)) - { - writer.WritePropertyName("_id"); - writer.WriteStringValue(id); - } - } - - if (IfPrimaryTermValue.HasValue) - { - writer.WritePropertyName("if_primary_term"); - JsonSerializer.Serialize(writer, IfPrimaryTermValue.Value, options); - } - - if (IfSequenceNoValue.HasValue) - { - writer.WritePropertyName("if_seq_no"); - JsonSerializer.Serialize(writer, IfSequenceNoValue.Value, options); - } - - if (IndexNameValue is not null) - { - writer.WritePropertyName("_index"); - JsonSerializer.Serialize(writer, IndexNameValue, options); - } - - if (RoutingValue is not null) - { - // TODO - This flow is a bit inefficient and annoying just to get "clean" JSON - var value = RoutingValue.GetString(settings); - - if (!string.IsNullOrEmpty(value)) - { - writer.WritePropertyName("routing"); - writer.WriteStringValue(value); - } - } - - if (_requireAlias.HasValue) - { - writer.WritePropertyName("require_alias"); - JsonSerializer.Serialize(writer, _requireAlias.Value, options); - } - - if (_version.HasValue) - { - writer.WritePropertyName("version"); - JsonSerializer.Serialize(writer, _version.Value, options); - } - - if (_versionType.HasValue) - { - writer.WritePropertyName("version_type"); - JsonSerializer.Serialize(writer, _versionType.Value, options); - } - - SerializeInternal(writer, options, settings); - - writer.WriteEndObject(); - } - - /// - /// Must be overridden in derived operations to write their own properties to the . - /// - protected abstract void SerializeInternal(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings); - - protected abstract void Serialize(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting); - - protected abstract Task SerializeAsync(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting, CancellationToken cancellationToken = default); - - void IStreamSerializable.Serialize(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) => Serialize(stream, settings, formatting); - - Task IStreamSerializable.SerializeAsync(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) => SerializeAsync(stream, settings, formatting); - - protected abstract object GetBody(); - - protected virtual Id GetIdForOperation(Inferrer inferrer) => IdValue ?? new Id(GetBody()); - - protected virtual Routing GetRoutingForOperation(Inferrer inferrer) => RoutingValue ?? new Routing(GetBody()); - - void IBulkOperation.PrepareIndex(IndexName bulkRequestIndex) - { - IndexNameValue ??= bulkRequestIndex ?? ClrType; - - if (bulkRequestIndex is not null && IndexNameValue.Equals(bulkRequestIndex)) - IndexNameValue = null; - } - } -} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkOperationsCollection.cs b/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkOperationsCollection.cs deleted file mode 100644 index 18b0b4f7b5b..00000000000 --- a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkOperationsCollection.cs +++ /dev/null @@ -1,256 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Threading.Tasks; -using Elastic.Transport; - -namespace Elastic.Clients.Elasticsearch -{ - ///// - ///// This class is used by which needs thread-safe adding , as well as expose - ///// an equivalent of . Because operations from Elasticsearch are executed in order none of the types in - ///// System.Collection.Concurrent can be used for this. We need to preserve insert order and exposed indexed index because - ///// is ordered and lines up with allowing one to zip the two together. - ///// - ///// - public sealed class BulkOperationsCollection : IList, IList, IStreamSerializable - { - private readonly object _lock = new(); - - public BulkOperationsCollection() => Items = new List(); - - public BulkOperationsCollection(IEnumerable operations) - { - Items = new List(); - Items.AddRange(operations); - } - - public int Count - { - get - { - lock (_lock) - return Items.Count; - } - } - - public IBulkOperation this[int index] - { - get - { - lock (_lock) - return Items[index]; - } - set - { - lock (_lock) - { - if (index < 0 || index >= Items.Count) - throw new ArgumentOutOfRangeException("index", index, $"value {index} must be in range of {Items.Count}"); - - Items[index] = value; - } - } - } - - bool IList.IsFixedSize => false; - - bool ICollection.IsReadOnly => false; - - bool IList.IsReadOnly => false; - - bool ICollection.IsSynchronized => true; - - object IList.this[int index] - { - get => this[index]; - set - { - VerifyValueType(value); - this[index] = (IBulkOperation)value; - } - } - - private List Items { get; } - - object ICollection.SyncRoot => _lock; - - void ICollection.CopyTo(Array array, int index) - { - lock (_lock) - ((IList)Items).CopyTo(array, index); - } - - public void Add(IBulkOperation item) - { - lock (_lock) - Items.Add(item); - } - - public void Clear() - { - lock (_lock) - Items.Clear(); - } - - public bool Contains(IBulkOperation item) - { - lock (_lock) - return Items.Contains(item); - } - - public void CopyTo(IBulkOperation[] array, int index) - { - lock (_lock) - Items.CopyTo(array, index); - } - - public bool Remove(IBulkOperation item) - { - lock (_lock) - { - var index = InternalIndexOf(item); - if (index < 0) - return false; - - RemoveItem(index); - return true; - } - } - - IEnumerator IEnumerable.GetEnumerator() => ((IList)Items).GetEnumerator(); - - public IEnumerator GetEnumerator() - { - lock (_lock) - return Items.GetEnumerator(); - } - - int IList.Add(object value) - { - VerifyValueType(value); - - lock (_lock) - { - Add((IBulkOperation)value); - return Count - 1; - } - } - - bool IList.Contains(object value) - { - VerifyValueType(value); - return Contains((IBulkOperation)value); - } - - int IList.IndexOf(object value) - { - VerifyValueType(value); - return IndexOf((IBulkOperation)value); - } - - void IList.Insert(int index, object value) - { - VerifyValueType(value); - Insert(index, (IBulkOperation)value); - } - - void IList.Remove(object value) - { - VerifyValueType(value); - Remove((IBulkOperation)value); - } - - public static implicit operator BulkOperationsCollection(List items) => new(items); - - public int IndexOf(IBulkOperation item) - { - lock (_lock) - return InternalIndexOf(item); - } - - public void Insert(int index, IBulkOperation item) - { - lock (_lock) - { - if (index < 0 || index > Items.Count) - throw new ArgumentOutOfRangeException("index", index, $"value {index} must be in range of {Items.Count}"); - - InsertItem(index, item); - } - } - - public void RemoveAt(int index) - { - lock (_lock) - { - if (index < 0 || index >= Items.Count) - throw new ArgumentOutOfRangeException("index", index, $"value {index} must be in range of {Items.Count}"); - - RemoveItem(index); - } - } - - public void AddRange(IEnumerable items) - { - lock (_lock) - Items.AddRange(items); - } - - private int InternalIndexOf(IBulkOperation item) - { - var count = Items.Count; - - for (var i = 0; i < count; i++) - { - if (Equals(Items[i], item)) - return i; - } - return -1; - } - - private void InsertItem(int index, IBulkOperation item) => Items.Insert(index, item); - - private void RemoveItem(int index) => Items.RemoveAt(index); - - private static void VerifyValueType(object value) - { - if (value == null) - { - if (typeof(IBulkOperation).IsValueType) - throw new ArgumentException("value is null and a value type"); - } - else if (value is not IBulkOperation) - throw new ArgumentException($"object is of type {value.GetType().FullName} but collection is of {typeof(IBulkOperation).FullName}"); - } - - public void Serialize(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting = SerializationFormatting.None) - { - foreach (var op in this) - { - if (op is not IStreamSerializable serializable) - throw new InvalidOperationException(""); - - serializable.Serialize(stream, settings, formatting); - stream.WriteByte((byte)'\n'); - } - } - - public async Task SerializeAsync(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting = SerializationFormatting.None) - { - foreach (var op in this) - { - if (op is not IStreamSerializable serializable) - throw new InvalidOperationException(""); - - await serializable.SerializeAsync(stream, settings, formatting).ConfigureAwait(false); - stream.WriteByte((byte)'\n'); - } - } - } -} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkResponseItemConverter.cs b/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkResponseItemConverter.cs deleted file mode 100644 index 4fab47d3d17..00000000000 --- a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkResponseItemConverter.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch -{ - internal sealed class BulkResponseItemConverter : JsonConverter> - { - public override IReadOnlyList? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartArray) - throw new JsonException($"Unexpected token in bulk response items. Read {reader.TokenType} but was expecting {JsonTokenType.StartArray}."); - - var responseItems = new List(); - - while (reader.Read() && reader.TokenType != JsonTokenType.EndArray) - { - if (reader.TokenType != JsonTokenType.StartObject) - throw new JsonException($"Unexpected token in bulk response items. Read {reader.TokenType} but was expecting {JsonTokenType.StartObject}."); - - reader.Read(); - - if (reader.TokenType != JsonTokenType.PropertyName) - throw new JsonException($"Unexpected token in bulk response items. Read {reader.TokenType} but was expecting {JsonTokenType.PropertyName}."); - - BulkResponseItemBase responseItem; - - if (reader.ValueTextEquals("index")) - { - responseItem = JsonSerializer.Deserialize(ref reader, options); - } - else if (reader.ValueTextEquals("delete")) - { - responseItem = JsonSerializer.Deserialize(ref reader, options); - } - else if (reader.ValueTextEquals("create")) - { - responseItem = JsonSerializer.Deserialize(ref reader, options); - } - else if (reader.ValueTextEquals("update")) - { - responseItem = JsonSerializer.Deserialize(ref reader, options); - } - else - { - throw new JsonException("Unexpected operation type in bulk response items."); - } - - responseItems.Add(responseItem); - - reader.Read(); - - if (reader.TokenType != JsonTokenType.EndObject) - throw new JsonException($"Unexpected token in bulk response items. Read {reader.TokenType} but was expecting {JsonTokenType.EndObject}."); - } - - return responseItems; - } - - public override void Write(Utf8JsonWriter writer, IReadOnlyList value, JsonSerializerOptions options) => throw new NotImplementedException(); - } -} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkUpdateBody.cs b/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkUpdateBody.cs deleted file mode 100644 index e9912c16516..00000000000 --- a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkUpdateBody.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. - -using System.Text.Json; - -namespace Elastic.Clients.Elasticsearch -{ - internal class BulkUpdateBody : BulkUpdateBodyBase - { - public bool? DocAsUpsert { get; set; } - - public TPartialUpdate PartialUpdate { get; set; } - - public Script Script { get; set; } - - public bool? ScriptedUpsert { get; set; } - - public TDocument Upsert { get; set; } - - public Union Source { get; set; } - - protected override void SerializeProperties(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (PartialUpdate is not null) - { - writer.WritePropertyName("doc"); - SourceSerialisation.Serialize(PartialUpdate, writer, settings.SourceSerializer); - } - - if (Script is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, Script, options); - } - - if (ScriptedUpsert.HasValue) - { - writer.WritePropertyName("scripted_upsert"); - JsonSerializer.Serialize(writer, ScriptedUpsert.Value, options); - } - - if (DocAsUpsert.HasValue) - { - writer.WritePropertyName("doc_as_upsert"); - JsonSerializer.Serialize(writer, DocAsUpsert.Value, options); - } - - if (Upsert is not null) - { - writer.WritePropertyName("upsert"); - SourceSerialisation.Serialize(Upsert, writer, settings.SourceSerializer); - } - - if (Source is not null) - { - writer.WritePropertyName("_source"); - JsonSerializer.Serialize(writer, Source, options); - } - } - } -} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkUpdateBodyBase.cs b/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkUpdateBodyBase.cs deleted file mode 100644 index fb396553b7a..00000000000 --- a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkUpdateBodyBase.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. - -using System.Text.Json; - -namespace Elastic.Clients.Elasticsearch -{ - internal abstract class BulkUpdateBodyBase : ISelfSerializable - { - public long? IfSequenceNumber { get; set; } - - public long? IfPrimaryTerm { get; set; } - - protected abstract void SerializeProperties(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings); - - void ISelfSerializable.Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - - if (IfSequenceNumber.HasValue) - { - writer.WritePropertyName("if_seq_no"); - writer.WriteNumberValue(IfSequenceNumber.Value); - } - - if (IfPrimaryTerm.HasValue) - { - writer.WritePropertyName("if_primary_term"); - writer.WriteNumberValue(IfPrimaryTerm.Value); - } - - SerializeProperties(writer, options, settings); - - writer.WriteEndObject(); - } - } -} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkUpdateOperationBase.cs b/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkUpdateOperationBase.cs deleted file mode 100644 index 998d75d1515..00000000000 --- a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkUpdateOperationBase.cs +++ /dev/null @@ -1,138 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. - -using System.IO; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.Threading; -using System.Threading.Tasks; -using Elastic.Transport; - -namespace Elastic.Clients.Elasticsearch -{ - public abstract class BulkUpdateOperationBase : BulkOperationBase - { - protected internal BulkUpdateOperationBase() : base() { } - - private static byte _newline => (byte)'\n'; - - [JsonPropertyName("retry_on_conflict")] - public bool? RetryOnConflict { get; set; } - - protected override string Operation => "update"; - - protected abstract void BeforeSerialize(IElasticsearchClientSettings settings); - - /// - /// Serialise the operation action line for the NDJSON stream. - /// - /// - /// - protected abstract void WriteOperation(Utf8JsonWriter writer, JsonSerializerOptions options = null); - - protected override void Serialize(Stream stream, IElasticsearchClientSettings settings) - { - BeforeSerialize(settings); - - var requestResponseSerializer = settings.RequestResponseSerializer; - - var internalWriter = new Utf8JsonWriter(stream); - - internalWriter.WriteStartObject(); - internalWriter.WritePropertyName(Operation); - requestResponseSerializer.TryGetJsonSerializerOptions(out var options); - WriteOperation(internalWriter, options); - internalWriter.WriteEndObject(); - internalWriter.Flush(); - - stream.WriteByte(_newline); - - var body = GetBody(); - settings.RequestResponseSerializer.Serialize(body, stream); - stream.Flush(); - } - - protected override async Task SerializeAsync(Stream stream, IElasticsearchClientSettings settings) - { - BeforeSerialize(settings); - - var internalWriter = new Utf8JsonWriter(stream); - SerializeOperationAction(settings, internalWriter); - internalWriter.Flush(); - - stream.WriteByte(_newline); - - var body = GetBody(); - await settings.RequestResponseSerializer.SerializeAsync(body, stream).ConfigureAwait(false); - await stream.FlushAsync().ConfigureAwait(false); - } - - private void SerializeOperationAction(IElasticsearchClientSettings settings, Utf8JsonWriter writer) - { - var requestResponseSerializer = settings.RequestResponseSerializer; - writer.WriteStartObject(); - writer.WritePropertyName(Operation); - requestResponseSerializer.TryGetJsonSerializerOptions(out var options); - WriteOperation(writer, options); - writer.WriteEndObject(); - } - - protected abstract object GetBody(); - } - - public abstract class BulkUpdateOperationDescriptorBase : BulkOperationDescriptorBase> - { - private static byte _newline => (byte)'\n'; - - protected override string Operation => "update"; - - protected abstract void BeforeSerialize(IElasticsearchClientSettings settings); - - protected abstract void WriteOperation(Utf8JsonWriter writer, JsonSerializerOptions options = null); - - protected override void Serialize(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting = SerializationFormatting.None) - { - BeforeSerialize(settings); - - var requestResponseSerializer = settings.RequestResponseSerializer; - - var internalWriter = new Utf8JsonWriter(stream); - - internalWriter.WriteStartObject(); - internalWriter.WritePropertyName(Operation); - requestResponseSerializer.TryGetJsonSerializerOptions(out var options); - WriteOperation(internalWriter, options); - internalWriter.WriteEndObject(); - internalWriter.Flush(); - - stream.WriteByte(_newline); - var body = GetBody(); - settings.RequestResponseSerializer.Serialize(body, stream, formatting); - } - - protected override async Task SerializeAsync(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting, CancellationToken cancellationToken = default) - { - BeforeSerialize(settings); - - var requestResponseSerializer = settings.RequestResponseSerializer; - - var internalWriter = new Utf8JsonWriter(stream); - - internalWriter.WriteStartObject(); - internalWriter.WritePropertyName(Operation); - - requestResponseSerializer.TryGetJsonSerializerOptions(out var options); - WriteOperation(internalWriter, options); - - internalWriter.WriteEndObject(); - internalWriter.Flush(); - - stream.WriteByte(_newline); - - var body = GetBody(); - - await settings.SourceSerializer.SerializeAsync(body, stream, formatting).ConfigureAwait(false); - } - } -} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkUpdateOperationWithPartial.cs b/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkUpdateOperationWithPartial.cs deleted file mode 100644 index 0b2d346269a..00000000000 --- a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkUpdateOperationWithPartial.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch -{ - public sealed class BulkUpdateOperationWithPartial : BulkUpdateOperationBase - { - public BulkUpdateOperationWithPartial(Id id, TPartialDocument partialDocument) - { - Id = id; - PartialDocument = partialDocument; - } - - public BulkUpdateOperationWithPartial(Id id, IndexName index, TPartialDocument partialDocument) - { - Id = id; - Index = index; - PartialDocument = partialDocument; - } - - [JsonIgnore] - public TPartialDocument PartialDocument { get; set; } - - protected override Type ClrType => null; - - protected override string Operation => "update"; - - protected override void BeforeSerialize(IElasticsearchClientSettings settings) - { - if (Index is null) - Index = settings.Inferrer.IndexName(); - } - - protected override void WriteOperation(Utf8JsonWriter writer, JsonSerializerOptions options = null) => - JsonSerializer.Serialize>(writer, this, options); - - protected override object GetBody() => new PartialBulkUpdateBody { PartialUpdate = PartialDocument }; - } -} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkUpdateOperationWithScript.cs b/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkUpdateOperationWithScript.cs deleted file mode 100644 index 7d2fb98b4b2..00000000000 --- a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkUpdateOperationWithScript.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. - -using System; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Elastic.Clients.Elasticsearch -{ - public class BulkUpdateOperationWithScript : BulkUpdateOperationBase - { - public BulkUpdateOperationWithScript(Id id, Script script) - { - Id = id; - Script = script; - } - - public BulkUpdateOperationWithScript(Id id, IndexName index, Script script) - { - Id = id; - Index = index; - Script = script; - } - - [JsonIgnore] - public Script Script { get; set; } - - protected override string Operation => "update"; - - protected override Type ClrType => null; - - protected override void BeforeSerialize(IElasticsearchClientSettings settings) - { - } - - protected override void WriteOperation(Utf8JsonWriter writer, JsonSerializerOptions options = null) => JsonSerializer.Serialize(writer, this, options); - - protected override object GetBody() => new ScriptedBulkUpdateBody { Script = Script }; - } - - public sealed class BulkUpdateOperationWithScript : BulkUpdateOperationWithScript - { - public BulkUpdateOperationWithScript(TDocument upsert, Id id, Script script) : base(id, script) => Upsert = upsert; - - public BulkUpdateOperationWithScript(TDocument upsert, Id id, IndexName index, Script script) : base(id, index, script) => Upsert = upsert; - - [JsonIgnore] - public TDocument Upsert { get; set; } - - protected override object GetBody() => new ScriptedBulkUpdateBody { Script = Script, Upsert = Upsert }; - } -} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Bulk/IBulkOperation.cs b/src/Elastic.Clients.Elasticsearch/Types/Bulk/IBulkOperation.cs deleted file mode 100644 index 3fa407ab671..00000000000 --- a/src/Elastic.Clients.Elasticsearch/Types/Bulk/IBulkOperation.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. - -namespace Elastic.Clients.Elasticsearch -{ - /// - /// Marker interface for types that can be serialised as an operation of a bulk API request. - /// - /// Allows objects and descriptors to be stored in the same . - public interface IBulkOperation - { - void PrepareIndex(IndexName bulkRequestIndex); - } -} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Bulk/PartialBulkUpdateBody.cs b/src/Elastic.Clients.Elasticsearch/Types/Bulk/PartialBulkUpdateBody.cs deleted file mode 100644 index 3da8f1fd8fe..00000000000 --- a/src/Elastic.Clients.Elasticsearch/Types/Bulk/PartialBulkUpdateBody.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. - -using System.Text.Json; - -namespace Elastic.Clients.Elasticsearch -{ - internal class PartialBulkUpdateBody : BulkUpdateBodyBase - { - public bool? DocAsUpsert { get; set; } - - public TPartialUpdate PartialUpdate { get; set; } - - protected override void SerializeProperties(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (DocAsUpsert.HasValue) - { - writer.WritePropertyName("doc_as_upsert"); - writer.WriteBooleanValue(DocAsUpsert.Value); - } - - if (PartialUpdate is not null) - { - writer.WritePropertyName("doc"); - SourceSerialisation.Serialize(PartialUpdate, writer, settings.SourceSerializer); - } - } - } -} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Bulk/ScriptedBulkUpdateBody.cs b/src/Elastic.Clients.Elasticsearch/Types/Bulk/ScriptedBulkUpdateBody.cs deleted file mode 100644 index 64f22319b1e..00000000000 --- a/src/Elastic.Clients.Elasticsearch/Types/Bulk/ScriptedBulkUpdateBody.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. - -using System.Text.Json; - -namespace Elastic.Clients.Elasticsearch -{ - internal class ScriptedBulkUpdateBody : BulkUpdateBodyBase - { - public Script Script { get; set; } - - protected override void SerializeProperties(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (Script is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, Script, options); - } - } - } - - internal class ScriptedBulkUpdateBody : ScriptedBulkUpdateBody - { - public TDocument Upsert { get; set; } - - protected override void SerializeProperties(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (Script is not null) - { - writer.WritePropertyName("script"); - JsonSerializer.Serialize(writer, Script, options); - } - - if (Upsert is not null) - { - writer.WritePropertyName("upsert"); - SourceSerialisation.Serialize(Upsert, writer, settings.SourceSerializer); - } - } - } -} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkCreateOperation.cs b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkCreateOperation.cs new file mode 100644 index 00000000000..7282d0da7ca --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkCreateOperation.cs @@ -0,0 +1,127 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Threading.Tasks; + +namespace Elastic.Clients.Elasticsearch.Core.Bulk; + +/// +/// Represents a bulk operation to create a document. +/// +/// The type representing the document being created. +public sealed class BulkCreateOperation : BulkOperationBase +{ + /// + /// Creates an instance of with the provided document serialized + /// as source data. + /// + /// The document to index. + public BulkCreateOperation(T document) => Document = document; + + /// + /// Creates an instance of with the provided document serialized + /// as source data. + /// + /// When an is provided, even if the value is null, no further inference will occur. + /// Setting null using this overload is considered explicit intent not to set an index for the operation. In this case + /// it is expected that the bulk request will have defined an index to operate on. + /// + /// The document to index. + /// The which can represent an index, alias or data stream. + public BulkCreateOperation(T document, IndexName index) : this(document) => Index = index; + + /// + /// ID of the pipeline to use to preprocess incoming documents. + /// + [JsonPropertyName("pipeline")] + public string? Pipeline { get; set; } + + /// + /// A dictionary from the full name of fields to the name of dynamic templates. + /// If a name matches a dynamic template, then that template will be applied regardless of other match predicates + /// defined in the template. And if a field is already defined in the mapping, then this parameter won’t be used. + /// + [JsonPropertyName("dynamic_templates")] + public Dictionary? DynamicTemplates { get; set; } + + /// + protected override string Operation => "create"; + + /// + /// The source document. + /// + [JsonIgnore] + public T Document { get; set; } + + protected override Type ClrType => typeof(T); + + /// + protected override void Serialize(Stream stream, IElasticsearchClientSettings settings) + { + SetValues(settings); + using var writer = new Utf8JsonWriter(stream); + SerializeOperationAction(settings, writer); + writer.Flush(); + stream.WriteByte(SerializationConstants.Newline); + settings.SourceSerializer.Serialize(Document, stream); + } + + /// + protected override async Task SerializeAsync(Stream stream, IElasticsearchClientSettings settings) + { + SetValues(settings); + var writer = new Utf8JsonWriter(stream); + await using (writer.ConfigureAwait(false)) + { + SerializeOperationAction(settings, writer); + await writer.FlushAsync().ConfigureAwait(false); + stream.WriteByte(SerializationConstants.Newline); + await settings.SourceSerializer.SerializeAsync(Document, stream).ConfigureAwait(false); + } + } + + private void SetValues(IElasticsearchClientSettings settings) + { + // This allocates but avoids serialising "routing":null etc. into the operation action + // Unfortunately, the alternative is we always set to new Routing(Document) which is then + // never null even if the inferrer will be unable to return a value for the Routing during serialization + + if (settings.ExperimentalEnableSerializeNullInferredValues) + { + Routing ??= new Routing(Document); + } + else if (Routing is null) + { + var routing = new Routing(Document); + if (!string.IsNullOrEmpty(routing.GetString(settings))) + Routing = routing; + } + + if (settings.ExperimentalEnableSerializeNullInferredValues) + { + Id ??= new Id(Document); + } + else if (Id is null) + { + var id = new Id(Document); + if (!string.IsNullOrEmpty(id.GetString(settings))) + Id = id; + } + } + + private void SerializeOperationAction(IElasticsearchClientSettings settings, Utf8JsonWriter writer) + { + var requestResponseSerializer = settings.RequestResponseSerializer; + writer.WriteStartObject(); + writer.WritePropertyName(Operation); + requestResponseSerializer.TryGetJsonSerializerOptions(out var options); + JsonSerializer.Serialize>(writer, this, options); + writer.WriteEndObject(); + } +} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkCreateOperationDescriptor.cs b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkCreateOperationDescriptor.cs new file mode 100644 index 00000000000..5c3ff974c29 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkCreateOperationDescriptor.cs @@ -0,0 +1,80 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Elastic.Transport; + +namespace Elastic.Clients.Elasticsearch.Core.Bulk; + +public sealed class BulkCreateOperationDescriptor : BulkOperationDescriptorBase> +{ + private string _pipeline; + private Dictionary _dynamicTemplates; + + private static byte _newline => (byte)'\n'; + + private readonly TSource _document; + + public BulkCreateOperationDescriptor(TSource source) => _document = source; + + public BulkCreateOperationDescriptor(TSource source, IndexName index) : this(source) => IndexNameValue = index; + + public BulkCreateOperationDescriptor Pipeline(string pipeline) => Assign(pipeline, (a, v) => a._pipeline = v); + + public BulkCreateOperationDescriptor DynamicTemplates(Func, FluentDictionary> selector) => Assign(selector, (a, v) => a._dynamicTemplates = v?.Invoke(new FluentDictionary())); + + protected override string Operation => "create"; + + protected override Type ClrType => typeof(TSource); + + protected override void Serialize(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) + { + var requestResponseSerializer = settings.RequestResponseSerializer; + var internalWriter = new Utf8JsonWriter(stream); + internalWriter.WriteStartObject(); + internalWriter.WritePropertyName(Operation); + requestResponseSerializer.TryGetJsonSerializerOptions(out var options); + JsonSerializer.Serialize>(internalWriter, this, options); + internalWriter.WriteEndObject(); + internalWriter.Flush(); + stream.WriteByte(_newline); + settings.SourceSerializer.Serialize(GetBody(), stream); + } + + protected override async Task SerializeAsync(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting, CancellationToken cancellationToken = default) + { + var requestResponseSerializer = settings.RequestResponseSerializer; + var internalWriter = new Utf8JsonWriter(stream); + internalWriter.WriteStartObject(); + internalWriter.WritePropertyName(Operation); + requestResponseSerializer.TryGetJsonSerializerOptions(out var options); + JsonSerializer.Serialize>(internalWriter, this, options); + internalWriter.WriteEndObject(); + await internalWriter.FlushAsync().ConfigureAwait(false); + stream.WriteByte(_newline); + await settings.SourceSerializer.SerializeAsync(GetBody(), stream).ConfigureAwait(false); + } + + protected override void SerializeInternal(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + if (!string.IsNullOrEmpty(_pipeline)) + { + writer.WritePropertyName("pipeline"); + JsonSerializer.Serialize(writer, _pipeline, options); + } + + if (_dynamicTemplates is not null) + { + writer.WritePropertyName("dynamic_templates"); + JsonSerializer.Serialize(writer, _dynamicTemplates, options); + } + } + + protected override object GetBody() => _document; +} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkDeleteOperation.cs b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkDeleteOperation.cs new file mode 100644 index 00000000000..f4dc31b3f5c --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkDeleteOperation.cs @@ -0,0 +1,82 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. + +using System; +using System.IO; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Threading.Tasks; + +namespace Elastic.Clients.Elasticsearch.Core.Bulk; + +public class BulkDeleteOperation : BulkOperationBase +{ + public BulkDeleteOperation(Id id) => Id = id; + + protected override void Serialize(Stream stream, IElasticsearchClientSettings settings) + { + SetValues(settings); + using var writer = new Utf8JsonWriter(stream); + SerializeInternal(settings, writer); + writer.Flush(); + } + + protected override async Task SerializeAsync(Stream stream, IElasticsearchClientSettings settings) + { + SetValues(settings); + var writer = new Utf8JsonWriter(stream); + await using (writer.ConfigureAwait(false)) + { + SerializeInternal(settings, writer); + await writer.FlushAsync().ConfigureAwait(false); + } + } + + protected virtual void SetValues(IElasticsearchClientSettings settings) + { + } + + private void SerializeInternal(IElasticsearchClientSettings settings, Utf8JsonWriter writer) + { + var requestResponseSerializer = settings.RequestResponseSerializer; + writer.WriteStartObject(); + writer.WritePropertyName(Operation); + requestResponseSerializer.TryGetJsonSerializerOptions(out var options); + JsonSerializer.Serialize(writer, this, options); + writer.WriteEndObject(); + } + + protected override string Operation => "delete"; + + protected override Type ClrType => null; +} + +public sealed class BulkDeleteOperation : BulkDeleteOperation +{ + public BulkDeleteOperation(T document) : base (new Id(document)) + => Document = document; + + public BulkDeleteOperation(Id id) : base(id) { } + + [JsonIgnore] + public T Document { get; set; } + + protected override void SetValues(IElasticsearchClientSettings settings) + { + if (settings.ExperimentalEnableSerializeNullInferredValues) + { + Routing ??= new Routing(Document); + } + else if (Routing is null) + { + var routing = new Routing(Document); + if (!string.IsNullOrEmpty(routing.GetString(settings))) + Routing = routing; + } + + Index ??= typeof(T); + } + + protected override Type ClrType => typeof(T); +} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkDeleteOperationDescriptor.cs b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkDeleteOperationDescriptor.cs new file mode 100644 index 00000000000..070cc3414b6 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkDeleteOperationDescriptor.cs @@ -0,0 +1,62 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. + +using System; +using System.IO; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Elastic.Transport; + +namespace Elastic.Clients.Elasticsearch.Core.Bulk; + +public class BulkDeleteOperationDescriptor : BulkOperationDescriptorBase +{ + public BulkDeleteOperationDescriptor() { } + + public BulkDeleteOperationDescriptor(Id id) => Id(id); + + protected override string Operation => "delete"; + + protected override Type ClrType => null; + + protected override object GetBody() => null; + + protected override void Serialize(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) + { + var requestResponseSerializer = settings.RequestResponseSerializer; + var internalWriter = new Utf8JsonWriter(stream); + internalWriter.WriteStartObject(); + internalWriter.WritePropertyName(Operation); + requestResponseSerializer.TryGetJsonSerializerOptions(out var options); + JsonSerializer.Serialize(internalWriter, this, options); + internalWriter.WriteEndObject(); + internalWriter.Flush(); + } + + protected override async Task SerializeAsync(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting, CancellationToken cancellationToken = default) + { + var requestResponseSerializer = settings.RequestResponseSerializer; + var internalWriter = new Utf8JsonWriter(stream); + internalWriter.WriteStartObject(); + internalWriter.WritePropertyName(Operation); + requestResponseSerializer.TryGetJsonSerializerOptions(out var options); + JsonSerializer.Serialize(internalWriter, this, options); + internalWriter.WriteEndObject(); + await internalWriter.FlushAsync().ConfigureAwait(false); + } + + protected override void SerializeInternal(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + } +} + +public sealed class BulkDeleteOperationDescriptor : BulkDeleteOperationDescriptor +{ + public BulkDeleteOperationDescriptor(TDocument documentToDelete) : base (new Id(documentToDelete)) + { + RoutingValue = new Routing(documentToDelete); + IndexNameValue = IndexName.From(); + } +} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkIndexOperation.cs b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkIndexOperation.cs new file mode 100644 index 00000000000..8b77ae2241c --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkIndexOperation.cs @@ -0,0 +1,110 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Threading.Tasks; + +namespace Elastic.Clients.Elasticsearch.Core.Bulk; + +public sealed class BulkIndexOperation : BulkOperationBase +{ + /// + /// Creates an instance of with the provided document serialized + /// as source data. + /// + /// The document to index. + public BulkIndexOperation(T document) => Document = document; + + /// + /// Creates an instance of with the provided document serialized + /// as source data. + /// + /// When an is provided, even if the value is null, no further inference will occur. + /// Setting null using this overload is considered explicit intent not to set an index for the operation. In this case + /// it is expected that the bulk request will have defined an index to operate on. + /// + /// The document to index. + /// The which can represent an index, alias or data stream. + public BulkIndexOperation(T document, IndexName index) : this(document) => Index = index; + + [JsonPropertyName("pipeline")] + public string? Pipeline { get; set; } + + [JsonPropertyName("dynamic_templates")] + public Dictionary? DynamicTemplates { get; set; } + + [JsonIgnore] + public T Document { get; set; } + + protected override string Operation => "index"; + + protected override Type ClrType => typeof(T); + + private void SetValues(IElasticsearchClientSettings settings) + { + // This allocates but avoids serialising "routing":null etc. into the operation action + // Unfortunately, the alternative is we always set to new Routing(Document) which is then + // never null even if the inferrer will be unable to return a value for the Routing during serialization + + if (settings.ExperimentalEnableSerializeNullInferredValues) + { + Routing ??= new Routing(Document); + } + else if (Routing is null) + { + var routing = new Routing(Document); + if (!string.IsNullOrEmpty(routing.GetString(settings))) + Routing = routing; + } + + if (settings.ExperimentalEnableSerializeNullInferredValues) + { + Id ??= new Id(Document); + } + else if (Id is null) + { + var id = new Id(Document); + if (!string.IsNullOrEmpty(id.GetString(settings))) + Id = id; + } + } + + protected override void Serialize(Stream stream, IElasticsearchClientSettings settings) + { + SetValues(settings); + var writer = new Utf8JsonWriter(stream); + SerializeOperationAction(writer, settings); + writer.Flush(); + stream.WriteByte(SerializationConstants.Newline); + settings.SourceSerializer.Serialize(Document, stream); + } + + protected override async Task SerializeAsync(Stream stream, IElasticsearchClientSettings settings) + { + SetValues(settings); + var writer = new Utf8JsonWriter(stream); + await using (writer.ConfigureAwait(false)) + { + SerializeOperationAction(writer, settings); + await writer.FlushAsync().ConfigureAwait(false); + stream.WriteByte(SerializationConstants.Newline); + await settings.SourceSerializer.SerializeAsync(Document, stream).ConfigureAwait(false); + } + } + + private void SerializeOperationAction(Utf8JsonWriter writer, IElasticsearchClientSettings settings) + { + var requestResponseSerializer = settings.RequestResponseSerializer; + + writer.WriteStartObject(); + writer.WritePropertyName(Operation); + requestResponseSerializer.TryGetJsonSerializerOptions(out var options); + JsonSerializer.Serialize>(writer, this, options); + writer.WriteEndObject(); + } +} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkIndexOperationDescriptor.cs b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkIndexOperationDescriptor.cs new file mode 100644 index 00000000000..ba191710ee9 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkIndexOperationDescriptor.cs @@ -0,0 +1,87 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Elastic.Transport; + +namespace Elastic.Clients.Elasticsearch.Core.Bulk; + +public sealed class BulkIndexOperationDescriptor : BulkOperationDescriptorBase> +{ + private string _pipeline; + + private Dictionary _dynamicTemplates; + + private static byte _newline => (byte)'\n'; + + private readonly TSource _document; + + public BulkIndexOperationDescriptor(TSource source) => _document = source; + + public BulkIndexOperationDescriptor(TSource source, IndexName index) : this(source) => IndexNameValue = index; + + public BulkIndexOperationDescriptor Pipeline(string pipeline) => Assign(pipeline, (a, v) => a._pipeline = v); + + + public BulkIndexOperationDescriptor DynamicTemplates(Func, FluentDictionary> selector) => + Assign(selector, (a, v) => a._dynamicTemplates = v?.Invoke(new FluentDictionary())); + + protected override string Operation => "index"; + + protected override Type ClrType => typeof(TSource); + + protected override void Serialize(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) + { + var requestResponseSerializer = settings.RequestResponseSerializer; + var internalWriter = new Utf8JsonWriter(stream); + internalWriter.WriteStartObject(); + internalWriter.WritePropertyName(Operation); + requestResponseSerializer.TryGetJsonSerializerOptions(out var options); + JsonSerializer.Serialize>(internalWriter, this, options); + internalWriter.WriteEndObject(); + internalWriter.Flush(); + stream.WriteByte(_newline); + settings.SourceSerializer.Serialize(_document, stream); + } + + protected override async Task SerializeAsync(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting, CancellationToken cancellationToken = default) + { + var requestResponseSerializer = settings.RequestResponseSerializer; + var internalWriter = new Utf8JsonWriter(stream); + internalWriter.WriteStartObject(); + internalWriter.WritePropertyName(Operation); + requestResponseSerializer.TryGetJsonSerializerOptions(out var options); + JsonSerializer.Serialize>(internalWriter, this, options); + internalWriter.WriteEndObject(); + await internalWriter.FlushAsync().ConfigureAwait(false); + stream.WriteByte(_newline); + await settings.SourceSerializer.SerializeAsync(_document, stream).ConfigureAwait(false); + } + + protected override void SerializeInternal(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + if (!string.IsNullOrEmpty(_pipeline)) + { + writer.WritePropertyName("pipeline"); + JsonSerializer.Serialize(writer, _pipeline, options); + } + + if (_dynamicTemplates is not null) + { + writer.WritePropertyName("dynamic_templates"); + JsonSerializer.Serialize(writer, _dynamicTemplates, options); + } + } + + protected override object GetBody() => _document; + + protected override Id GetIdForOperation(Inferrer inferrer) => IdValue ?? new Id(_document); + + protected override Routing GetRoutingForOperation(Inferrer inferrer) => RoutingValue ?? new Routing(_document); +} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkOperationBase.cs b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkOperationBase.cs new file mode 100644 index 00000000000..175c2b516e2 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkOperationBase.cs @@ -0,0 +1,113 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. + +using System; +using System.IO; +using System.Text.Json.Serialization; +using System.Threading.Tasks; +using Elastic.Transport; + +namespace Elastic.Clients.Elasticsearch.Core.Bulk; + +/// +/// Provides the base class from which the classes that represent bulk operations are derived. +/// +/// +/// This is an abstract class. +/// +public abstract class BulkOperationBase : IBulkOperation, IStreamSerializable +{ + internal BulkOperationBase() { } + + /// + /// The document ID. + /// Required for update and delete operations. + /// Optional for create and index operations. If no ID is specified, a document ID is automatically generated. + /// + [JsonPropertyName("_id")] + public Id? Id { get; set; } + + /// + /// May be set as part of optimistic concurrency control to specify the operation applies only if the primary term matches. + /// + [JsonPropertyName("if_primary_term")] + public long? IfPrimaryTerm { get; set; } + + /// + /// May be set as part of optimistic concurrency control to specify the operation applies only if the sequence number matches. + /// + [JsonPropertyName("if_seq_no")] + public long? IfSequenceNumber { get; set; } + + /// + /// Name of the data stream, index, or index alias to perform the action on. + /// This parameter is required if a target index is not specified in the request path. + /// + [JsonPropertyName("_index")] + public IndexName? Index { get; set; } + + /// + /// If true, the operation action must target an index alias. Defaults to false. + /// + [JsonPropertyName("require_alias")] + public bool? RequireAlias { get; set; } + + /// + /// May be set to specify a custom routing value for the document. + /// + /// It automatically follows the behavior of the index/delete operation based on the _routing mapping + [JsonPropertyName("routing")] + public Routing? Routing { get; set; } + + /// + /// Each bulk operation can include the version value for the document. + /// + /// This automatically follows the behavior of the index/delete operation based on the _version mapping. + [JsonPropertyName("version")] + public long? Version { get; set; } + + /// + /// The version type for the document in the current operation. + /// + /// This automatically follows the behavior of the index/delete operation based on the _version mapping. + [JsonPropertyName("version_type")] + public VersionType? VersionType { get; set; } + + /// + /// The name for the bulk operation action. + /// + protected abstract string Operation { get; } + + protected abstract Type ClrType { get; } + + /// + /// Derived operations should override this control how the operation and its payload will be serialised into the HTTP request content . + /// This supports newline delimited JSON data. + /// + /// The writable stream for the HTTP request. + /// The for the current client instance. + protected abstract void Serialize(Stream stream, IElasticsearchClientSettings settings); + + /// + /// Derived operations should override this control how the operation and its payload will be asynchronously serialised into the HTTP request content . + /// This supports newline delimited JSON data. + /// + /// The writable stream for the HTTP request. + /// The for the current client instance. + protected abstract Task SerializeAsync(Stream stream, IElasticsearchClientSettings settings); + + void IBulkOperation.PrepareIndex(IndexName bulkRequestIndex) + { + Index ??= bulkRequestIndex ?? ClrType; + + if (bulkRequestIndex is not null && Index.Equals(bulkRequestIndex)) + Index = null; + } + + /// + void IStreamSerializable.Serialize(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) => Serialize(stream, settings); + + /// + Task IStreamSerializable.SerializeAsync(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) => SerializeAsync(stream, settings); +} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkOperationDescriptorBase.cs b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkOperationDescriptorBase.cs new file mode 100644 index 00000000000..803043bbbef --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkOperationDescriptorBase.cs @@ -0,0 +1,143 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. + +using System; +using System.IO; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Elastic.Transport; + +namespace Elastic.Clients.Elasticsearch.Core.Bulk; + +public abstract class BulkOperationDescriptorBase : SerializableDescriptorBase, IBulkOperation, IStreamSerializable where TDescriptor : BulkOperationDescriptorBase +{ + private long? _version; + private VersionType? _versionType; + private bool? _requireAlias; + + protected IndexName IndexNameValue { get; set; } + protected Id IdValue { get; set; } + protected Routing RoutingValue { get; set; } + protected long? IfSequenceNoValue { get; set; } + protected long? IfPrimaryTermValue { get; set; } + protected abstract string Operation { get; } + protected abstract Type ClrType { get; } + + public TDescriptor Id(Id id) => Assign(id, (a, v) => a.IdValue = v); + + public TDescriptor IfSequenceNumber(long? ifSequenceNumber) => Assign(ifSequenceNumber, (a, v) => a.IfSequenceNoValue = v); + + public TDescriptor IfPrimaryTerm(long? ifPrimaryTerm) => Assign(ifPrimaryTerm, (a, v) => a.IfPrimaryTermValue = v); + + public TDescriptor Index(IndexName index) => Assign(index, (a, v) => a.IndexNameValue = v); + + public TDescriptor Index() => Assign(typeof(T), (a, v) => a.IndexNameValue = v); + public TDescriptor RequireAlias(bool? requireAlias = true) => Assign(requireAlias, (a, v) => a._requireAlias = v); + + public TDescriptor Routing(Routing routing) => Assign(routing, (a, v) => a.RoutingValue = v); + + public TDescriptor Version(long version) => Assign(version, (a, v) => a._version = v); + + public TDescriptor VersionType(VersionType? versionType) => Assign(versionType, (a, v) => a._versionType = v); + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + IdValue = GetIdForOperation(settings.Inferrer); + RoutingValue = GetRoutingForOperation(settings.Inferrer); + + writer.WriteStartObject(); + + if (IdValue is not null) + { + // TODO - This flow is a bit inefficient and annoying just to get "clean" JSON + var id = IdValue.GetString(settings); + + if (!string.IsNullOrEmpty(id)) + { + writer.WritePropertyName("_id"); + writer.WriteStringValue(id); + } + } + + if (IfPrimaryTermValue.HasValue) + { + writer.WritePropertyName("if_primary_term"); + JsonSerializer.Serialize(writer, IfPrimaryTermValue.Value, options); + } + + if (IfSequenceNoValue.HasValue) + { + writer.WritePropertyName("if_seq_no"); + JsonSerializer.Serialize(writer, IfSequenceNoValue.Value, options); + } + + if (IndexNameValue is not null) + { + writer.WritePropertyName("_index"); + JsonSerializer.Serialize(writer, IndexNameValue, options); + } + + if (RoutingValue is not null) + { + // TODO - This flow is a bit inefficient and annoying just to get "clean" JSON + var value = RoutingValue.GetString(settings); + + if (!string.IsNullOrEmpty(value)) + { + writer.WritePropertyName("routing"); + writer.WriteStringValue(value); + } + } + + if (_requireAlias.HasValue) + { + writer.WritePropertyName("require_alias"); + JsonSerializer.Serialize(writer, _requireAlias.Value, options); + } + + if (_version.HasValue) + { + writer.WritePropertyName("version"); + JsonSerializer.Serialize(writer, _version.Value, options); + } + + if (_versionType.HasValue) + { + writer.WritePropertyName("version_type"); + JsonSerializer.Serialize(writer, _versionType.Value, options); + } + + SerializeInternal(writer, options, settings); + + writer.WriteEndObject(); + } + + /// + /// Must be overridden in derived operations to write their own properties to the . + /// + protected abstract void SerializeInternal(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings); + + protected abstract void Serialize(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting); + + protected abstract Task SerializeAsync(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting, CancellationToken cancellationToken = default); + + void IStreamSerializable.Serialize(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) => Serialize(stream, settings, formatting); + + Task IStreamSerializable.SerializeAsync(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) => SerializeAsync(stream, settings, formatting); + + protected abstract object GetBody(); + + protected virtual Id GetIdForOperation(Inferrer inferrer) => IdValue ?? new Id(GetBody()); + + protected virtual Routing GetRoutingForOperation(Inferrer inferrer) => RoutingValue ?? new Routing(GetBody()); + + void IBulkOperation.PrepareIndex(IndexName bulkRequestIndex) + { + IndexNameValue ??= bulkRequestIndex ?? ClrType; + + if (bulkRequestIndex is not null && IndexNameValue.Equals(bulkRequestIndex)) + IndexNameValue = null; + } +} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkOperationsCollection.cs b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkOperationsCollection.cs new file mode 100644 index 00000000000..f77c8ee8af4 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkOperationsCollection.cs @@ -0,0 +1,255 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using Elastic.Transport; + +namespace Elastic.Clients.Elasticsearch.Core.Bulk; + +///// +///// This class is used by which needs thread-safe adding , as well as expose +///// an equivalent of . Because operations from Elasticsearch are executed in order none of the types in +///// System.Collection.Concurrent can be used for this. We need to preserve insert order and exposed indexed index because +///// is ordered and lines up with allowing one to zip the two together. +///// +///// +public sealed class BulkOperationsCollection : IList, IList, IStreamSerializable +{ + private readonly object _lock = new(); + + public BulkOperationsCollection() => Items = new List(); + + public BulkOperationsCollection(IEnumerable operations) + { + Items = new List(); + Items.AddRange(operations); + } + + public int Count + { + get + { + lock (_lock) + return Items.Count; + } + } + + public IBulkOperation this[int index] + { + get + { + lock (_lock) + return Items[index]; + } + set + { + lock (_lock) + { + if (index < 0 || index >= Items.Count) + throw new ArgumentOutOfRangeException("index", index, $"value {index} must be in range of {Items.Count}"); + + Items[index] = value; + } + } + } + + bool IList.IsFixedSize => false; + + bool ICollection.IsReadOnly => false; + + bool IList.IsReadOnly => false; + + bool ICollection.IsSynchronized => true; + + object IList.this[int index] + { + get => this[index]; + set + { + VerifyValueType(value); + this[index] = (IBulkOperation)value; + } + } + + private List Items { get; } + + object ICollection.SyncRoot => _lock; + + void ICollection.CopyTo(Array array, int index) + { + lock (_lock) + ((IList)Items).CopyTo(array, index); + } + + public void Add(IBulkOperation item) + { + lock (_lock) + Items.Add(item); + } + + public void Clear() + { + lock (_lock) + Items.Clear(); + } + + public bool Contains(IBulkOperation item) + { + lock (_lock) + return Items.Contains(item); + } + + public void CopyTo(IBulkOperation[] array, int index) + { + lock (_lock) + Items.CopyTo(array, index); + } + + public bool Remove(IBulkOperation item) + { + lock (_lock) + { + var index = InternalIndexOf(item); + if (index < 0) + return false; + + RemoveItem(index); + return true; + } + } + + IEnumerator IEnumerable.GetEnumerator() => ((IList)Items).GetEnumerator(); + + public IEnumerator GetEnumerator() + { + lock (_lock) + return Items.GetEnumerator(); + } + + int IList.Add(object value) + { + VerifyValueType(value); + + lock (_lock) + { + Add((IBulkOperation)value); + return Count - 1; + } + } + + bool IList.Contains(object value) + { + VerifyValueType(value); + return Contains((IBulkOperation)value); + } + + int IList.IndexOf(object value) + { + VerifyValueType(value); + return IndexOf((IBulkOperation)value); + } + + void IList.Insert(int index, object value) + { + VerifyValueType(value); + Insert(index, (IBulkOperation)value); + } + + void IList.Remove(object value) + { + VerifyValueType(value); + Remove((IBulkOperation)value); + } + + public static implicit operator BulkOperationsCollection(List items) => new(items); + + public int IndexOf(IBulkOperation item) + { + lock (_lock) + return InternalIndexOf(item); + } + + public void Insert(int index, IBulkOperation item) + { + lock (_lock) + { + if (index < 0 || index > Items.Count) + throw new ArgumentOutOfRangeException("index", index, $"value {index} must be in range of {Items.Count}"); + + InsertItem(index, item); + } + } + + public void RemoveAt(int index) + { + lock (_lock) + { + if (index < 0 || index >= Items.Count) + throw new ArgumentOutOfRangeException("index", index, $"value {index} must be in range of {Items.Count}"); + + RemoveItem(index); + } + } + + public void AddRange(IEnumerable items) + { + lock (_lock) + Items.AddRange(items); + } + + private int InternalIndexOf(IBulkOperation item) + { + var count = Items.Count; + + for (var i = 0; i < count; i++) + { + if (Equals(Items[i], item)) + return i; + } + return -1; + } + + private void InsertItem(int index, IBulkOperation item) => Items.Insert(index, item); + + private void RemoveItem(int index) => Items.RemoveAt(index); + + private static void VerifyValueType(object value) + { + if (value == null) + { + if (typeof(IBulkOperation).IsValueType) + throw new ArgumentException("value is null and a value type"); + } + else if (value is not IBulkOperation) + throw new ArgumentException($"object is of type {value.GetType().FullName} but collection is of {typeof(IBulkOperation).FullName}"); + } + + public void Serialize(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting = SerializationFormatting.None) + { + foreach (var op in this) + { + if (op is not IStreamSerializable serializable) + throw new InvalidOperationException(""); + + serializable.Serialize(stream, settings, formatting); + stream.WriteByte((byte)'\n'); + } + } + + public async Task SerializeAsync(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting = SerializationFormatting.None) + { + foreach (var op in this) + { + if (op is not IStreamSerializable serializable) + throw new InvalidOperationException(""); + + await serializable.SerializeAsync(stream, settings, formatting).ConfigureAwait(false); + stream.WriteByte((byte)'\n'); + } + } +} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkResponseItemConverter.cs b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkResponseItemConverter.cs new file mode 100644 index 00000000000..eb58f505f30 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkResponseItemConverter.cs @@ -0,0 +1,66 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Core.Bulk; + +internal sealed class BulkResponseItemConverter : JsonConverter> +{ + public override IReadOnlyList? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + if (reader.TokenType != JsonTokenType.StartArray) + throw new JsonException($"Unexpected token in bulk response items. Read {reader.TokenType} but was expecting {JsonTokenType.StartArray}."); + + var responseItems = new List(); + + while (reader.Read() && reader.TokenType != JsonTokenType.EndArray) + { + if (reader.TokenType != JsonTokenType.StartObject) + throw new JsonException($"Unexpected token in bulk response items. Read {reader.TokenType} but was expecting {JsonTokenType.StartObject}."); + + reader.Read(); + + if (reader.TokenType != JsonTokenType.PropertyName) + throw new JsonException($"Unexpected token in bulk response items. Read {reader.TokenType} but was expecting {JsonTokenType.PropertyName}."); + + BulkResponseItemBase responseItem; + + if (reader.ValueTextEquals("index")) + { + responseItem = JsonSerializer.Deserialize(ref reader, options); + } + else if (reader.ValueTextEquals("delete")) + { + responseItem = JsonSerializer.Deserialize(ref reader, options); + } + else if (reader.ValueTextEquals("create")) + { + responseItem = JsonSerializer.Deserialize(ref reader, options); + } + else if (reader.ValueTextEquals("update")) + { + responseItem = JsonSerializer.Deserialize(ref reader, options); + } + else + { + throw new JsonException("Unexpected operation type in bulk response items."); + } + + responseItems.Add(responseItem); + + reader.Read(); + + if (reader.TokenType != JsonTokenType.EndObject) + throw new JsonException($"Unexpected token in bulk response items. Read {reader.TokenType} but was expecting {JsonTokenType.EndObject}."); + } + + return responseItems; + } + + public override void Write(Utf8JsonWriter writer, IReadOnlyList value, JsonSerializerOptions options) => throw new NotImplementedException(); +} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkUpdateBody.cs b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkUpdateBody.cs new file mode 100644 index 00000000000..dcf51939355 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkUpdateBody.cs @@ -0,0 +1,62 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. + +using System.Text.Json; +using Elastic.Clients.Elasticsearch.Core.Search; + +namespace Elastic.Clients.Elasticsearch.Core.Bulk; + +internal class BulkUpdateBody : BulkUpdateBodyBase +{ + public bool? DocAsUpsert { get; set; } + + public TPartialUpdate PartialUpdate { get; set; } + + public Script Script { get; set; } + + public bool? ScriptedUpsert { get; set; } + + public TDocument Upsert { get; set; } + + public Union Source { get; set; } + + protected override void SerializeProperties(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + if (PartialUpdate is not null) + { + writer.WritePropertyName("doc"); + SourceSerialisation.Serialize(PartialUpdate, writer, settings.SourceSerializer); + } + + if (Script is not null) + { + writer.WritePropertyName("script"); + JsonSerializer.Serialize(writer, Script, options); + } + + if (ScriptedUpsert.HasValue) + { + writer.WritePropertyName("scripted_upsert"); + JsonSerializer.Serialize(writer, ScriptedUpsert.Value, options); + } + + if (DocAsUpsert.HasValue) + { + writer.WritePropertyName("doc_as_upsert"); + JsonSerializer.Serialize(writer, DocAsUpsert.Value, options); + } + + if (Upsert is not null) + { + writer.WritePropertyName("upsert"); + SourceSerialisation.Serialize(Upsert, writer, settings.SourceSerializer); + } + + if (Source is not null) + { + writer.WritePropertyName("_source"); + JsonSerializer.Serialize(writer, Source, options); + } + } +} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkUpdateBodyBase.cs b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkUpdateBodyBase.cs new file mode 100644 index 00000000000..76f1ed2267f --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkUpdateBodyBase.cs @@ -0,0 +1,37 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. + +using System.Text.Json; + +namespace Elastic.Clients.Elasticsearch.Core.Bulk; + +internal abstract class BulkUpdateBodyBase : ISelfSerializable +{ + public long? IfSequenceNumber { get; set; } + + public long? IfPrimaryTerm { get; set; } + + protected abstract void SerializeProperties(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings); + + void ISelfSerializable.Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + + if (IfSequenceNumber.HasValue) + { + writer.WritePropertyName("if_seq_no"); + writer.WriteNumberValue(IfSequenceNumber.Value); + } + + if (IfPrimaryTerm.HasValue) + { + writer.WritePropertyName("if_primary_term"); + writer.WriteNumberValue(IfPrimaryTerm.Value); + } + + SerializeProperties(writer, options, settings); + + writer.WriteEndObject(); + } +} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkUpdateOperation.cs b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkUpdateOperation.cs similarity index 97% rename from src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkUpdateOperation.cs rename to src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkUpdateOperation.cs index b26cc83b04d..02c66ba5340 100644 --- a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkUpdateOperation.cs +++ b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkUpdateOperation.cs @@ -7,8 +7,9 @@ using System.Linq; using System.Text.Json; using System.Text.Json.Serialization; +using Elastic.Clients.Elasticsearch.Core.Search; -namespace Elastic.Clients.Elasticsearch; +namespace Elastic.Clients.Elasticsearch.Core.Bulk; public sealed class BulkUpdateOperation : BulkUpdateOperationBase { diff --git a/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkUpdateOperationBase.cs b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkUpdateOperationBase.cs new file mode 100644 index 00000000000..d46ab245c80 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkUpdateOperationBase.cs @@ -0,0 +1,137 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. + +using System.IO; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Threading; +using System.Threading.Tasks; +using Elastic.Transport; + +namespace Elastic.Clients.Elasticsearch.Core.Bulk; + +public abstract class BulkUpdateOperationBase : BulkOperationBase +{ + protected internal BulkUpdateOperationBase() : base() { } + + private static byte _newline => (byte)'\n'; + + [JsonPropertyName("retry_on_conflict")] + public bool? RetryOnConflict { get; set; } + + protected override string Operation => "update"; + + protected abstract void BeforeSerialize(IElasticsearchClientSettings settings); + + /// + /// Serialise the operation action line for the NDJSON stream. + /// + /// + /// + protected abstract void WriteOperation(Utf8JsonWriter writer, JsonSerializerOptions options = null); + + protected override void Serialize(Stream stream, IElasticsearchClientSettings settings) + { + BeforeSerialize(settings); + + var requestResponseSerializer = settings.RequestResponseSerializer; + + var internalWriter = new Utf8JsonWriter(stream); + + internalWriter.WriteStartObject(); + internalWriter.WritePropertyName(Operation); + requestResponseSerializer.TryGetJsonSerializerOptions(out var options); + WriteOperation(internalWriter, options); + internalWriter.WriteEndObject(); + internalWriter.Flush(); + + stream.WriteByte(_newline); + + var body = GetBody(); + settings.RequestResponseSerializer.Serialize(body, stream); + stream.Flush(); + } + + protected override async Task SerializeAsync(Stream stream, IElasticsearchClientSettings settings) + { + BeforeSerialize(settings); + + var internalWriter = new Utf8JsonWriter(stream); + SerializeOperationAction(settings, internalWriter); + internalWriter.Flush(); + + stream.WriteByte(_newline); + + var body = GetBody(); + await settings.RequestResponseSerializer.SerializeAsync(body, stream).ConfigureAwait(false); + await stream.FlushAsync().ConfigureAwait(false); + } + + private void SerializeOperationAction(IElasticsearchClientSettings settings, Utf8JsonWriter writer) + { + var requestResponseSerializer = settings.RequestResponseSerializer; + writer.WriteStartObject(); + writer.WritePropertyName(Operation); + requestResponseSerializer.TryGetJsonSerializerOptions(out var options); + WriteOperation(writer, options); + writer.WriteEndObject(); + } + + protected abstract object GetBody(); +} + +public abstract class BulkUpdateOperationDescriptorBase : BulkOperationDescriptorBase> +{ + private static byte _newline => (byte)'\n'; + + protected override string Operation => "update"; + + protected abstract void BeforeSerialize(IElasticsearchClientSettings settings); + + protected abstract void WriteOperation(Utf8JsonWriter writer, JsonSerializerOptions options = null); + + protected override void Serialize(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting = SerializationFormatting.None) + { + BeforeSerialize(settings); + + var requestResponseSerializer = settings.RequestResponseSerializer; + + var internalWriter = new Utf8JsonWriter(stream); + + internalWriter.WriteStartObject(); + internalWriter.WritePropertyName(Operation); + requestResponseSerializer.TryGetJsonSerializerOptions(out var options); + WriteOperation(internalWriter, options); + internalWriter.WriteEndObject(); + internalWriter.Flush(); + + stream.WriteByte(_newline); + var body = GetBody(); + settings.RequestResponseSerializer.Serialize(body, stream, formatting); + } + + protected override async Task SerializeAsync(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting, CancellationToken cancellationToken = default) + { + BeforeSerialize(settings); + + var requestResponseSerializer = settings.RequestResponseSerializer; + + var internalWriter = new Utf8JsonWriter(stream); + + internalWriter.WriteStartObject(); + internalWriter.WritePropertyName(Operation); + + requestResponseSerializer.TryGetJsonSerializerOptions(out var options); + WriteOperation(internalWriter, options); + + internalWriter.WriteEndObject(); + internalWriter.Flush(); + + stream.WriteByte(_newline); + + var body = GetBody(); + + await settings.SourceSerializer.SerializeAsync(body, stream, formatting).ConfigureAwait(false); + } +} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkUpdateOperationDescriptor.cs b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkUpdateOperationDescriptor.cs similarity index 98% rename from src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkUpdateOperationDescriptor.cs rename to src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkUpdateOperationDescriptor.cs index 786988de430..cf34b9389c1 100644 --- a/src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkUpdateOperationDescriptor.cs +++ b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkUpdateOperationDescriptor.cs @@ -9,8 +9,9 @@ using System.Threading; using System.Threading.Tasks; using Elastic.Transport; +using Elastic.Clients.Elasticsearch.Core.Search; -namespace Elastic.Clients.Elasticsearch; +namespace Elastic.Clients.Elasticsearch.Core.Bulk; public sealed class BulkUpdateOperationDescriptor : BulkOperationDescriptorBase> { diff --git a/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkUpdateOperationWithPartial.cs b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkUpdateOperationWithPartial.cs new file mode 100644 index 00000000000..b36d558ed08 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkUpdateOperationWithPartial.cs @@ -0,0 +1,43 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Core.Bulk; + +public sealed class BulkUpdateOperationWithPartial : BulkUpdateOperationBase +{ + public BulkUpdateOperationWithPartial(Id id, TPartialDocument partialDocument) + { + Id = id; + PartialDocument = partialDocument; + } + + public BulkUpdateOperationWithPartial(Id id, IndexName index, TPartialDocument partialDocument) + { + Id = id; + Index = index; + PartialDocument = partialDocument; + } + + [JsonIgnore] + public TPartialDocument PartialDocument { get; set; } + + protected override Type ClrType => null; + + protected override string Operation => "update"; + + protected override void BeforeSerialize(IElasticsearchClientSettings settings) + { + if (Index is null) + Index = settings.Inferrer.IndexName(); + } + + protected override void WriteOperation(Utf8JsonWriter writer, JsonSerializerOptions options = null) => + JsonSerializer.Serialize>(writer, this, options); + + protected override object GetBody() => new PartialBulkUpdateBody { PartialUpdate = PartialDocument }; +} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkUpdateOperationWithScript.cs b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkUpdateOperationWithScript.cs new file mode 100644 index 00000000000..12eac78e9e9 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/BulkUpdateOperationWithScript.cs @@ -0,0 +1,52 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Core.Bulk; + +public class BulkUpdateOperationWithScript : BulkUpdateOperationBase +{ + public BulkUpdateOperationWithScript(Id id, Script script) + { + Id = id; + Script = script; + } + + public BulkUpdateOperationWithScript(Id id, IndexName index, Script script) + { + Id = id; + Index = index; + Script = script; + } + + [JsonIgnore] + public Script Script { get; set; } + + protected override string Operation => "update"; + + protected override Type ClrType => null; + + protected override void BeforeSerialize(IElasticsearchClientSettings settings) + { + } + + protected override void WriteOperation(Utf8JsonWriter writer, JsonSerializerOptions options = null) => JsonSerializer.Serialize(writer, this, options); + + protected override object GetBody() => new ScriptedBulkUpdateBody { Script = Script }; +} + +public sealed class BulkUpdateOperationWithScript : BulkUpdateOperationWithScript +{ + public BulkUpdateOperationWithScript(TDocument upsert, Id id, Script script) : base(id, script) => Upsert = upsert; + + public BulkUpdateOperationWithScript(TDocument upsert, Id id, IndexName index, Script script) : base(id, index, script) => Upsert = upsert; + + [JsonIgnore] + public TDocument Upsert { get; set; } + + protected override object GetBody() => new ScriptedBulkUpdateBody { Script = Script, Upsert = Upsert }; +} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/IBulkOperation.cs b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/IBulkOperation.cs new file mode 100644 index 00000000000..ed6e49ba40c --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/IBulkOperation.cs @@ -0,0 +1,14 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. + +namespace Elastic.Clients.Elasticsearch.Core.Bulk; + +/// +/// Marker interface for types that can be serialised as an operation of a bulk API request. +/// +/// Allows objects and descriptors to be stored in the same . +public interface IBulkOperation +{ + void PrepareIndex(IndexName bulkRequestIndex); +} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/PartialBulkUpdateBody.cs b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/PartialBulkUpdateBody.cs new file mode 100644 index 00000000000..8e317df6e58 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/PartialBulkUpdateBody.cs @@ -0,0 +1,29 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. + +using System.Text.Json; + +namespace Elastic.Clients.Elasticsearch.Core.Bulk; + +internal class PartialBulkUpdateBody : BulkUpdateBodyBase +{ + public bool? DocAsUpsert { get; set; } + + public TPartialUpdate PartialUpdate { get; set; } + + protected override void SerializeProperties(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + if (DocAsUpsert.HasValue) + { + writer.WritePropertyName("doc_as_upsert"); + writer.WriteBooleanValue(DocAsUpsert.Value); + } + + if (PartialUpdate is not null) + { + writer.WritePropertyName("doc"); + SourceSerialisation.Serialize(PartialUpdate, writer, settings.SourceSerializer); + } + } +} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Bulk/Response/BulkCreateResponseItem.cs b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/Response/BulkCreateResponseItem.cs similarity index 56% rename from src/Elastic.Clients.Elasticsearch/Types/Bulk/Response/BulkCreateResponseItem.cs rename to src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/Response/BulkCreateResponseItem.cs index ea2862d73f9..f52006b0ff8 100644 --- a/src/Elastic.Clients.Elasticsearch/Types/Bulk/Response/BulkCreateResponseItem.cs +++ b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/Response/BulkCreateResponseItem.cs @@ -2,10 +2,9 @@ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information. -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Bulk; + +public sealed class CreateResponseItem : BulkResponseItemBase { - public sealed class CreateResponseItem : BulkResponseItemBase - { - public override string Operation => "create"; - } + public override string Operation => "create"; } diff --git a/src/Elastic.Clients.Elasticsearch/Types/Bulk/Response/BulkIndexResponseItem.cs b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/Response/BulkDeleteResponseItem.cs similarity index 56% rename from src/Elastic.Clients.Elasticsearch/Types/Bulk/Response/BulkIndexResponseItem.cs rename to src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/Response/BulkDeleteResponseItem.cs index 2bad8821e6e..bd5aa12751c 100644 --- a/src/Elastic.Clients.Elasticsearch/Types/Bulk/Response/BulkIndexResponseItem.cs +++ b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/Response/BulkDeleteResponseItem.cs @@ -2,10 +2,9 @@ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information. -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Bulk; + +public sealed class BulkDeleteResponseItem : BulkResponseItemBase { - public sealed class BulkIndexResponseItem : BulkResponseItemBase - { - public override string Operation => "index"; - } + public override string Operation => "delete"; } diff --git a/src/Elastic.Clients.Elasticsearch/Types/Bulk/Response/BulkUpdateResponseItem.cs b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/Response/BulkIndexResponseItem.cs similarity index 56% rename from src/Elastic.Clients.Elasticsearch/Types/Bulk/Response/BulkUpdateResponseItem.cs rename to src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/Response/BulkIndexResponseItem.cs index 0974ae5b482..4c949cb257f 100644 --- a/src/Elastic.Clients.Elasticsearch/Types/Bulk/Response/BulkUpdateResponseItem.cs +++ b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/Response/BulkIndexResponseItem.cs @@ -2,10 +2,9 @@ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information. -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Bulk; + +public sealed class BulkIndexResponseItem : BulkResponseItemBase { - public sealed class BulkUpdateResponseItem : BulkResponseItemBase - { - public override string Operation => "update"; - } + public override string Operation => "index"; } diff --git a/src/Elastic.Clients.Elasticsearch/Types/Bulk/Response/BulkDeleteResponseItem.cs b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/Response/BulkUpdateResponseItem.cs similarity index 56% rename from src/Elastic.Clients.Elasticsearch/Types/Bulk/Response/BulkDeleteResponseItem.cs rename to src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/Response/BulkUpdateResponseItem.cs index 489b2395a52..7e6b22a5b8c 100644 --- a/src/Elastic.Clients.Elasticsearch/Types/Bulk/Response/BulkDeleteResponseItem.cs +++ b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/Response/BulkUpdateResponseItem.cs @@ -2,10 +2,9 @@ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information. -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Bulk; + +public sealed class BulkUpdateResponseItem : BulkResponseItemBase { - public sealed class BulkDeleteResponseItem : BulkResponseItemBase - { - public override string Operation => "delete"; - } + public override string Operation => "update"; } diff --git a/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/ScriptedBulkUpdateBody.cs b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/ScriptedBulkUpdateBody.cs new file mode 100644 index 00000000000..18801c1401d --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/Types/Core/Bulk/ScriptedBulkUpdateBody.cs @@ -0,0 +1,41 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. + +using System.Text.Json; + +namespace Elastic.Clients.Elasticsearch.Core.Bulk; + +internal class ScriptedBulkUpdateBody : BulkUpdateBodyBase +{ + public Script Script { get; set; } + + protected override void SerializeProperties(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + if (Script is not null) + { + writer.WritePropertyName("script"); + JsonSerializer.Serialize(writer, Script, options); + } + } +} + +internal class ScriptedBulkUpdateBody : ScriptedBulkUpdateBody +{ + public TDocument Upsert { get; set; } + + protected override void SerializeProperties(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + if (Script is not null) + { + writer.WritePropertyName("script"); + JsonSerializer.Serialize(writer, Script, options); + } + + if (Upsert is not null) + { + writer.WritePropertyName("upsert"); + SourceSerialisation.Serialize(Upsert, writer, settings.SourceSerializer); + } + } +} diff --git a/src/Elastic.Clients.Elasticsearch/Types/Documents/MultiSearch/MultiSearchRequest.cs b/src/Elastic.Clients.Elasticsearch/Types/Documents/MultiSearch/MultiSearchRequest.cs index c8a1b0888ae..fe259c73dfa 100644 --- a/src/Elastic.Clients.Elasticsearch/Types/Documents/MultiSearch/MultiSearchRequest.cs +++ b/src/Elastic.Clients.Elasticsearch/Types/Documents/MultiSearch/MultiSearchRequest.cs @@ -2,79 +2,30 @@ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information. -using System.Collections.Generic; -using System.IO; using System.Linq; -using System.Text.Json; using System.Text.Json.Serialization; -using System.Threading.Tasks; -using Elastic.Transport; -namespace Elastic.Clients.Elasticsearch -{ - public sealed partial class MultiSearchRequestDescriptor - { - internal override void BeforeRequest() => TypedKeys(true); - } - - public sealed partial class MultiSearchRequestDescriptor - { - internal override void BeforeRequest() => TypedKeys(true); - } - - public partial class MultiSearchRequest - { - internal override void BeforeRequest() => TypedKeys = true; - } - - // POC - If we have more than one union doing this, can we autogenerate with correct ctors etc. - public class SearchRequestItem : IStreamSerializable - { - public SearchRequestItem(MultisearchBody body) => Body = body; - - public SearchRequestItem(MultisearchHeader header, MultisearchBody body) - { - Header = header; - Body = body; - } - - public MultisearchHeader Header { get; init; } - public MultisearchBody Body { get; init; } - - void IStreamSerializable.Serialize(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) - { - if (Body is null) - return; +namespace Elastic.Clients.Elasticsearch; - if (settings.RequestResponseSerializer.TryGetJsonSerializerOptions(out var options)) - { - JsonSerializer.Serialize(stream, Header, options); - stream.WriteByte((byte)'\n'); - JsonSerializer.Serialize(stream, Body, options); - stream.WriteByte((byte)'\n'); - } - } +public partial class MultiSearchResponse +{ + public override bool IsValid => base.IsValid && (Responses?.All(b => b.Item1 is not null && b.Item1.Status == 200) ?? true); - async Task IStreamSerializable.SerializeAsync(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) - { - if (Body is null) - return; + [JsonIgnore] + public int TotalResponses => Responses.HasAny() ? Responses.Count() : 0; +} - if (settings.RequestResponseSerializer.TryGetJsonSerializerOptions(out var options)) - { - await JsonSerializer.SerializeAsync(stream, Header, options).ConfigureAwait(false); - stream.WriteByte((byte)'\n'); - await JsonSerializer.SerializeAsync(stream, Body, options).ConfigureAwait(false); - stream.WriteByte((byte)'\n'); - } - } - } +public sealed partial class MultiSearchRequestDescriptor +{ + internal override void BeforeRequest() => TypedKeys(true); +} - public partial class MultiSearchResponse - { - public override bool IsValid => base.IsValid && (Responses?.All(b => b.Item1 is not null && b.Item1.Status == 200) ?? true); +public sealed partial class MultiSearchRequestDescriptor +{ + internal override void BeforeRequest() => TypedKeys(true); +} - [JsonIgnore] - public int TotalResponses => Responses.HasAny() ? Responses.Count() : 0; - } +public partial class MultiSearchRequest +{ + internal override void BeforeRequest() => TypedKeys = true; } diff --git a/src/Elastic.Clients.Elasticsearch/Types/Documents/MultiSearch/SearchRequestItem.cs b/src/Elastic.Clients.Elasticsearch/Types/Documents/MultiSearch/SearchRequestItem.cs new file mode 100644 index 00000000000..b6c1cc2e58a --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/Types/Documents/MultiSearch/SearchRequestItem.cs @@ -0,0 +1,56 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. + +using System.IO; +using System.Text.Json; +using System.Threading.Tasks; +using Elastic.Transport; + +namespace Elastic.Clients.Elasticsearch.Core.MSearch +{ + // POC - If we have more than one union doing this, can we autogenerate with correct ctors etc. + public class SearchRequestItem : IStreamSerializable + { + public SearchRequestItem(MultisearchBody body) => Body = body; + + public SearchRequestItem(MultisearchHeader header, MultisearchBody body) + { + Header = header; + Body = body; + } + + public MultisearchHeader Header { get; init; } + public MultisearchBody Body { get; init; } + + void IStreamSerializable.Serialize(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) + { + if (Body is null) + return; + + if (settings.RequestResponseSerializer.TryGetJsonSerializerOptions(out var options)) + { + JsonSerializer.Serialize(stream, Header, options); + stream.WriteByte((byte)'\n'); + JsonSerializer.Serialize(stream, Body, options); + stream.WriteByte((byte)'\n'); + } + } + + async Task IStreamSerializable.SerializeAsync(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) + { + if (Body is null) + return; + + if (settings.RequestResponseSerializer.TryGetJsonSerializerOptions(out var options)) + { + await JsonSerializer.SerializeAsync(stream, Header, options).ConfigureAwait(false); + stream.WriteByte((byte)'\n'); + await JsonSerializer.SerializeAsync(stream, Body, options).ConfigureAwait(false); + stream.WriteByte((byte)'\n'); + } + } + } +} + + diff --git a/src/Elastic.Clients.Elasticsearch/Types/MultiSearchItem.cs b/src/Elastic.Clients.Elasticsearch/Types/MultiSearchItem.cs index bb0ab128deb..250950cc9fc 100644 --- a/src/Elastic.Clients.Elasticsearch/Types/MultiSearchItem.cs +++ b/src/Elastic.Clients.Elasticsearch/Types/MultiSearchItem.cs @@ -6,12 +6,12 @@ using System.Linq; using System.Text.Json.Serialization; -namespace Elastic.Clients.Elasticsearch; +namespace Elastic.Clients.Elasticsearch.Core.MSearch; public partial class MultiSearchItem { [JsonIgnore] - public IReadOnlyCollection> Hits => HitsMetadata.Hits; + public IReadOnlyCollection> Hits => HitsMetadata.Hits; [JsonIgnore] public IReadOnlyCollection Documents => HitsMetadata.Hits.Select(s => s.Source).ToReadOnlyCollection(); diff --git a/src/Elastic.Clients.Elasticsearch/Types/PointInTimeReferenceDescriptor.cs b/src/Elastic.Clients.Elasticsearch/Types/PointInTimeReferenceDescriptor.cs index efff7d7cf11..f711badc726 100644 --- a/src/Elastic.Clients.Elasticsearch/Types/PointInTimeReferenceDescriptor.cs +++ b/src/Elastic.Clients.Elasticsearch/Types/PointInTimeReferenceDescriptor.cs @@ -2,7 +2,7 @@ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information. -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class PointInTimeReferenceDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/Types/SourceConfig.cs b/src/Elastic.Clients.Elasticsearch/Types/SourceConfig.cs index 637d9f46a7d..d041d9ef321 100644 --- a/src/Elastic.Clients.Elasticsearch/Types/SourceConfig.cs +++ b/src/Elastic.Clients.Elasticsearch/Types/SourceConfig.cs @@ -7,7 +7,7 @@ using System.Text.Json; using System.Text.Json.Serialization; -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { [JsonConverter(typeof(SourceConfigConverter))] public partial class SourceConfig diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchSubmitRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchSubmitRequest.g.cs index b6792cfaf38..b9ed8e9642a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchSubmitRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchSubmitRequest.g.cs @@ -144,7 +144,7 @@ public override AsyncSearchSubmitRequest Read(ref Utf8JsonReader reader, Type ty if (property == "collapse") { - variant.Collapse = JsonSerializer.Deserialize(ref reader, options); + variant.Collapse = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -168,13 +168,13 @@ public override AsyncSearchSubmitRequest Read(ref Utf8JsonReader reader, Type ty if (property == "highlight") { - variant.Highlight = JsonSerializer.Deserialize(ref reader, options); + variant.Highlight = JsonSerializer.Deserialize(ref reader, options); continue; } if (property == "track_total_hits") { - variant.TrackTotalHits = JsonSerializer.Deserialize(ref reader, options); + variant.TrackTotalHits = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -222,7 +222,7 @@ public override AsyncSearchSubmitRequest Read(ref Utf8JsonReader reader, Type ty if (property == "rescore") { - variant.Rescore = JsonSerializer.Deserialize?>(ref reader, options); + variant.Rescore = JsonSerializer.Deserialize?>(ref reader, options); continue; } @@ -258,7 +258,7 @@ public override AsyncSearchSubmitRequest Read(ref Utf8JsonReader reader, Type ty if (property == "_source") { - variant.Source = JsonSerializer.Deserialize(ref reader, options); + variant.Source = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -270,7 +270,7 @@ public override AsyncSearchSubmitRequest Read(ref Utf8JsonReader reader, Type ty if (property == "suggest") { - variant.Suggest = JsonSerializer.Deserialize(ref reader, options); + variant.Suggest = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -312,7 +312,7 @@ public override AsyncSearchSubmitRequest Read(ref Utf8JsonReader reader, Type ty if (property == "pit") { - variant.Pit = JsonSerializer.Deserialize(ref reader, options); + variant.Pit = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -648,7 +648,7 @@ public AsyncSearchSubmitRequest(Elastic.Clients.Elasticsearch.Indices? indices) [JsonInclude] [JsonPropertyName("collapse")] - public Elastic.Clients.Elasticsearch.FieldCollapse? Collapse { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? Collapse { get; set; } [JsonInclude] [JsonPropertyName("explain")] @@ -664,11 +664,11 @@ public AsyncSearchSubmitRequest(Elastic.Clients.Elasticsearch.Indices? indices) [JsonInclude] [JsonPropertyName("highlight")] - public Elastic.Clients.Elasticsearch.Highlight? Highlight { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.Highlight? Highlight { get; set; } [JsonInclude] [JsonPropertyName("track_total_hits")] - public Elastic.Clients.Elasticsearch.TrackHits? TrackTotalHits { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.TrackHits? TrackTotalHits { get; set; } [JsonInclude] [JsonPropertyName("indices_boost")] @@ -700,7 +700,7 @@ public AsyncSearchSubmitRequest(Elastic.Clients.Elasticsearch.Indices? indices) [JsonInclude] [JsonPropertyName("rescore")] - public IEnumerable? Rescore { get; set; } + public IEnumerable? Rescore { get; set; } [JsonInclude] [JsonPropertyName("script_fields")] @@ -725,7 +725,7 @@ public AsyncSearchSubmitRequest(Elastic.Clients.Elasticsearch.Indices? indices) [JsonInclude] [JsonPropertyName("_source")] - public Elastic.Clients.Elasticsearch.SourceConfig? Source { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? Source { get; set; } [JsonInclude] [JsonPropertyName("fields")] @@ -733,7 +733,7 @@ public AsyncSearchSubmitRequest(Elastic.Clients.Elasticsearch.Indices? indices) [JsonInclude] [JsonPropertyName("suggest")] - public Elastic.Clients.Elasticsearch.Suggester? Suggest { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.Suggester? Suggest { get; set; } [JsonInclude] [JsonPropertyName("terminate_after")] @@ -761,7 +761,7 @@ public AsyncSearchSubmitRequest(Elastic.Clients.Elasticsearch.Indices? indices) [JsonInclude] [JsonPropertyName("pit")] - public Elastic.Clients.Elasticsearch.PointInTimeReference? Pit { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? Pit { get; set; } [JsonInclude] [JsonPropertyName("runtime_mappings")] @@ -833,11 +833,11 @@ public AsyncSearchSubmitRequestDescriptor Indices(Elastic.Clients.Ela private Action> AggregationsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.FieldCollapse? CollapseValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? CollapseValue { get; set; } - private FieldCollapseDescriptor CollapseDescriptor { get; set; } + private Core.Search.FieldCollapseDescriptor CollapseDescriptor { get; set; } - private Action> CollapseDescriptorAction { get; set; } + private Action> CollapseDescriptorAction { get; set; } private IEnumerable? DocvalueFieldsValue { get; set; } @@ -855,11 +855,11 @@ public AsyncSearchSubmitRequestDescriptor Indices(Elastic.Clients.Ela private Action>[] FieldsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Highlight? HighlightValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.Highlight? HighlightValue { get; set; } - private HighlightDescriptor HighlightDescriptor { get; set; } + private Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } - private Action> HighlightDescriptorAction { get; set; } + private Action> HighlightDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.KnnQuery? KnnValue { get; set; } @@ -879,13 +879,13 @@ public AsyncSearchSubmitRequestDescriptor Indices(Elastic.Clients.Ela private Action> QueryDescriptorAction { get; set; } - private IEnumerable? RescoreValue { get; set; } + private IEnumerable? RescoreValue { get; set; } - private RescoreDescriptor RescoreDescriptor { get; set; } + private Core.Search.RescoreDescriptor RescoreDescriptor { get; set; } - private Action> RescoreDescriptorAction { get; set; } + private Action> RescoreDescriptorAction { get; set; } - private Action>[] RescoreDescriptorActions { get; set; } + private Action>[] RescoreDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.SlicedScroll? SliceValue { get; set; } @@ -893,7 +893,7 @@ public AsyncSearchSubmitRequestDescriptor Indices(Elastic.Clients.Ela private Action> SliceDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.SourceConfig? SourceValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? SourceValue { get; set; } private bool? ExplainValue { get; set; } @@ -905,11 +905,11 @@ public AsyncSearchSubmitRequestDescriptor Indices(Elastic.Clients.Ela private double? MinScoreValue { get; set; } - private Elastic.Clients.Elasticsearch.PointInTimeReference? PitValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? PitValue { get; set; } - private PointInTimeReferenceDescriptor PitDescriptor { get; set; } + private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } - private Action PitDescriptorAction { get; set; } + private Action PitDescriptorAction { get; set; } private bool? ProfileValue { get; set; } @@ -929,11 +929,11 @@ public AsyncSearchSubmitRequestDescriptor Indices(Elastic.Clients.Ela private Elastic.Clients.Elasticsearch.Fields? StoredFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Suggester? SuggestValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.Suggester? SuggestValue { get; set; } - private SuggesterDescriptor SuggestDescriptor { get; set; } + private Core.Search.SuggesterDescriptor SuggestDescriptor { get; set; } - private Action SuggestDescriptorAction { get; set; } + private Action SuggestDescriptorAction { get; set; } private long? TerminateAfterValue { get; set; } @@ -941,7 +941,7 @@ public AsyncSearchSubmitRequestDescriptor Indices(Elastic.Clients.Ela private bool? TrackScoresValue { get; set; } - private Elastic.Clients.Elasticsearch.TrackHits? TrackTotalHitsValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.TrackHits? TrackTotalHitsValue { get; set; } private bool? VersionValue { get; set; } @@ -969,7 +969,7 @@ public AsyncSearchSubmitRequestDescriptor Aggregations(Action Collapse(Elastic.Clients.Elasticsearch.FieldCollapse? collapse) + public AsyncSearchSubmitRequestDescriptor Collapse(Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? collapse) { CollapseDescriptor = null; CollapseDescriptorAction = null; @@ -977,7 +977,7 @@ public AsyncSearchSubmitRequestDescriptor Collapse(Elastic.Clients.El return Self; } - public AsyncSearchSubmitRequestDescriptor Collapse(FieldCollapseDescriptor descriptor) + public AsyncSearchSubmitRequestDescriptor Collapse(Core.Search.FieldCollapseDescriptor descriptor) { CollapseValue = null; CollapseDescriptorAction = null; @@ -985,7 +985,7 @@ public AsyncSearchSubmitRequestDescriptor Collapse(FieldCollapseDescr return Self; } - public AsyncSearchSubmitRequestDescriptor Collapse(Action> configure) + public AsyncSearchSubmitRequestDescriptor Collapse(Action> configure) { CollapseValue = null; CollapseDescriptor = null; @@ -1065,7 +1065,7 @@ public AsyncSearchSubmitRequestDescriptor Fields(params Action Highlight(Elastic.Clients.Elasticsearch.Highlight? highlight) + public AsyncSearchSubmitRequestDescriptor Highlight(Elastic.Clients.Elasticsearch.Core.Search.Highlight? highlight) { HighlightDescriptor = null; HighlightDescriptorAction = null; @@ -1073,7 +1073,7 @@ public AsyncSearchSubmitRequestDescriptor Highlight(Elastic.Clients.E return Self; } - public AsyncSearchSubmitRequestDescriptor Highlight(HighlightDescriptor descriptor) + public AsyncSearchSubmitRequestDescriptor Highlight(Core.Search.HighlightDescriptor descriptor) { HighlightValue = null; HighlightDescriptorAction = null; @@ -1081,7 +1081,7 @@ public AsyncSearchSubmitRequestDescriptor Highlight(HighlightDescript return Self; } - public AsyncSearchSubmitRequestDescriptor Highlight(Action> configure) + public AsyncSearchSubmitRequestDescriptor Highlight(Action> configure) { HighlightValue = null; HighlightDescriptor = null; @@ -1161,7 +1161,7 @@ public AsyncSearchSubmitRequestDescriptor Query(Action Rescore(IEnumerable? rescore) + public AsyncSearchSubmitRequestDescriptor Rescore(IEnumerable? rescore) { RescoreDescriptor = null; RescoreDescriptorAction = null; @@ -1170,7 +1170,7 @@ public AsyncSearchSubmitRequestDescriptor Rescore(IEnumerable Rescore(RescoreDescriptor descriptor) + public AsyncSearchSubmitRequestDescriptor Rescore(Core.Search.RescoreDescriptor descriptor) { RescoreValue = null; RescoreDescriptorAction = null; @@ -1179,7 +1179,7 @@ public AsyncSearchSubmitRequestDescriptor Rescore(RescoreDescriptor Rescore(Action> configure) + public AsyncSearchSubmitRequestDescriptor Rescore(Action> configure) { RescoreValue = null; RescoreDescriptor = null; @@ -1188,7 +1188,7 @@ public AsyncSearchSubmitRequestDescriptor Rescore(Action Rescore(params Action>[] configure) + public AsyncSearchSubmitRequestDescriptor Rescore(params Action>[] configure) { RescoreValue = null; RescoreDescriptor = null; @@ -1221,7 +1221,7 @@ public AsyncSearchSubmitRequestDescriptor Slice(Action Source(Elastic.Clients.Elasticsearch.SourceConfig? source) + public AsyncSearchSubmitRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? source) { SourceValue = source; return Self; @@ -1257,7 +1257,7 @@ public AsyncSearchSubmitRequestDescriptor MinScore(double? minScore) return Self; } - public AsyncSearchSubmitRequestDescriptor Pit(Elastic.Clients.Elasticsearch.PointInTimeReference? pit) + public AsyncSearchSubmitRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? pit) { PitDescriptor = null; PitDescriptorAction = null; @@ -1265,7 +1265,7 @@ public AsyncSearchSubmitRequestDescriptor Pit(Elastic.Clients.Elastic return Self; } - public AsyncSearchSubmitRequestDescriptor Pit(PointInTimeReferenceDescriptor descriptor) + public AsyncSearchSubmitRequestDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor) { PitValue = null; PitDescriptorAction = null; @@ -1273,7 +1273,7 @@ public AsyncSearchSubmitRequestDescriptor Pit(PointInTimeReferenceDes return Self; } - public AsyncSearchSubmitRequestDescriptor Pit(Action configure) + public AsyncSearchSubmitRequestDescriptor Pit(Action configure) { PitValue = null; PitDescriptor = null; @@ -1335,7 +1335,7 @@ public AsyncSearchSubmitRequestDescriptor StoredFields(Elastic.Client return Self; } - public AsyncSearchSubmitRequestDescriptor Suggest(Elastic.Clients.Elasticsearch.Suggester? suggest) + public AsyncSearchSubmitRequestDescriptor Suggest(Elastic.Clients.Elasticsearch.Core.Search.Suggester? suggest) { SuggestDescriptor = null; SuggestDescriptorAction = null; @@ -1343,7 +1343,7 @@ public AsyncSearchSubmitRequestDescriptor Suggest(Elastic.Clients.Ela return Self; } - public AsyncSearchSubmitRequestDescriptor Suggest(SuggesterDescriptor descriptor) + public AsyncSearchSubmitRequestDescriptor Suggest(Core.Search.SuggesterDescriptor descriptor) { SuggestValue = null; SuggestDescriptorAction = null; @@ -1351,7 +1351,7 @@ public AsyncSearchSubmitRequestDescriptor Suggest(SuggesterDescriptor return Self; } - public AsyncSearchSubmitRequestDescriptor Suggest(Action configure) + public AsyncSearchSubmitRequestDescriptor Suggest(Action configure) { SuggestValue = null; SuggestDescriptor = null; @@ -1377,7 +1377,7 @@ public AsyncSearchSubmitRequestDescriptor TrackScores(bool? trackScor return Self; } - public AsyncSearchSubmitRequestDescriptor TrackTotalHits(Elastic.Clients.Elasticsearch.TrackHits? trackTotalHits) + public AsyncSearchSubmitRequestDescriptor TrackTotalHits(Elastic.Clients.Elasticsearch.Core.Search.TrackHits? trackTotalHits) { TrackTotalHitsValue = trackTotalHits; return Self; @@ -1416,7 +1416,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (CollapseDescriptorAction is not null) { writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, new FieldCollapseDescriptor(CollapseDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.FieldCollapseDescriptor(CollapseDescriptorAction), options); } else if (CollapseValue is not null) { @@ -1494,7 +1494,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (HighlightDescriptorAction is not null) { writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, new HighlightDescriptor(HighlightDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.HighlightDescriptor(HighlightDescriptorAction), options); } else if (HighlightValue is not null) { @@ -1561,7 +1561,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o { writer.WritePropertyName("rescore"); writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new RescoreDescriptor(RescoreDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.RescoreDescriptor(RescoreDescriptorAction), options); writer.WriteEndArray(); } else if (RescoreDescriptorActions is not null) @@ -1570,7 +1570,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartArray(); foreach (var action in RescoreDescriptorActions) { - JsonSerializer.Serialize(writer, new RescoreDescriptor(action), options); + JsonSerializer.Serialize(writer, new Core.Search.RescoreDescriptor(action), options); } writer.WriteEndArray(); @@ -1641,7 +1641,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (PitDescriptorAction is not null) { writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, new PointInTimeReferenceDescriptor(PitDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); } else if (PitValue is not null) { @@ -1711,7 +1711,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (SuggestDescriptorAction is not null) { writer.WritePropertyName("suggest"); - JsonSerializer.Serialize(writer, new SuggesterDescriptor(SuggestDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.SuggesterDescriptor(SuggestDescriptorAction), options); } else if (SuggestValue is not null) { @@ -1807,11 +1807,11 @@ public AsyncSearchSubmitRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private Action AggregationsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.FieldCollapse? CollapseValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? CollapseValue { get; set; } - private FieldCollapseDescriptor CollapseDescriptor { get; set; } + private Core.Search.FieldCollapseDescriptor CollapseDescriptor { get; set; } - private Action CollapseDescriptorAction { get; set; } + private Action CollapseDescriptorAction { get; set; } private IEnumerable? DocvalueFieldsValue { get; set; } @@ -1829,11 +1829,11 @@ public AsyncSearchSubmitRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private Action[] FieldsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Highlight? HighlightValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.Highlight? HighlightValue { get; set; } - private HighlightDescriptor HighlightDescriptor { get; set; } + private Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } - private Action HighlightDescriptorAction { get; set; } + private Action HighlightDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.KnnQuery? KnnValue { get; set; } @@ -1853,13 +1853,13 @@ public AsyncSearchSubmitRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private Action QueryDescriptorAction { get; set; } - private IEnumerable? RescoreValue { get; set; } + private IEnumerable? RescoreValue { get; set; } - private RescoreDescriptor RescoreDescriptor { get; set; } + private Core.Search.RescoreDescriptor RescoreDescriptor { get; set; } - private Action RescoreDescriptorAction { get; set; } + private Action RescoreDescriptorAction { get; set; } - private Action[] RescoreDescriptorActions { get; set; } + private Action[] RescoreDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.SlicedScroll? SliceValue { get; set; } @@ -1867,7 +1867,7 @@ public AsyncSearchSubmitRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private Action SliceDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.SourceConfig? SourceValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? SourceValue { get; set; } private bool? ExplainValue { get; set; } @@ -1879,11 +1879,11 @@ public AsyncSearchSubmitRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private double? MinScoreValue { get; set; } - private Elastic.Clients.Elasticsearch.PointInTimeReference? PitValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? PitValue { get; set; } - private PointInTimeReferenceDescriptor PitDescriptor { get; set; } + private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } - private Action PitDescriptorAction { get; set; } + private Action PitDescriptorAction { get; set; } private bool? ProfileValue { get; set; } @@ -1903,11 +1903,11 @@ public AsyncSearchSubmitRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private Elastic.Clients.Elasticsearch.Fields? StoredFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Suggester? SuggestValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.Suggester? SuggestValue { get; set; } - private SuggesterDescriptor SuggestDescriptor { get; set; } + private Core.Search.SuggesterDescriptor SuggestDescriptor { get; set; } - private Action SuggestDescriptorAction { get; set; } + private Action SuggestDescriptorAction { get; set; } private long? TerminateAfterValue { get; set; } @@ -1915,7 +1915,7 @@ public AsyncSearchSubmitRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private bool? TrackScoresValue { get; set; } - private Elastic.Clients.Elasticsearch.TrackHits? TrackTotalHitsValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.TrackHits? TrackTotalHitsValue { get; set; } private bool? VersionValue { get; set; } @@ -1943,7 +1943,7 @@ public AsyncSearchSubmitRequestDescriptor Aggregations(Action configure) + public AsyncSearchSubmitRequestDescriptor Collapse(Action configure) { CollapseValue = null; CollapseDescriptor = null; @@ -2039,7 +2039,7 @@ public AsyncSearchSubmitRequestDescriptor Fields(params Action configure) + public AsyncSearchSubmitRequestDescriptor Highlight(Action configure) { HighlightValue = null; HighlightDescriptor = null; @@ -2135,7 +2135,7 @@ public AsyncSearchSubmitRequestDescriptor Query(Action? rescore) + public AsyncSearchSubmitRequestDescriptor Rescore(IEnumerable? rescore) { RescoreDescriptor = null; RescoreDescriptorAction = null; @@ -2144,7 +2144,7 @@ public AsyncSearchSubmitRequestDescriptor Rescore(IEnumerable configure) + public AsyncSearchSubmitRequestDescriptor Rescore(Action configure) { RescoreValue = null; RescoreDescriptor = null; @@ -2162,7 +2162,7 @@ public AsyncSearchSubmitRequestDescriptor Rescore(Action conf return Self; } - public AsyncSearchSubmitRequestDescriptor Rescore(params Action[] configure) + public AsyncSearchSubmitRequestDescriptor Rescore(params Action[] configure) { RescoreValue = null; RescoreDescriptor = null; @@ -2195,7 +2195,7 @@ public AsyncSearchSubmitRequestDescriptor Slice(Action c return Self; } - public AsyncSearchSubmitRequestDescriptor Source(Elastic.Clients.Elasticsearch.SourceConfig? source) + public AsyncSearchSubmitRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? source) { SourceValue = source; return Self; @@ -2231,7 +2231,7 @@ public AsyncSearchSubmitRequestDescriptor MinScore(double? minScore) return Self; } - public AsyncSearchSubmitRequestDescriptor Pit(Elastic.Clients.Elasticsearch.PointInTimeReference? pit) + public AsyncSearchSubmitRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? pit) { PitDescriptor = null; PitDescriptorAction = null; @@ -2239,7 +2239,7 @@ public AsyncSearchSubmitRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Poin return Self; } - public AsyncSearchSubmitRequestDescriptor Pit(PointInTimeReferenceDescriptor descriptor) + public AsyncSearchSubmitRequestDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor) { PitValue = null; PitDescriptorAction = null; @@ -2247,7 +2247,7 @@ public AsyncSearchSubmitRequestDescriptor Pit(PointInTimeReferenceDescriptor des return Self; } - public AsyncSearchSubmitRequestDescriptor Pit(Action configure) + public AsyncSearchSubmitRequestDescriptor Pit(Action configure) { PitValue = null; PitDescriptor = null; @@ -2309,7 +2309,7 @@ public AsyncSearchSubmitRequestDescriptor StoredFields(Elastic.Clients.Elasticse return Self; } - public AsyncSearchSubmitRequestDescriptor Suggest(Elastic.Clients.Elasticsearch.Suggester? suggest) + public AsyncSearchSubmitRequestDescriptor Suggest(Elastic.Clients.Elasticsearch.Core.Search.Suggester? suggest) { SuggestDescriptor = null; SuggestDescriptorAction = null; @@ -2317,7 +2317,7 @@ public AsyncSearchSubmitRequestDescriptor Suggest(Elastic.Clients.Elasticsearch. return Self; } - public AsyncSearchSubmitRequestDescriptor Suggest(SuggesterDescriptor descriptor) + public AsyncSearchSubmitRequestDescriptor Suggest(Core.Search.SuggesterDescriptor descriptor) { SuggestValue = null; SuggestDescriptorAction = null; @@ -2325,7 +2325,7 @@ public AsyncSearchSubmitRequestDescriptor Suggest(SuggesterDescriptor descriptor return Self; } - public AsyncSearchSubmitRequestDescriptor Suggest(Action configure) + public AsyncSearchSubmitRequestDescriptor Suggest(Action configure) { SuggestValue = null; SuggestDescriptor = null; @@ -2351,7 +2351,7 @@ public AsyncSearchSubmitRequestDescriptor TrackScores(bool? trackScores = true) return Self; } - public AsyncSearchSubmitRequestDescriptor TrackTotalHits(Elastic.Clients.Elasticsearch.TrackHits? trackTotalHits) + public AsyncSearchSubmitRequestDescriptor TrackTotalHits(Elastic.Clients.Elasticsearch.Core.Search.TrackHits? trackTotalHits) { TrackTotalHitsValue = trackTotalHits; return Self; @@ -2390,7 +2390,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (CollapseDescriptorAction is not null) { writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, new FieldCollapseDescriptor(CollapseDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.FieldCollapseDescriptor(CollapseDescriptorAction), options); } else if (CollapseValue is not null) { @@ -2468,7 +2468,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (HighlightDescriptorAction is not null) { writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, new HighlightDescriptor(HighlightDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.HighlightDescriptor(HighlightDescriptorAction), options); } else if (HighlightValue is not null) { @@ -2535,7 +2535,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o { writer.WritePropertyName("rescore"); writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new RescoreDescriptor(RescoreDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.RescoreDescriptor(RescoreDescriptorAction), options); writer.WriteEndArray(); } else if (RescoreDescriptorActions is not null) @@ -2544,7 +2544,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartArray(); foreach (var action in RescoreDescriptorActions) { - JsonSerializer.Serialize(writer, new RescoreDescriptor(action), options); + JsonSerializer.Serialize(writer, new Core.Search.RescoreDescriptor(action), options); } writer.WriteEndArray(); @@ -2615,7 +2615,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (PitDescriptorAction is not null) { writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, new PointInTimeReferenceDescriptor(PitDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); } else if (PitValue is not null) { @@ -2685,7 +2685,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (SuggestDescriptorAction is not null) { writer.WritePropertyName("suggest"); - JsonSerializer.Serialize(writer, new SuggesterDescriptor(SuggestDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.SuggesterDescriptor(SuggestDescriptorAction), options); } else if (SuggestValue is not null) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs index c3aaaa94d30..d0e8348de10 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkRequest.g.cs @@ -37,7 +37,7 @@ public sealed class BulkRequestParameters : RequestParameters Q("routing"); set => Q("routing", value); } [JsonIgnore] - public Elastic.Clients.Elasticsearch.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } + public Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } [JsonIgnore] public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } @@ -78,7 +78,7 @@ public BulkRequest(Elastic.Clients.Elasticsearch.IndexName? index) : base(r => r public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); } [JsonIgnore] - public Elastic.Clients.Elasticsearch.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } + public Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } [JsonIgnore] public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } @@ -106,7 +106,7 @@ public BulkRequestDescriptor() internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceBulk; protected override HttpMethod HttpMethod => HttpMethod.POST; protected override bool SupportsBody => true; - public BulkRequestDescriptor Source(Elastic.Clients.Elasticsearch.SourceConfigParam? source) => Qs("_source", source); + public BulkRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); public BulkRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); public BulkRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public BulkRequestDescriptor Pipeline(string? pipeline) => Qs("pipeline", pipeline); @@ -136,7 +136,7 @@ public BulkRequestDescriptor() internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceBulk; protected override HttpMethod HttpMethod => HttpMethod.POST; protected override bool SupportsBody => true; - public BulkRequestDescriptor Source(Elastic.Clients.Elasticsearch.SourceConfigParam? source) => Qs("_source", source); + public BulkRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); public BulkRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); public BulkRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public BulkRequestDescriptor Pipeline(string? pipeline) => Qs("pipeline", pipeline); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsRequest.g.cs index 8898e89fd2d..6116f9468d9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsRequest.g.cs @@ -40,7 +40,7 @@ public sealed class ExistsRequestParameters : RequestParameters Q("routing"); set => Q("routing", value); } [JsonIgnore] - public Elastic.Clients.Elasticsearch.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } + public Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } [JsonIgnore] public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } @@ -80,7 +80,7 @@ public ExistsRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); } [JsonIgnore] - public Elastic.Clients.Elasticsearch.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } + public Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } [JsonIgnore] public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } @@ -132,7 +132,7 @@ internal ExistsRequestDescriptor() internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceExists; protected override HttpMethod HttpMethod => HttpMethod.HEAD; protected override bool SupportsBody => false; - public ExistsRequestDescriptor Source(Elastic.Clients.Elasticsearch.SourceConfigParam? source) => Qs("_source", source); + public ExistsRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); public ExistsRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); public ExistsRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public ExistsRequestDescriptor Preference(string? preference) => Qs("preference", preference); @@ -173,7 +173,7 @@ internal ExistsRequestDescriptor() internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceExists; protected override HttpMethod HttpMethod => HttpMethod.HEAD; protected override bool SupportsBody => false; - public ExistsRequestDescriptor Source(Elastic.Clients.Elasticsearch.SourceConfigParam? source) => Qs("_source", source); + public ExistsRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); public ExistsRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); public ExistsRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public ExistsRequestDescriptor Preference(string? preference) => Qs("preference", preference); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsSourceRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsSourceRequest.g.cs index 396343476fa..7b0a143035c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsSourceRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsSourceRequest.g.cs @@ -40,7 +40,7 @@ public sealed class ExistsSourceRequestParameters : RequestParameters Q("routing"); set => Q("routing", value); } [JsonIgnore] - public Elastic.Clients.Elasticsearch.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } + public Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } [JsonIgnore] public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } @@ -77,7 +77,7 @@ public ExistsSourceRequest(Elastic.Clients.Elasticsearch.IndexName index, Elasti public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); } [JsonIgnore] - public Elastic.Clients.Elasticsearch.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } + public Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } [JsonIgnore] public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } @@ -126,7 +126,7 @@ internal ExistsSourceRequestDescriptor() internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceExistsSource; protected override HttpMethod HttpMethod => HttpMethod.HEAD; protected override bool SupportsBody => false; - public ExistsSourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.SourceConfigParam? source) => Qs("_source", source); + public ExistsSourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); public ExistsSourceRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); public ExistsSourceRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public ExistsSourceRequestDescriptor Preference(string? preference) => Qs("preference", preference); @@ -166,7 +166,7 @@ internal ExistsSourceRequestDescriptor() internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceExistsSource; protected override HttpMethod HttpMethod => HttpMethod.HEAD; protected override bool SupportsBody => false; - public ExistsSourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.SourceConfigParam? source) => Qs("_source", source); + public ExistsSourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); public ExistsSourceRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); public ExistsSourceRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public ExistsSourceRequestDescriptor Preference(string? preference) => Qs("preference", preference); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExplainRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExplainRequest.g.cs index 39a72d78a5b..a39da6abe9d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExplainRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExplainRequest.g.cs @@ -49,7 +49,7 @@ public sealed class ExplainRequestParameters : RequestParameters Q("routing"); set => Q("routing", value); } [JsonIgnore] - public Elastic.Clients.Elasticsearch.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } + public Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } [JsonIgnore] public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } @@ -95,7 +95,7 @@ public ExplainRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Cli public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); } [JsonIgnore] - public Elastic.Clients.Elasticsearch.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } + public Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } [JsonIgnore] public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } @@ -148,7 +148,7 @@ internal ExplainRequestDescriptor() internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceExplain; protected override HttpMethod HttpMethod => HttpMethod.POST; protected override bool SupportsBody => true; - public ExplainRequestDescriptor Source(Elastic.Clients.Elasticsearch.SourceConfigParam? source) => Qs("_source", source); + public ExplainRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); public ExplainRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); public ExplainRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public ExplainRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); @@ -239,7 +239,7 @@ internal ExplainRequestDescriptor() internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceExplain; protected override HttpMethod HttpMethod => HttpMethod.POST; protected override bool SupportsBody => true; - public ExplainRequestDescriptor Source(Elastic.Clients.Elasticsearch.SourceConfigParam? source) => Qs("_source", source); + public ExplainRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); public ExplainRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); public ExplainRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public ExplainRequestDescriptor AnalyzeWildcard(bool? analyzeWildcard = true) => Qs("analyze_wildcard", analyzeWildcard); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExplainResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExplainResponse.g.cs index 0093d138604..2fb92ace9a3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExplainResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExplainResponse.g.cs @@ -26,7 +26,7 @@ public sealed partial class ExplainResponse : ElasticsearchResponseBa { [JsonInclude] [JsonPropertyName("explanation")] - public Elastic.Clients.Elasticsearch.ExplanationDetail? Explanation { get; init; } + public Elastic.Clients.Elasticsearch.Core.Explain.ExplanationDetail? Explanation { get; init; } [JsonInclude] [JsonPropertyName("get")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsResponse.g.cs index 96edb719419..8c5f9d6ac28 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/FieldCapsResponse.g.cs @@ -26,7 +26,7 @@ public sealed partial class FieldCapsResponse : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("fields")] - public Dictionary> Fields { get; init; } + public Dictionary> Fields { get; init; } [JsonInclude] [JsonPropertyName("indices")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetRequest.g.cs index 0af20fd1114..14b1d334db9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetRequest.g.cs @@ -40,7 +40,7 @@ public sealed class GetRequestParameters : RequestParameters Q("routing"); set => Q("routing", value); } [JsonIgnore] - public Elastic.Clients.Elasticsearch.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } + public Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } [JsonIgnore] public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } @@ -80,7 +80,7 @@ public GetRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); } [JsonIgnore] - public Elastic.Clients.Elasticsearch.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } + public Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } [JsonIgnore] public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } @@ -132,7 +132,7 @@ internal GetRequestDescriptor() internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceGet; protected override HttpMethod HttpMethod => HttpMethod.GET; protected override bool SupportsBody => false; - public GetRequestDescriptor Source(Elastic.Clients.Elasticsearch.SourceConfigParam? source) => Qs("_source", source); + public GetRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); public GetRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); public GetRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public GetRequestDescriptor Preference(string? preference) => Qs("preference", preference); @@ -173,7 +173,7 @@ internal GetRequestDescriptor() internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceGet; protected override HttpMethod HttpMethod => HttpMethod.GET; protected override bool SupportsBody => false; - public GetRequestDescriptor Source(Elastic.Clients.Elasticsearch.SourceConfigParam? source) => Qs("_source", source); + public GetRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); public GetRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); public GetRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public GetRequestDescriptor Preference(string? preference) => Qs("preference", preference); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiGetRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiGetRequest.g.cs index 78794511bf5..5cda2ef67bc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiGetRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiGetRequest.g.cs @@ -40,7 +40,7 @@ public sealed class MultiGetRequestParameters : RequestParameters Q("routing"); set => Q("routing", value); } [JsonIgnore] - public Elastic.Clients.Elasticsearch.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } + public Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } [JsonIgnore] public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } @@ -78,7 +78,7 @@ public MultiGetRequest(Elastic.Clients.Elasticsearch.IndexName? index) : base(r public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); } [JsonIgnore] - public Elastic.Clients.Elasticsearch.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } + public Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } [JsonIgnore] public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } @@ -91,7 +91,7 @@ public MultiGetRequest(Elastic.Clients.Elasticsearch.IndexName? index) : base(r [JsonInclude] [JsonPropertyName("docs")] - public IEnumerable? Docs { get; set; } + public IEnumerable? Docs { get; set; } [JsonInclude] [JsonPropertyName("ids")] @@ -108,7 +108,7 @@ public MultiGetRequestDescriptor() internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceMget; protected override HttpMethod HttpMethod => HttpMethod.POST; protected override bool SupportsBody => true; - public MultiGetRequestDescriptor Source(Elastic.Clients.Elasticsearch.SourceConfigParam? source) => Qs("_source", source); + public MultiGetRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); public MultiGetRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); public MultiGetRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public MultiGetRequestDescriptor Preference(string? preference) => Qs("preference", preference); @@ -122,17 +122,17 @@ public MultiGetRequestDescriptor Index(Elastic.Clients.Elasticsearch. return Self; } - private IEnumerable? DocsValue { get; set; } + private IEnumerable? DocsValue { get; set; } - private OperationDescriptor DocsDescriptor { get; set; } + private Core.MGet.OperationDescriptor DocsDescriptor { get; set; } - private Action DocsDescriptorAction { get; set; } + private Action DocsDescriptorAction { get; set; } - private Action[] DocsDescriptorActions { get; set; } + private Action[] DocsDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Ids? IdsValue { get; set; } - public MultiGetRequestDescriptor Docs(IEnumerable? docs) + public MultiGetRequestDescriptor Docs(IEnumerable? docs) { DocsDescriptor = null; DocsDescriptorAction = null; @@ -141,7 +141,7 @@ public MultiGetRequestDescriptor Docs(IEnumerable Docs(OperationDescriptor descriptor) + public MultiGetRequestDescriptor Docs(Core.MGet.OperationDescriptor descriptor) { DocsValue = null; DocsDescriptorAction = null; @@ -150,7 +150,7 @@ public MultiGetRequestDescriptor Docs(OperationDescriptor descriptor) return Self; } - public MultiGetRequestDescriptor Docs(Action configure) + public MultiGetRequestDescriptor Docs(Action configure) { DocsValue = null; DocsDescriptor = null; @@ -159,7 +159,7 @@ public MultiGetRequestDescriptor Docs(Action con return Self; } - public MultiGetRequestDescriptor Docs(params Action[] configure) + public MultiGetRequestDescriptor Docs(params Action[] configure) { DocsValue = null; DocsDescriptor = null; @@ -188,7 +188,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o { writer.WritePropertyName("docs"); writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new OperationDescriptor(DocsDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.MGet.OperationDescriptor(DocsDescriptorAction), options); writer.WriteEndArray(); } else if (DocsDescriptorActions is not null) @@ -197,7 +197,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartArray(); foreach (var action in DocsDescriptorActions) { - JsonSerializer.Serialize(writer, new OperationDescriptor(action), options); + JsonSerializer.Serialize(writer, new Core.MGet.OperationDescriptor(action), options); } writer.WriteEndArray(); @@ -228,7 +228,7 @@ public MultiGetRequestDescriptor() internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceMget; protected override HttpMethod HttpMethod => HttpMethod.POST; protected override bool SupportsBody => true; - public MultiGetRequestDescriptor Source(Elastic.Clients.Elasticsearch.SourceConfigParam? source) => Qs("_source", source); + public MultiGetRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); public MultiGetRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); public MultiGetRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public MultiGetRequestDescriptor Preference(string? preference) => Qs("preference", preference); @@ -242,17 +242,17 @@ public MultiGetRequestDescriptor Index(Elastic.Clients.Elasticsearch.IndexName? return Self; } - private IEnumerable? DocsValue { get; set; } + private IEnumerable? DocsValue { get; set; } - private OperationDescriptor DocsDescriptor { get; set; } + private Core.MGet.OperationDescriptor DocsDescriptor { get; set; } - private Action DocsDescriptorAction { get; set; } + private Action DocsDescriptorAction { get; set; } - private Action[] DocsDescriptorActions { get; set; } + private Action[] DocsDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.Ids? IdsValue { get; set; } - public MultiGetRequestDescriptor Docs(IEnumerable? docs) + public MultiGetRequestDescriptor Docs(IEnumerable? docs) { DocsDescriptor = null; DocsDescriptorAction = null; @@ -261,7 +261,7 @@ public MultiGetRequestDescriptor Docs(IEnumerable configure) + public MultiGetRequestDescriptor Docs(Action configure) { DocsValue = null; DocsDescriptor = null; @@ -279,7 +279,7 @@ public MultiGetRequestDescriptor Docs(Action configure) return Self; } - public MultiGetRequestDescriptor Docs(params Action[] configure) + public MultiGetRequestDescriptor Docs(params Action[] configure) { DocsValue = null; DocsDescriptor = null; @@ -308,7 +308,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o { writer.WritePropertyName("docs"); writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new OperationDescriptor(DocsDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.MGet.OperationDescriptor(DocsDescriptorAction), options); writer.WriteEndArray(); } else if (DocsDescriptorActions is not null) @@ -317,7 +317,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartArray(); foreach (var action in DocsDescriptorActions) { - JsonSerializer.Serialize(writer, new OperationDescriptor(action), options); + JsonSerializer.Serialize(writer, new Core.MGet.OperationDescriptor(action), options); } writer.WriteEndArray(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiGetResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiGetResponse.g.cs index d2e51d1378f..bf30b7de482 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiGetResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiGetResponse.g.cs @@ -26,6 +26,6 @@ public sealed partial class MultiGetResponse : ElasticsearchResponseB { [JsonInclude] [JsonPropertyName("docs")] - public IReadOnlyCollection> Docs { get; init; } + public IReadOnlyCollection> Docs { get; init; } } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchRequest.g.cs index 1b605813d58..902e2e42a75 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchRequest.g.cs @@ -115,7 +115,7 @@ public MultiSearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base [JsonIgnore] public bool? TypedKeys { get => Q("typed_keys"); set => Q("typed_keys", value); } - public List Searches { get; set; } + public List Searches { get; set; } void IStreamSerializable.Serialize(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) { @@ -172,7 +172,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o { } - List _items = new(); + List _items = new(); void IStreamSerializable.Serialize(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) { if (_items is null) @@ -195,7 +195,7 @@ async Task IStreamSerializable.SerializeAsync(Stream stream, IElasticsearchClien } } - public MultiSearchRequestDescriptor AddSearch(SearchRequestItem search) + public MultiSearchRequestDescriptor AddSearch(Core.MSearch.SearchRequestItem search) { _items.Add(search); return this; @@ -234,7 +234,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o { } - List _items = new(); + List _items = new(); void IStreamSerializable.Serialize(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) { if (_items is null) @@ -257,7 +257,7 @@ async Task IStreamSerializable.SerializeAsync(Stream stream, IElasticsearchClien } } - public MultiSearchRequestDescriptor AddSearch(SearchRequestItem search) + public MultiSearchRequestDescriptor AddSearch(Core.MSearch.SearchRequestItem search) { _items.Add(search); return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchResponse.g.cs index 5483dd4ad8d..4dd07ae2d79 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchResponse.g.cs @@ -26,7 +26,7 @@ public sealed partial class MultiSearchResponse : ElasticsearchRespon { [JsonInclude] [JsonPropertyName("responses")] - public IReadOnlyCollection> Responses { get; init; } + public IReadOnlyCollection> Responses { get; init; } [JsonInclude] [JsonPropertyName("took")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchTemplateRequest.g.cs index eeb8583054c..d10922333cb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchTemplateRequest.g.cs @@ -73,7 +73,7 @@ public MultiSearchTemplateRequest(Elastic.Clients.Elasticsearch.Indices? indices [JsonIgnore] public bool? TypedKeys { get => Q("typed_keys"); set => Q("typed_keys", value); } - public List SearchTemplates { get; set; } + public List SearchTemplates { get; set; } void IStreamSerializable.Serialize(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) { @@ -123,7 +123,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o { } - List _items = new(); + List _items = new(); void IStreamSerializable.Serialize(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) { if (_items is null) @@ -146,7 +146,7 @@ async Task IStreamSerializable.SerializeAsync(Stream stream, IElasticsearchClien } } - public MultiSearchTemplateRequestDescriptor Add(RequestItem item) + public MultiSearchTemplateRequestDescriptor Add(Core.MSearchTemplate.RequestItem item) { _items.Add(item); return this; @@ -178,7 +178,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o { } - List _items = new(); + List _items = new(); void IStreamSerializable.Serialize(Stream stream, IElasticsearchClientSettings settings, SerializationFormatting formatting) { if (_items is null) @@ -201,7 +201,7 @@ async Task IStreamSerializable.SerializeAsync(Stream stream, IElasticsearchClien } } - public MultiSearchTemplateRequestDescriptor Add(RequestItem item) + public MultiSearchTemplateRequestDescriptor Add(Core.MSearchTemplate.RequestItem item) { _items.Add(item); return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchTemplateResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchTemplateResponse.g.cs index 72ceb561bf7..24b9ee6fd1a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchTemplateResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchTemplateResponse.g.cs @@ -26,7 +26,7 @@ public sealed partial class MultiSearchTemplateResponse : Elasticsear { [JsonInclude] [JsonPropertyName("responses")] - public IReadOnlyCollection> Responses { get; init; } + public IReadOnlyCollection> Responses { get; init; } [JsonInclude] [JsonPropertyName("took")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/RankEvalRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/RankEvalRequest.g.cs index 1ec67896a09..e4c14b12ee0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/RankEvalRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/RankEvalRequest.g.cs @@ -63,11 +63,11 @@ public RankEvalRequest(Elastic.Clients.Elasticsearch.Indices indices) : base(r = [JsonInclude] [JsonPropertyName("requests")] - public IEnumerable Requests { get; set; } + public IEnumerable Requests { get; set; } [JsonInclude] [JsonPropertyName("metric")] - public Elastic.Clients.Elasticsearch.RankEvalMetric? Metric { get; set; } + public Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetric? Metric { get; set; } } public sealed partial class RankEvalRequestDescriptor : RequestDescriptorBase, RankEvalRequestParameters> @@ -94,21 +94,21 @@ public RankEvalRequestDescriptor Indices(Elastic.Clients.Elasticsearc return Self; } - private IEnumerable RequestsValue { get; set; } + private IEnumerable RequestsValue { get; set; } - private RankEvalRequestItemDescriptor RequestsDescriptor { get; set; } + private Core.RankEval.RankEvalRequestItemDescriptor RequestsDescriptor { get; set; } - private Action> RequestsDescriptorAction { get; set; } + private Action> RequestsDescriptorAction { get; set; } - private Action>[] RequestsDescriptorActions { get; set; } + private Action>[] RequestsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.RankEvalMetric? MetricValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetric? MetricValue { get; set; } - private RankEvalMetricDescriptor MetricDescriptor { get; set; } + private Core.RankEval.RankEvalMetricDescriptor MetricDescriptor { get; set; } - private Action MetricDescriptorAction { get; set; } + private Action MetricDescriptorAction { get; set; } - public RankEvalRequestDescriptor Requests(IEnumerable requests) + public RankEvalRequestDescriptor Requests(IEnumerable requests) { RequestsDescriptor = null; RequestsDescriptorAction = null; @@ -117,7 +117,7 @@ public RankEvalRequestDescriptor Requests(IEnumerable Requests(RankEvalRequestItemDescriptor descriptor) + public RankEvalRequestDescriptor Requests(Core.RankEval.RankEvalRequestItemDescriptor descriptor) { RequestsValue = null; RequestsDescriptorAction = null; @@ -126,7 +126,7 @@ public RankEvalRequestDescriptor Requests(RankEvalRequestItemDescript return Self; } - public RankEvalRequestDescriptor Requests(Action> configure) + public RankEvalRequestDescriptor Requests(Action> configure) { RequestsValue = null; RequestsDescriptor = null; @@ -135,7 +135,7 @@ public RankEvalRequestDescriptor Requests(Action Requests(params Action>[] configure) + public RankEvalRequestDescriptor Requests(params Action>[] configure) { RequestsValue = null; RequestsDescriptor = null; @@ -144,7 +144,7 @@ public RankEvalRequestDescriptor Requests(params Action Metric(Elastic.Clients.Elasticsearch.RankEvalMetric? metric) + public RankEvalRequestDescriptor Metric(Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetric? metric) { MetricDescriptor = null; MetricDescriptorAction = null; @@ -152,7 +152,7 @@ public RankEvalRequestDescriptor Metric(Elastic.Clients.Elasticsearch return Self; } - public RankEvalRequestDescriptor Metric(RankEvalMetricDescriptor descriptor) + public RankEvalRequestDescriptor Metric(Core.RankEval.RankEvalMetricDescriptor descriptor) { MetricValue = null; MetricDescriptorAction = null; @@ -160,7 +160,7 @@ public RankEvalRequestDescriptor Metric(RankEvalMetricDescriptor desc return Self; } - public RankEvalRequestDescriptor Metric(Action configure) + public RankEvalRequestDescriptor Metric(Action configure) { MetricValue = null; MetricDescriptor = null; @@ -182,7 +182,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o { writer.WritePropertyName("requests"); writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new RankEvalRequestItemDescriptor(RequestsDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.RankEval.RankEvalRequestItemDescriptor(RequestsDescriptorAction), options); writer.WriteEndArray(); } else if (RequestsDescriptorActions is not null) @@ -191,7 +191,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartArray(); foreach (var action in RequestsDescriptorActions) { - JsonSerializer.Serialize(writer, new RankEvalRequestItemDescriptor(action), options); + JsonSerializer.Serialize(writer, new Core.RankEval.RankEvalRequestItemDescriptor(action), options); } writer.WriteEndArray(); @@ -210,7 +210,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (MetricDescriptorAction is not null) { writer.WritePropertyName("metric"); - JsonSerializer.Serialize(writer, new RankEvalMetricDescriptor(MetricDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.RankEval.RankEvalMetricDescriptor(MetricDescriptorAction), options); } else if (MetricValue is not null) { @@ -246,21 +246,21 @@ public RankEvalRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices i return Self; } - private IEnumerable RequestsValue { get; set; } + private IEnumerable RequestsValue { get; set; } - private RankEvalRequestItemDescriptor RequestsDescriptor { get; set; } + private Core.RankEval.RankEvalRequestItemDescriptor RequestsDescriptor { get; set; } - private Action RequestsDescriptorAction { get; set; } + private Action RequestsDescriptorAction { get; set; } - private Action[] RequestsDescriptorActions { get; set; } + private Action[] RequestsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.RankEvalMetric? MetricValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetric? MetricValue { get; set; } - private RankEvalMetricDescriptor MetricDescriptor { get; set; } + private Core.RankEval.RankEvalMetricDescriptor MetricDescriptor { get; set; } - private Action MetricDescriptorAction { get; set; } + private Action MetricDescriptorAction { get; set; } - public RankEvalRequestDescriptor Requests(IEnumerable requests) + public RankEvalRequestDescriptor Requests(IEnumerable requests) { RequestsDescriptor = null; RequestsDescriptorAction = null; @@ -269,7 +269,7 @@ public RankEvalRequestDescriptor Requests(IEnumerable configure) + public RankEvalRequestDescriptor Requests(Action configure) { RequestsValue = null; RequestsDescriptor = null; @@ -287,7 +287,7 @@ public RankEvalRequestDescriptor Requests(Action return Self; } - public RankEvalRequestDescriptor Requests(params Action[] configure) + public RankEvalRequestDescriptor Requests(params Action[] configure) { RequestsValue = null; RequestsDescriptor = null; @@ -296,7 +296,7 @@ public RankEvalRequestDescriptor Requests(params Action configure) + public RankEvalRequestDescriptor Metric(Action configure) { MetricValue = null; MetricDescriptor = null; @@ -334,7 +334,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o { writer.WritePropertyName("requests"); writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new RankEvalRequestItemDescriptor(RequestsDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.RankEval.RankEvalRequestItemDescriptor(RequestsDescriptorAction), options); writer.WriteEndArray(); } else if (RequestsDescriptorActions is not null) @@ -343,7 +343,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartArray(); foreach (var action in RequestsDescriptorActions) { - JsonSerializer.Serialize(writer, new RankEvalRequestItemDescriptor(action), options); + JsonSerializer.Serialize(writer, new Core.RankEval.RankEvalRequestItemDescriptor(action), options); } writer.WriteEndArray(); @@ -362,7 +362,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (MetricDescriptorAction is not null) { writer.WritePropertyName("metric"); - JsonSerializer.Serialize(writer, new RankEvalMetricDescriptor(MetricDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.RankEval.RankEvalMetricDescriptor(MetricDescriptorAction), options); } else if (MetricValue is not null) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/RankEvalResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/RankEvalResponse.g.cs index 59abd516c90..e524027180e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/RankEvalResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/RankEvalResponse.g.cs @@ -26,7 +26,7 @@ public sealed partial class RankEvalResponse : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("details")] - public Dictionary Details { get; init; } + public Dictionary Details { get; init; } [JsonInclude] [JsonPropertyName("failures")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRequest.g.cs index 14f9ba1bb9f..574de21f3da 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRequest.g.cs @@ -87,7 +87,7 @@ public sealed partial class ReindexRequest : PlainRequestBase : RequestDescriptorBase, ReindexRequestParameters> @@ -124,19 +124,19 @@ public ReindexRequestDescriptor() public ReindexRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); public ReindexRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); public ReindexRequestDescriptor WaitForCompletion(bool? waitForCompletion = true) => Qs("wait_for_completion", waitForCompletion); - private Elastic.Clients.Elasticsearch.Source SourceValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Reindex.Source SourceValue { get; set; } - private SourceDescriptor SourceDescriptor { get; set; } + private Core.Reindex.SourceDescriptor SourceDescriptor { get; set; } - private Action> SourceDescriptorAction { get; set; } + private Action> SourceDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Conflicts? ConflictsValue { get; set; } - private Elastic.Clients.Elasticsearch.Destination DestValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Reindex.Destination DestValue { get; set; } - private DestinationDescriptor DestDescriptor { get; set; } + private Core.Reindex.DestinationDescriptor DestDescriptor { get; set; } - private Action DestDescriptorAction { get; set; } + private Action DestDescriptorAction { get; set; } private long? MaxDocsValue { get; set; } @@ -144,7 +144,7 @@ public ReindexRequestDescriptor() private long? SizeValue { get; set; } - public ReindexRequestDescriptor Source(Elastic.Clients.Elasticsearch.Source source) + public ReindexRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Reindex.Source source) { SourceDescriptor = null; SourceDescriptorAction = null; @@ -152,7 +152,7 @@ public ReindexRequestDescriptor Source(Elastic.Clients.Elasticsearch. return Self; } - public ReindexRequestDescriptor Source(SourceDescriptor descriptor) + public ReindexRequestDescriptor Source(Core.Reindex.SourceDescriptor descriptor) { SourceValue = null; SourceDescriptorAction = null; @@ -160,7 +160,7 @@ public ReindexRequestDescriptor Source(SourceDescriptor de return Self; } - public ReindexRequestDescriptor Source(Action> configure) + public ReindexRequestDescriptor Source(Action> configure) { SourceValue = null; SourceDescriptor = null; @@ -174,7 +174,7 @@ public ReindexRequestDescriptor Conflicts(Elastic.Clients.Elasticsear return Self; } - public ReindexRequestDescriptor Dest(Elastic.Clients.Elasticsearch.Destination dest) + public ReindexRequestDescriptor Dest(Elastic.Clients.Elasticsearch.Core.Reindex.Destination dest) { DestDescriptor = null; DestDescriptorAction = null; @@ -182,7 +182,7 @@ public ReindexRequestDescriptor Dest(Elastic.Clients.Elasticsearch.De return Self; } - public ReindexRequestDescriptor Dest(DestinationDescriptor descriptor) + public ReindexRequestDescriptor Dest(Core.Reindex.DestinationDescriptor descriptor) { DestValue = null; DestDescriptorAction = null; @@ -190,7 +190,7 @@ public ReindexRequestDescriptor Dest(DestinationDescriptor descriptor return Self; } - public ReindexRequestDescriptor Dest(Action configure) + public ReindexRequestDescriptor Dest(Action configure) { DestValue = null; DestDescriptor = null; @@ -227,7 +227,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (SourceDescriptorAction is not null) { writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, new SourceDescriptor(SourceDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Reindex.SourceDescriptor(SourceDescriptorAction), options); } else { @@ -249,7 +249,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (DestDescriptorAction is not null) { writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, new DestinationDescriptor(DestDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Reindex.DestinationDescriptor(DestDescriptorAction), options); } else { @@ -297,19 +297,19 @@ public ReindexRequestDescriptor() public ReindexRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout); public ReindexRequestDescriptor WaitForActiveShards(Elastic.Clients.Elasticsearch.WaitForActiveShards? waitForActiveShards) => Qs("wait_for_active_shards", waitForActiveShards); public ReindexRequestDescriptor WaitForCompletion(bool? waitForCompletion = true) => Qs("wait_for_completion", waitForCompletion); - private Elastic.Clients.Elasticsearch.Source SourceValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Reindex.Source SourceValue { get; set; } - private SourceDescriptor SourceDescriptor { get; set; } + private Core.Reindex.SourceDescriptor SourceDescriptor { get; set; } - private Action SourceDescriptorAction { get; set; } + private Action SourceDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.Conflicts? ConflictsValue { get; set; } - private Elastic.Clients.Elasticsearch.Destination DestValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Reindex.Destination DestValue { get; set; } - private DestinationDescriptor DestDescriptor { get; set; } + private Core.Reindex.DestinationDescriptor DestDescriptor { get; set; } - private Action DestDescriptorAction { get; set; } + private Action DestDescriptorAction { get; set; } private long? MaxDocsValue { get; set; } @@ -317,7 +317,7 @@ public ReindexRequestDescriptor() private long? SizeValue { get; set; } - public ReindexRequestDescriptor Source(Elastic.Clients.Elasticsearch.Source source) + public ReindexRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Reindex.Source source) { SourceDescriptor = null; SourceDescriptorAction = null; @@ -325,7 +325,7 @@ public ReindexRequestDescriptor Source(Elastic.Clients.Elasticsearch.Source sour return Self; } - public ReindexRequestDescriptor Source(SourceDescriptor descriptor) + public ReindexRequestDescriptor Source(Core.Reindex.SourceDescriptor descriptor) { SourceValue = null; SourceDescriptorAction = null; @@ -333,7 +333,7 @@ public ReindexRequestDescriptor Source(SourceDescriptor descriptor) return Self; } - public ReindexRequestDescriptor Source(Action configure) + public ReindexRequestDescriptor Source(Action configure) { SourceValue = null; SourceDescriptor = null; @@ -347,7 +347,7 @@ public ReindexRequestDescriptor Conflicts(Elastic.Clients.Elasticsearch.Conflict return Self; } - public ReindexRequestDescriptor Dest(Elastic.Clients.Elasticsearch.Destination dest) + public ReindexRequestDescriptor Dest(Elastic.Clients.Elasticsearch.Core.Reindex.Destination dest) { DestDescriptor = null; DestDescriptorAction = null; @@ -355,7 +355,7 @@ public ReindexRequestDescriptor Dest(Elastic.Clients.Elasticsearch.Destination d return Self; } - public ReindexRequestDescriptor Dest(DestinationDescriptor descriptor) + public ReindexRequestDescriptor Dest(Core.Reindex.DestinationDescriptor descriptor) { DestValue = null; DestDescriptorAction = null; @@ -363,7 +363,7 @@ public ReindexRequestDescriptor Dest(DestinationDescriptor descriptor) return Self; } - public ReindexRequestDescriptor Dest(Action configure) + public ReindexRequestDescriptor Dest(Action configure) { DestValue = null; DestDescriptor = null; @@ -400,7 +400,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (SourceDescriptorAction is not null) { writer.WritePropertyName("source"); - JsonSerializer.Serialize(writer, new SourceDescriptor(SourceDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Reindex.SourceDescriptor(SourceDescriptorAction), options); } else { @@ -422,7 +422,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (DestDescriptorAction is not null) { writer.WritePropertyName("dest"); - JsonSerializer.Serialize(writer, new DestinationDescriptor(DestDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Reindex.DestinationDescriptor(DestDescriptorAction), options); } else { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRethrottleResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRethrottleResponse.g.cs index d02f4ec3df5..510f98f778a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRethrottleResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRethrottleResponse.g.cs @@ -26,6 +26,6 @@ public sealed partial class ReindexRethrottleResponse : ElasticsearchResponseBas { [JsonInclude] [JsonPropertyName("nodes")] - public Dictionary Nodes { get; init; } + public Dictionary Nodes { get; init; } } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScriptContextResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScriptContextResponse.g.cs index caaf7b2fbb8..cd713d559c9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScriptContextResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScriptContextResponse.g.cs @@ -26,6 +26,6 @@ public sealed partial class ScriptContextResponse : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("contexts")] - public IReadOnlyCollection Contexts { get; init; } + public IReadOnlyCollection Contexts { get; init; } } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScriptLanguagesResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScriptLanguagesResponse.g.cs index 4e80ca81f2b..46b28202e05 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScriptLanguagesResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScriptLanguagesResponse.g.cs @@ -26,7 +26,7 @@ public sealed partial class ScriptLanguagesResponse : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("language_contexts")] - public IReadOnlyCollection LanguageContexts { get; init; } + public IReadOnlyCollection LanguageContexts { get; init; } [JsonInclude] [JsonPropertyName("types_allowed")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScrollResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScrollResponse.g.cs index 52e1e334ca2..d59e68d55b0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScrollResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScrollResponse.g.cs @@ -38,7 +38,7 @@ public sealed partial class ScrollResponse : ElasticsearchResponseBas [JsonInclude] [JsonPropertyName("hits")] - public Elastic.Clients.Elasticsearch.HitsMetadata HitsMetadata { get; init; } + public Elastic.Clients.Elasticsearch.Core.Search.HitsMetadata HitsMetadata { get; init; } [JsonInclude] [JsonPropertyName("max_score")] @@ -54,7 +54,7 @@ public sealed partial class ScrollResponse : ElasticsearchResponseBas [JsonInclude] [JsonPropertyName("profile")] - public Elastic.Clients.Elasticsearch.Profile? Profile { get; init; } + public Elastic.Clients.Elasticsearch.Core.Search.Profile? Profile { get; init; } [JsonInclude] [JsonPropertyName("_scroll_id")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs index 5293f3db6fc..7f1e24f79fa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs @@ -135,7 +135,7 @@ public override SearchRequest Read(ref Utf8JsonReader reader, Type typeToConvert if (property == "collapse") { - variant.Collapse = JsonSerializer.Deserialize(ref reader, options); + variant.Collapse = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -159,13 +159,13 @@ public override SearchRequest Read(ref Utf8JsonReader reader, Type typeToConvert if (property == "highlight") { - variant.Highlight = JsonSerializer.Deserialize(ref reader, options); + variant.Highlight = JsonSerializer.Deserialize(ref reader, options); continue; } if (property == "track_total_hits") { - variant.TrackTotalHits = JsonSerializer.Deserialize(ref reader, options); + variant.TrackTotalHits = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -213,7 +213,7 @@ public override SearchRequest Read(ref Utf8JsonReader reader, Type typeToConvert if (property == "rescore") { - variant.Rescore = JsonSerializer.Deserialize?>(ref reader, options); + variant.Rescore = JsonSerializer.Deserialize?>(ref reader, options); continue; } @@ -249,7 +249,7 @@ public override SearchRequest Read(ref Utf8JsonReader reader, Type typeToConvert if (property == "_source") { - variant.Source = JsonSerializer.Deserialize(ref reader, options); + variant.Source = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -261,7 +261,7 @@ public override SearchRequest Read(ref Utf8JsonReader reader, Type typeToConvert if (property == "suggest") { - variant.Suggest = JsonSerializer.Deserialize(ref reader, options); + variant.Suggest = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -303,7 +303,7 @@ public override SearchRequest Read(ref Utf8JsonReader reader, Type typeToConvert if (property == "pit") { - variant.Pit = JsonSerializer.Deserialize(ref reader, options); + variant.Pit = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -630,7 +630,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => [JsonInclude] [JsonPropertyName("collapse")] - public Elastic.Clients.Elasticsearch.FieldCollapse? Collapse { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? Collapse { get; set; } [JsonInclude] [JsonPropertyName("explain")] @@ -646,11 +646,11 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => [JsonInclude] [JsonPropertyName("highlight")] - public Elastic.Clients.Elasticsearch.Highlight? Highlight { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.Highlight? Highlight { get; set; } [JsonInclude] [JsonPropertyName("track_total_hits")] - public Elastic.Clients.Elasticsearch.TrackHits? TrackTotalHits { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.TrackHits? TrackTotalHits { get; set; } [JsonInclude] [JsonPropertyName("indices_boost")] @@ -682,7 +682,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => [JsonInclude] [JsonPropertyName("rescore")] - public IEnumerable? Rescore { get; set; } + public IEnumerable? Rescore { get; set; } [JsonInclude] [JsonPropertyName("script_fields")] @@ -707,7 +707,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => [JsonInclude] [JsonPropertyName("_source")] - public Elastic.Clients.Elasticsearch.SourceConfig? Source { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? Source { get; set; } [JsonInclude] [JsonPropertyName("fields")] @@ -715,7 +715,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => [JsonInclude] [JsonPropertyName("suggest")] - public Elastic.Clients.Elasticsearch.Suggester? Suggest { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.Suggester? Suggest { get; set; } [JsonInclude] [JsonPropertyName("terminate_after")] @@ -743,7 +743,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Indices? indices) : base(r => [JsonInclude] [JsonPropertyName("pit")] - public Elastic.Clients.Elasticsearch.PointInTimeReference? Pit { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? Pit { get; set; } [JsonInclude] [JsonPropertyName("runtime_mappings")] @@ -816,11 +816,11 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private Action> AggregationsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.FieldCollapse? CollapseValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? CollapseValue { get; set; } - private FieldCollapseDescriptor CollapseDescriptor { get; set; } + private Core.Search.FieldCollapseDescriptor CollapseDescriptor { get; set; } - private Action> CollapseDescriptorAction { get; set; } + private Action> CollapseDescriptorAction { get; set; } private IEnumerable? DocvalueFieldsValue { get; set; } @@ -838,11 +838,11 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private Action>[] FieldsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Highlight? HighlightValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.Highlight? HighlightValue { get; set; } - private HighlightDescriptor HighlightDescriptor { get; set; } + private Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } - private Action> HighlightDescriptorAction { get; set; } + private Action> HighlightDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.KnnQuery? KnnValue { get; set; } @@ -862,13 +862,13 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private Action> QueryDescriptorAction { get; set; } - private IEnumerable? RescoreValue { get; set; } + private IEnumerable? RescoreValue { get; set; } - private RescoreDescriptor RescoreDescriptor { get; set; } + private Core.Search.RescoreDescriptor RescoreDescriptor { get; set; } - private Action> RescoreDescriptorAction { get; set; } + private Action> RescoreDescriptorAction { get; set; } - private Action>[] RescoreDescriptorActions { get; set; } + private Action>[] RescoreDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.SlicedScroll? SliceValue { get; set; } @@ -876,7 +876,7 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private Action> SliceDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.SourceConfig? SourceValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? SourceValue { get; set; } private bool? ExplainValue { get; set; } @@ -888,11 +888,11 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private double? MinScoreValue { get; set; } - private Elastic.Clients.Elasticsearch.PointInTimeReference? PitValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? PitValue { get; set; } - private PointInTimeReferenceDescriptor PitDescriptor { get; set; } + private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } - private Action PitDescriptorAction { get; set; } + private Action PitDescriptorAction { get; set; } private bool? ProfileValue { get; set; } @@ -912,11 +912,11 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private Elastic.Clients.Elasticsearch.Fields? StoredFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Suggester? SuggestValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.Suggester? SuggestValue { get; set; } - private SuggesterDescriptor SuggestDescriptor { get; set; } + private Core.Search.SuggesterDescriptor SuggestDescriptor { get; set; } - private Action SuggestDescriptorAction { get; set; } + private Action SuggestDescriptorAction { get; set; } private long? TerminateAfterValue { get; set; } @@ -924,7 +924,7 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch. private bool? TrackScoresValue { get; set; } - private Elastic.Clients.Elasticsearch.TrackHits? TrackTotalHitsValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.TrackHits? TrackTotalHitsValue { get; set; } private bool? VersionValue { get; set; } @@ -952,7 +952,7 @@ public SearchRequestDescriptor Aggregations(Action Collapse(Elastic.Clients.Elasticsearch.FieldCollapse? collapse) + public SearchRequestDescriptor Collapse(Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? collapse) { CollapseDescriptor = null; CollapseDescriptorAction = null; @@ -960,7 +960,7 @@ public SearchRequestDescriptor Collapse(Elastic.Clients.Elasticsearch return Self; } - public SearchRequestDescriptor Collapse(FieldCollapseDescriptor descriptor) + public SearchRequestDescriptor Collapse(Core.Search.FieldCollapseDescriptor descriptor) { CollapseValue = null; CollapseDescriptorAction = null; @@ -968,7 +968,7 @@ public SearchRequestDescriptor Collapse(FieldCollapseDescriptor Collapse(Action> configure) + public SearchRequestDescriptor Collapse(Action> configure) { CollapseValue = null; CollapseDescriptor = null; @@ -1048,7 +1048,7 @@ public SearchRequestDescriptor Fields(params Action Highlight(Elastic.Clients.Elasticsearch.Highlight? highlight) + public SearchRequestDescriptor Highlight(Elastic.Clients.Elasticsearch.Core.Search.Highlight? highlight) { HighlightDescriptor = null; HighlightDescriptorAction = null; @@ -1056,7 +1056,7 @@ public SearchRequestDescriptor Highlight(Elastic.Clients.Elasticsearc return Self; } - public SearchRequestDescriptor Highlight(HighlightDescriptor descriptor) + public SearchRequestDescriptor Highlight(Core.Search.HighlightDescriptor descriptor) { HighlightValue = null; HighlightDescriptorAction = null; @@ -1064,7 +1064,7 @@ public SearchRequestDescriptor Highlight(HighlightDescriptor Highlight(Action> configure) + public SearchRequestDescriptor Highlight(Action> configure) { HighlightValue = null; HighlightDescriptor = null; @@ -1144,7 +1144,7 @@ public SearchRequestDescriptor Query(Action Rescore(IEnumerable? rescore) + public SearchRequestDescriptor Rescore(IEnumerable? rescore) { RescoreDescriptor = null; RescoreDescriptorAction = null; @@ -1153,7 +1153,7 @@ public SearchRequestDescriptor Rescore(IEnumerable Rescore(RescoreDescriptor descriptor) + public SearchRequestDescriptor Rescore(Core.Search.RescoreDescriptor descriptor) { RescoreValue = null; RescoreDescriptorAction = null; @@ -1162,7 +1162,7 @@ public SearchRequestDescriptor Rescore(RescoreDescriptor d return Self; } - public SearchRequestDescriptor Rescore(Action> configure) + public SearchRequestDescriptor Rescore(Action> configure) { RescoreValue = null; RescoreDescriptor = null; @@ -1171,7 +1171,7 @@ public SearchRequestDescriptor Rescore(Action Rescore(params Action>[] configure) + public SearchRequestDescriptor Rescore(params Action>[] configure) { RescoreValue = null; RescoreDescriptor = null; @@ -1204,7 +1204,7 @@ public SearchRequestDescriptor Slice(Action Source(Elastic.Clients.Elasticsearch.SourceConfig? source) + public SearchRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? source) { SourceValue = source; return Self; @@ -1240,7 +1240,7 @@ public SearchRequestDescriptor MinScore(double? minScore) return Self; } - public SearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.PointInTimeReference? pit) + public SearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? pit) { PitDescriptor = null; PitDescriptorAction = null; @@ -1248,7 +1248,7 @@ public SearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Poin return Self; } - public SearchRequestDescriptor Pit(PointInTimeReferenceDescriptor descriptor) + public SearchRequestDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor) { PitValue = null; PitDescriptorAction = null; @@ -1256,7 +1256,7 @@ public SearchRequestDescriptor Pit(PointInTimeReferenceDescriptor des return Self; } - public SearchRequestDescriptor Pit(Action configure) + public SearchRequestDescriptor Pit(Action configure) { PitValue = null; PitDescriptor = null; @@ -1318,7 +1318,7 @@ public SearchRequestDescriptor StoredFields(Elastic.Clients.Elasticse return Self; } - public SearchRequestDescriptor Suggest(Elastic.Clients.Elasticsearch.Suggester? suggest) + public SearchRequestDescriptor Suggest(Elastic.Clients.Elasticsearch.Core.Search.Suggester? suggest) { SuggestDescriptor = null; SuggestDescriptorAction = null; @@ -1326,7 +1326,7 @@ public SearchRequestDescriptor Suggest(Elastic.Clients.Elasticsearch. return Self; } - public SearchRequestDescriptor Suggest(SuggesterDescriptor descriptor) + public SearchRequestDescriptor Suggest(Core.Search.SuggesterDescriptor descriptor) { SuggestValue = null; SuggestDescriptorAction = null; @@ -1334,7 +1334,7 @@ public SearchRequestDescriptor Suggest(SuggesterDescriptor descriptor return Self; } - public SearchRequestDescriptor Suggest(Action configure) + public SearchRequestDescriptor Suggest(Action configure) { SuggestValue = null; SuggestDescriptor = null; @@ -1360,7 +1360,7 @@ public SearchRequestDescriptor TrackScores(bool? trackScores = true) return Self; } - public SearchRequestDescriptor TrackTotalHits(Elastic.Clients.Elasticsearch.TrackHits? trackTotalHits) + public SearchRequestDescriptor TrackTotalHits(Elastic.Clients.Elasticsearch.Core.Search.TrackHits? trackTotalHits) { TrackTotalHitsValue = trackTotalHits; return Self; @@ -1399,7 +1399,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (CollapseDescriptorAction is not null) { writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, new FieldCollapseDescriptor(CollapseDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.FieldCollapseDescriptor(CollapseDescriptorAction), options); } else if (CollapseValue is not null) { @@ -1477,7 +1477,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (HighlightDescriptorAction is not null) { writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, new HighlightDescriptor(HighlightDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.HighlightDescriptor(HighlightDescriptorAction), options); } else if (HighlightValue is not null) { @@ -1544,7 +1544,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o { writer.WritePropertyName("rescore"); writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new RescoreDescriptor(RescoreDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.RescoreDescriptor(RescoreDescriptorAction), options); writer.WriteEndArray(); } else if (RescoreDescriptorActions is not null) @@ -1553,7 +1553,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartArray(); foreach (var action in RescoreDescriptorActions) { - JsonSerializer.Serialize(writer, new RescoreDescriptor(action), options); + JsonSerializer.Serialize(writer, new Core.Search.RescoreDescriptor(action), options); } writer.WriteEndArray(); @@ -1624,7 +1624,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (PitDescriptorAction is not null) { writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, new PointInTimeReferenceDescriptor(PitDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); } else if (PitValue is not null) { @@ -1694,7 +1694,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (SuggestDescriptorAction is not null) { writer.WritePropertyName("suggest"); - JsonSerializer.Serialize(writer, new SuggesterDescriptor(SuggestDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.SuggesterDescriptor(SuggestDescriptorAction), options); } else if (SuggestValue is not null) { @@ -1791,11 +1791,11 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? in private Action AggregationsDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.FieldCollapse? CollapseValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? CollapseValue { get; set; } - private FieldCollapseDescriptor CollapseDescriptor { get; set; } + private Core.Search.FieldCollapseDescriptor CollapseDescriptor { get; set; } - private Action CollapseDescriptorAction { get; set; } + private Action CollapseDescriptorAction { get; set; } private IEnumerable? DocvalueFieldsValue { get; set; } @@ -1813,11 +1813,11 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? in private Action[] FieldsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Highlight? HighlightValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.Highlight? HighlightValue { get; set; } - private HighlightDescriptor HighlightDescriptor { get; set; } + private Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } - private Action HighlightDescriptorAction { get; set; } + private Action HighlightDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.KnnQuery? KnnValue { get; set; } @@ -1837,13 +1837,13 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? in private Action QueryDescriptorAction { get; set; } - private IEnumerable? RescoreValue { get; set; } + private IEnumerable? RescoreValue { get; set; } - private RescoreDescriptor RescoreDescriptor { get; set; } + private Core.Search.RescoreDescriptor RescoreDescriptor { get; set; } - private Action RescoreDescriptorAction { get; set; } + private Action RescoreDescriptorAction { get; set; } - private Action[] RescoreDescriptorActions { get; set; } + private Action[] RescoreDescriptorActions { get; set; } private Elastic.Clients.Elasticsearch.SlicedScroll? SliceValue { get; set; } @@ -1851,7 +1851,7 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? in private Action SliceDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.SourceConfig? SourceValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? SourceValue { get; set; } private bool? ExplainValue { get; set; } @@ -1863,11 +1863,11 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? in private double? MinScoreValue { get; set; } - private Elastic.Clients.Elasticsearch.PointInTimeReference? PitValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? PitValue { get; set; } - private PointInTimeReferenceDescriptor PitDescriptor { get; set; } + private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } - private Action PitDescriptorAction { get; set; } + private Action PitDescriptorAction { get; set; } private bool? ProfileValue { get; set; } @@ -1887,11 +1887,11 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? in private Elastic.Clients.Elasticsearch.Fields? StoredFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Suggester? SuggestValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.Suggester? SuggestValue { get; set; } - private SuggesterDescriptor SuggestDescriptor { get; set; } + private Core.Search.SuggesterDescriptor SuggestDescriptor { get; set; } - private Action SuggestDescriptorAction { get; set; } + private Action SuggestDescriptorAction { get; set; } private long? TerminateAfterValue { get; set; } @@ -1899,7 +1899,7 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? in private bool? TrackScoresValue { get; set; } - private Elastic.Clients.Elasticsearch.TrackHits? TrackTotalHitsValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.TrackHits? TrackTotalHitsValue { get; set; } private bool? VersionValue { get; set; } @@ -1927,7 +1927,7 @@ public SearchRequestDescriptor Aggregations(Action configure) + public SearchRequestDescriptor Collapse(Action configure) { CollapseValue = null; CollapseDescriptor = null; @@ -2023,7 +2023,7 @@ public SearchRequestDescriptor Fields(params Action configure) + public SearchRequestDescriptor Highlight(Action configure) { HighlightValue = null; HighlightDescriptor = null; @@ -2119,7 +2119,7 @@ public SearchRequestDescriptor Query(Action c return Self; } - public SearchRequestDescriptor Rescore(IEnumerable? rescore) + public SearchRequestDescriptor Rescore(IEnumerable? rescore) { RescoreDescriptor = null; RescoreDescriptorAction = null; @@ -2128,7 +2128,7 @@ public SearchRequestDescriptor Rescore(IEnumerable configure) + public SearchRequestDescriptor Rescore(Action configure) { RescoreValue = null; RescoreDescriptor = null; @@ -2146,7 +2146,7 @@ public SearchRequestDescriptor Rescore(Action configure) return Self; } - public SearchRequestDescriptor Rescore(params Action[] configure) + public SearchRequestDescriptor Rescore(params Action[] configure) { RescoreValue = null; RescoreDescriptor = null; @@ -2179,7 +2179,7 @@ public SearchRequestDescriptor Slice(Action configure) return Self; } - public SearchRequestDescriptor Source(Elastic.Clients.Elasticsearch.SourceConfig? source) + public SearchRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? source) { SourceValue = source; return Self; @@ -2215,7 +2215,7 @@ public SearchRequestDescriptor MinScore(double? minScore) return Self; } - public SearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.PointInTimeReference? pit) + public SearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? pit) { PitDescriptor = null; PitDescriptorAction = null; @@ -2223,7 +2223,7 @@ public SearchRequestDescriptor Pit(Elastic.Clients.Elasticsearch.PointInTimeRefe return Self; } - public SearchRequestDescriptor Pit(PointInTimeReferenceDescriptor descriptor) + public SearchRequestDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor) { PitValue = null; PitDescriptorAction = null; @@ -2231,7 +2231,7 @@ public SearchRequestDescriptor Pit(PointInTimeReferenceDescriptor descriptor) return Self; } - public SearchRequestDescriptor Pit(Action configure) + public SearchRequestDescriptor Pit(Action configure) { PitValue = null; PitDescriptor = null; @@ -2293,7 +2293,7 @@ public SearchRequestDescriptor StoredFields(Elastic.Clients.Elasticsearch.Fields return Self; } - public SearchRequestDescriptor Suggest(Elastic.Clients.Elasticsearch.Suggester? suggest) + public SearchRequestDescriptor Suggest(Elastic.Clients.Elasticsearch.Core.Search.Suggester? suggest) { SuggestDescriptor = null; SuggestDescriptorAction = null; @@ -2301,7 +2301,7 @@ public SearchRequestDescriptor Suggest(Elastic.Clients.Elasticsearch.Suggester? return Self; } - public SearchRequestDescriptor Suggest(SuggesterDescriptor descriptor) + public SearchRequestDescriptor Suggest(Core.Search.SuggesterDescriptor descriptor) { SuggestValue = null; SuggestDescriptorAction = null; @@ -2309,7 +2309,7 @@ public SearchRequestDescriptor Suggest(SuggesterDescriptor descriptor) return Self; } - public SearchRequestDescriptor Suggest(Action configure) + public SearchRequestDescriptor Suggest(Action configure) { SuggestValue = null; SuggestDescriptor = null; @@ -2335,7 +2335,7 @@ public SearchRequestDescriptor TrackScores(bool? trackScores = true) return Self; } - public SearchRequestDescriptor TrackTotalHits(Elastic.Clients.Elasticsearch.TrackHits? trackTotalHits) + public SearchRequestDescriptor TrackTotalHits(Elastic.Clients.Elasticsearch.Core.Search.TrackHits? trackTotalHits) { TrackTotalHitsValue = trackTotalHits; return Self; @@ -2374,7 +2374,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (CollapseDescriptorAction is not null) { writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, new FieldCollapseDescriptor(CollapseDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.FieldCollapseDescriptor(CollapseDescriptorAction), options); } else if (CollapseValue is not null) { @@ -2452,7 +2452,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (HighlightDescriptorAction is not null) { writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, new HighlightDescriptor(HighlightDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.HighlightDescriptor(HighlightDescriptorAction), options); } else if (HighlightValue is not null) { @@ -2519,7 +2519,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o { writer.WritePropertyName("rescore"); writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new RescoreDescriptor(RescoreDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.RescoreDescriptor(RescoreDescriptorAction), options); writer.WriteEndArray(); } else if (RescoreDescriptorActions is not null) @@ -2528,7 +2528,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartArray(); foreach (var action in RescoreDescriptorActions) { - JsonSerializer.Serialize(writer, new RescoreDescriptor(action), options); + JsonSerializer.Serialize(writer, new Core.Search.RescoreDescriptor(action), options); } writer.WriteEndArray(); @@ -2599,7 +2599,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (PitDescriptorAction is not null) { writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, new PointInTimeReferenceDescriptor(PitDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); } else if (PitValue is not null) { @@ -2669,7 +2669,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (SuggestDescriptorAction is not null) { writer.WritePropertyName("suggest"); - JsonSerializer.Serialize(writer, new SuggesterDescriptor(SuggestDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.SuggesterDescriptor(SuggestDescriptorAction), options); } else if (SuggestValue is not null) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchResponse.g.cs index 8f75fc3bd10..95ed347185c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchResponse.g.cs @@ -38,7 +38,7 @@ public sealed partial class SearchResponse : ElasticsearchResponseBas [JsonInclude] [JsonPropertyName("hits")] - public Elastic.Clients.Elasticsearch.HitsMetadata HitsMetadata { get; init; } + public Elastic.Clients.Elasticsearch.Core.Search.HitsMetadata HitsMetadata { get; init; } [JsonInclude] [JsonPropertyName("max_score")] @@ -54,7 +54,7 @@ public sealed partial class SearchResponse : ElasticsearchResponseBas [JsonInclude] [JsonPropertyName("profile")] - public Elastic.Clients.Elasticsearch.Profile? Profile { get; init; } + public Elastic.Clients.Elasticsearch.Core.Search.Profile? Profile { get; init; } [JsonInclude] [JsonPropertyName("_scroll_id")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchShardsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchShardsResponse.g.cs index ca1af1f60c0..e339fed02fc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchShardsResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchShardsResponse.g.cs @@ -26,7 +26,7 @@ public sealed partial class SearchShardsResponse : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("indices")] - public Dictionary Indices { get; init; } + public Dictionary Indices { get; init; } [JsonInclude] [JsonPropertyName("nodes")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SourceRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SourceRequest.g.cs index e99757ffe37..a14ee962727 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SourceRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SourceRequest.g.cs @@ -40,7 +40,7 @@ public sealed class SourceRequestParameters : RequestParameters Q("routing"); set => Q("routing", value); } [JsonIgnore] - public Elastic.Clients.Elasticsearch.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } + public Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } [JsonIgnore] public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } @@ -80,7 +80,7 @@ public SourceRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q("routing"); set => Q("routing", value); } [JsonIgnore] - public Elastic.Clients.Elasticsearch.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } + public Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? Source { get => Q("_source"); set => Q("_source", value); } [JsonIgnore] public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q("_source_excludes"); set => Q("_source_excludes", value); } @@ -132,7 +132,7 @@ internal SourceRequestDescriptor() internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceGetSource; protected override HttpMethod HttpMethod => HttpMethod.GET; protected override bool SupportsBody => false; - public SourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.SourceConfigParam? source) => Qs("_source", source); + public SourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); public SourceRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); public SourceRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public SourceRequestDescriptor Preference(string? preference) => Qs("preference", preference); @@ -173,7 +173,7 @@ internal SourceRequestDescriptor() internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceGetSource; protected override HttpMethod HttpMethod => HttpMethod.GET; protected override bool SupportsBody => false; - public SourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.SourceConfigParam? source) => Qs("_source", source); + public SourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfigParam? source) => Qs("_source", source); public SourceRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes); public SourceRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes); public SourceRequestDescriptor Preference(string? preference) => Qs("preference", preference); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRethrottleResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRethrottleResponse.g.cs index 7ed592bbbea..99ebe410360 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRethrottleResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRethrottleResponse.g.cs @@ -26,6 +26,6 @@ public sealed partial class UpdateByQueryRethrottleResponse : ElasticsearchRespo { [JsonInclude] [JsonPropertyName("nodes")] - public Dictionary Nodes { get; init; } + public Dictionary Nodes { get; init; } } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateRequest.g.cs index 91253832142..fbf073eeb31 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateRequest.g.cs @@ -126,7 +126,7 @@ public UpdateRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clie [JsonInclude] [JsonPropertyName("_source")] - public Elastic.Clients.Elasticsearch.SourceConfig? Source { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? Source { get; set; } [JsonInclude] [JsonPropertyName("upsert")] @@ -191,7 +191,7 @@ public UpdateRequestDescriptor Index(Elastic.Client return Self; } - private Elastic.Clients.Elasticsearch.SourceConfig? SourceValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? SourceValue { get; set; } private bool? DetectNoopValue { get; set; } @@ -205,7 +205,7 @@ public UpdateRequestDescriptor Index(Elastic.Client private TDocument? UpsertValue { get; set; } - public UpdateRequestDescriptor Source(Elastic.Clients.Elasticsearch.SourceConfig? source) + public UpdateRequestDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? source) { SourceValue = source; return Self; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketsPath.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketsPath.g.cs deleted file mode 100644 index 87d5a22ae15..00000000000 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketsPath.g.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -#nullable restore -namespace Elastic.Clients.Elasticsearch.Aggregations -{ - public partial class BucketsPath - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeCardinalityAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeCardinalityAggregation.g.cs index 31be1f3ef32..be658c6355e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeCardinalityAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeCardinalityAggregation.g.cs @@ -39,18 +39,6 @@ public override CumulativeCardinalityAggregation Read(ref Utf8JsonReader reader, { if (reader.TokenType == JsonTokenType.PropertyName) { - if (reader.ValueTextEquals("buckets_path")) - { - reader.Read(); - var value = JsonSerializer.Deserialize(ref reader, options); - if (value is not null) - { - agg.BucketsPath = value; - } - - continue; - } - if (reader.ValueTextEquals("format")) { reader.Read(); @@ -102,12 +90,6 @@ public override void Write(Utf8JsonWriter writer, CumulativeCardinalityAggregati writer.WriteStartObject(); writer.WritePropertyName("cumulative_cardinality"); writer.WriteStartObject(); - if (value.BucketsPath is not null) - { - writer.WritePropertyName("buckets_path"); - JsonSerializer.Serialize(writer, value.BucketsPath, options); - } - if (!string.IsNullOrEmpty(value.Format)) { writer.WritePropertyName("format"); @@ -139,8 +121,6 @@ internal CumulativeCardinalityAggregation() { } - public Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPath { get; set; } - public string? Format { get; set; } public Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicy { get; set; } @@ -157,20 +137,12 @@ public CumulativeCardinalityAggregationDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPathValue { get; set; } - private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } private Dictionary? MetaValue { get; set; } - public CumulativeCardinalityAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? bucketsPath) - { - BucketsPathValue = bucketsPath; - return Self; - } - public CumulativeCardinalityAggregationDescriptor Format(string? format) { FormatValue = format; @@ -194,12 +166,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName("cumulative_cardinality"); writer.WriteStartObject(); - if (BucketsPathValue is not null) - { - writer.WritePropertyName("buckets_path"); - JsonSerializer.Serialize(writer, BucketsPathValue, options); - } - if (!string.IsNullOrEmpty(FormatValue)) { writer.WritePropertyName("format"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DerivativeAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DerivativeAggregation.g.cs index 60354a402ce..e29d5abffee 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DerivativeAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DerivativeAggregation.g.cs @@ -39,18 +39,6 @@ public override DerivativeAggregation Read(ref Utf8JsonReader reader, Type typeT { if (reader.TokenType == JsonTokenType.PropertyName) { - if (reader.ValueTextEquals("buckets_path")) - { - reader.Read(); - var value = JsonSerializer.Deserialize(ref reader, options); - if (value is not null) - { - agg.BucketsPath = value; - } - - continue; - } - if (reader.ValueTextEquals("format")) { reader.Read(); @@ -102,12 +90,6 @@ public override void Write(Utf8JsonWriter writer, DerivativeAggregation value, J writer.WriteStartObject(); writer.WritePropertyName("derivative"); writer.WriteStartObject(); - if (value.BucketsPath is not null) - { - writer.WritePropertyName("buckets_path"); - JsonSerializer.Serialize(writer, value.BucketsPath, options); - } - if (!string.IsNullOrEmpty(value.Format)) { writer.WritePropertyName("format"); @@ -139,8 +121,6 @@ internal DerivativeAggregation() { } - public Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPath { get; set; } - public string? Format { get; set; } public Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicy { get; set; } @@ -157,20 +137,12 @@ public DerivativeAggregationDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPathValue { get; set; } - private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } private Dictionary? MetaValue { get; set; } - public DerivativeAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? bucketsPath) - { - BucketsPathValue = bucketsPath; - return Self; - } - public DerivativeAggregationDescriptor Format(string? format) { FormatValue = format; @@ -194,12 +166,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName("derivative"); writer.WriteStartObject(); - if (BucketsPathValue is not null) - { - writer.WritePropertyName("buckets_path"); - JsonSerializer.Serialize(writer, BucketsPathValue, options); - } - if (!string.IsNullOrEmpty(FormatValue)) { writer.WritePropertyName("format"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsBucketAggregation.g.cs index 114c97e2fb8..a895d94c51f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsBucketAggregation.g.cs @@ -39,18 +39,6 @@ public override ExtendedStatsBucketAggregation Read(ref Utf8JsonReader reader, T { if (reader.TokenType == JsonTokenType.PropertyName) { - if (reader.ValueTextEquals("buckets_path")) - { - reader.Read(); - var value = JsonSerializer.Deserialize(ref reader, options); - if (value is not null) - { - agg.BucketsPath = value; - } - - continue; - } - if (reader.ValueTextEquals("format")) { reader.Read(); @@ -114,12 +102,6 @@ public override void Write(Utf8JsonWriter writer, ExtendedStatsBucketAggregation writer.WriteStartObject(); writer.WritePropertyName("extended_stats_bucket"); writer.WriteStartObject(); - if (value.BucketsPath is not null) - { - writer.WritePropertyName("buckets_path"); - JsonSerializer.Serialize(writer, value.BucketsPath, options); - } - if (!string.IsNullOrEmpty(value.Format)) { writer.WritePropertyName("format"); @@ -157,8 +139,6 @@ internal ExtendedStatsBucketAggregation() { } - public Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPath { get; set; } - public string? Format { get; set; } public Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicy { get; set; } @@ -177,8 +157,6 @@ public ExtendedStatsBucketAggregationDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPathValue { get; set; } - private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } @@ -187,12 +165,6 @@ public ExtendedStatsBucketAggregationDescriptor() : base() private double? SigmaValue { get; set; } - public ExtendedStatsBucketAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? bucketsPath) - { - BucketsPathValue = bucketsPath; - return Self; - } - public ExtendedStatsBucketAggregationDescriptor Format(string? format) { FormatValue = format; @@ -222,12 +194,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName("extended_stats_bucket"); writer.WriteStartObject(); - if (BucketsPathValue is not null) - { - writer.WritePropertyName("buckets_path"); - JsonSerializer.Serialize(writer, BucketsPathValue, options); - } - if (!string.IsNullOrEmpty(FormatValue)) { writer.WritePropertyName("format"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceAggregation.g.cs index a379dc576ff..c909eb198e9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceAggregation.g.cs @@ -39,18 +39,6 @@ public override InferenceAggregation Read(ref Utf8JsonReader reader, Type typeTo { if (reader.TokenType == JsonTokenType.PropertyName) { - if (reader.ValueTextEquals("buckets_path")) - { - reader.Read(); - var value = JsonSerializer.Deserialize(ref reader, options); - if (value is not null) - { - agg.BucketsPath = value; - } - - continue; - } - if (reader.ValueTextEquals("format")) { reader.Read(); @@ -126,12 +114,6 @@ public override void Write(Utf8JsonWriter writer, InferenceAggregation value, Js writer.WriteStartObject(); writer.WritePropertyName("inference"); writer.WriteStartObject(); - if (value.BucketsPath is not null) - { - writer.WritePropertyName("buckets_path"); - JsonSerializer.Serialize(writer, value.BucketsPath, options); - } - if (!string.IsNullOrEmpty(value.Format)) { writer.WritePropertyName("format"); @@ -171,8 +153,6 @@ internal InferenceAggregation() { } - public Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPath { get; set; } - public string? Format { get; set; } public Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicy { get; set; } @@ -199,8 +179,6 @@ public InferenceAggregationDescriptor() : base() private Action> InferenceConfigDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPathValue { get; set; } - private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } @@ -233,12 +211,6 @@ public InferenceAggregationDescriptor InferenceConfig(Action BucketsPath(Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? bucketsPath) - { - BucketsPathValue = bucketsPath; - return Self; - } - public InferenceAggregationDescriptor Format(string? format) { FormatValue = format; @@ -284,12 +256,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, InferenceConfigValue, options); } - if (BucketsPathValue is not null) - { - writer.WritePropertyName("buckets_path"); - JsonSerializer.Serialize(writer, BucketsPathValue, options); - } - if (!string.IsNullOrEmpty(FormatValue)) { writer.WritePropertyName("format"); @@ -328,8 +294,6 @@ public InferenceAggregationDescriptor() : base() private Action InferenceConfigDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPathValue { get; set; } - private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } @@ -362,12 +326,6 @@ public InferenceAggregationDescriptor InferenceConfig(Action(ref reader, options); - if (value is not null) - { - agg.BucketsPath = value; - } - - continue; - } - if (reader.ValueTextEquals("format")) { reader.Read(); @@ -114,12 +102,6 @@ public override void Write(Utf8JsonWriter writer, PercentilesBucketAggregation v writer.WriteStartObject(); writer.WritePropertyName("percentiles_bucket"); writer.WriteStartObject(); - if (value.BucketsPath is not null) - { - writer.WritePropertyName("buckets_path"); - JsonSerializer.Serialize(writer, value.BucketsPath, options); - } - if (!string.IsNullOrEmpty(value.Format)) { writer.WritePropertyName("format"); @@ -157,8 +139,6 @@ internal PercentilesBucketAggregation() { } - public Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPath { get; set; } - public string? Format { get; set; } public Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicy { get; set; } @@ -177,8 +157,6 @@ public PercentilesBucketAggregationDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPathValue { get; set; } - private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } @@ -187,12 +165,6 @@ public PercentilesBucketAggregationDescriptor() : base() private IEnumerable? PercentsValue { get; set; } - public PercentilesBucketAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? bucketsPath) - { - BucketsPathValue = bucketsPath; - return Self; - } - public PercentilesBucketAggregationDescriptor Format(string? format) { FormatValue = format; @@ -222,12 +194,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName("percentiles_bucket"); writer.WriteStartObject(); - if (BucketsPathValue is not null) - { - writer.WritePropertyName("buckets_path"); - JsonSerializer.Serialize(writer, BucketsPathValue, options); - } - if (!string.IsNullOrEmpty(FormatValue)) { writer.WritePropertyName("format"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsBucketAggregation.g.cs index c3e3748ecc5..b5dc782faaf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsBucketAggregation.g.cs @@ -39,18 +39,6 @@ public override StatsBucketAggregation Read(ref Utf8JsonReader reader, Type type { if (reader.TokenType == JsonTokenType.PropertyName) { - if (reader.ValueTextEquals("buckets_path")) - { - reader.Read(); - var value = JsonSerializer.Deserialize(ref reader, options); - if (value is not null) - { - agg.BucketsPath = value; - } - - continue; - } - if (reader.ValueTextEquals("format")) { reader.Read(); @@ -102,12 +90,6 @@ public override void Write(Utf8JsonWriter writer, StatsBucketAggregation value, writer.WriteStartObject(); writer.WritePropertyName("stats_bucket"); writer.WriteStartObject(); - if (value.BucketsPath is not null) - { - writer.WritePropertyName("buckets_path"); - JsonSerializer.Serialize(writer, value.BucketsPath, options); - } - if (!string.IsNullOrEmpty(value.Format)) { writer.WritePropertyName("format"); @@ -139,8 +121,6 @@ internal StatsBucketAggregation() { } - public Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPath { get; set; } - public string? Format { get; set; } public Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicy { get; set; } @@ -157,20 +137,12 @@ public StatsBucketAggregationDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPathValue { get; set; } - private string? FormatValue { get; set; } private Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? GapPolicyValue { get; set; } private Dictionary? MetaValue { get; set; } - public StatsBucketAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? bucketsPath) - { - BucketsPathValue = bucketsPath; - return Self; - } - public StatsBucketAggregationDescriptor Format(string? format) { FormatValue = format; @@ -194,12 +166,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartObject(); writer.WritePropertyName("stats_bucket"); writer.WriteStartObject(); - if (BucketsPathValue is not null) - { - writer.WritePropertyName("buckets_path"); - JsonSerializer.Serialize(writer, BucketsPathValue, options); - } - if (!string.IsNullOrEmpty(FormatValue)) { writer.WritePropertyName("format"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsAggregation.g.cs index 20a7d4d7a73..5d81a6c9cde 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsAggregation.g.cs @@ -99,18 +99,6 @@ public override TermsAggregation Read(ref Utf8JsonReader reader, Type typeToConv continue; } - if (reader.ValueTextEquals("include")) - { - reader.Read(); - var value = JsonSerializer.Deserialize(ref reader, options); - if (value is not null) - { - agg.Include = value; - } - - continue; - } - if (reader.ValueTextEquals("min_doc_count")) { reader.Read(); @@ -299,12 +287,6 @@ public override void Write(Utf8JsonWriter writer, TermsAggregation value, JsonSe writer.WriteStringValue(value.Format); } - if (value.Include is not null) - { - writer.WritePropertyName("include"); - JsonSerializer.Serialize(writer, value.Include, options); - } - if (value.MinDocCount.HasValue) { writer.WritePropertyName("min_doc_count"); @@ -403,8 +385,6 @@ internal TermsAggregation() public string? Format { get; set; } - public Elastic.Clients.Elasticsearch.Aggregations.TermsInclude? Include { get; set; } - public Dictionary? Meta { get; set; } public int? MinDocCount { get; set; } @@ -454,8 +434,6 @@ public TermsAggregationDescriptor() : base() private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Aggregations.TermsInclude? IncludeValue { get; set; } - private Dictionary? MetaValue { get; set; } private int? MinDocCountValue { get; set; } @@ -538,12 +516,6 @@ public TermsAggregationDescriptor Format(string? format) return Self; } - public TermsAggregationDescriptor Include(Elastic.Clients.Elasticsearch.Aggregations.TermsInclude? include) - { - IncludeValue = include; - return Self; - } - public TermsAggregationDescriptor Meta(Func, FluentDictionary> selector) { MetaValue = selector?.Invoke(new FluentDictionary()); @@ -645,12 +617,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(FormatValue); } - if (IncludeValue is not null) - { - writer.WritePropertyName("include"); - JsonSerializer.Serialize(writer, IncludeValue, options); - } - if (MinDocCountValue.HasValue) { writer.WritePropertyName("min_doc_count"); @@ -761,8 +727,6 @@ public TermsAggregationDescriptor() : base() private string? FormatValue { get; set; } - private Elastic.Clients.Elasticsearch.Aggregations.TermsInclude? IncludeValue { get; set; } - private Dictionary? MetaValue { get; set; } private int? MinDocCountValue { get; set; } @@ -851,12 +815,6 @@ public TermsAggregationDescriptor Format(string? format) return Self; } - public TermsAggregationDescriptor Include(Elastic.Clients.Elasticsearch.Aggregations.TermsInclude? include) - { - IncludeValue = include; - return Self; - } - public TermsAggregationDescriptor Meta(Func, FluentDictionary> selector) { MetaValue = selector?.Invoke(new FluentDictionary()); @@ -958,12 +916,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStringValue(FormatValue); } - if (IncludeValue is not null) - { - writer.WritePropertyName("include"); - JsonSerializer.Serialize(writer, IncludeValue, options); - } - if (MinDocCountValue.HasValue) { writer.WritePropertyName("min_doc_count"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsInclude.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsInclude.g.cs deleted file mode 100644 index b443765fc6a..00000000000 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsInclude.g.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -#nullable restore -namespace Elastic.Clients.Elasticsearch.Aggregations -{ - public partial class TermsInclude - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsPartition.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsPartition.g.cs deleted file mode 100644 index a3db57d9b51..00000000000 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsPartition.g.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -#nullable restore -namespace Elastic.Clients.Elasticsearch.Aggregations -{ - public sealed partial class TermsPartition - { - [JsonInclude] - [JsonPropertyName("num_partitions")] - public long NumPartitions { get; set; } - - [JsonInclude] - [JsonPropertyName("partition")] - public long Partition { get; set; } - } - - public sealed partial class TermsPartitionDescriptor : SerializableDescriptorBase - { - internal TermsPartitionDescriptor(Action configure) => configure.Invoke(this); - public TermsPartitionDescriptor() : base() - { - } - - private long NumPartitionsValue { get; set; } - - private long PartitionValue { get; set; } - - public TermsPartitionDescriptor NumPartitions(long numPartitions) - { - NumPartitionsValue = numPartitions; - return Self; - } - - public TermsPartitionDescriptor Partition(long partition) - { - PartitionValue = partition; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("num_partitions"); - writer.WriteNumberValue(NumPartitionsValue); - writer.WritePropertyName("partition"); - writer.WriteNumberValue(PartitionValue); - writer.WriteEndObject(); - } - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopHitsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopHitsAggregate.g.cs index 18f46f599f0..f246536d23e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopHitsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopHitsAggregate.g.cs @@ -28,7 +28,7 @@ public sealed partial class TopHitsAggregate : IAggregate { [JsonInclude] [JsonPropertyName("hits")] - public Elastic.Clients.Elasticsearch.HitsMetadata Hits { get; init; } + public Elastic.Clients.Elasticsearch.Core.Search.HitsMetadata Hits { get; init; } [JsonInclude] [JsonPropertyName("meta")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopHitsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopHitsAggregation.g.cs index aa3bf098210..3023e603e76 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopHitsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopHitsAggregation.g.cs @@ -42,7 +42,7 @@ public override TopHitsAggregation Read(ref Utf8JsonReader reader, Type typeToCo if (reader.ValueTextEquals("_source")) { reader.Read(); - var value = JsonSerializer.Deserialize(ref reader, options); + var value = JsonSerializer.Deserialize(ref reader, options); if (value is not null) { agg.Source = value; @@ -102,7 +102,7 @@ public override TopHitsAggregation Read(ref Utf8JsonReader reader, Type typeToCo if (reader.ValueTextEquals("highlight")) { reader.Read(); - var value = JsonSerializer.Deserialize(ref reader, options); + var value = JsonSerializer.Deserialize(ref reader, options); if (value is not null) { agg.Highlight = value; @@ -356,7 +356,7 @@ internal TopHitsAggregation() { } - public Elastic.Clients.Elasticsearch.SourceConfig? Source { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? Source { get; set; } public Elastic.Clients.Elasticsearch.Fields? DocvalueFields { get; set; } @@ -366,7 +366,7 @@ internal TopHitsAggregation() public int? From { get; set; } - public Elastic.Clients.Elasticsearch.Highlight? Highlight { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.Highlight? Highlight { get; set; } public Dictionary? Meta { get; set; } @@ -399,13 +399,13 @@ public TopHitsAggregationDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Highlight? HighlightValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.Highlight? HighlightValue { get; set; } - private HighlightDescriptor HighlightDescriptor { get; set; } + private Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } - private Action> HighlightDescriptorAction { get; set; } + private Action> HighlightDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.SourceConfig? SourceValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? SourceValue { get; set; } private Elastic.Clients.Elasticsearch.Fields? DocvalueFieldsValue { get; set; } @@ -435,7 +435,7 @@ public TopHitsAggregationDescriptor() : base() private bool? VersionValue { get; set; } - public TopHitsAggregationDescriptor Highlight(Elastic.Clients.Elasticsearch.Highlight? highlight) + public TopHitsAggregationDescriptor Highlight(Elastic.Clients.Elasticsearch.Core.Search.Highlight? highlight) { HighlightDescriptor = null; HighlightDescriptorAction = null; @@ -443,7 +443,7 @@ public TopHitsAggregationDescriptor Highlight(Elastic.Clients.Elastic return Self; } - public TopHitsAggregationDescriptor Highlight(HighlightDescriptor descriptor) + public TopHitsAggregationDescriptor Highlight(Core.Search.HighlightDescriptor descriptor) { HighlightValue = null; HighlightDescriptorAction = null; @@ -451,7 +451,7 @@ public TopHitsAggregationDescriptor Highlight(HighlightDescriptor Highlight(Action> configure) + public TopHitsAggregationDescriptor Highlight(Action> configure) { HighlightValue = null; HighlightDescriptor = null; @@ -459,7 +459,7 @@ public TopHitsAggregationDescriptor Highlight(Action Source(Elastic.Clients.Elasticsearch.SourceConfig? source) + public TopHitsAggregationDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? source) { SourceValue = source; return Self; @@ -568,7 +568,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (HighlightDescriptorAction is not null) { writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, new HighlightDescriptor(HighlightDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.HighlightDescriptor(HighlightDescriptorAction), options); } else if (HighlightValue is not null) { @@ -678,13 +678,13 @@ public TopHitsAggregationDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.Highlight? HighlightValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.Highlight? HighlightValue { get; set; } - private HighlightDescriptor HighlightDescriptor { get; set; } + private Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } - private Action HighlightDescriptorAction { get; set; } + private Action HighlightDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.SourceConfig? SourceValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? SourceValue { get; set; } private Elastic.Clients.Elasticsearch.Fields? DocvalueFieldsValue { get; set; } @@ -714,7 +714,7 @@ public TopHitsAggregationDescriptor() : base() private bool? VersionValue { get; set; } - public TopHitsAggregationDescriptor Highlight(Elastic.Clients.Elasticsearch.Highlight? highlight) + public TopHitsAggregationDescriptor Highlight(Elastic.Clients.Elasticsearch.Core.Search.Highlight? highlight) { HighlightDescriptor = null; HighlightDescriptorAction = null; @@ -722,7 +722,7 @@ public TopHitsAggregationDescriptor Highlight(Elastic.Clients.Elasticsearch.High return Self; } - public TopHitsAggregationDescriptor Highlight(HighlightDescriptor descriptor) + public TopHitsAggregationDescriptor Highlight(Core.Search.HighlightDescriptor descriptor) { HighlightValue = null; HighlightDescriptorAction = null; @@ -730,7 +730,7 @@ public TopHitsAggregationDescriptor Highlight(HighlightDescriptor descriptor) return Self; } - public TopHitsAggregationDescriptor Highlight(Action configure) + public TopHitsAggregationDescriptor Highlight(Action configure) { HighlightValue = null; HighlightDescriptor = null; @@ -738,7 +738,7 @@ public TopHitsAggregationDescriptor Highlight(Action config return Self; } - public TopHitsAggregationDescriptor Source(Elastic.Clients.Elasticsearch.SourceConfig? source) + public TopHitsAggregationDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? source) { SourceValue = source; return Self; @@ -853,7 +853,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (HighlightDescriptorAction is not null) { writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, new HighlightDescriptor(HighlightDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.HighlightDescriptor(HighlightDescriptorAction), options); } else if (HighlightValue is not null) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/AsyncSearch/AsyncSearch.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/AsyncSearch/AsyncSearch.g.cs index d7734eb363f..eb0ce6a102a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/AsyncSearch/AsyncSearch.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/AsyncSearch/AsyncSearch.g.cs @@ -48,7 +48,7 @@ public sealed partial class AsyncSearch [JsonInclude] [JsonPropertyName("hits")] - public Elastic.Clients.Elasticsearch.HitsMetadata HitsMetadata { get; init; } + public Elastic.Clients.Elasticsearch.Core.Search.HitsMetadata HitsMetadata { get; init; } [JsonInclude] [JsonPropertyName("max_score")] @@ -64,7 +64,7 @@ public sealed partial class AsyncSearch [JsonInclude] [JsonPropertyName("profile")] - public Elastic.Clients.Elasticsearch.Profile? Profile { get; init; } + public Elastic.Clients.Elasticsearch.Core.Search.Profile? Profile { get; init; } [JsonInclude] [JsonPropertyName("terminated_early")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/CoordsGeoBounds.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/CoordsGeoBounds.g.cs deleted file mode 100644 index 6d75e3d23b4..00000000000 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/CoordsGeoBounds.g.cs +++ /dev/null @@ -1,99 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -#nullable restore -namespace Elastic.Clients.Elasticsearch -{ - public sealed partial class CoordsGeoBounds - { - [JsonInclude] - [JsonPropertyName("bottom")] - public double Bottom { get; set; } - - [JsonInclude] - [JsonPropertyName("left")] - public double Left { get; set; } - - [JsonInclude] - [JsonPropertyName("right")] - public double Right { get; set; } - - [JsonInclude] - [JsonPropertyName("top")] - public double Top { get; set; } - } - - public sealed partial class CoordsGeoBoundsDescriptor : SerializableDescriptorBase - { - internal CoordsGeoBoundsDescriptor(Action configure) => configure.Invoke(this); - public CoordsGeoBoundsDescriptor() : base() - { - } - - private double BottomValue { get; set; } - - private double LeftValue { get; set; } - - private double RightValue { get; set; } - - private double TopValue { get; set; } - - public CoordsGeoBoundsDescriptor Bottom(double bottom) - { - BottomValue = bottom; - return Self; - } - - public CoordsGeoBoundsDescriptor Left(double left) - { - LeftValue = left; - return Self; - } - - public CoordsGeoBoundsDescriptor Right(double right) - { - RightValue = right; - return Self; - } - - public CoordsGeoBoundsDescriptor Top(double top) - { - TopValue = top; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("bottom"); - writer.WriteNumberValue(BottomValue); - writer.WritePropertyName("left"); - writer.WriteNumberValue(LeftValue); - writer.WritePropertyName("right"); - writer.WriteNumberValue(RightValue); - writer.WritePropertyName("top"); - writer.WriteNumberValue(TopValue); - writer.WriteEndObject(); - } - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/AggregationBreakdown.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/AggregationBreakdown.g.cs similarity index 98% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/AggregationBreakdown.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/AggregationBreakdown.g.cs index f3e56c88c25..da0d0cabbfc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/AggregationBreakdown.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/AggregationBreakdown.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class AggregationBreakdown { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/AggregationProfile.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/AggregationProfile.g.cs similarity index 83% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/AggregationProfile.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/AggregationProfile.g.cs index 731d22d2d52..37de7f0c77c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/AggregationProfile.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/AggregationProfile.g.cs @@ -22,21 +22,21 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class AggregationProfile { [JsonInclude] [JsonPropertyName("breakdown")] - public Elastic.Clients.Elasticsearch.AggregationBreakdown Breakdown { get; init; } + public Elastic.Clients.Elasticsearch.Core.Search.AggregationBreakdown Breakdown { get; init; } [JsonInclude] [JsonPropertyName("children")] - public IReadOnlyCollection? Children { get; init; } + public IReadOnlyCollection? Children { get; init; } [JsonInclude] [JsonPropertyName("debug")] - public Elastic.Clients.Elasticsearch.AggregationProfileDebug? Debug { get; init; } + public Elastic.Clients.Elasticsearch.Core.Search.AggregationProfileDebug? Debug { get; init; } [JsonInclude] [JsonPropertyName("description")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/AggregationProfileDebug.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/AggregationProfileDebug.g.cs similarity index 93% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/AggregationProfileDebug.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/AggregationProfileDebug.g.cs index 602882fc5ac..2d418cbb964 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/AggregationProfileDebug.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/AggregationProfileDebug.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class AggregationProfileDebug { @@ -56,7 +56,7 @@ public sealed partial class AggregationProfileDebug [JsonInclude] [JsonPropertyName("delegate_debug")] - public Elastic.Clients.Elasticsearch.AggregationProfileDebug? DelegateDebug { get; init; } + public Elastic.Clients.Elasticsearch.Core.Search.AggregationProfileDebug? DelegateDebug { get; init; } [JsonInclude] [JsonPropertyName("empty_collectors_used")] @@ -72,7 +72,7 @@ public sealed partial class AggregationProfileDebug [JsonInclude] [JsonPropertyName("filters")] - public IReadOnlyCollection? Filters { get; init; } + public IReadOnlyCollection? Filters { get; init; } [JsonInclude] [JsonPropertyName("has_filter")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/AggregationProfileDelegateDebugFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/AggregationProfileDelegateDebugFilter.g.cs similarity index 97% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/AggregationProfileDelegateDebugFilter.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/AggregationProfileDelegateDebugFilter.g.cs index 6afa8420c7e..d04c5b3fc02 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/AggregationProfileDelegateDebugFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/AggregationProfileDelegateDebugFilter.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class AggregationProfileDelegateDebugFilter { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/BulkResponseItemBase.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/BulkResponseItemBase.g.cs similarity index 98% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/BulkResponseItemBase.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/BulkResponseItemBase.g.cs index 84af1694013..92c55df9f2b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/BulkResponseItemBase.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/BulkResponseItemBase.g.cs @@ -23,7 +23,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Bulk { public abstract partial class BulkResponseItemBase { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Collector.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Collector.g.cs similarity index 91% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/Collector.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Collector.g.cs index 57d875682a4..93fb995d214 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Collector.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Collector.g.cs @@ -22,13 +22,13 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class Collector { [JsonInclude] [JsonPropertyName("children")] - public IReadOnlyCollection? Children { get; init; } + public IReadOnlyCollection? Children { get; init; } [JsonInclude] [JsonPropertyName("name")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/CompletionContext.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/CompletionContext.g.cs similarity index 88% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/CompletionContext.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/CompletionContext.g.cs index 443198c228a..d3fe08a635c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/CompletionContext.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/CompletionContext.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class CompletionContext { @@ -30,10 +30,6 @@ public sealed partial class CompletionContext [JsonPropertyName("boost")] public double? Boost { get; set; } - [JsonInclude] - [JsonPropertyName("context")] - public Elastic.Clients.Elasticsearch.Context Context { get; set; } - [JsonInclude] [JsonPropertyName("neighbours")] public IEnumerable? Neighbours { get; set; } @@ -56,8 +52,6 @@ public CompletionContextDescriptor() : base() private double? BoostValue { get; set; } - private Elastic.Clients.Elasticsearch.Context ContextValue { get; set; } - private IEnumerable? NeighboursValue { get; set; } private Elastic.Clients.Elasticsearch.GeoHashPrecision? PrecisionValue { get; set; } @@ -70,12 +64,6 @@ public CompletionContextDescriptor Boost(double? boost) return Self; } - public CompletionContextDescriptor Context(Elastic.Clients.Elasticsearch.Context context) - { - ContextValue = context; - return Self; - } - public CompletionContextDescriptor Neighbours(IEnumerable? neighbours) { NeighboursValue = neighbours; @@ -103,8 +91,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteNumberValue(BoostValue.Value); } - writer.WritePropertyName("context"); - JsonSerializer.Serialize(writer, ContextValue, options); if (NeighboursValue is not null) { writer.WritePropertyName("neighbours"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/CompletionSuggester.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/CompletionSuggester.g.cs similarity index 89% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/CompletionSuggester.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/CompletionSuggester.g.cs index bf476da87c9..9472b00f2e0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/CompletionSuggester.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/CompletionSuggester.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class CompletionSuggester { @@ -32,7 +32,7 @@ public sealed partial class CompletionSuggester [JsonInclude] [JsonPropertyName("contexts")] - public Dictionary>? Contexts { get; set; } + public Dictionary>? Contexts { get; set; } [JsonInclude] [JsonPropertyName("field")] @@ -40,7 +40,7 @@ public sealed partial class CompletionSuggester [JsonInclude] [JsonPropertyName("fuzzy")] - public Elastic.Clients.Elasticsearch.SuggestFuzziness? Fuzzy { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.SuggestFuzziness? Fuzzy { get; set; } [JsonInclude] [JsonPropertyName("prefix")] @@ -68,11 +68,11 @@ public CompletionSuggesterDescriptor() : base() private string? AnalyzerValue { get; set; } - private Dictionary>? ContextsValue { get; set; } + private Dictionary>? ContextsValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.SuggestFuzziness? FuzzyValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.SuggestFuzziness? FuzzyValue { get; set; } private SuggestFuzzinessDescriptor FuzzyDescriptor { get; set; } @@ -92,9 +92,9 @@ public CompletionSuggesterDescriptor Analyzer(string? analyzer) return Self; } - public CompletionSuggesterDescriptor Contexts(Func>, FluentDictionary>> selector) + public CompletionSuggesterDescriptor Contexts(Func>, FluentDictionary>> selector) { - ContextsValue = selector?.Invoke(new FluentDictionary>()); + ContextsValue = selector?.Invoke(new FluentDictionary>()); return Self; } @@ -110,7 +110,7 @@ public CompletionSuggesterDescriptor Field(Expression Fuzzy(Elastic.Clients.Elasticsearch.SuggestFuzziness? fuzzy) + public CompletionSuggesterDescriptor Fuzzy(Elastic.Clients.Elasticsearch.Core.Search.SuggestFuzziness? fuzzy) { FuzzyDescriptor = null; FuzzyDescriptorAction = null; @@ -228,11 +228,11 @@ public CompletionSuggesterDescriptor() : base() private string? AnalyzerValue { get; set; } - private Dictionary>? ContextsValue { get; set; } + private Dictionary>? ContextsValue { get; set; } private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.SuggestFuzziness? FuzzyValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.SuggestFuzziness? FuzzyValue { get; set; } private SuggestFuzzinessDescriptor FuzzyDescriptor { get; set; } @@ -252,9 +252,9 @@ public CompletionSuggesterDescriptor Analyzer(string? analyzer) return Self; } - public CompletionSuggesterDescriptor Contexts(Func>, FluentDictionary>> selector) + public CompletionSuggesterDescriptor Contexts(Func>, FluentDictionary>> selector) { - ContextsValue = selector?.Invoke(new FluentDictionary>()); + ContextsValue = selector?.Invoke(new FluentDictionary>()); return Self; } @@ -276,7 +276,7 @@ public CompletionSuggesterDescriptor Field(Expression + public sealed partial class Context { - public Context(string context) : base(context) - { - } + [JsonInclude] + [JsonPropertyName("methods")] + public IReadOnlyCollection Methods { get; init; } - public Context(Elastic.Clients.Elasticsearch.GeoLocation geoLocation) : base(geoLocation) - { - } + [JsonInclude] + [JsonPropertyName("name")] + public string Name { get; init; } } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ContextMethod.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ContextMethod.g.cs similarity index 89% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/ContextMethod.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ContextMethod.g.cs index 56ec4914f4c..10da93032ff 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ContextMethod.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ContextMethod.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.GetScriptContext { public sealed partial class ContextMethod { @@ -32,7 +32,7 @@ public sealed partial class ContextMethod [JsonInclude] [JsonPropertyName("params")] - public IReadOnlyCollection Params { get; init; } + public IReadOnlyCollection Params { get; init; } [JsonInclude] [JsonPropertyName("return_type")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ContextMethodParam.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ContextMethodParam.g.cs similarity index 96% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/ContextMethodParam.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ContextMethodParam.g.cs index a3c71114d3d..4af84b1e064 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ContextMethodParam.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ContextMethodParam.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.GetScriptContext { public sealed partial class ContextMethodParam { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Destination.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Destination.g.cs similarity index 98% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/Destination.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Destination.g.cs index 0e8ab6886f2..b89a95a890a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Destination.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Destination.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Reindex { public sealed partial class Destination { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/DirectGenerator.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/DirectGenerator.g.cs similarity index 99% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/DirectGenerator.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/DirectGenerator.g.cs index 912d608b7fa..cfa0ed8e19a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/DirectGenerator.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/DirectGenerator.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class DirectGenerator { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/DocumentRating.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/DocumentRating.g.cs similarity index 98% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/DocumentRating.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/DocumentRating.g.cs index 2d0fee0550f..4c49195002a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/DocumentRating.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/DocumentRating.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.RankEval { public sealed partial class DocumentRating { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Explanation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Explanation.g.cs similarity index 90% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/Explanation.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Explanation.g.cs index 3085485d1c0..f07577b4216 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Explanation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Explanation.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Explain { public sealed partial class Explanation { @@ -32,7 +32,7 @@ public sealed partial class Explanation [JsonInclude] [JsonPropertyName("details")] - public IReadOnlyCollection Details { get; init; } + public IReadOnlyCollection Details { get; init; } [JsonInclude] [JsonPropertyName("value")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ExplanationDetail.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ExplanationDetail.g.cs similarity index 90% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/ExplanationDetail.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ExplanationDetail.g.cs index 89cbe83cde2..bf3786fa73e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ExplanationDetail.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ExplanationDetail.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Explain { public sealed partial class ExplanationDetail { @@ -32,7 +32,7 @@ public sealed partial class ExplanationDetail [JsonInclude] [JsonPropertyName("details")] - public IReadOnlyCollection? Details { get; init; } + public IReadOnlyCollection? Details { get; init; } [JsonInclude] [JsonPropertyName("value")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/FetchProfile.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/FetchProfile.g.cs similarity index 83% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/FetchProfile.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/FetchProfile.g.cs index 64f0e0ceab5..77fbfa89cf0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/FetchProfile.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/FetchProfile.g.cs @@ -22,21 +22,21 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class FetchProfile { [JsonInclude] [JsonPropertyName("breakdown")] - public Elastic.Clients.Elasticsearch.FetchProfileBreakdown Breakdown { get; init; } + public Elastic.Clients.Elasticsearch.Core.Search.FetchProfileBreakdown Breakdown { get; init; } [JsonInclude] [JsonPropertyName("children")] - public IReadOnlyCollection? Children { get; init; } + public IReadOnlyCollection? Children { get; init; } [JsonInclude] [JsonPropertyName("debug")] - public Elastic.Clients.Elasticsearch.FetchProfileDebug? Debug { get; init; } + public Elastic.Clients.Elasticsearch.Core.Search.FetchProfileDebug? Debug { get; init; } [JsonInclude] [JsonPropertyName("description")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/FetchProfileBreakdown.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/FetchProfileBreakdown.g.cs similarity index 97% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/FetchProfileBreakdown.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/FetchProfileBreakdown.g.cs index 692239bfba3..1562d9b4343 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/FetchProfileBreakdown.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/FetchProfileBreakdown.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class FetchProfileBreakdown { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/FetchProfileDebug.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/FetchProfileDebug.g.cs similarity index 96% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/FetchProfileDebug.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/FetchProfileDebug.g.cs index 174563b97d1..20e5b80cc37 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/FetchProfileDebug.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/FetchProfileDebug.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class FetchProfileDebug { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/FieldCapability.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/FieldCapability.g.cs similarity index 98% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/FieldCapability.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/FieldCapability.g.cs index 933271d841e..6efc273bffb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/FieldCapability.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/FieldCapability.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.FieldCaps { public sealed partial class FieldCapability { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/FieldCollapse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/FieldCollapse.g.cs similarity index 93% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/FieldCollapse.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/FieldCollapse.g.cs index 8a7d7b99c77..700d99bf41a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/FieldCollapse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/FieldCollapse.g.cs @@ -22,13 +22,13 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class FieldCollapse { [JsonInclude] [JsonPropertyName("collapse")] - public Elastic.Clients.Elasticsearch.FieldCollapse? Collapse { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? Collapse { get; set; } [JsonInclude] [JsonPropertyName("field")] @@ -36,7 +36,7 @@ public sealed partial class FieldCollapse [JsonInclude] [JsonPropertyName("inner_hits")] - public IEnumerable? InnerHits { get; set; } + public IEnumerable? InnerHits { get; set; } [JsonInclude] [JsonPropertyName("max_concurrent_group_searches")] @@ -50,13 +50,13 @@ public FieldCollapseDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.FieldCollapse? CollapseValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? CollapseValue { get; set; } private FieldCollapseDescriptor CollapseDescriptor { get; set; } private Action> CollapseDescriptorAction { get; set; } - private IEnumerable? InnerHitsValue { get; set; } + private IEnumerable? InnerHitsValue { get; set; } private InnerHitsDescriptor InnerHitsDescriptor { get; set; } @@ -68,7 +68,7 @@ public FieldCollapseDescriptor() : base() private int? MaxConcurrentGroupSearchesValue { get; set; } - public FieldCollapseDescriptor Collapse(Elastic.Clients.Elasticsearch.FieldCollapse? collapse) + public FieldCollapseDescriptor Collapse(Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? collapse) { CollapseDescriptor = null; CollapseDescriptorAction = null; @@ -92,7 +92,7 @@ public FieldCollapseDescriptor Collapse(Action InnerHits(IEnumerable? innerHits) + public FieldCollapseDescriptor InnerHits(IEnumerable? innerHits) { InnerHitsDescriptor = null; InnerHitsDescriptorAction = null; @@ -215,13 +215,13 @@ public FieldCollapseDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.FieldCollapse? CollapseValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? CollapseValue { get; set; } private FieldCollapseDescriptor CollapseDescriptor { get; set; } private Action CollapseDescriptorAction { get; set; } - private IEnumerable? InnerHitsValue { get; set; } + private IEnumerable? InnerHitsValue { get; set; } private InnerHitsDescriptor InnerHitsDescriptor { get; set; } @@ -233,7 +233,7 @@ public FieldCollapseDescriptor() : base() private int? MaxConcurrentGroupSearchesValue { get; set; } - public FieldCollapseDescriptor Collapse(Elastic.Clients.Elasticsearch.FieldCollapse? collapse) + public FieldCollapseDescriptor Collapse(Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? collapse) { CollapseDescriptor = null; CollapseDescriptorAction = null; @@ -257,7 +257,7 @@ public FieldCollapseDescriptor Collapse(Action configur return Self; } - public FieldCollapseDescriptor InnerHits(IEnumerable? innerHits) + public FieldCollapseDescriptor InnerHits(IEnumerable? innerHits) { InnerHitsDescriptor = null; InnerHitsDescriptorAction = null; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/FieldSuggester.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/FieldSuggester.g.cs similarity index 91% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/FieldSuggester.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/FieldSuggester.g.cs index 025a2e8076a..5adb594292a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/FieldSuggester.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/FieldSuggester.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { [JsonConverter(typeof(FieldSuggesterConverter))] public sealed partial class FieldSuggester @@ -43,9 +43,9 @@ internal FieldSuggester(string variantName, object variant) internal string VariantName { get; } - public static FieldSuggester Completion(Elastic.Clients.Elasticsearch.CompletionSuggester completionSuggester) => new FieldSuggester("completion", completionSuggester); - public static FieldSuggester Phrase(Elastic.Clients.Elasticsearch.PhraseSuggester phraseSuggester) => new FieldSuggester("phrase", phraseSuggester); - public static FieldSuggester Term(Elastic.Clients.Elasticsearch.TermSuggester termSuggester) => new FieldSuggester("term", termSuggester); + public static FieldSuggester Completion(Elastic.Clients.Elasticsearch.Core.Search.CompletionSuggester completionSuggester) => new FieldSuggester("completion", completionSuggester); + public static FieldSuggester Phrase(Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggester phraseSuggester) => new FieldSuggester("phrase", phraseSuggester); + public static FieldSuggester Term(Elastic.Clients.Elasticsearch.Core.Search.TermSuggester termSuggester) => new FieldSuggester("term", termSuggester); [JsonInclude] [JsonPropertyName("prefix")] public string? Prefix { get; set; } @@ -107,21 +107,21 @@ public override FieldSuggester Read(ref Utf8JsonReader reader, Type typeToConver if (propertyName == "completion") { - variantValue = JsonSerializer.Deserialize(ref reader, options); + variantValue = JsonSerializer.Deserialize(ref reader, options); variantNameValue = propertyName; continue; } if (propertyName == "phrase") { - variantValue = JsonSerializer.Deserialize(ref reader, options); + variantValue = JsonSerializer.Deserialize(ref reader, options); variantNameValue = propertyName; continue; } if (propertyName == "term") { - variantValue = JsonSerializer.Deserialize(ref reader, options); + variantValue = JsonSerializer.Deserialize(ref reader, options); variantNameValue = propertyName; continue; } @@ -162,13 +162,13 @@ public override void Write(Utf8JsonWriter writer, FieldSuggester value, JsonSeri switch (value.VariantName) { case "completion": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.CompletionSuggester)value.Variant, options); + JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Core.Search.CompletionSuggester)value.Variant, options); break; case "phrase": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.PhraseSuggester)value.Variant, options); + JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggester)value.Variant, options); break; case "term": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.TermSuggester)value.Variant, options); + JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Core.Search.TermSuggester)value.Variant, options); break; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/GetResult.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/GetResult.g.cs similarity index 97% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/GetResult.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/GetResult.g.cs index 96416010bd6..c2f32091b9e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/GetResult.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/GetResult.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Get { public sealed partial class GetResult { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Highlight.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Highlight.g.cs similarity index 87% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/Highlight.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Highlight.g.cs index f2be9cb556b..59ec48fcea6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Highlight.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Highlight.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class Highlight { @@ -36,7 +36,7 @@ public sealed partial class Highlight [JsonInclude] [JsonPropertyName("boundary_scanner")] - public Elastic.Clients.Elasticsearch.BoundaryScanner? BoundaryScanner { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.BoundaryScanner? BoundaryScanner { get; set; } [JsonInclude] [JsonPropertyName("boundary_scanner_locale")] @@ -44,11 +44,11 @@ public sealed partial class Highlight [JsonInclude] [JsonPropertyName("encoder")] - public Elastic.Clients.Elasticsearch.HighlighterEncoder? Encoder { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.HighlighterEncoder? Encoder { get; set; } [JsonInclude] [JsonPropertyName("fields")] - public Dictionary Fields { get; set; } + public Dictionary Fields { get; set; } [JsonInclude] [JsonPropertyName("force_source")] @@ -60,7 +60,7 @@ public sealed partial class Highlight [JsonInclude] [JsonPropertyName("fragmenter")] - public Elastic.Clients.Elasticsearch.HighlighterFragmenter? Fragmenter { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.HighlighterFragmenter? Fragmenter { get; set; } [JsonInclude] [JsonPropertyName("highlight_filter")] @@ -92,7 +92,7 @@ public sealed partial class Highlight [JsonInclude] [JsonPropertyName("order")] - public Elastic.Clients.Elasticsearch.HighlighterOrder? Order { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.HighlighterOrder? Order { get; set; } [JsonInclude] [JsonPropertyName("phrase_limit")] @@ -112,11 +112,11 @@ public sealed partial class Highlight [JsonInclude] [JsonPropertyName("tags_schema")] - public Elastic.Clients.Elasticsearch.HighlighterTagsSchema? TagsSchema { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.HighlighterTagsSchema? TagsSchema { get; set; } [JsonInclude] [JsonPropertyName("type")] - public Elastic.Clients.Elasticsearch.HighlighterType? Type { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.HighlighterType? Type { get; set; } } public sealed partial class HighlightDescriptor : SerializableDescriptorBase> @@ -136,19 +136,19 @@ public HighlightDescriptor() : base() private int? BoundaryMaxScanValue { get; set; } - private Elastic.Clients.Elasticsearch.BoundaryScanner? BoundaryScannerValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.BoundaryScanner? BoundaryScannerValue { get; set; } private string? BoundaryScannerLocaleValue { get; set; } - private Elastic.Clients.Elasticsearch.HighlighterEncoder? EncoderValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.HighlighterEncoder? EncoderValue { get; set; } - private Dictionary FieldsValue { get; set; } + private Dictionary FieldsValue { get; set; } private bool? ForceSourceValue { get; set; } private int? FragmentSizeValue { get; set; } - private Elastic.Clients.Elasticsearch.HighlighterFragmenter? FragmenterValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.HighlighterFragmenter? FragmenterValue { get; set; } private bool? HighlightFilterValue { get; set; } @@ -162,7 +162,7 @@ public HighlightDescriptor() : base() private Dictionary? OptionsValue { get; set; } - private Elastic.Clients.Elasticsearch.HighlighterOrder? OrderValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.HighlighterOrder? OrderValue { get; set; } private int? PhraseLimitValue { get; set; } @@ -172,9 +172,9 @@ public HighlightDescriptor() : base() private bool? RequireFieldMatchValue { get; set; } - private Elastic.Clients.Elasticsearch.HighlighterTagsSchema? TagsSchemaValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.HighlighterTagsSchema? TagsSchemaValue { get; set; } - private Elastic.Clients.Elasticsearch.HighlighterType? TypeValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.HighlighterType? TypeValue { get; set; } public HighlightDescriptor HighlightQuery(Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? highlightQuery) { @@ -212,7 +212,7 @@ public HighlightDescriptor BoundaryMaxScan(int? boundaryMaxScan) return Self; } - public HighlightDescriptor BoundaryScanner(Elastic.Clients.Elasticsearch.BoundaryScanner? boundaryScanner) + public HighlightDescriptor BoundaryScanner(Elastic.Clients.Elasticsearch.Core.Search.BoundaryScanner? boundaryScanner) { BoundaryScannerValue = boundaryScanner; return Self; @@ -224,15 +224,15 @@ public HighlightDescriptor BoundaryScannerLocale(string? boundaryScan return Self; } - public HighlightDescriptor Encoder(Elastic.Clients.Elasticsearch.HighlighterEncoder? encoder) + public HighlightDescriptor Encoder(Elastic.Clients.Elasticsearch.Core.Search.HighlighterEncoder? encoder) { EncoderValue = encoder; return Self; } - public HighlightDescriptor Fields(Func, FluentDictionary> selector) + public HighlightDescriptor Fields(Func, FluentDictionary> selector) { - FieldsValue = selector?.Invoke(new FluentDictionary()); + FieldsValue = selector?.Invoke(new FluentDictionary()); return Self; } @@ -248,7 +248,7 @@ public HighlightDescriptor FragmentSize(int? fragmentSize) return Self; } - public HighlightDescriptor Fragmenter(Elastic.Clients.Elasticsearch.HighlighterFragmenter? fragmenter) + public HighlightDescriptor Fragmenter(Elastic.Clients.Elasticsearch.Core.Search.HighlighterFragmenter? fragmenter) { FragmenterValue = fragmenter; return Self; @@ -290,7 +290,7 @@ public HighlightDescriptor Options(Func Order(Elastic.Clients.Elasticsearch.HighlighterOrder? order) + public HighlightDescriptor Order(Elastic.Clients.Elasticsearch.Core.Search.HighlighterOrder? order) { OrderValue = order; return Self; @@ -320,13 +320,13 @@ public HighlightDescriptor RequireFieldMatch(bool? requireFieldMatch return Self; } - public HighlightDescriptor TagsSchema(Elastic.Clients.Elasticsearch.HighlighterTagsSchema? tagsSchema) + public HighlightDescriptor TagsSchema(Elastic.Clients.Elasticsearch.Core.Search.HighlighterTagsSchema? tagsSchema) { TagsSchemaValue = tagsSchema; return Self; } - public HighlightDescriptor Type(Elastic.Clients.Elasticsearch.HighlighterType? type) + public HighlightDescriptor Type(Elastic.Clients.Elasticsearch.Core.Search.HighlighterType? type) { TypeValue = type; return Self; @@ -500,19 +500,19 @@ public HighlightDescriptor() : base() private int? BoundaryMaxScanValue { get; set; } - private Elastic.Clients.Elasticsearch.BoundaryScanner? BoundaryScannerValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.BoundaryScanner? BoundaryScannerValue { get; set; } private string? BoundaryScannerLocaleValue { get; set; } - private Elastic.Clients.Elasticsearch.HighlighterEncoder? EncoderValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.HighlighterEncoder? EncoderValue { get; set; } - private Dictionary FieldsValue { get; set; } + private Dictionary FieldsValue { get; set; } private bool? ForceSourceValue { get; set; } private int? FragmentSizeValue { get; set; } - private Elastic.Clients.Elasticsearch.HighlighterFragmenter? FragmenterValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.HighlighterFragmenter? FragmenterValue { get; set; } private bool? HighlightFilterValue { get; set; } @@ -526,7 +526,7 @@ public HighlightDescriptor() : base() private Dictionary? OptionsValue { get; set; } - private Elastic.Clients.Elasticsearch.HighlighterOrder? OrderValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.HighlighterOrder? OrderValue { get; set; } private int? PhraseLimitValue { get; set; } @@ -536,9 +536,9 @@ public HighlightDescriptor() : base() private bool? RequireFieldMatchValue { get; set; } - private Elastic.Clients.Elasticsearch.HighlighterTagsSchema? TagsSchemaValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.HighlighterTagsSchema? TagsSchemaValue { get; set; } - private Elastic.Clients.Elasticsearch.HighlighterType? TypeValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.HighlighterType? TypeValue { get; set; } public HighlightDescriptor HighlightQuery(Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? highlightQuery) { @@ -576,7 +576,7 @@ public HighlightDescriptor BoundaryMaxScan(int? boundaryMaxScan) return Self; } - public HighlightDescriptor BoundaryScanner(Elastic.Clients.Elasticsearch.BoundaryScanner? boundaryScanner) + public HighlightDescriptor BoundaryScanner(Elastic.Clients.Elasticsearch.Core.Search.BoundaryScanner? boundaryScanner) { BoundaryScannerValue = boundaryScanner; return Self; @@ -588,15 +588,15 @@ public HighlightDescriptor BoundaryScannerLocale(string? boundaryScannerLocale) return Self; } - public HighlightDescriptor Encoder(Elastic.Clients.Elasticsearch.HighlighterEncoder? encoder) + public HighlightDescriptor Encoder(Elastic.Clients.Elasticsearch.Core.Search.HighlighterEncoder? encoder) { EncoderValue = encoder; return Self; } - public HighlightDescriptor Fields(Func, FluentDictionary> selector) + public HighlightDescriptor Fields(Func, FluentDictionary> selector) { - FieldsValue = selector?.Invoke(new FluentDictionary()); + FieldsValue = selector?.Invoke(new FluentDictionary()); return Self; } @@ -612,7 +612,7 @@ public HighlightDescriptor FragmentSize(int? fragmentSize) return Self; } - public HighlightDescriptor Fragmenter(Elastic.Clients.Elasticsearch.HighlighterFragmenter? fragmenter) + public HighlightDescriptor Fragmenter(Elastic.Clients.Elasticsearch.Core.Search.HighlighterFragmenter? fragmenter) { FragmenterValue = fragmenter; return Self; @@ -654,7 +654,7 @@ public HighlightDescriptor Options(Func, Fluent return Self; } - public HighlightDescriptor Order(Elastic.Clients.Elasticsearch.HighlighterOrder? order) + public HighlightDescriptor Order(Elastic.Clients.Elasticsearch.Core.Search.HighlighterOrder? order) { OrderValue = order; return Self; @@ -684,13 +684,13 @@ public HighlightDescriptor RequireFieldMatch(bool? requireFieldMatch = true) return Self; } - public HighlightDescriptor TagsSchema(Elastic.Clients.Elasticsearch.HighlighterTagsSchema? tagsSchema) + public HighlightDescriptor TagsSchema(Elastic.Clients.Elasticsearch.Core.Search.HighlighterTagsSchema? tagsSchema) { TagsSchemaValue = tagsSchema; return Self; } - public HighlightDescriptor Type(Elastic.Clients.Elasticsearch.HighlighterType? type) + public HighlightDescriptor Type(Elastic.Clients.Elasticsearch.Core.Search.HighlighterType? type) { TypeValue = type; return Self; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/HighlightField.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HighlightField.g.cs similarity index 91% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/HighlightField.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HighlightField.g.cs index 9bc76c6fb51..b748bd1c320 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/HighlightField.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HighlightField.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class HighlightField { @@ -40,7 +40,7 @@ public sealed partial class HighlightField [JsonInclude] [JsonPropertyName("boundary_scanner")] - public Elastic.Clients.Elasticsearch.BoundaryScanner? BoundaryScanner { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.BoundaryScanner? BoundaryScanner { get; set; } [JsonInclude] [JsonPropertyName("boundary_scanner_locale")] @@ -60,7 +60,7 @@ public sealed partial class HighlightField [JsonInclude] [JsonPropertyName("fragmenter")] - public Elastic.Clients.Elasticsearch.HighlighterFragmenter? Fragmenter { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.HighlighterFragmenter? Fragmenter { get; set; } [JsonInclude] [JsonPropertyName("highlight_filter")] @@ -96,7 +96,7 @@ public sealed partial class HighlightField [JsonInclude] [JsonPropertyName("order")] - public Elastic.Clients.Elasticsearch.HighlighterOrder? Order { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.HighlighterOrder? Order { get; set; } [JsonInclude] [JsonPropertyName("phrase_limit")] @@ -116,11 +116,11 @@ public sealed partial class HighlightField [JsonInclude] [JsonPropertyName("tags_schema")] - public Elastic.Clients.Elasticsearch.HighlighterTagsSchema? TagsSchema { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.HighlighterTagsSchema? TagsSchema { get; set; } [JsonInclude] [JsonPropertyName("type")] - public Elastic.Clients.Elasticsearch.HighlighterType? Type { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.HighlighterType? Type { get; set; } } public sealed partial class HighlightFieldDescriptor : SerializableDescriptorBase> @@ -142,7 +142,7 @@ public HighlightFieldDescriptor() : base() private int? BoundaryMaxScanValue { get; set; } - private Elastic.Clients.Elasticsearch.BoundaryScanner? BoundaryScannerValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.BoundaryScanner? BoundaryScannerValue { get; set; } private string? BoundaryScannerLocaleValue { get; set; } @@ -152,7 +152,7 @@ public HighlightFieldDescriptor() : base() private int? FragmentSizeValue { get; set; } - private Elastic.Clients.Elasticsearch.HighlighterFragmenter? FragmenterValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.HighlighterFragmenter? FragmenterValue { get; set; } private bool? HighlightFilterValue { get; set; } @@ -168,7 +168,7 @@ public HighlightFieldDescriptor() : base() private Dictionary? OptionsValue { get; set; } - private Elastic.Clients.Elasticsearch.HighlighterOrder? OrderValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.HighlighterOrder? OrderValue { get; set; } private int? PhraseLimitValue { get; set; } @@ -178,9 +178,9 @@ public HighlightFieldDescriptor() : base() private bool? RequireFieldMatchValue { get; set; } - private Elastic.Clients.Elasticsearch.HighlighterTagsSchema? TagsSchemaValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.HighlighterTagsSchema? TagsSchemaValue { get; set; } - private Elastic.Clients.Elasticsearch.HighlighterType? TypeValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.HighlighterType? TypeValue { get; set; } public HighlightFieldDescriptor HighlightQuery(Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? highlightQuery) { @@ -224,7 +224,7 @@ public HighlightFieldDescriptor BoundaryMaxScan(int? boundaryMaxScan) return Self; } - public HighlightFieldDescriptor BoundaryScanner(Elastic.Clients.Elasticsearch.BoundaryScanner? boundaryScanner) + public HighlightFieldDescriptor BoundaryScanner(Elastic.Clients.Elasticsearch.Core.Search.BoundaryScanner? boundaryScanner) { BoundaryScannerValue = boundaryScanner; return Self; @@ -254,7 +254,7 @@ public HighlightFieldDescriptor FragmentSize(int? fragmentSize) return Self; } - public HighlightFieldDescriptor Fragmenter(Elastic.Clients.Elasticsearch.HighlighterFragmenter? fragmenter) + public HighlightFieldDescriptor Fragmenter(Elastic.Clients.Elasticsearch.Core.Search.HighlighterFragmenter? fragmenter) { FragmenterValue = fragmenter; return Self; @@ -302,7 +302,7 @@ public HighlightFieldDescriptor Options(Func Order(Elastic.Clients.Elasticsearch.HighlighterOrder? order) + public HighlightFieldDescriptor Order(Elastic.Clients.Elasticsearch.Core.Search.HighlighterOrder? order) { OrderValue = order; return Self; @@ -332,13 +332,13 @@ public HighlightFieldDescriptor RequireFieldMatch(bool? requireFieldM return Self; } - public HighlightFieldDescriptor TagsSchema(Elastic.Clients.Elasticsearch.HighlighterTagsSchema? tagsSchema) + public HighlightFieldDescriptor TagsSchema(Elastic.Clients.Elasticsearch.Core.Search.HighlighterTagsSchema? tagsSchema) { TagsSchemaValue = tagsSchema; return Self; } - public HighlightFieldDescriptor Type(Elastic.Clients.Elasticsearch.HighlighterType? type) + public HighlightFieldDescriptor Type(Elastic.Clients.Elasticsearch.Core.Search.HighlighterType? type) { TypeValue = type; return Self; @@ -524,7 +524,7 @@ public HighlightFieldDescriptor() : base() private int? BoundaryMaxScanValue { get; set; } - private Elastic.Clients.Elasticsearch.BoundaryScanner? BoundaryScannerValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.BoundaryScanner? BoundaryScannerValue { get; set; } private string? BoundaryScannerLocaleValue { get; set; } @@ -534,7 +534,7 @@ public HighlightFieldDescriptor() : base() private int? FragmentSizeValue { get; set; } - private Elastic.Clients.Elasticsearch.HighlighterFragmenter? FragmenterValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.HighlighterFragmenter? FragmenterValue { get; set; } private bool? HighlightFilterValue { get; set; } @@ -550,7 +550,7 @@ public HighlightFieldDescriptor() : base() private Dictionary? OptionsValue { get; set; } - private Elastic.Clients.Elasticsearch.HighlighterOrder? OrderValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.HighlighterOrder? OrderValue { get; set; } private int? PhraseLimitValue { get; set; } @@ -560,9 +560,9 @@ public HighlightFieldDescriptor() : base() private bool? RequireFieldMatchValue { get; set; } - private Elastic.Clients.Elasticsearch.HighlighterTagsSchema? TagsSchemaValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.HighlighterTagsSchema? TagsSchemaValue { get; set; } - private Elastic.Clients.Elasticsearch.HighlighterType? TypeValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.HighlighterType? TypeValue { get; set; } public HighlightFieldDescriptor HighlightQuery(Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? highlightQuery) { @@ -606,7 +606,7 @@ public HighlightFieldDescriptor BoundaryMaxScan(int? boundaryMaxScan) return Self; } - public HighlightFieldDescriptor BoundaryScanner(Elastic.Clients.Elasticsearch.BoundaryScanner? boundaryScanner) + public HighlightFieldDescriptor BoundaryScanner(Elastic.Clients.Elasticsearch.Core.Search.BoundaryScanner? boundaryScanner) { BoundaryScannerValue = boundaryScanner; return Self; @@ -636,7 +636,7 @@ public HighlightFieldDescriptor FragmentSize(int? fragmentSize) return Self; } - public HighlightFieldDescriptor Fragmenter(Elastic.Clients.Elasticsearch.HighlighterFragmenter? fragmenter) + public HighlightFieldDescriptor Fragmenter(Elastic.Clients.Elasticsearch.Core.Search.HighlighterFragmenter? fragmenter) { FragmenterValue = fragmenter; return Self; @@ -684,7 +684,7 @@ public HighlightFieldDescriptor Options(Func, F return Self; } - public HighlightFieldDescriptor Order(Elastic.Clients.Elasticsearch.HighlighterOrder? order) + public HighlightFieldDescriptor Order(Elastic.Clients.Elasticsearch.Core.Search.HighlighterOrder? order) { OrderValue = order; return Self; @@ -714,13 +714,13 @@ public HighlightFieldDescriptor RequireFieldMatch(bool? requireFieldMatch = true return Self; } - public HighlightFieldDescriptor TagsSchema(Elastic.Clients.Elasticsearch.HighlighterTagsSchema? tagsSchema) + public HighlightFieldDescriptor TagsSchema(Elastic.Clients.Elasticsearch.Core.Search.HighlighterTagsSchema? tagsSchema) { TagsSchemaValue = tagsSchema; return Self; } - public HighlightFieldDescriptor Type(Elastic.Clients.Elasticsearch.HighlighterType? type) + public HighlightFieldDescriptor Type(Elastic.Clients.Elasticsearch.Core.Search.HighlighterType? type) { TypeValue = type; return Self; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Hit.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Hit.g.cs similarity index 90% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/Hit.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Hit.g.cs index 6c1bc0210f7..693a4398674 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Hit.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Hit.g.cs @@ -22,13 +22,13 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class Hit { [JsonInclude] [JsonPropertyName("_explanation")] - public Elastic.Clients.Elasticsearch.Explanation? Explanation { get; init; } + public Elastic.Clients.Elasticsearch.Core.Explain.Explanation? Explanation { get; init; } [JsonInclude] [JsonPropertyName("_id")] @@ -44,7 +44,7 @@ public sealed partial class Hit [JsonInclude] [JsonPropertyName("_nested")] - public Elastic.Clients.Elasticsearch.NestedIdentity? Nested { get; init; } + public Elastic.Clients.Elasticsearch.Core.Search.NestedIdentity? Nested { get; init; } [JsonInclude] [JsonPropertyName("_node")] @@ -93,7 +93,7 @@ public sealed partial class Hit [JsonInclude] [JsonPropertyName("inner_hits")] - public Dictionary? InnerHits { get; init; } + public Dictionary? InnerHits { get; init; } [JsonInclude] [JsonPropertyName("matched_queries")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/HitsMetadata.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HitsMetadata.g.cs similarity index 86% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/HitsMetadata.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HitsMetadata.g.cs index 7fd8b9bd4d2..d87633c0781 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/HitsMetadata.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HitsMetadata.g.cs @@ -22,13 +22,13 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class HitsMetadata { [JsonInclude] [JsonPropertyName("hits")] - public IReadOnlyCollection> Hits { get; init; } + public IReadOnlyCollection> Hits { get; init; } [JsonInclude] [JsonPropertyName("max_score")] @@ -36,6 +36,6 @@ public sealed partial class HitsMetadata [JsonInclude] [JsonPropertyName("total")] - public Elastic.Clients.Elasticsearch.TotalHits? Total { get; init; } + public Elastic.Clients.Elasticsearch.Core.Search.TotalHits? Total { get; init; } } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/InnerHits.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/InnerHits.g.cs similarity index 95% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/InnerHits.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/InnerHits.g.cs index d7998cb7193..2ec1a0bb3c4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/InnerHits.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/InnerHits.g.cs @@ -22,17 +22,17 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class InnerHits { [JsonInclude] [JsonPropertyName("_source")] - public Elastic.Clients.Elasticsearch.SourceConfig? Source { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? Source { get; set; } [JsonInclude] [JsonPropertyName("collapse")] - public Elastic.Clients.Elasticsearch.FieldCollapse? Collapse { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? Collapse { get; set; } [JsonInclude] [JsonPropertyName("docvalue_fields")] @@ -52,7 +52,7 @@ public sealed partial class InnerHits [JsonInclude] [JsonPropertyName("highlight")] - public Elastic.Clients.Elasticsearch.Highlight? Highlight { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.Highlight? Highlight { get; set; } [JsonInclude] [JsonPropertyName("ignore_unmapped")] @@ -99,7 +99,7 @@ public InnerHitsDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.FieldCollapse? CollapseValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? CollapseValue { get; set; } private FieldCollapseDescriptor CollapseDescriptor { get; set; } @@ -113,13 +113,13 @@ public InnerHitsDescriptor() : base() private Action>[] DocvalueFieldsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Highlight? HighlightValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.Highlight? HighlightValue { get; set; } private HighlightDescriptor HighlightDescriptor { get; set; } private Action> HighlightDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.SourceConfig? SourceValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? SourceValue { get; set; } private bool? ExplainValue { get; set; } @@ -145,7 +145,7 @@ public InnerHitsDescriptor() : base() private bool? VersionValue { get; set; } - public InnerHitsDescriptor Collapse(Elastic.Clients.Elasticsearch.FieldCollapse? collapse) + public InnerHitsDescriptor Collapse(Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? collapse) { CollapseDescriptor = null; CollapseDescriptorAction = null; @@ -205,7 +205,7 @@ public InnerHitsDescriptor DocvalueFields(params Action Highlight(Elastic.Clients.Elasticsearch.Highlight? highlight) + public InnerHitsDescriptor Highlight(Elastic.Clients.Elasticsearch.Core.Search.Highlight? highlight) { HighlightDescriptor = null; HighlightDescriptorAction = null; @@ -229,7 +229,7 @@ public InnerHitsDescriptor Highlight(Action Source(Elastic.Clients.Elasticsearch.SourceConfig? source) + public InnerHitsDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? source) { SourceValue = source; return Self; @@ -462,7 +462,7 @@ public InnerHitsDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.FieldCollapse? CollapseValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? CollapseValue { get; set; } private FieldCollapseDescriptor CollapseDescriptor { get; set; } @@ -476,13 +476,13 @@ public InnerHitsDescriptor() : base() private Action[] DocvalueFieldsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Highlight? HighlightValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.Highlight? HighlightValue { get; set; } private HighlightDescriptor HighlightDescriptor { get; set; } private Action HighlightDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.SourceConfig? SourceValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? SourceValue { get; set; } private bool? ExplainValue { get; set; } @@ -508,7 +508,7 @@ public InnerHitsDescriptor() : base() private bool? VersionValue { get; set; } - public InnerHitsDescriptor Collapse(Elastic.Clients.Elasticsearch.FieldCollapse? collapse) + public InnerHitsDescriptor Collapse(Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? collapse) { CollapseDescriptor = null; CollapseDescriptorAction = null; @@ -568,7 +568,7 @@ public InnerHitsDescriptor DocvalueFields(params Action configure) return Self; } - public InnerHitsDescriptor Source(Elastic.Clients.Elasticsearch.SourceConfig? source) + public InnerHitsDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? source) { SourceValue = source; return Self; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/InnerHitsResult.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/InnerHitsResult.g.cs similarity index 90% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/InnerHitsResult.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/InnerHitsResult.g.cs index 4a4b4276a59..352b71ea952 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/InnerHitsResult.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/InnerHitsResult.g.cs @@ -22,12 +22,12 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class InnerHitsResult { [JsonInclude] [JsonPropertyName("hits")] - public Elastic.Clients.Elasticsearch.HitsMetadata Hits { get; init; } + public Elastic.Clients.Elasticsearch.Core.Search.HitsMetadata Hits { get; init; } } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/LanguageContext.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/LanguageContext.g.cs similarity index 96% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/LanguageContext.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/LanguageContext.g.cs index c6f1dfa5b62..7d0757e0abb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/LanguageContext.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/LanguageContext.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.GetScriptLanguages { public sealed partial class LanguageContext { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/LaplaceSmoothingModel.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/LaplaceSmoothingModel.g.cs similarity index 97% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/LaplaceSmoothingModel.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/LaplaceSmoothingModel.g.cs index 3c3f13845ff..76edab6106c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/LaplaceSmoothingModel.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/LaplaceSmoothingModel.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class LaplaceSmoothingModel { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/LinearInterpolationSmoothingModel.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/LinearInterpolationSmoothingModel.g.cs similarity index 98% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/LinearInterpolationSmoothingModel.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/LinearInterpolationSmoothingModel.g.cs index 86699dc5f7c..b7cdd179dc2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/LinearInterpolationSmoothingModel.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/LinearInterpolationSmoothingModel.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class LinearInterpolationSmoothingModel { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MultiGetError.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MultiGetError.g.cs similarity index 97% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/MultiGetError.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MultiGetError.g.cs index 83879fcc0b8..af6351ab025 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MultiGetError.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MultiGetError.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.MGet { public sealed partial class MultiGetError { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MultiSearchItem.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MultiSearchItem.g.cs similarity index 92% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/MultiSearchItem.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MultiSearchItem.g.cs index 51bf0bacb0e..cc8fe062730 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MultiSearchItem.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MultiSearchItem.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.MSearch { public sealed partial class MultiSearchItem { @@ -48,7 +48,7 @@ public sealed partial class MultiSearchItem [JsonInclude] [JsonPropertyName("hits")] - public Elastic.Clients.Elasticsearch.HitsMetadata HitsMetadata { get; init; } + public Elastic.Clients.Elasticsearch.Core.Search.HitsMetadata HitsMetadata { get; init; } [JsonInclude] [JsonPropertyName("max_score")] @@ -64,7 +64,7 @@ public sealed partial class MultiSearchItem [JsonInclude] [JsonPropertyName("profile")] - public Elastic.Clients.Elasticsearch.Profile? Profile { get; init; } + public Elastic.Clients.Elasticsearch.Core.Search.Profile? Profile { get; init; } [JsonInclude] [JsonPropertyName("status")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MultisearchBody.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MultisearchBody.g.cs similarity index 87% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/MultisearchBody.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MultisearchBody.g.cs index cdc7d071df1..bc6520afed2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MultisearchBody.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MultisearchBody.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.MSearch { internal sealed class MultisearchBodyConverter : JsonConverter { @@ -38,7 +38,7 @@ public override MultisearchBody Read(ref Utf8JsonReader reader, Type typeToConve var property = reader.GetString(); if (property == "_source") { - variant.Source = JsonSerializer.Deserialize(ref reader, options); + variant.Source = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -50,7 +50,7 @@ public override MultisearchBody Read(ref Utf8JsonReader reader, Type typeToConve if (property == "collapse") { - variant.Collapse = JsonSerializer.Deserialize(ref reader, options); + variant.Collapse = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -86,7 +86,7 @@ public override MultisearchBody Read(ref Utf8JsonReader reader, Type typeToConve if (property == "highlight") { - variant.Highlight = JsonSerializer.Deserialize(ref reader, options); + variant.Highlight = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -110,7 +110,7 @@ public override MultisearchBody Read(ref Utf8JsonReader reader, Type typeToConve if (property == "pit") { - variant.Pit = JsonSerializer.Deserialize(ref reader, options); + variant.Pit = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -134,7 +134,7 @@ public override MultisearchBody Read(ref Utf8JsonReader reader, Type typeToConve if (property == "rescore") { - variant.Rescore = JsonSerializer.Deserialize?>(ref reader, options); + variant.Rescore = JsonSerializer.Deserialize?>(ref reader, options); continue; } @@ -188,7 +188,7 @@ public override MultisearchBody Read(ref Utf8JsonReader reader, Type typeToConve if (property == "suggest") { - variant.Suggest = JsonSerializer.Deserialize(ref reader, options); + variant.Suggest = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -212,7 +212,7 @@ public override MultisearchBody Read(ref Utf8JsonReader reader, Type typeToConve if (property == "track_total_hits") { - variant.TrackTotalHits = JsonSerializer.Deserialize(ref reader, options); + variant.TrackTotalHits = JsonSerializer.Deserialize(ref reader, options); continue; } @@ -423,11 +423,11 @@ public override void Write(Utf8JsonWriter writer, MultisearchBody value, JsonSer [JsonConverter(typeof(MultisearchBodyConverter))] public sealed partial class MultisearchBody { - public Elastic.Clients.Elasticsearch.SourceConfig? Source { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? Source { get; set; } public Dictionary? Aggregations { get; set; } - public Elastic.Clients.Elasticsearch.FieldCollapse? Collapse { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? Collapse { get; set; } public IEnumerable? DocvalueFields { get; set; } @@ -439,7 +439,7 @@ public sealed partial class MultisearchBody public int? From { get; set; } - public Elastic.Clients.Elasticsearch.Highlight? Highlight { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.Highlight? Highlight { get; set; } public IEnumerable>? IndicesBoost { get; set; } @@ -447,7 +447,7 @@ public sealed partial class MultisearchBody public double? MinScore { get; set; } - public Elastic.Clients.Elasticsearch.PointInTimeReference? Pit { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? Pit { get; set; } public Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? PostFilter { get; set; } @@ -455,7 +455,7 @@ public sealed partial class MultisearchBody public Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer? Query { get; set; } - public IEnumerable? Rescore { get; set; } + public IEnumerable? Rescore { get; set; } public Dictionary? RuntimeMappings { get; set; } @@ -474,7 +474,7 @@ public sealed partial class MultisearchBody public Elastic.Clients.Elasticsearch.Fields? StoredFields { get; set; } - public Elastic.Clients.Elasticsearch.Suggester? Suggest { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.Suggester? Suggest { get; set; } public long? TerminateAfter { get; set; } @@ -482,7 +482,7 @@ public sealed partial class MultisearchBody public bool? TrackScores { get; set; } - public Elastic.Clients.Elasticsearch.TrackHits? TrackTotalHits { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.TrackHits? TrackTotalHits { get; set; } public bool? Version { get; set; } } @@ -494,11 +494,11 @@ public MultisearchBodyDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.FieldCollapse? CollapseValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? CollapseValue { get; set; } - private FieldCollapseDescriptor CollapseDescriptor { get; set; } + private Core.Search.FieldCollapseDescriptor CollapseDescriptor { get; set; } - private Action> CollapseDescriptorAction { get; set; } + private Action> CollapseDescriptorAction { get; set; } private IEnumerable? DocvalueFieldsValue { get; set; } @@ -516,11 +516,11 @@ public MultisearchBodyDescriptor() : base() private Action>[] FieldsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Highlight? HighlightValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.Highlight? HighlightValue { get; set; } - private HighlightDescriptor HighlightDescriptor { get; set; } + private Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } - private Action> HighlightDescriptorAction { get; set; } + private Action> HighlightDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.KnnQuery? KnnValue { get; set; } @@ -540,15 +540,15 @@ public MultisearchBodyDescriptor() : base() private Action> QueryDescriptorAction { get; set; } - private IEnumerable? RescoreValue { get; set; } + private IEnumerable? RescoreValue { get; set; } - private RescoreDescriptor RescoreDescriptor { get; set; } + private Core.Search.RescoreDescriptor RescoreDescriptor { get; set; } - private Action> RescoreDescriptorAction { get; set; } + private Action> RescoreDescriptorAction { get; set; } - private Action>[] RescoreDescriptorActions { get; set; } + private Action>[] RescoreDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.SourceConfig? SourceValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? SourceValue { get; set; } private Dictionary? AggregationsValue { get; set; } @@ -562,11 +562,11 @@ public MultisearchBodyDescriptor() : base() private double? MinScoreValue { get; set; } - private Elastic.Clients.Elasticsearch.PointInTimeReference? PitValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? PitValue { get; set; } - private PointInTimeReferenceDescriptor PitDescriptor { get; set; } + private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } - private Action PitDescriptorAction { get; set; } + private Action PitDescriptorAction { get; set; } private bool? ProfileValue { get; set; } @@ -586,11 +586,11 @@ public MultisearchBodyDescriptor() : base() private Elastic.Clients.Elasticsearch.Fields? StoredFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Suggester? SuggestValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.Suggester? SuggestValue { get; set; } - private SuggesterDescriptor SuggestDescriptor { get; set; } + private Core.Search.SuggesterDescriptor SuggestDescriptor { get; set; } - private Action SuggestDescriptorAction { get; set; } + private Action SuggestDescriptorAction { get; set; } private long? TerminateAfterValue { get; set; } @@ -598,11 +598,11 @@ public MultisearchBodyDescriptor() : base() private bool? TrackScoresValue { get; set; } - private Elastic.Clients.Elasticsearch.TrackHits? TrackTotalHitsValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.TrackHits? TrackTotalHitsValue { get; set; } private bool? VersionValue { get; set; } - public MultisearchBodyDescriptor Collapse(Elastic.Clients.Elasticsearch.FieldCollapse? collapse) + public MultisearchBodyDescriptor Collapse(Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? collapse) { CollapseDescriptor = null; CollapseDescriptorAction = null; @@ -610,7 +610,7 @@ public MultisearchBodyDescriptor Collapse(Elastic.Clients.Elasticsear return Self; } - public MultisearchBodyDescriptor Collapse(FieldCollapseDescriptor descriptor) + public MultisearchBodyDescriptor Collapse(Core.Search.FieldCollapseDescriptor descriptor) { CollapseValue = null; CollapseDescriptorAction = null; @@ -618,7 +618,7 @@ public MultisearchBodyDescriptor Collapse(FieldCollapseDescriptor Collapse(Action> configure) + public MultisearchBodyDescriptor Collapse(Action> configure) { CollapseValue = null; CollapseDescriptor = null; @@ -698,7 +698,7 @@ public MultisearchBodyDescriptor Fields(params Action Highlight(Elastic.Clients.Elasticsearch.Highlight? highlight) + public MultisearchBodyDescriptor Highlight(Elastic.Clients.Elasticsearch.Core.Search.Highlight? highlight) { HighlightDescriptor = null; HighlightDescriptorAction = null; @@ -706,7 +706,7 @@ public MultisearchBodyDescriptor Highlight(Elastic.Clients.Elasticsea return Self; } - public MultisearchBodyDescriptor Highlight(HighlightDescriptor descriptor) + public MultisearchBodyDescriptor Highlight(Core.Search.HighlightDescriptor descriptor) { HighlightValue = null; HighlightDescriptorAction = null; @@ -714,7 +714,7 @@ public MultisearchBodyDescriptor Highlight(HighlightDescriptor Highlight(Action> configure) + public MultisearchBodyDescriptor Highlight(Action> configure) { HighlightValue = null; HighlightDescriptor = null; @@ -794,7 +794,7 @@ public MultisearchBodyDescriptor Query(Action Rescore(IEnumerable? rescore) + public MultisearchBodyDescriptor Rescore(IEnumerable? rescore) { RescoreDescriptor = null; RescoreDescriptorAction = null; @@ -803,7 +803,7 @@ public MultisearchBodyDescriptor Rescore(IEnumerable Rescore(RescoreDescriptor descriptor) + public MultisearchBodyDescriptor Rescore(Core.Search.RescoreDescriptor descriptor) { RescoreValue = null; RescoreDescriptorAction = null; @@ -812,7 +812,7 @@ public MultisearchBodyDescriptor Rescore(RescoreDescriptor return Self; } - public MultisearchBodyDescriptor Rescore(Action> configure) + public MultisearchBodyDescriptor Rescore(Action> configure) { RescoreValue = null; RescoreDescriptor = null; @@ -821,7 +821,7 @@ public MultisearchBodyDescriptor Rescore(Action Rescore(params Action>[] configure) + public MultisearchBodyDescriptor Rescore(params Action>[] configure) { RescoreValue = null; RescoreDescriptor = null; @@ -830,7 +830,7 @@ public MultisearchBodyDescriptor Rescore(params Action Source(Elastic.Clients.Elasticsearch.SourceConfig? source) + public MultisearchBodyDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? source) { SourceValue = source; return Self; @@ -872,7 +872,7 @@ public MultisearchBodyDescriptor MinScore(double? minScore) return Self; } - public MultisearchBodyDescriptor Pit(Elastic.Clients.Elasticsearch.PointInTimeReference? pit) + public MultisearchBodyDescriptor Pit(Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? pit) { PitDescriptor = null; PitDescriptorAction = null; @@ -880,7 +880,7 @@ public MultisearchBodyDescriptor Pit(Elastic.Clients.Elasticsearch.Po return Self; } - public MultisearchBodyDescriptor Pit(PointInTimeReferenceDescriptor descriptor) + public MultisearchBodyDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor) { PitValue = null; PitDescriptorAction = null; @@ -888,7 +888,7 @@ public MultisearchBodyDescriptor Pit(PointInTimeReferenceDescriptor d return Self; } - public MultisearchBodyDescriptor Pit(Action configure) + public MultisearchBodyDescriptor Pit(Action configure) { PitValue = null; PitDescriptor = null; @@ -950,7 +950,7 @@ public MultisearchBodyDescriptor StoredFields(Elastic.Clients.Elastic return Self; } - public MultisearchBodyDescriptor Suggest(Elastic.Clients.Elasticsearch.Suggester? suggest) + public MultisearchBodyDescriptor Suggest(Elastic.Clients.Elasticsearch.Core.Search.Suggester? suggest) { SuggestDescriptor = null; SuggestDescriptorAction = null; @@ -958,7 +958,7 @@ public MultisearchBodyDescriptor Suggest(Elastic.Clients.Elasticsearc return Self; } - public MultisearchBodyDescriptor Suggest(SuggesterDescriptor descriptor) + public MultisearchBodyDescriptor Suggest(Core.Search.SuggesterDescriptor descriptor) { SuggestValue = null; SuggestDescriptorAction = null; @@ -966,7 +966,7 @@ public MultisearchBodyDescriptor Suggest(SuggesterDescriptor descript return Self; } - public MultisearchBodyDescriptor Suggest(Action configure) + public MultisearchBodyDescriptor Suggest(Action configure) { SuggestValue = null; SuggestDescriptor = null; @@ -992,7 +992,7 @@ public MultisearchBodyDescriptor TrackScores(bool? trackScores = true return Self; } - public MultisearchBodyDescriptor TrackTotalHits(Elastic.Clients.Elasticsearch.TrackHits? trackTotalHits) + public MultisearchBodyDescriptor TrackTotalHits(Elastic.Clients.Elasticsearch.Core.Search.TrackHits? trackTotalHits) { TrackTotalHitsValue = trackTotalHits; return Self; @@ -1015,7 +1015,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (CollapseDescriptorAction is not null) { writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, new FieldCollapseDescriptor(CollapseDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.FieldCollapseDescriptor(CollapseDescriptorAction), options); } else if (CollapseValue is not null) { @@ -1093,7 +1093,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (HighlightDescriptorAction is not null) { writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, new HighlightDescriptor(HighlightDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.HighlightDescriptor(HighlightDescriptorAction), options); } else if (HighlightValue is not null) { @@ -1160,7 +1160,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o { writer.WritePropertyName("rescore"); writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new RescoreDescriptor(RescoreDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.RescoreDescriptor(RescoreDescriptorAction), options); writer.WriteEndArray(); } else if (RescoreDescriptorActions is not null) @@ -1169,7 +1169,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartArray(); foreach (var action in RescoreDescriptorActions) { - JsonSerializer.Serialize(writer, new RescoreDescriptor(action), options); + JsonSerializer.Serialize(writer, new Core.Search.RescoreDescriptor(action), options); } writer.WriteEndArray(); @@ -1230,7 +1230,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (PitDescriptorAction is not null) { writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, new PointInTimeReferenceDescriptor(PitDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); } else if (PitValue is not null) { @@ -1300,7 +1300,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (SuggestDescriptorAction is not null) { writer.WritePropertyName("suggest"); - JsonSerializer.Serialize(writer, new SuggesterDescriptor(SuggestDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.SuggesterDescriptor(SuggestDescriptorAction), options); } else if (SuggestValue is not null) { @@ -1349,11 +1349,11 @@ public MultisearchBodyDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.FieldCollapse? CollapseValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? CollapseValue { get; set; } - private FieldCollapseDescriptor CollapseDescriptor { get; set; } + private Core.Search.FieldCollapseDescriptor CollapseDescriptor { get; set; } - private Action CollapseDescriptorAction { get; set; } + private Action CollapseDescriptorAction { get; set; } private IEnumerable? DocvalueFieldsValue { get; set; } @@ -1371,11 +1371,11 @@ public MultisearchBodyDescriptor() : base() private Action[] FieldsDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.Highlight? HighlightValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.Highlight? HighlightValue { get; set; } - private HighlightDescriptor HighlightDescriptor { get; set; } + private Core.Search.HighlightDescriptor HighlightDescriptor { get; set; } - private Action HighlightDescriptorAction { get; set; } + private Action HighlightDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.KnnQuery? KnnValue { get; set; } @@ -1395,15 +1395,15 @@ public MultisearchBodyDescriptor() : base() private Action QueryDescriptorAction { get; set; } - private IEnumerable? RescoreValue { get; set; } + private IEnumerable? RescoreValue { get; set; } - private RescoreDescriptor RescoreDescriptor { get; set; } + private Core.Search.RescoreDescriptor RescoreDescriptor { get; set; } - private Action RescoreDescriptorAction { get; set; } + private Action RescoreDescriptorAction { get; set; } - private Action[] RescoreDescriptorActions { get; set; } + private Action[] RescoreDescriptorActions { get; set; } - private Elastic.Clients.Elasticsearch.SourceConfig? SourceValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? SourceValue { get; set; } private Dictionary? AggregationsValue { get; set; } @@ -1417,11 +1417,11 @@ public MultisearchBodyDescriptor() : base() private double? MinScoreValue { get; set; } - private Elastic.Clients.Elasticsearch.PointInTimeReference? PitValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? PitValue { get; set; } - private PointInTimeReferenceDescriptor PitDescriptor { get; set; } + private Core.Search.PointInTimeReferenceDescriptor PitDescriptor { get; set; } - private Action PitDescriptorAction { get; set; } + private Action PitDescriptorAction { get; set; } private bool? ProfileValue { get; set; } @@ -1441,11 +1441,11 @@ public MultisearchBodyDescriptor() : base() private Elastic.Clients.Elasticsearch.Fields? StoredFieldsValue { get; set; } - private Elastic.Clients.Elasticsearch.Suggester? SuggestValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.Suggester? SuggestValue { get; set; } - private SuggesterDescriptor SuggestDescriptor { get; set; } + private Core.Search.SuggesterDescriptor SuggestDescriptor { get; set; } - private Action SuggestDescriptorAction { get; set; } + private Action SuggestDescriptorAction { get; set; } private long? TerminateAfterValue { get; set; } @@ -1453,11 +1453,11 @@ public MultisearchBodyDescriptor() : base() private bool? TrackScoresValue { get; set; } - private Elastic.Clients.Elasticsearch.TrackHits? TrackTotalHitsValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.TrackHits? TrackTotalHitsValue { get; set; } private bool? VersionValue { get; set; } - public MultisearchBodyDescriptor Collapse(Elastic.Clients.Elasticsearch.FieldCollapse? collapse) + public MultisearchBodyDescriptor Collapse(Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? collapse) { CollapseDescriptor = null; CollapseDescriptorAction = null; @@ -1465,7 +1465,7 @@ public MultisearchBodyDescriptor Collapse(Elastic.Clients.Elasticsearch.FieldCol return Self; } - public MultisearchBodyDescriptor Collapse(FieldCollapseDescriptor descriptor) + public MultisearchBodyDescriptor Collapse(Core.Search.FieldCollapseDescriptor descriptor) { CollapseValue = null; CollapseDescriptorAction = null; @@ -1473,7 +1473,7 @@ public MultisearchBodyDescriptor Collapse(FieldCollapseDescriptor descriptor) return Self; } - public MultisearchBodyDescriptor Collapse(Action configure) + public MultisearchBodyDescriptor Collapse(Action configure) { CollapseValue = null; CollapseDescriptor = null; @@ -1553,7 +1553,7 @@ public MultisearchBodyDescriptor Fields(params Action configure) + public MultisearchBodyDescriptor Highlight(Action configure) { HighlightValue = null; HighlightDescriptor = null; @@ -1649,7 +1649,7 @@ public MultisearchBodyDescriptor Query(Action return Self; } - public MultisearchBodyDescriptor Rescore(IEnumerable? rescore) + public MultisearchBodyDescriptor Rescore(IEnumerable? rescore) { RescoreDescriptor = null; RescoreDescriptorAction = null; @@ -1658,7 +1658,7 @@ public MultisearchBodyDescriptor Rescore(IEnumerable configure) + public MultisearchBodyDescriptor Rescore(Action configure) { RescoreValue = null; RescoreDescriptor = null; @@ -1676,7 +1676,7 @@ public MultisearchBodyDescriptor Rescore(Action configure) return Self; } - public MultisearchBodyDescriptor Rescore(params Action[] configure) + public MultisearchBodyDescriptor Rescore(params Action[] configure) { RescoreValue = null; RescoreDescriptor = null; @@ -1685,7 +1685,7 @@ public MultisearchBodyDescriptor Rescore(params Action[] conf return Self; } - public MultisearchBodyDescriptor Source(Elastic.Clients.Elasticsearch.SourceConfig? source) + public MultisearchBodyDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? source) { SourceValue = source; return Self; @@ -1727,7 +1727,7 @@ public MultisearchBodyDescriptor MinScore(double? minScore) return Self; } - public MultisearchBodyDescriptor Pit(Elastic.Clients.Elasticsearch.PointInTimeReference? pit) + public MultisearchBodyDescriptor Pit(Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? pit) { PitDescriptor = null; PitDescriptorAction = null; @@ -1735,7 +1735,7 @@ public MultisearchBodyDescriptor Pit(Elastic.Clients.Elasticsearch.PointInTimeRe return Self; } - public MultisearchBodyDescriptor Pit(PointInTimeReferenceDescriptor descriptor) + public MultisearchBodyDescriptor Pit(Core.Search.PointInTimeReferenceDescriptor descriptor) { PitValue = null; PitDescriptorAction = null; @@ -1743,7 +1743,7 @@ public MultisearchBodyDescriptor Pit(PointInTimeReferenceDescriptor descriptor) return Self; } - public MultisearchBodyDescriptor Pit(Action configure) + public MultisearchBodyDescriptor Pit(Action configure) { PitValue = null; PitDescriptor = null; @@ -1805,7 +1805,7 @@ public MultisearchBodyDescriptor StoredFields(Elastic.Clients.Elasticsearch.Fiel return Self; } - public MultisearchBodyDescriptor Suggest(Elastic.Clients.Elasticsearch.Suggester? suggest) + public MultisearchBodyDescriptor Suggest(Elastic.Clients.Elasticsearch.Core.Search.Suggester? suggest) { SuggestDescriptor = null; SuggestDescriptorAction = null; @@ -1813,7 +1813,7 @@ public MultisearchBodyDescriptor Suggest(Elastic.Clients.Elasticsearch.Suggester return Self; } - public MultisearchBodyDescriptor Suggest(SuggesterDescriptor descriptor) + public MultisearchBodyDescriptor Suggest(Core.Search.SuggesterDescriptor descriptor) { SuggestValue = null; SuggestDescriptorAction = null; @@ -1821,7 +1821,7 @@ public MultisearchBodyDescriptor Suggest(SuggesterDescriptor descriptor) return Self; } - public MultisearchBodyDescriptor Suggest(Action configure) + public MultisearchBodyDescriptor Suggest(Action configure) { SuggestValue = null; SuggestDescriptor = null; @@ -1847,7 +1847,7 @@ public MultisearchBodyDescriptor TrackScores(bool? trackScores = true) return Self; } - public MultisearchBodyDescriptor TrackTotalHits(Elastic.Clients.Elasticsearch.TrackHits? trackTotalHits) + public MultisearchBodyDescriptor TrackTotalHits(Elastic.Clients.Elasticsearch.Core.Search.TrackHits? trackTotalHits) { TrackTotalHitsValue = trackTotalHits; return Self; @@ -1870,7 +1870,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (CollapseDescriptorAction is not null) { writer.WritePropertyName("collapse"); - JsonSerializer.Serialize(writer, new FieldCollapseDescriptor(CollapseDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.FieldCollapseDescriptor(CollapseDescriptorAction), options); } else if (CollapseValue is not null) { @@ -1948,7 +1948,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (HighlightDescriptorAction is not null) { writer.WritePropertyName("highlight"); - JsonSerializer.Serialize(writer, new HighlightDescriptor(HighlightDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.HighlightDescriptor(HighlightDescriptorAction), options); } else if (HighlightValue is not null) { @@ -2015,7 +2015,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o { writer.WritePropertyName("rescore"); writer.WriteStartArray(); - JsonSerializer.Serialize(writer, new RescoreDescriptor(RescoreDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.RescoreDescriptor(RescoreDescriptorAction), options); writer.WriteEndArray(); } else if (RescoreDescriptorActions is not null) @@ -2024,7 +2024,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o writer.WriteStartArray(); foreach (var action in RescoreDescriptorActions) { - JsonSerializer.Serialize(writer, new RescoreDescriptor(action), options); + JsonSerializer.Serialize(writer, new Core.Search.RescoreDescriptor(action), options); } writer.WriteEndArray(); @@ -2085,7 +2085,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (PitDescriptorAction is not null) { writer.WritePropertyName("pit"); - JsonSerializer.Serialize(writer, new PointInTimeReferenceDescriptor(PitDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.PointInTimeReferenceDescriptor(PitDescriptorAction), options); } else if (PitValue is not null) { @@ -2155,7 +2155,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (SuggestDescriptorAction is not null) { writer.WritePropertyName("suggest"); - JsonSerializer.Serialize(writer, new SuggesterDescriptor(SuggestDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.SuggesterDescriptor(SuggestDescriptorAction), options); } else if (SuggestValue is not null) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MultisearchHeader.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MultisearchHeader.g.cs similarity index 99% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/MultisearchHeader.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MultisearchHeader.g.cs index 5167a443679..15d12776846 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MultisearchHeader.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MultisearchHeader.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.MSearch { public sealed partial class MultisearchHeader { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/NestedIdentity.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/NestedIdentity.g.cs similarity index 91% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/NestedIdentity.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/NestedIdentity.g.cs index 978c2a37b77..b6d5469ba6d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/NestedIdentity.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/NestedIdentity.g.cs @@ -22,13 +22,13 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class NestedIdentity { [JsonInclude] [JsonPropertyName("_nested")] - public Elastic.Clients.Elasticsearch.NestedIdentity? Nested { get; init; } + public Elastic.Clients.Elasticsearch.Core.Search.NestedIdentity? Nested { get; init; } [JsonInclude] [JsonPropertyName("field")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Operation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Operation.g.cs similarity index 94% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/Operation.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Operation.g.cs index 0e7c3043c7b..f1c50ef1660 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Operation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Operation.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.MGet { public sealed partial class Operation { @@ -36,7 +36,7 @@ public sealed partial class Operation [JsonInclude] [JsonPropertyName("_source")] - public Elastic.Clients.Elasticsearch.SourceConfig? Source { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? Source { get; set; } [JsonInclude] [JsonPropertyName("routing")] @@ -66,7 +66,7 @@ public OperationDescriptor() : base() private Elastic.Clients.Elasticsearch.IndexName? IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.SourceConfig? SourceValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? SourceValue { get; set; } private Elastic.Clients.Elasticsearch.Routing? RoutingValue { get; set; } @@ -88,7 +88,7 @@ public OperationDescriptor Index(Elastic.Clients.Elasticsearch.IndexName? index) return Self; } - public OperationDescriptor Source(Elastic.Clients.Elasticsearch.SourceConfig? source) + public OperationDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? source) { SourceValue = source; return Self; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/PhraseSuggestCollate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/PhraseSuggestCollate.g.cs similarity index 92% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/PhraseSuggestCollate.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/PhraseSuggestCollate.g.cs index 318cbb8a988..b60e30cd17a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/PhraseSuggestCollate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/PhraseSuggestCollate.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class PhraseSuggestCollate { @@ -36,7 +36,7 @@ public sealed partial class PhraseSuggestCollate [JsonInclude] [JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.PhraseSuggestCollateQuery Query { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggestCollateQuery Query { get; set; } } public sealed partial class PhraseSuggestCollateDescriptor : SerializableDescriptorBase @@ -50,7 +50,7 @@ public PhraseSuggestCollateDescriptor() : base() private bool? PruneValue { get; set; } - private Elastic.Clients.Elasticsearch.PhraseSuggestCollateQuery QueryValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggestCollateQuery QueryValue { get; set; } private PhraseSuggestCollateQueryDescriptor QueryDescriptor { get; set; } @@ -68,7 +68,7 @@ public PhraseSuggestCollateDescriptor Prune(bool? prune = true) return Self; } - public PhraseSuggestCollateDescriptor Query(Elastic.Clients.Elasticsearch.PhraseSuggestCollateQuery query) + public PhraseSuggestCollateDescriptor Query(Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggestCollateQuery query) { QueryDescriptor = null; QueryDescriptorAction = null; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/PhraseSuggestCollateQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/PhraseSuggestCollateQuery.g.cs similarity index 98% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/PhraseSuggestCollateQuery.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/PhraseSuggestCollateQuery.g.cs index 69ce18f30e6..7510aadbdfe 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/PhraseSuggestCollateQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/PhraseSuggestCollateQuery.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class PhraseSuggestCollateQuery { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/PhraseSuggestHighlight.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/PhraseSuggestHighlight.g.cs similarity index 97% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/PhraseSuggestHighlight.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/PhraseSuggestHighlight.g.cs index 1e2de03e6d1..0dbd20651fb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/PhraseSuggestHighlight.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/PhraseSuggestHighlight.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class PhraseSuggestHighlight { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/PhraseSuggester.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/PhraseSuggester.g.cs similarity index 93% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/PhraseSuggester.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/PhraseSuggester.g.cs index cc8a05747da..452764e55d0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/PhraseSuggester.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/PhraseSuggester.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class PhraseSuggester { @@ -32,7 +32,7 @@ public sealed partial class PhraseSuggester [JsonInclude] [JsonPropertyName("collate")] - public Elastic.Clients.Elasticsearch.PhraseSuggestCollate? Collate { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggestCollate? Collate { get; set; } [JsonInclude] [JsonPropertyName("confidence")] @@ -40,7 +40,7 @@ public sealed partial class PhraseSuggester [JsonInclude] [JsonPropertyName("direct_generator")] - public IEnumerable? DirectGenerator { get; set; } + public IEnumerable? DirectGenerator { get; set; } [JsonInclude] [JsonPropertyName("field")] @@ -56,7 +56,7 @@ public sealed partial class PhraseSuggester [JsonInclude] [JsonPropertyName("highlight")] - public Elastic.Clients.Elasticsearch.PhraseSuggestHighlight? Highlight { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggestHighlight? Highlight { get; set; } [JsonInclude] [JsonPropertyName("max_errors")] @@ -80,7 +80,7 @@ public sealed partial class PhraseSuggester [JsonInclude] [JsonPropertyName("smoothing")] - public Elastic.Clients.Elasticsearch.SmoothingModelContainer? Smoothing { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.SmoothingModelContainer? Smoothing { get; set; } [JsonInclude] [JsonPropertyName("text")] @@ -98,7 +98,7 @@ public PhraseSuggesterDescriptor() : base() { } - private IEnumerable? DirectGeneratorValue { get; set; } + private IEnumerable? DirectGeneratorValue { get; set; } private DirectGeneratorDescriptor DirectGeneratorDescriptor { get; set; } @@ -108,7 +108,7 @@ public PhraseSuggesterDescriptor() : base() private string? AnalyzerValue { get; set; } - private Elastic.Clients.Elasticsearch.PhraseSuggestCollate? CollateValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggestCollate? CollateValue { get; set; } private PhraseSuggestCollateDescriptor CollateDescriptor { get; set; } @@ -122,7 +122,7 @@ public PhraseSuggesterDescriptor() : base() private int? GramSizeValue { get; set; } - private Elastic.Clients.Elasticsearch.PhraseSuggestHighlight? HighlightValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggestHighlight? HighlightValue { get; set; } private PhraseSuggestHighlightDescriptor HighlightDescriptor { get; set; } @@ -138,7 +138,7 @@ public PhraseSuggesterDescriptor() : base() private int? SizeValue { get; set; } - private Elastic.Clients.Elasticsearch.SmoothingModelContainer? SmoothingValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.SmoothingModelContainer? SmoothingValue { get; set; } private SmoothingModelContainerDescriptor SmoothingDescriptor { get; set; } @@ -148,7 +148,7 @@ public PhraseSuggesterDescriptor() : base() private int? TokenLimitValue { get; set; } - public PhraseSuggesterDescriptor DirectGenerator(IEnumerable? directGenerator) + public PhraseSuggesterDescriptor DirectGenerator(IEnumerable? directGenerator) { DirectGeneratorDescriptor = null; DirectGeneratorDescriptorAction = null; @@ -190,7 +190,7 @@ public PhraseSuggesterDescriptor Analyzer(string? analyzer) return Self; } - public PhraseSuggesterDescriptor Collate(Elastic.Clients.Elasticsearch.PhraseSuggestCollate? collate) + public PhraseSuggesterDescriptor Collate(Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggestCollate? collate) { CollateDescriptor = null; CollateDescriptorAction = null; @@ -244,7 +244,7 @@ public PhraseSuggesterDescriptor GramSize(int? gramSize) return Self; } - public PhraseSuggesterDescriptor Highlight(Elastic.Clients.Elasticsearch.PhraseSuggestHighlight? highlight) + public PhraseSuggesterDescriptor Highlight(Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggestHighlight? highlight) { HighlightDescriptor = null; HighlightDescriptorAction = null; @@ -298,7 +298,7 @@ public PhraseSuggesterDescriptor Size(int? size) return Self; } - public PhraseSuggesterDescriptor Smoothing(Elastic.Clients.Elasticsearch.SmoothingModelContainer? smoothing) + public PhraseSuggesterDescriptor Smoothing(Elastic.Clients.Elasticsearch.Core.Search.SmoothingModelContainer? smoothing) { SmoothingDescriptor = null; SmoothingDescriptorAction = null; @@ -495,7 +495,7 @@ public PhraseSuggesterDescriptor() : base() { } - private IEnumerable? DirectGeneratorValue { get; set; } + private IEnumerable? DirectGeneratorValue { get; set; } private DirectGeneratorDescriptor DirectGeneratorDescriptor { get; set; } @@ -505,7 +505,7 @@ public PhraseSuggesterDescriptor() : base() private string? AnalyzerValue { get; set; } - private Elastic.Clients.Elasticsearch.PhraseSuggestCollate? CollateValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggestCollate? CollateValue { get; set; } private PhraseSuggestCollateDescriptor CollateDescriptor { get; set; } @@ -519,7 +519,7 @@ public PhraseSuggesterDescriptor() : base() private int? GramSizeValue { get; set; } - private Elastic.Clients.Elasticsearch.PhraseSuggestHighlight? HighlightValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggestHighlight? HighlightValue { get; set; } private PhraseSuggestHighlightDescriptor HighlightDescriptor { get; set; } @@ -535,7 +535,7 @@ public PhraseSuggesterDescriptor() : base() private int? SizeValue { get; set; } - private Elastic.Clients.Elasticsearch.SmoothingModelContainer? SmoothingValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.SmoothingModelContainer? SmoothingValue { get; set; } private SmoothingModelContainerDescriptor SmoothingDescriptor { get; set; } @@ -545,7 +545,7 @@ public PhraseSuggesterDescriptor() : base() private int? TokenLimitValue { get; set; } - public PhraseSuggesterDescriptor DirectGenerator(IEnumerable? directGenerator) + public PhraseSuggesterDescriptor DirectGenerator(IEnumerable? directGenerator) { DirectGeneratorDescriptor = null; DirectGeneratorDescriptorAction = null; @@ -587,7 +587,7 @@ public PhraseSuggesterDescriptor Analyzer(string? analyzer) return Self; } - public PhraseSuggesterDescriptor Collate(Elastic.Clients.Elasticsearch.PhraseSuggestCollate? collate) + public PhraseSuggesterDescriptor Collate(Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggestCollate? collate) { CollateDescriptor = null; CollateDescriptorAction = null; @@ -647,7 +647,7 @@ public PhraseSuggesterDescriptor GramSize(int? gramSize) return Self; } - public PhraseSuggesterDescriptor Highlight(Elastic.Clients.Elasticsearch.PhraseSuggestHighlight? highlight) + public PhraseSuggesterDescriptor Highlight(Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggestHighlight? highlight) { HighlightDescriptor = null; HighlightDescriptorAction = null; @@ -701,7 +701,7 @@ public PhraseSuggesterDescriptor Size(int? size) return Self; } - public PhraseSuggesterDescriptor Smoothing(Elastic.Clients.Elasticsearch.SmoothingModelContainer? smoothing) + public PhraseSuggesterDescriptor Smoothing(Elastic.Clients.Elasticsearch.Core.Search.SmoothingModelContainer? smoothing) { SmoothingDescriptor = null; SmoothingDescriptorAction = null; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/PointInTimeReference.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/PointInTimeReference.g.cs similarity index 98% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/PointInTimeReference.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/PointInTimeReference.g.cs index 3ad5462b6d4..2b30a5559f1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/PointInTimeReference.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/PointInTimeReference.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class PointInTimeReference { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Profile.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Profile.g.cs similarity index 89% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/Profile.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Profile.g.cs index 2cd8bbac88a..b17f59756f5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Profile.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Profile.g.cs @@ -22,12 +22,12 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class Profile { [JsonInclude] [JsonPropertyName("shards")] - public IReadOnlyCollection Shards { get; init; } + public IReadOnlyCollection Shards { get; init; } } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryBreakdown.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/QueryBreakdown.g.cs similarity index 98% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryBreakdown.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/QueryBreakdown.g.cs index 5fd465af5aa..bd70d3ba7c5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryBreakdown.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/QueryBreakdown.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class QueryBreakdown { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryProfile.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/QueryProfile.g.cs similarity index 87% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryProfile.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/QueryProfile.g.cs index e00030a3143..98e071378fd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryProfile.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/QueryProfile.g.cs @@ -22,17 +22,17 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class QueryProfile { [JsonInclude] [JsonPropertyName("breakdown")] - public Elastic.Clients.Elasticsearch.QueryBreakdown Breakdown { get; init; } + public Elastic.Clients.Elasticsearch.Core.Search.QueryBreakdown Breakdown { get; init; } [JsonInclude] [JsonPropertyName("children")] - public IReadOnlyCollection? Children { get; init; } + public IReadOnlyCollection? Children { get; init; } [JsonInclude] [JsonPropertyName("description")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalHit.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEvalHit.g.cs similarity index 96% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalHit.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEvalHit.g.cs index 9e7b72d6daf..8b05b525277 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalHit.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEvalHit.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.RankEval { public sealed partial class RankEvalHit { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalHitItem.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEvalHitItem.g.cs similarity index 91% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalHitItem.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEvalHitItem.g.cs index a5b67fcb99c..92c7c013d6b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalHitItem.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEvalHitItem.g.cs @@ -22,13 +22,13 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.RankEval { public sealed partial class RankEvalHitItem { [JsonInclude] [JsonPropertyName("hit")] - public Elastic.Clients.Elasticsearch.RankEvalHit Hit { get; init; } + public Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalHit Hit { get; init; } [JsonInclude] [JsonPropertyName("rating")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetric.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEvalMetric.g.cs similarity index 85% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetric.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEvalMetric.g.cs index 272ed61aa4f..91538f4b3cc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetric.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEvalMetric.g.cs @@ -22,29 +22,29 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.RankEval { public sealed partial class RankEvalMetric { [JsonInclude] [JsonPropertyName("dcg")] - public Elastic.Clients.Elasticsearch.RankEvalMetricDiscountedCumulativeGain? Dcg { get; set; } + public Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricDiscountedCumulativeGain? Dcg { get; set; } [JsonInclude] [JsonPropertyName("expected_reciprocal_rank")] - public Elastic.Clients.Elasticsearch.RankEvalMetricExpectedReciprocalRank? ExpectedReciprocalRank { get; set; } + public Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricExpectedReciprocalRank? ExpectedReciprocalRank { get; set; } [JsonInclude] [JsonPropertyName("mean_reciprocal_rank")] - public Elastic.Clients.Elasticsearch.RankEvalMetricMeanReciprocalRank? MeanReciprocalRank { get; set; } + public Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricMeanReciprocalRank? MeanReciprocalRank { get; set; } [JsonInclude] [JsonPropertyName("precision")] - public Elastic.Clients.Elasticsearch.RankEvalMetricPrecision? Precision { get; set; } + public Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricPrecision? Precision { get; set; } [JsonInclude] [JsonPropertyName("recall")] - public Elastic.Clients.Elasticsearch.RankEvalMetricRecall? Recall { get; set; } + public Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricRecall? Recall { get; set; } } public sealed partial class RankEvalMetricDescriptor : SerializableDescriptorBase @@ -54,37 +54,37 @@ public RankEvalMetricDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.RankEvalMetricDiscountedCumulativeGain? DcgValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricDiscountedCumulativeGain? DcgValue { get; set; } private RankEvalMetricDiscountedCumulativeGainDescriptor DcgDescriptor { get; set; } private Action DcgDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.RankEvalMetricExpectedReciprocalRank? ExpectedReciprocalRankValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricExpectedReciprocalRank? ExpectedReciprocalRankValue { get; set; } private RankEvalMetricExpectedReciprocalRankDescriptor ExpectedReciprocalRankDescriptor { get; set; } private Action ExpectedReciprocalRankDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.RankEvalMetricMeanReciprocalRank? MeanReciprocalRankValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricMeanReciprocalRank? MeanReciprocalRankValue { get; set; } private RankEvalMetricMeanReciprocalRankDescriptor MeanReciprocalRankDescriptor { get; set; } private Action MeanReciprocalRankDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.RankEvalMetricPrecision? PrecisionValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricPrecision? PrecisionValue { get; set; } private RankEvalMetricPrecisionDescriptor PrecisionDescriptor { get; set; } private Action PrecisionDescriptorAction { get; set; } - private Elastic.Clients.Elasticsearch.RankEvalMetricRecall? RecallValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricRecall? RecallValue { get; set; } private RankEvalMetricRecallDescriptor RecallDescriptor { get; set; } private Action RecallDescriptorAction { get; set; } - public RankEvalMetricDescriptor Dcg(Elastic.Clients.Elasticsearch.RankEvalMetricDiscountedCumulativeGain? dcg) + public RankEvalMetricDescriptor Dcg(Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricDiscountedCumulativeGain? dcg) { DcgDescriptor = null; DcgDescriptorAction = null; @@ -108,7 +108,7 @@ public RankEvalMetricDescriptor Dcg(Action Hits { get; init; } + public IReadOnlyCollection Hits { get; init; } [JsonInclude] [JsonPropertyName("metric_details")] @@ -40,6 +40,6 @@ public sealed partial class RankEvalMetricDetail [JsonInclude] [JsonPropertyName("unrated_docs")] - public IReadOnlyCollection UnratedDocs { get; init; } + public IReadOnlyCollection UnratedDocs { get; init; } } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricDiscountedCumulativeGain.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEvalMetricDiscountedCumulativeGain.g.cs similarity index 98% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricDiscountedCumulativeGain.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEvalMetricDiscountedCumulativeGain.g.cs index 41ca2ef477b..9e1cf02bbea 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricDiscountedCumulativeGain.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEvalMetricDiscountedCumulativeGain.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.RankEval { public sealed partial class RankEvalMetricDiscountedCumulativeGain { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricExpectedReciprocalRank.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEvalMetricExpectedReciprocalRank.g.cs similarity index 98% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricExpectedReciprocalRank.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEvalMetricExpectedReciprocalRank.g.cs index f62fdc8f69e..a583c087058 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricExpectedReciprocalRank.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEvalMetricExpectedReciprocalRank.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.RankEval { public sealed partial class RankEvalMetricExpectedReciprocalRank { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricMeanReciprocalRank.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEvalMetricMeanReciprocalRank.g.cs similarity index 98% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricMeanReciprocalRank.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEvalMetricMeanReciprocalRank.g.cs index 009bdfe0c24..49ddd970efa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricMeanReciprocalRank.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEvalMetricMeanReciprocalRank.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.RankEval { public sealed partial class RankEvalMetricMeanReciprocalRank { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricPrecision.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEvalMetricPrecision.g.cs similarity index 98% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricPrecision.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEvalMetricPrecision.g.cs index 82503067a86..cf4a81afec1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricPrecision.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEvalMetricPrecision.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.RankEval { public sealed partial class RankEvalMetricPrecision { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricRecall.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEvalMetricRecall.g.cs similarity index 98% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricRecall.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEvalMetricRecall.g.cs index b5b84785151..a782fd70549 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalMetricRecall.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEvalMetricRecall.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.RankEval { public sealed partial class RankEvalMetricRecall { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEvalQuery.g.cs similarity index 99% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalQuery.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEvalQuery.g.cs index 1a2022488a6..b258d59b2cb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEvalQuery.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.RankEval { public sealed partial class RankEvalQuery { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalRequestItem.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEvalRequestItem.g.cs similarity index 92% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalRequestItem.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEvalRequestItem.g.cs index c57dafa88c6..27bd75da8ea 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RankEvalRequestItem.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEvalRequestItem.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.RankEval { public sealed partial class RankEvalRequestItem { @@ -36,11 +36,11 @@ public sealed partial class RankEvalRequestItem [JsonInclude] [JsonPropertyName("ratings")] - public IEnumerable Ratings { get; set; } + public IEnumerable Ratings { get; set; } [JsonInclude] [JsonPropertyName("request")] - public Elastic.Clients.Elasticsearch.RankEvalQuery? Request { get; set; } + public Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalQuery? Request { get; set; } [JsonInclude] [JsonPropertyName("template_id")] @@ -54,7 +54,7 @@ public RankEvalRequestItemDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.RankEvalQuery? RequestValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalQuery? RequestValue { get; set; } private RankEvalQueryDescriptor RequestDescriptor { get; set; } @@ -64,7 +64,7 @@ public RankEvalRequestItemDescriptor() : base() private Dictionary? ParamsValue { get; set; } - private IEnumerable RatingsValue { get; set; } + private IEnumerable RatingsValue { get; set; } private DocumentRatingDescriptor RatingsDescriptor { get; set; } @@ -74,7 +74,7 @@ public RankEvalRequestItemDescriptor() : base() private Elastic.Clients.Elasticsearch.Id? TemplateIdValue { get; set; } - public RankEvalRequestItemDescriptor Request(Elastic.Clients.Elasticsearch.RankEvalQuery? request) + public RankEvalRequestItemDescriptor Request(Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalQuery? request) { RequestDescriptor = null; RequestDescriptorAction = null; @@ -110,7 +110,7 @@ public RankEvalRequestItemDescriptor Params(Func Ratings(IEnumerable ratings) + public RankEvalRequestItemDescriptor Ratings(IEnumerable ratings) { RatingsDescriptor = null; RatingsDescriptorAction = null; @@ -227,7 +227,7 @@ public RankEvalRequestItemDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.RankEvalQuery? RequestValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalQuery? RequestValue { get; set; } private RankEvalQueryDescriptor RequestDescriptor { get; set; } @@ -237,7 +237,7 @@ public RankEvalRequestItemDescriptor() : base() private Dictionary? ParamsValue { get; set; } - private IEnumerable RatingsValue { get; set; } + private IEnumerable RatingsValue { get; set; } private DocumentRatingDescriptor RatingsDescriptor { get; set; } @@ -247,7 +247,7 @@ public RankEvalRequestItemDescriptor() : base() private Elastic.Clients.Elasticsearch.Id? TemplateIdValue { get; set; } - public RankEvalRequestItemDescriptor Request(Elastic.Clients.Elasticsearch.RankEvalQuery? request) + public RankEvalRequestItemDescriptor Request(Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalQuery? request) { RequestDescriptor = null; RequestDescriptorAction = null; @@ -283,7 +283,7 @@ public RankEvalRequestItemDescriptor Params(Func ratings) + public RankEvalRequestItemDescriptor Ratings(IEnumerable ratings) { RatingsDescriptor = null; RatingsDescriptorAction = null; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ReindexNode.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ReindexNode.g.cs similarity index 93% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/ReindexNode.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ReindexNode.g.cs index 95ec698a20a..5c40e133048 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ReindexNode.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ReindexNode.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.ReindexRethrottle { public sealed partial class ReindexNode { @@ -48,7 +48,7 @@ public sealed partial class ReindexNode [JsonInclude] [JsonPropertyName("tasks")] - public Dictionary Tasks { get; init; } + public Dictionary Tasks { get; init; } [JsonInclude] [JsonPropertyName("transport_address")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ReindexStatus.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ReindexStatus.g.cs similarity index 97% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/ReindexStatus.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ReindexStatus.g.cs index 3e36cbc047f..a5e28472967 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ReindexStatus.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ReindexStatus.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.ReindexRethrottle { public sealed partial class ReindexStatus { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ReindexTask.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ReindexTask.g.cs similarity index 93% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/ReindexTask.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ReindexTask.g.cs index 322c579921e..411b508563b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ReindexTask.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ReindexTask.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.ReindexRethrottle { public sealed partial class ReindexTask { @@ -60,7 +60,7 @@ public sealed partial class ReindexTask [JsonInclude] [JsonPropertyName("status")] - public Elastic.Clients.Elasticsearch.ReindexStatus Status { get; init; } + public Elastic.Clients.Elasticsearch.Core.ReindexRethrottle.ReindexStatus Status { get; init; } [JsonInclude] [JsonPropertyName("type")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RemoteSource.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RemoteSource.g.cs similarity index 98% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/RemoteSource.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RemoteSource.g.cs index 40de189d264..460bcee0c53 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RemoteSource.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RemoteSource.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Reindex { public sealed partial class RemoteSource { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RequestItem.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RequestItem.g.cs similarity index 77% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/RequestItem.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RequestItem.g.cs index 6e60997eaf8..b71540d3cb0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RequestItem.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RequestItem.g.cs @@ -23,15 +23,15 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.MSearchTemplate { - public partial class RequestItem : Union + public partial class RequestItem : Union { - public RequestItem(Elastic.Clients.Elasticsearch.MultisearchHeader multisearchHeader) : base(multisearchHeader) + public RequestItem(Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeader multisearchHeader) : base(multisearchHeader) { } - public RequestItem(Elastic.Clients.Elasticsearch.TemplateConfig templateConfig) : base(templateConfig) + public RequestItem(Elastic.Clients.Elasticsearch.Core.MSearchTemplate.TemplateConfig templateConfig) : base(templateConfig) { } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Rescore.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Rescore.g.cs similarity index 92% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/Rescore.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Rescore.g.cs index 38ea709f987..869057c784b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Rescore.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Rescore.g.cs @@ -22,13 +22,13 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class Rescore { [JsonInclude] [JsonPropertyName("query")] - public Elastic.Clients.Elasticsearch.RescoreQuery Query { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.RescoreQuery Query { get; set; } [JsonInclude] [JsonPropertyName("window_size")] @@ -42,7 +42,7 @@ public RescoreDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.RescoreQuery QueryValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.RescoreQuery QueryValue { get; set; } private RescoreQueryDescriptor QueryDescriptor { get; set; } @@ -50,7 +50,7 @@ public RescoreDescriptor() : base() private int? WindowSizeValue { get; set; } - public RescoreDescriptor Query(Elastic.Clients.Elasticsearch.RescoreQuery query) + public RescoreDescriptor Query(Elastic.Clients.Elasticsearch.Core.Search.RescoreQuery query) { QueryDescriptor = null; QueryDescriptorAction = null; @@ -116,7 +116,7 @@ public RescoreDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.RescoreQuery QueryValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.RescoreQuery QueryValue { get; set; } private RescoreQueryDescriptor QueryDescriptor { get; set; } @@ -124,7 +124,7 @@ public RescoreDescriptor() : base() private int? WindowSizeValue { get; set; } - public RescoreDescriptor Query(Elastic.Clients.Elasticsearch.RescoreQuery query) + public RescoreDescriptor Query(Elastic.Clients.Elasticsearch.Core.Search.RescoreQuery query) { QueryDescriptor = null; QueryDescriptorAction = null; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RescoreQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RescoreQuery.g.cs similarity index 94% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/RescoreQuery.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RescoreQuery.g.cs index 2ebedf05a56..bfa30a84ddd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RescoreQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RescoreQuery.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class RescoreQuery { @@ -40,7 +40,7 @@ public sealed partial class RescoreQuery [JsonInclude] [JsonPropertyName("score_mode")] - public Elastic.Clients.Elasticsearch.ScoreMode? ScoreMode { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.ScoreMode? ScoreMode { get; set; } } public sealed partial class RescoreQueryDescriptor : SerializableDescriptorBase> @@ -60,7 +60,7 @@ public RescoreQueryDescriptor() : base() private double? RescoreQueryWeightValue { get; set; } - private Elastic.Clients.Elasticsearch.ScoreMode? ScoreModeValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.ScoreMode? ScoreModeValue { get; set; } public RescoreQueryDescriptor Query(Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer query) { @@ -98,7 +98,7 @@ public RescoreQueryDescriptor RescoreQueryWeight(double? rescoreQuery return Self; } - public RescoreQueryDescriptor ScoreMode(Elastic.Clients.Elasticsearch.ScoreMode? scoreMode) + public RescoreQueryDescriptor ScoreMode(Elastic.Clients.Elasticsearch.Core.Search.ScoreMode? scoreMode) { ScoreModeValue = scoreMode; return Self; @@ -162,7 +162,7 @@ public RescoreQueryDescriptor() : base() private double? RescoreQueryWeightValue { get; set; } - private Elastic.Clients.Elasticsearch.ScoreMode? ScoreModeValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.ScoreMode? ScoreModeValue { get; set; } public RescoreQueryDescriptor Query(Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer query) { @@ -200,7 +200,7 @@ public RescoreQueryDescriptor RescoreQueryWeight(double? rescoreQueryWeight) return Self; } - public RescoreQueryDescriptor ScoreMode(Elastic.Clients.Elasticsearch.ScoreMode? scoreMode) + public RescoreQueryDescriptor ScoreMode(Elastic.Clients.Elasticsearch.Core.Search.ScoreMode? scoreMode) { ScoreModeValue = scoreMode; return Self; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ResponseItem.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ResponseItem.g.cs similarity index 78% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/ResponseItem.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ResponseItem.g.cs index d3ce087f2f0..527f9819402 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ResponseItem.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ResponseItem.g.cs @@ -23,15 +23,15 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.MGet { - public partial class ResponseItem : Union, Elastic.Clients.Elasticsearch.MultiGetError> + public partial class ResponseItem : Union, Elastic.Clients.Elasticsearch.Core.MGet.MultiGetError> { - public ResponseItem(Elastic.Clients.Elasticsearch.GetResult getResult) : base(getResult) + public ResponseItem(Elastic.Clients.Elasticsearch.Core.Get.GetResult getResult) : base(getResult) { } - public ResponseItem(Elastic.Clients.Elasticsearch.MultiGetError multiGetError) : base(multiGetError) + public ResponseItem(Elastic.Clients.Elasticsearch.Core.MGet.MultiGetError multiGetError) : base(multiGetError) { } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchProfile.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/SearchProfile.g.cs similarity index 85% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchProfile.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/SearchProfile.g.cs index f8dfab21c9e..efa233119ff 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchProfile.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/SearchProfile.g.cs @@ -22,17 +22,17 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class SearchProfile { [JsonInclude] [JsonPropertyName("collector")] - public IReadOnlyCollection Collector { get; init; } + public IReadOnlyCollection Collector { get; init; } [JsonInclude] [JsonPropertyName("query")] - public IReadOnlyCollection Query { get; init; } + public IReadOnlyCollection Query { get; init; } [JsonInclude] [JsonPropertyName("rewrite_time")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchResponseItem.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/SearchResponseItem.g.cs similarity index 83% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchResponseItem.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/SearchResponseItem.g.cs index 2703f4bef7e..467684e7f07 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchResponseItem.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/SearchResponseItem.g.cs @@ -23,11 +23,11 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.MSearch { - public partial class SearchResponseItem : Union, Elastic.Clients.Elasticsearch.ErrorResponseBase> + public partial class SearchResponseItem : Union, Elastic.Clients.Elasticsearch.ErrorResponseBase> { - public SearchResponseItem(Elastic.Clients.Elasticsearch.MultiSearchItem multiSearchItem) : base(multiSearchItem) + public SearchResponseItem(Elastic.Clients.Elasticsearch.Core.MSearch.MultiSearchItem multiSearchItem) : base(multiSearchItem) { } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ShardProfile.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ShardProfile.g.cs similarity index 81% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/ShardProfile.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ShardProfile.g.cs index 65d9f1b5541..1ee250c158e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ShardProfile.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ShardProfile.g.cs @@ -22,17 +22,17 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class ShardProfile { [JsonInclude] [JsonPropertyName("aggregations")] - public IReadOnlyCollection Aggregations { get; init; } + public IReadOnlyCollection Aggregations { get; init; } [JsonInclude] [JsonPropertyName("fetch")] - public Elastic.Clients.Elasticsearch.FetchProfile? Fetch { get; init; } + public Elastic.Clients.Elasticsearch.Core.Search.FetchProfile? Fetch { get; init; } [JsonInclude] [JsonPropertyName("id")] @@ -40,6 +40,6 @@ public sealed partial class ShardProfile [JsonInclude] [JsonPropertyName("searches")] - public IReadOnlyCollection Searches { get; init; } + public IReadOnlyCollection Searches { get; init; } } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ShardStoreIndex.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ShardStoreIndex.g.cs similarity index 96% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/ShardStoreIndex.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ShardStoreIndex.g.cs index 678bb87e9ae..72a79adba82 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ShardStoreIndex.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/ShardStoreIndex.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.SearchShards { public sealed partial class ShardStoreIndex { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SmoothingModelContainer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/SmoothingModelContainer.g.cs similarity index 86% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/SmoothingModelContainer.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/SmoothingModelContainer.g.cs index 843f21cb595..13849a80db3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SmoothingModelContainer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/SmoothingModelContainer.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { [JsonConverter(typeof(SmoothingModelContainerConverter))] public sealed partial class SmoothingModelContainer @@ -43,9 +43,9 @@ internal SmoothingModelContainer(string variantName, object variant) internal string VariantName { get; } - public static SmoothingModelContainer Laplace(Elastic.Clients.Elasticsearch.LaplaceSmoothingModel laplaceSmoothingModel) => new SmoothingModelContainer("laplace", laplaceSmoothingModel); - public static SmoothingModelContainer LinearInterpolation(Elastic.Clients.Elasticsearch.LinearInterpolationSmoothingModel linearInterpolationSmoothingModel) => new SmoothingModelContainer("linear_interpolation", linearInterpolationSmoothingModel); - public static SmoothingModelContainer StupidBackoff(Elastic.Clients.Elasticsearch.StupidBackoffSmoothingModel stupidBackoffSmoothingModel) => new SmoothingModelContainer("stupid_backoff", stupidBackoffSmoothingModel); + public static SmoothingModelContainer Laplace(Elastic.Clients.Elasticsearch.Core.Search.LaplaceSmoothingModel laplaceSmoothingModel) => new SmoothingModelContainer("laplace", laplaceSmoothingModel); + public static SmoothingModelContainer LinearInterpolation(Elastic.Clients.Elasticsearch.Core.Search.LinearInterpolationSmoothingModel linearInterpolationSmoothingModel) => new SmoothingModelContainer("linear_interpolation", linearInterpolationSmoothingModel); + public static SmoothingModelContainer StupidBackoff(Elastic.Clients.Elasticsearch.Core.Search.StupidBackoffSmoothingModel stupidBackoffSmoothingModel) => new SmoothingModelContainer("stupid_backoff", stupidBackoffSmoothingModel); } internal sealed class SmoothingModelContainerConverter : JsonConverter @@ -67,21 +67,21 @@ public override SmoothingModelContainer Read(ref Utf8JsonReader reader, Type typ reader.Read(); if (propertyName == "laplace") { - var variant = JsonSerializer.Deserialize(ref reader, options); + var variant = JsonSerializer.Deserialize(ref reader, options); reader.Read(); return new SmoothingModelContainer(propertyName, variant); } if (propertyName == "linear_interpolation") { - var variant = JsonSerializer.Deserialize(ref reader, options); + var variant = JsonSerializer.Deserialize(ref reader, options); reader.Read(); return new SmoothingModelContainer(propertyName, variant); } if (propertyName == "stupid_backoff") { - var variant = JsonSerializer.Deserialize(ref reader, options); + var variant = JsonSerializer.Deserialize(ref reader, options); reader.Read(); return new SmoothingModelContainer(propertyName, variant); } @@ -96,13 +96,13 @@ public override void Write(Utf8JsonWriter writer, SmoothingModelContainer value, switch (value.VariantName) { case "laplace": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.LaplaceSmoothingModel)value.Variant, options); + JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Core.Search.LaplaceSmoothingModel)value.Variant, options); break; case "linear_interpolation": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.LinearInterpolationSmoothingModel)value.Variant, options); + JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Core.Search.LinearInterpolationSmoothingModel)value.Variant, options); break; case "stupid_backoff": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.StupidBackoffSmoothingModel)value.Variant, options); + JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.Core.Search.StupidBackoffSmoothingModel)value.Variant, options); break; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Source.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Source.g.cs similarity index 97% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/Source.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Source.g.cs index 215e34e440a..1d428dc5dc8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Source.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Source.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Reindex { public sealed partial class Source { @@ -40,7 +40,7 @@ public sealed partial class Source [JsonInclude] [JsonPropertyName("remote")] - public Elastic.Clients.Elasticsearch.RemoteSource? Remote { get; set; } + public Elastic.Clients.Elasticsearch.Core.Reindex.RemoteSource? Remote { get; set; } [JsonInclude] [JsonPropertyName("runtime_mappings")] @@ -83,7 +83,7 @@ public SourceDescriptor() : base() private Elastic.Clients.Elasticsearch.Indices IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.RemoteSource? RemoteValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Reindex.RemoteSource? RemoteValue { get; set; } private RemoteSourceDescriptor RemoteDescriptor { get; set; } @@ -155,7 +155,7 @@ public SourceDescriptor Index(Elastic.Clients.Elasticsearch.Indices i return Self; } - public SourceDescriptor Remote(Elastic.Clients.Elasticsearch.RemoteSource? remote) + public SourceDescriptor Remote(Elastic.Clients.Elasticsearch.Core.Reindex.RemoteSource? remote) { RemoteDescriptor = null; RemoteDescriptorAction = null; @@ -301,7 +301,7 @@ public SourceDescriptor() : base() private Elastic.Clients.Elasticsearch.Indices IndexValue { get; set; } - private Elastic.Clients.Elasticsearch.RemoteSource? RemoteValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Reindex.RemoteSource? RemoteValue { get; set; } private RemoteSourceDescriptor RemoteDescriptor { get; set; } @@ -373,7 +373,7 @@ public SourceDescriptor Index(Elastic.Clients.Elasticsearch.Indices index) return Self; } - public SourceDescriptor Remote(Elastic.Clients.Elasticsearch.RemoteSource? remote) + public SourceDescriptor Remote(Elastic.Clients.Elasticsearch.Core.Reindex.RemoteSource? remote) { RemoteDescriptor = null; RemoteDescriptorAction = null; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SourceConfig.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/SourceConfig.g.cs similarity index 87% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/SourceConfig.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/SourceConfig.g.cs index 9f994bf88ac..ed8e43b96b8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SourceConfig.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/SourceConfig.g.cs @@ -23,15 +23,15 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { - public partial class SourceConfig : Union + public partial class SourceConfig : Union { public SourceConfig(bool sourceConfig) : base(sourceConfig) { } - public SourceConfig(Elastic.Clients.Elasticsearch.SourceFilter sourceFilter) : base(sourceFilter) + public SourceConfig(Elastic.Clients.Elasticsearch.Core.Search.SourceFilter sourceFilter) : base(sourceFilter) { } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SourceConfigParam.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/SourceConfigParam.g.cs similarity index 96% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/SourceConfigParam.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/SourceConfigParam.g.cs index dedf0127d47..2f9ff6f6288 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SourceConfigParam.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/SourceConfigParam.g.cs @@ -23,7 +23,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public partial class SourceConfigParam : Union { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SourceFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/SourceFilter.g.cs similarity index 98% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/SourceFilter.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/SourceFilter.g.cs index 9146ec4bbf8..c181b5f8bd5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SourceFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/SourceFilter.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { internal sealed class SourceFilterConverter : JsonConverter { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/StupidBackoffSmoothingModel.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/StupidBackoffSmoothingModel.g.cs similarity index 97% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/StupidBackoffSmoothingModel.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/StupidBackoffSmoothingModel.g.cs index 8f101b2ff74..9a7dc4eebe9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/StupidBackoffSmoothingModel.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/StupidBackoffSmoothingModel.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class StupidBackoffSmoothingModel { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SuggestFuzziness.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/SuggestFuzziness.g.cs similarity index 98% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/SuggestFuzziness.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/SuggestFuzziness.g.cs index 2851cced26d..f07d7d4da2a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SuggestFuzziness.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/SuggestFuzziness.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class SuggestFuzziness { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Suggester.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Suggester.g.cs similarity index 84% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/Suggester.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Suggester.g.cs index fccfebe36ed..c7fcd1707a3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Suggester.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Suggester.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { internal sealed class SuggesterConverter : JsonConverter { @@ -31,7 +31,7 @@ public override Suggester Read(ref Utf8JsonReader reader, Type typeToConvert, Js if (reader.TokenType != JsonTokenType.StartObject) throw new JsonException("Unexpected JSON detected."); var variant = new Suggester(); - Dictionary additionalProperties = null; + Dictionary additionalProperties = null; while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) { if (reader.TokenType == JsonTokenType.PropertyName) @@ -43,8 +43,8 @@ public override Suggester Read(ref Utf8JsonReader reader, Type typeToConvert, Js continue; } - additionalProperties ??= new Dictionary(); - var value = JsonSerializer.Deserialize(ref reader, options); + additionalProperties ??= new Dictionary(); + var value = JsonSerializer.Deserialize(ref reader, options); additionalProperties.Add(property, value); } } @@ -78,7 +78,7 @@ public override void Write(Utf8JsonWriter writer, Suggester value, JsonSerialize [JsonConverter(typeof(SuggesterConverter))] public sealed partial class Suggester { - public Dictionary Suggesters { get; set; } + public Dictionary Suggesters { get; set; } public string? Text { get; set; } } @@ -90,13 +90,13 @@ public SuggesterDescriptor() : base() { } - private Dictionary SuggestersValue { get; set; } + private Dictionary SuggestersValue { get; set; } private string? TextValue { get; set; } - public SuggesterDescriptor Suggesters(Func, FluentDictionary> selector) + public SuggesterDescriptor Suggesters(Func, FluentDictionary> selector) { - SuggestersValue = selector?.Invoke(new FluentDictionary()); + SuggestersValue = selector?.Invoke(new FluentDictionary()); return Self; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TemplateConfig.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TemplateConfig.g.cs similarity index 98% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/TemplateConfig.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TemplateConfig.g.cs index 4616a8ed5d1..a76a11ade13 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TemplateConfig.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TemplateConfig.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.MSearchTemplate { public sealed partial class TemplateConfig { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TermSuggester.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TermSuggester.g.cs similarity index 94% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/TermSuggester.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TermSuggester.g.cs index 93e851cb288..20f164dcc93 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TermSuggester.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TermSuggester.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class TermSuggester { @@ -72,11 +72,11 @@ public sealed partial class TermSuggester [JsonInclude] [JsonPropertyName("sort")] - public Elastic.Clients.Elasticsearch.SuggestSort? Sort { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.SuggestSort? Sort { get; set; } [JsonInclude] [JsonPropertyName("string_distance")] - public Elastic.Clients.Elasticsearch.StringDistance? StringDistance { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.StringDistance? StringDistance { get; set; } [JsonInclude] [JsonPropertyName("suggest_mode")] @@ -116,9 +116,9 @@ public TermSuggesterDescriptor() : base() private int? SizeValue { get; set; } - private Elastic.Clients.Elasticsearch.SuggestSort? SortValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.SuggestSort? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.StringDistance? StringDistanceValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.StringDistance? StringDistanceValue { get; set; } private Elastic.Clients.Elasticsearch.SuggestMode? SuggestModeValue { get; set; } @@ -196,13 +196,13 @@ public TermSuggesterDescriptor Size(int? size) return Self; } - public TermSuggesterDescriptor Sort(Elastic.Clients.Elasticsearch.SuggestSort? sort) + public TermSuggesterDescriptor Sort(Elastic.Clients.Elasticsearch.Core.Search.SuggestSort? sort) { SortValue = sort; return Self; } - public TermSuggesterDescriptor StringDistance(Elastic.Clients.Elasticsearch.StringDistance? stringDistance) + public TermSuggesterDescriptor StringDistance(Elastic.Clients.Elasticsearch.Core.Search.StringDistance? stringDistance) { StringDistanceValue = stringDistance; return Self; @@ -342,9 +342,9 @@ public TermSuggesterDescriptor() : base() private int? SizeValue { get; set; } - private Elastic.Clients.Elasticsearch.SuggestSort? SortValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.SuggestSort? SortValue { get; set; } - private Elastic.Clients.Elasticsearch.StringDistance? StringDistanceValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.StringDistance? StringDistanceValue { get; set; } private Elastic.Clients.Elasticsearch.SuggestMode? SuggestModeValue { get; set; } @@ -428,13 +428,13 @@ public TermSuggesterDescriptor Size(int? size) return Self; } - public TermSuggesterDescriptor Sort(Elastic.Clients.Elasticsearch.SuggestSort? sort) + public TermSuggesterDescriptor Sort(Elastic.Clients.Elasticsearch.Core.Search.SuggestSort? sort) { SortValue = sort; return Self; } - public TermSuggesterDescriptor StringDistance(Elastic.Clients.Elasticsearch.StringDistance? stringDistance) + public TermSuggesterDescriptor StringDistance(Elastic.Clients.Elasticsearch.Core.Search.StringDistance? stringDistance) { StringDistanceValue = stringDistance; return Self; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TotalHits.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TotalHits.g.cs similarity index 91% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/TotalHits.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TotalHits.g.cs index bfc72c1c57c..b7874301ac0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TotalHits.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TotalHits.g.cs @@ -22,13 +22,13 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public sealed partial class TotalHits { [JsonInclude] [JsonPropertyName("relation")] - public Elastic.Clients.Elasticsearch.TotalHitsRelation Relation { get; init; } + public Elastic.Clients.Elasticsearch.Core.Search.TotalHitsRelation Relation { get; init; } [JsonInclude] [JsonPropertyName("value")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TrackHits.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TrackHits.g.cs similarity index 96% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/TrackHits.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TrackHits.g.cs index e374929e5b6..b334be799e8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TrackHits.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TrackHits.g.cs @@ -23,7 +23,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.Search { public partial class TrackHits : Union { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/UnratedDocument.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/UnratedDocument.g.cs similarity index 96% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/UnratedDocument.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/UnratedDocument.g.cs index a90548fd86c..a8cea826612 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/UnratedDocument.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/UnratedDocument.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.RankEval { public sealed partial class UnratedDocument { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/UpdateByQueryRethrottleNode.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/UpdateByQueryRethrottleNode.g.cs similarity index 96% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/UpdateByQueryRethrottleNode.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/UpdateByQueryRethrottleNode.g.cs index 2cc14c33348..98f8fd0bf35 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/UpdateByQueryRethrottleNode.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/UpdateByQueryRethrottleNode.g.cs @@ -22,7 +22,7 @@ using System.Text.Json.Serialization; #nullable restore -namespace Elastic.Clients.Elasticsearch +namespace Elastic.Clients.Elasticsearch.Core.UpdateByQueryRethrottle { public sealed partial class UpdateByQueryRethrottleNode { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Core.Search.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Core.Search.g.cs new file mode 100644 index 00000000000..f9c316b4d86 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Core.Search.g.cs @@ -0,0 +1,458 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Runtime.Serialization; +using Elastic.Transport; + +#nullable restore +namespace Elastic.Clients.Elasticsearch.Core.Search +{ + [JsonConverter(typeof(BoundaryScannerConverter))] + public enum BoundaryScanner + { + [EnumMember(Value = "word")] + Word, + [EnumMember(Value = "sentence")] + Sentence, + [EnumMember(Value = "chars")] + Chars + } + + internal sealed class BoundaryScannerConverter : JsonConverter + { + public override BoundaryScanner Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "word": + return BoundaryScanner.Word; + case "sentence": + return BoundaryScanner.Sentence; + case "chars": + return BoundaryScanner.Chars; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, BoundaryScanner value, JsonSerializerOptions options) + { + switch (value) + { + case BoundaryScanner.Word: + writer.WriteStringValue("word"); + return; + case BoundaryScanner.Sentence: + writer.WriteStringValue("sentence"); + return; + case BoundaryScanner.Chars: + writer.WriteStringValue("chars"); + return; + } + + writer.WriteNullValue(); + } + } + + [JsonConverter(typeof(HighlighterEncoderConverter))] + public enum HighlighterEncoder + { + [EnumMember(Value = "html")] + Html, + [EnumMember(Value = "default")] + Default + } + + internal sealed class HighlighterEncoderConverter : JsonConverter + { + public override HighlighterEncoder Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "html": + return HighlighterEncoder.Html; + case "default": + return HighlighterEncoder.Default; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, HighlighterEncoder value, JsonSerializerOptions options) + { + switch (value) + { + case HighlighterEncoder.Html: + writer.WriteStringValue("html"); + return; + case HighlighterEncoder.Default: + writer.WriteStringValue("default"); + return; + } + + writer.WriteNullValue(); + } + } + + [JsonConverter(typeof(HighlighterFragmenterConverter))] + public enum HighlighterFragmenter + { + [EnumMember(Value = "span")] + Span, + [EnumMember(Value = "simple")] + Simple + } + + internal sealed class HighlighterFragmenterConverter : JsonConverter + { + public override HighlighterFragmenter Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "span": + return HighlighterFragmenter.Span; + case "simple": + return HighlighterFragmenter.Simple; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, HighlighterFragmenter value, JsonSerializerOptions options) + { + switch (value) + { + case HighlighterFragmenter.Span: + writer.WriteStringValue("span"); + return; + case HighlighterFragmenter.Simple: + writer.WriteStringValue("simple"); + return; + } + + writer.WriteNullValue(); + } + } + + [JsonConverter(typeof(HighlighterOrderConverter))] + public enum HighlighterOrder + { + [EnumMember(Value = "score")] + Score + } + + internal sealed class HighlighterOrderConverter : JsonConverter + { + public override HighlighterOrder Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "score": + return HighlighterOrder.Score; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, HighlighterOrder value, JsonSerializerOptions options) + { + switch (value) + { + case HighlighterOrder.Score: + writer.WriteStringValue("score"); + return; + } + + writer.WriteNullValue(); + } + } + + [JsonConverter(typeof(HighlighterTagsSchemaConverter))] + public enum HighlighterTagsSchema + { + [EnumMember(Value = "styled")] + Styled + } + + internal sealed class HighlighterTagsSchemaConverter : JsonConverter + { + public override HighlighterTagsSchema Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "styled": + return HighlighterTagsSchema.Styled; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, HighlighterTagsSchema value, JsonSerializerOptions options) + { + switch (value) + { + case HighlighterTagsSchema.Styled: + writer.WriteStringValue("styled"); + return; + } + + writer.WriteNullValue(); + } + } + + [JsonConverter(typeof(EnumStructConverter))] + public readonly partial struct HighlighterType + { + public HighlighterType(string value) => Value = value; + public readonly string Value { get; } + + public static HighlighterType Unified { get; } = new HighlighterType("unified"); + public static HighlighterType Plain { get; } = new HighlighterType("plain"); + public static HighlighterType FastVector { get; } = new HighlighterType("fvh"); + public override string ToString() => Value ?? string.Empty; + public static implicit operator string(HighlighterType highlighterType) => highlighterType.Value; + public static implicit operator HighlighterType(string value) => new(value); + public override int GetHashCode() => Value.GetHashCode(); + public override bool Equals(object obj) => obj is HighlighterType other && this.Equals(other); + public bool Equals(HighlighterType other) => Value == other.Value; + public static bool operator ==(HighlighterType a, HighlighterType b) => a.Equals(b); + public static bool operator !=(HighlighterType a, HighlighterType b) => !(a == b); + } + + [JsonConverter(typeof(ScoreModeConverter))] + public enum ScoreMode + { + [EnumMember(Value = "total")] + Total, + [EnumMember(Value = "multiply")] + Multiply, + [EnumMember(Value = "min")] + Min, + [EnumMember(Value = "max")] + Max, + [EnumMember(Value = "avg")] + Avg + } + + internal sealed class ScoreModeConverter : JsonConverter + { + public override ScoreMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "total": + return ScoreMode.Total; + case "multiply": + return ScoreMode.Multiply; + case "min": + return ScoreMode.Min; + case "max": + return ScoreMode.Max; + case "avg": + return ScoreMode.Avg; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, ScoreMode value, JsonSerializerOptions options) + { + switch (value) + { + case ScoreMode.Total: + writer.WriteStringValue("total"); + return; + case ScoreMode.Multiply: + writer.WriteStringValue("multiply"); + return; + case ScoreMode.Min: + writer.WriteStringValue("min"); + return; + case ScoreMode.Max: + writer.WriteStringValue("max"); + return; + case ScoreMode.Avg: + writer.WriteStringValue("avg"); + return; + } + + writer.WriteNullValue(); + } + } + + [JsonConverter(typeof(StringDistanceConverter))] + public enum StringDistance + { + [EnumMember(Value = "ngram")] + Ngram, + [EnumMember(Value = "levenshtein")] + Levenshtein, + [EnumMember(Value = "jaro_winkler")] + JaroWinkler, + [EnumMember(Value = "internal")] + Internal, + [EnumMember(Value = "damerau_levenshtein")] + DamerauLevenshtein + } + + internal sealed class StringDistanceConverter : JsonConverter + { + public override StringDistance Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "ngram": + return StringDistance.Ngram; + case "levenshtein": + return StringDistance.Levenshtein; + case "jaro_winkler": + return StringDistance.JaroWinkler; + case "internal": + return StringDistance.Internal; + case "damerau_levenshtein": + return StringDistance.DamerauLevenshtein; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, StringDistance value, JsonSerializerOptions options) + { + switch (value) + { + case StringDistance.Ngram: + writer.WriteStringValue("ngram"); + return; + case StringDistance.Levenshtein: + writer.WriteStringValue("levenshtein"); + return; + case StringDistance.JaroWinkler: + writer.WriteStringValue("jaro_winkler"); + return; + case StringDistance.Internal: + writer.WriteStringValue("internal"); + return; + case StringDistance.DamerauLevenshtein: + writer.WriteStringValue("damerau_levenshtein"); + return; + } + + writer.WriteNullValue(); + } + } + + [JsonConverter(typeof(SuggestSortConverter))] + public enum SuggestSort + { + [EnumMember(Value = "score")] + Score, + [EnumMember(Value = "frequency")] + Frequency + } + + internal sealed class SuggestSortConverter : JsonConverter + { + public override SuggestSort Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "score": + return SuggestSort.Score; + case "frequency": + return SuggestSort.Frequency; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, SuggestSort value, JsonSerializerOptions options) + { + switch (value) + { + case SuggestSort.Score: + writer.WriteStringValue("score"); + return; + case SuggestSort.Frequency: + writer.WriteStringValue("frequency"); + return; + } + + writer.WriteNullValue(); + } + } + + [JsonConverter(typeof(TotalHitsRelationConverter))] + public enum TotalHitsRelation + { + [EnumMember(Value = "gte")] + Gte, + [EnumMember(Value = "eq")] + Eq + } + + internal sealed class TotalHitsRelationConverter : JsonConverter + { + public override TotalHitsRelation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "gte": + return TotalHitsRelation.Gte; + case "eq": + return TotalHitsRelation.Eq; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, TotalHitsRelation value, JsonSerializerOptions options) + { + switch (value) + { + case TotalHitsRelation.Gte: + writer.WriteStringValue("gte"); + return; + case TotalHitsRelation.Eq: + writer.WriteStringValue("eq"); + return; + } + + writer.WriteNullValue(); + } + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.NoNamespace.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.NoNamespace.g.cs index f4342510954..9f70c833830 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.NoNamespace.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.NoNamespace.g.cs @@ -24,55 +24,6 @@ #nullable restore namespace Elastic.Clients.Elasticsearch { - [JsonConverter(typeof(BoundaryScannerConverter))] - public enum BoundaryScanner - { - [EnumMember(Value = "word")] - Word, - [EnumMember(Value = "sentence")] - Sentence, - [EnumMember(Value = "chars")] - Chars - } - - internal sealed class BoundaryScannerConverter : JsonConverter - { - public override BoundaryScanner Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "word": - return BoundaryScanner.Word; - case "sentence": - return BoundaryScanner.Sentence; - case "chars": - return BoundaryScanner.Chars; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, BoundaryScanner value, JsonSerializerOptions options) - { - switch (value) - { - case BoundaryScanner.Word: - writer.WriteStringValue("word"); - return; - case BoundaryScanner.Sentence: - writer.WriteStringValue("sentence"); - return; - case BoundaryScanner.Chars: - writer.WriteStringValue("chars"); - return; - } - - writer.WriteNullValue(); - } - } - [JsonConverter(typeof(ConflictsConverter))] public enum Conflicts { @@ -647,179 +598,6 @@ public override void Write(Utf8JsonWriter writer, HealthStatus value, JsonSerial } } - [JsonConverter(typeof(HighlighterEncoderConverter))] - public enum HighlighterEncoder - { - [EnumMember(Value = "html")] - Html, - [EnumMember(Value = "default")] - Default - } - - internal sealed class HighlighterEncoderConverter : JsonConverter - { - public override HighlighterEncoder Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "html": - return HighlighterEncoder.Html; - case "default": - return HighlighterEncoder.Default; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, HighlighterEncoder value, JsonSerializerOptions options) - { - switch (value) - { - case HighlighterEncoder.Html: - writer.WriteStringValue("html"); - return; - case HighlighterEncoder.Default: - writer.WriteStringValue("default"); - return; - } - - writer.WriteNullValue(); - } - } - - [JsonConverter(typeof(HighlighterFragmenterConverter))] - public enum HighlighterFragmenter - { - [EnumMember(Value = "span")] - Span, - [EnumMember(Value = "simple")] - Simple - } - - internal sealed class HighlighterFragmenterConverter : JsonConverter - { - public override HighlighterFragmenter Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "span": - return HighlighterFragmenter.Span; - case "simple": - return HighlighterFragmenter.Simple; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, HighlighterFragmenter value, JsonSerializerOptions options) - { - switch (value) - { - case HighlighterFragmenter.Span: - writer.WriteStringValue("span"); - return; - case HighlighterFragmenter.Simple: - writer.WriteStringValue("simple"); - return; - } - - writer.WriteNullValue(); - } - } - - [JsonConverter(typeof(HighlighterOrderConverter))] - public enum HighlighterOrder - { - [EnumMember(Value = "score")] - Score - } - - internal sealed class HighlighterOrderConverter : JsonConverter - { - public override HighlighterOrder Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "score": - return HighlighterOrder.Score; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, HighlighterOrder value, JsonSerializerOptions options) - { - switch (value) - { - case HighlighterOrder.Score: - writer.WriteStringValue("score"); - return; - } - - writer.WriteNullValue(); - } - } - - [JsonConverter(typeof(HighlighterTagsSchemaConverter))] - public enum HighlighterTagsSchema - { - [EnumMember(Value = "styled")] - Styled - } - - internal sealed class HighlighterTagsSchemaConverter : JsonConverter - { - public override HighlighterTagsSchema Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "styled": - return HighlighterTagsSchema.Styled; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, HighlighterTagsSchema value, JsonSerializerOptions options) - { - switch (value) - { - case HighlighterTagsSchema.Styled: - writer.WriteStringValue("styled"); - return; - } - - writer.WriteNullValue(); - } - } - - [JsonConverter(typeof(EnumStructConverter))] - public readonly partial struct HighlighterType - { - public HighlighterType(string value) => Value = value; - public readonly string Value { get; } - - public static HighlighterType Unified { get; } = new HighlighterType("unified"); - public static HighlighterType Plain { get; } = new HighlighterType("plain"); - public static HighlighterType FastVector { get; } = new HighlighterType("fvh"); - public override string ToString() => Value ?? string.Empty; - public static implicit operator string(HighlighterType highlighterType) => highlighterType.Value; - public static implicit operator HighlighterType(string value) => new(value); - public override int GetHashCode() => Value.GetHashCode(); - public override bool Equals(object obj) => obj is HighlighterType other && this.Equals(other); - public bool Equals(HighlighterType other) => Value == other.Value; - public static bool operator ==(HighlighterType a, HighlighterType b) => a.Equals(b); - public static bool operator !=(HighlighterType a, HighlighterType b) => !(a == b); - } - [JsonConverter(typeof(IBDistributionConverter))] public enum IBDistribution { @@ -1205,69 +983,6 @@ public override void Write(Utf8JsonWriter writer, Result value, JsonSerializerOp } } - [JsonConverter(typeof(ScoreModeConverter))] - public enum ScoreMode - { - [EnumMember(Value = "total")] - Total, - [EnumMember(Value = "multiply")] - Multiply, - [EnumMember(Value = "min")] - Min, - [EnumMember(Value = "max")] - Max, - [EnumMember(Value = "avg")] - Avg - } - - internal sealed class ScoreModeConverter : JsonConverter - { - public override ScoreMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "total": - return ScoreMode.Total; - case "multiply": - return ScoreMode.Multiply; - case "min": - return ScoreMode.Min; - case "max": - return ScoreMode.Max; - case "avg": - return ScoreMode.Avg; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, ScoreMode value, JsonSerializerOptions options) - { - switch (value) - { - case ScoreMode.Total: - writer.WriteStringValue("total"); - return; - case ScoreMode.Multiply: - writer.WriteStringValue("multiply"); - return; - case ScoreMode.Min: - writer.WriteStringValue("min"); - return; - case ScoreMode.Max: - writer.WriteStringValue("max"); - return; - case ScoreMode.Avg: - writer.WriteStringValue("avg"); - return; - } - - writer.WriteNullValue(); - } - } - [JsonConverter(typeof(EnumStructConverter))] public readonly partial struct ScriptLanguage { @@ -1519,69 +1234,6 @@ public override void Write(Utf8JsonWriter writer, SortOrder value, JsonSerialize } } - [JsonConverter(typeof(StringDistanceConverter))] - public enum StringDistance - { - [EnumMember(Value = "ngram")] - Ngram, - [EnumMember(Value = "levenshtein")] - Levenshtein, - [EnumMember(Value = "jaro_winkler")] - JaroWinkler, - [EnumMember(Value = "internal")] - Internal, - [EnumMember(Value = "damerau_levenshtein")] - DamerauLevenshtein - } - - internal sealed class StringDistanceConverter : JsonConverter - { - public override StringDistance Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "ngram": - return StringDistance.Ngram; - case "levenshtein": - return StringDistance.Levenshtein; - case "jaro_winkler": - return StringDistance.JaroWinkler; - case "internal": - return StringDistance.Internal; - case "damerau_levenshtein": - return StringDistance.DamerauLevenshtein; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, StringDistance value, JsonSerializerOptions options) - { - switch (value) - { - case StringDistance.Ngram: - writer.WriteStringValue("ngram"); - return; - case StringDistance.Levenshtein: - writer.WriteStringValue("levenshtein"); - return; - case StringDistance.JaroWinkler: - writer.WriteStringValue("jaro_winkler"); - return; - case StringDistance.Internal: - writer.WriteStringValue("internal"); - return; - case StringDistance.DamerauLevenshtein: - writer.WriteStringValue("damerau_levenshtein"); - return; - } - - writer.WriteNullValue(); - } - } - [JsonConverter(typeof(SuggestModeConverter))] public enum SuggestMode { @@ -1631,48 +1283,6 @@ public override void Write(Utf8JsonWriter writer, SuggestMode value, JsonSeriali } } - [JsonConverter(typeof(SuggestSortConverter))] - public enum SuggestSort - { - [EnumMember(Value = "score")] - Score, - [EnumMember(Value = "frequency")] - Frequency - } - - internal sealed class SuggestSortConverter : JsonConverter - { - public override SuggestSort Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "score": - return SuggestSort.Score; - case "frequency": - return SuggestSort.Frequency; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, SuggestSort value, JsonSerializerOptions options) - { - switch (value) - { - case SuggestSort.Score: - writer.WriteStringValue("score"); - return; - case SuggestSort.Frequency: - writer.WriteStringValue("frequency"); - return; - } - - writer.WriteNullValue(); - } - } - [JsonConverter(typeof(TimeUnitConverter))] public enum TimeUnit { @@ -1750,48 +1360,6 @@ public override void Write(Utf8JsonWriter writer, TimeUnit value, JsonSerializer } } - [JsonConverter(typeof(TotalHitsRelationConverter))] - public enum TotalHitsRelation - { - [EnumMember(Value = "gte")] - Gte, - [EnumMember(Value = "eq")] - Eq - } - - internal sealed class TotalHitsRelationConverter : JsonConverter - { - public override TotalHitsRelation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - var enumString = reader.GetString(); - switch (enumString) - { - case "gte": - return TotalHitsRelation.Gte; - case "eq": - return TotalHitsRelation.Eq; - } - - ThrowHelper.ThrowJsonException(); - return default; - } - - public override void Write(Utf8JsonWriter writer, TotalHitsRelation value, JsonSerializerOptions options) - { - switch (value) - { - case TotalHitsRelation.Gte: - writer.WriteStringValue("gte"); - return; - case TotalHitsRelation.Eq: - writer.WriteStringValue("eq"); - return; - } - - writer.WriteNullValue(); - } - } - [JsonConverter(typeof(VersionTypeConverter))] public enum VersionType { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Eql/EqlHits.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Eql/EqlHits.g.cs index 66a0ec55c47..1874115cfa3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Eql/EqlHits.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Eql/EqlHits.g.cs @@ -36,6 +36,6 @@ public sealed partial class EqlHits [JsonInclude] [JsonPropertyName("total")] - public Elastic.Clients.Elasticsearch.TotalHits? Total { get; init; } + public Elastic.Clients.Elasticsearch.Core.Search.TotalHits? Total { get; init; } } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/GeoBounds.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/GeoBounds.g.cs deleted file mode 100644 index a2b007a45fd..00000000000 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/GeoBounds.g.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -#nullable restore -namespace Elastic.Clients.Elasticsearch -{ - public partial class GeoBounds - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/GeoDistanceSort.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/GeoDistanceSort.g.cs index de4901c4951..58565d4ae81 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/GeoDistanceSort.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/GeoDistanceSort.g.cs @@ -65,10 +65,6 @@ public override GeoDistanceSort Read(ref Utf8JsonReader reader, Type typeToConve variant.Unit = JsonSerializer.Deserialize(ref reader, options); continue; } - - variant.Field = property; - reader.Read(); - variant.Location = JsonSerializer.Deserialize>(ref reader, options); } } @@ -78,18 +74,6 @@ public override GeoDistanceSort Read(ref Utf8JsonReader reader, Type typeToConve public override void Write(Utf8JsonWriter writer, GeoDistanceSort value, JsonSerializerOptions options) { writer.WriteStartObject(); - if (value.Field is not null && value.Location is not null) - { - if (!options.TryGetClientSettings(out var settings)) - { - throw new JsonException("Unable to retrive client settings for JsonSerializerOptions."); - } - - var propertyName = settings.Inferrer.Field(value.Field); - writer.WritePropertyName(propertyName); - JsonSerializer.Serialize(writer, value.Location, options); - } - if (value.DistanceType is not null) { writer.WritePropertyName("distance_type"); @@ -133,8 +117,6 @@ public sealed partial class GeoDistanceSort public bool? IgnoreUnmapped { get; set; } - public IEnumerable Location { get; set; } - public Elastic.Clients.Elasticsearch.SortMode? Mode { get; set; } public Elastic.Clients.Elasticsearch.SortOrder? Order { get; set; } @@ -161,8 +143,6 @@ public GeoDistanceSortDescriptor() : base() private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } - private IEnumerable LocationValue { get; set; } - public GeoDistanceSortDescriptor DistanceType(Elastic.Clients.Elasticsearch.GeoDistanceType? distanceType) { DistanceTypeValue = distanceType; @@ -193,34 +173,9 @@ public GeoDistanceSortDescriptor Unit(Elastic.Clients.Elasticsearch.D return Self; } - public GeoDistanceSortDescriptor Location(IEnumerable location) - { - LocationValue = location; - return Self; - } - - public GeoDistanceSortDescriptor Field(Elastic.Clients.Elasticsearch.Field field) - { - FieldValue = field; - return Self; - } - - public GeoDistanceSortDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (FieldValue is not null && LocationValue is not null) - { - var propertyName = settings.Inferrer.Field(FieldValue); - writer.WritePropertyName(propertyName); - JsonSerializer.Serialize(writer, LocationValue, options); - } - if (DistanceTypeValue is not null) { writer.WritePropertyName("distance_type"); @@ -274,8 +229,6 @@ public GeoDistanceSortDescriptor() : base() private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } - private IEnumerable LocationValue { get; set; } - public GeoDistanceSortDescriptor DistanceType(Elastic.Clients.Elasticsearch.GeoDistanceType? distanceType) { DistanceTypeValue = distanceType; @@ -306,40 +259,9 @@ public GeoDistanceSortDescriptor Unit(Elastic.Clients.Elasticsearch.DistanceUnit return Self; } - public GeoDistanceSortDescriptor Location(IEnumerable location) - { - LocationValue = location; - return Self; - } - - public GeoDistanceSortDescriptor Field(Elastic.Clients.Elasticsearch.Field field) - { - FieldValue = field; - return Self; - } - - public GeoDistanceSortDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public GeoDistanceSortDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (FieldValue is not null && LocationValue is not null) - { - var propertyName = settings.Inferrer.Field(FieldValue); - writer.WritePropertyName(propertyName); - JsonSerializer.Serialize(writer, LocationValue, options); - } - if (DistanceTypeValue is not null) { writer.WritePropertyName("distance_type"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/GeoHashLocation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/GeoHashLocation.g.cs deleted file mode 100644 index 73642a252d3..00000000000 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/GeoHashLocation.g.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -#nullable restore -namespace Elastic.Clients.Elasticsearch -{ - public sealed partial class GeoHashLocation - { - [JsonInclude] - [JsonPropertyName("geohash")] - public string Geohash { get; set; } - } - - public sealed partial class GeoHashLocationDescriptor : SerializableDescriptorBase - { - internal GeoHashLocationDescriptor(Action configure) => configure.Invoke(this); - public GeoHashLocationDescriptor() : base() - { - } - - private string GeohashValue { get; set; } - - public GeoHashLocationDescriptor Geohash(string geohash) - { - GeohashValue = geohash; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("geohash"); - JsonSerializer.Serialize(writer, GeohashValue, options); - writer.WriteEndObject(); - } - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/GeoLocation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/GeoLocation.g.cs deleted file mode 100644 index 187b6d6d159..00000000000 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/GeoLocation.g.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -using Elastic.Transport; -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -#nullable restore -namespace Elastic.Clients.Elasticsearch -{ - public partial class GeoLocation - { - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/LatLonGeoLocation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/LatLonGeoLocation.g.cs deleted file mode 100644 index d0ff57a5018..00000000000 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/LatLonGeoLocation.g.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -#nullable restore -namespace Elastic.Clients.Elasticsearch -{ - public sealed partial class LatLonGeoLocation - { - [JsonInclude] - [JsonPropertyName("lat")] - public double Lat { get; set; } - - [JsonInclude] - [JsonPropertyName("lon")] - public double Lon { get; set; } - } - - public sealed partial class LatLonGeoLocationDescriptor : SerializableDescriptorBase - { - internal LatLonGeoLocationDescriptor(Action configure) => configure.Invoke(this); - public LatLonGeoLocationDescriptor() : base() - { - } - - private double LatValue { get; set; } - - private double LonValue { get; set; } - - public LatLonGeoLocationDescriptor Lat(double lat) - { - LatValue = lat; - return Self; - } - - public LatLonGeoLocationDescriptor Lon(double lon) - { - LonValue = lon; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("lat"); - writer.WriteNumberValue(LatValue); - writer.WritePropertyName("lon"); - writer.WriteNumberValue(LonValue); - writer.WriteEndObject(); - } - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoPointProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoPointProperty.g.cs index 9398e887e33..9c17e80f2d9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoPointProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoPointProperty.g.cs @@ -62,10 +62,6 @@ public sealed partial class GeoPointProperty : IProperty [JsonPropertyName("meta")] public Dictionary? Meta { get; set; } - [JsonInclude] - [JsonPropertyName("null_value")] - public Elastic.Clients.Elasticsearch.GeoLocation? NullValue { get; set; } - [JsonInclude] [JsonPropertyName("properties")] public Elastic.Clients.Elasticsearch.Mapping.Properties? Properties { get; set; } @@ -108,8 +104,6 @@ public GeoPointPropertyDescriptor() : base() private Dictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.GeoLocation? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private string? SimilarityValue { get; set; } @@ -184,12 +178,6 @@ public GeoPointPropertyDescriptor Meta(Func NullValue(Elastic.Clients.Elasticsearch.GeoLocation? nullValue) - { - NullValueValue = nullValue; - return Self; - } - public GeoPointPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Mapping.Properties? properties) { PropertiesValue = properties; @@ -279,12 +267,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, MetaValue, options); } - if (NullValueValue is not null) - { - writer.WritePropertyName("null_value"); - JsonSerializer.Serialize(writer, NullValueValue, options); - } - if (PropertiesValue is not null) { writer.WritePropertyName("properties"); @@ -309,7 +291,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o } GeoPointProperty IBuildableDescriptor.Build() => new() - { CopyTo = CopyToValue, DocValues = DocValuesValue, Dynamic = DynamicValue, Fields = FieldsValue, IgnoreAbove = IgnoreAboveValue, IgnoreMalformed = IgnoreMalformedValue, IgnoreZValue = IgnoreZValueValue, LocalMetadata = LocalMetadataValue, Meta = MetaValue, NullValue = NullValueValue, Properties = PropertiesValue, Similarity = SimilarityValue, Store = StoreValue }; + { CopyTo = CopyToValue, DocValues = DocValuesValue, Dynamic = DynamicValue, Fields = FieldsValue, IgnoreAbove = IgnoreAboveValue, IgnoreMalformed = IgnoreMalformedValue, IgnoreZValue = IgnoreZValueValue, LocalMetadata = LocalMetadataValue, Meta = MetaValue, Properties = PropertiesValue, Similarity = SimilarityValue, Store = StoreValue }; } public sealed partial class GeoPointPropertyDescriptor : SerializableDescriptorBase, IBuildableDescriptor @@ -337,8 +319,6 @@ public GeoPointPropertyDescriptor() : base() private Dictionary? MetaValue { get; set; } - private Elastic.Clients.Elasticsearch.GeoLocation? NullValueValue { get; set; } - private Elastic.Clients.Elasticsearch.Mapping.Properties? PropertiesValue { get; set; } private string? SimilarityValue { get; set; } @@ -413,12 +393,6 @@ public GeoPointPropertyDescriptor Meta(Func, Fl return Self; } - public GeoPointPropertyDescriptor NullValue(Elastic.Clients.Elasticsearch.GeoLocation? nullValue) - { - NullValueValue = nullValue; - return Self; - } - public GeoPointPropertyDescriptor Properties(Elastic.Clients.Elasticsearch.Mapping.Properties? properties) { PropertiesValue = properties; @@ -508,12 +482,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o JsonSerializer.Serialize(writer, MetaValue, options); } - if (NullValueValue is not null) - { - writer.WritePropertyName("null_value"); - JsonSerializer.Serialize(writer, NullValueValue, options); - } - if (PropertiesValue is not null) { writer.WritePropertyName("properties"); @@ -538,6 +506,6 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o } GeoPointProperty IBuildableDescriptor.Build() => new() - { CopyTo = CopyToValue, DocValues = DocValuesValue, Dynamic = DynamicValue, Fields = FieldsValue, IgnoreAbove = IgnoreAboveValue, IgnoreMalformed = IgnoreMalformedValue, IgnoreZValue = IgnoreZValueValue, LocalMetadata = LocalMetadataValue, Meta = MetaValue, NullValue = NullValueValue, Properties = PropertiesValue, Similarity = SimilarityValue, Store = StoreValue }; + { CopyTo = CopyToValue, DocValues = DocValuesValue, Dynamic = DynamicValue, Fields = FieldsValue, IgnoreAbove = IgnoreAboveValue, IgnoreMalformed = IgnoreMalformedValue, IgnoreZValue = IgnoreZValueValue, LocalMetadata = LocalMetadataValue, Meta = MetaValue, Properties = PropertiesValue, Similarity = SimilarityValue, Store = StoreValue }; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoBoundingBoxQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoBoundingBoxQuery.g.cs index 5f55c187a4c..2e6e1740e11 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoBoundingBoxQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoBoundingBoxQuery.g.cs @@ -59,10 +59,6 @@ public override GeoBoundingBoxQuery Read(ref Utf8JsonReader reader, Type typeToC variant.ValidationMethod = JsonSerializer.Deserialize(ref reader, options); continue; } - - variant.Field = property; - reader.Read(); - variant.BoundingBox = JsonSerializer.Deserialize(ref reader, options); } } @@ -72,18 +68,6 @@ public override GeoBoundingBoxQuery Read(ref Utf8JsonReader reader, Type typeToC public override void Write(Utf8JsonWriter writer, GeoBoundingBoxQuery value, JsonSerializerOptions options) { writer.WriteStartObject(); - if (value.Field is not null && value.BoundingBox is not null) - { - if (!options.TryGetClientSettings(out var settings)) - { - throw new JsonException("Unable to retrive client settings for JsonSerializerOptions."); - } - - var propertyName = settings.Inferrer.Field(value.Field); - writer.WritePropertyName(propertyName); - JsonSerializer.Serialize(writer, value.BoundingBox, options); - } - if (!string.IsNullOrEmpty(value.QueryName)) { writer.WritePropertyName("_name"); @@ -119,8 +103,6 @@ public sealed partial class GeoBoundingBoxQuery : Query public float? Boost { get; set; } - public Elastic.Clients.Elasticsearch.GeoBounds BoundingBox { get; set; } - public Elastic.Clients.Elasticsearch.Field Field { get; set; } public bool? IgnoreUnmapped { get; set; } @@ -145,8 +127,6 @@ public GeoBoundingBoxQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.GeoBounds BoundingBoxValue { get; set; } - public GeoBoundingBoxQueryDescriptor QueryName(string? queryName) { QueryNameValue = queryName; @@ -171,34 +151,9 @@ public GeoBoundingBoxQueryDescriptor ValidationMethod(Elastic.Clients return Self; } - public GeoBoundingBoxQueryDescriptor BoundingBox(Elastic.Clients.Elasticsearch.GeoBounds boundingBox) - { - BoundingBoxValue = boundingBox; - return Self; - } - - public GeoBoundingBoxQueryDescriptor Field(Elastic.Clients.Elasticsearch.Field field) - { - FieldValue = field; - return Self; - } - - public GeoBoundingBoxQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (FieldValue is not null && BoundingBoxValue is not null) - { - var propertyName = settings.Inferrer.Field(FieldValue); - writer.WritePropertyName(propertyName); - JsonSerializer.Serialize(writer, BoundingBoxValue, options); - } - if (!string.IsNullOrEmpty(QueryNameValue)) { writer.WritePropertyName("_name"); @@ -244,8 +199,6 @@ public GeoBoundingBoxQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.GeoBounds BoundingBoxValue { get; set; } - public GeoBoundingBoxQueryDescriptor QueryName(string? queryName) { QueryNameValue = queryName; @@ -270,40 +223,9 @@ public GeoBoundingBoxQueryDescriptor ValidationMethod(Elastic.Clients.Elasticsea return Self; } - public GeoBoundingBoxQueryDescriptor BoundingBox(Elastic.Clients.Elasticsearch.GeoBounds boundingBox) - { - BoundingBoxValue = boundingBox; - return Self; - } - - public GeoBoundingBoxQueryDescriptor Field(Elastic.Clients.Elasticsearch.Field field) - { - FieldValue = field; - return Self; - } - - public GeoBoundingBoxQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public GeoBoundingBoxQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (FieldValue is not null && BoundingBoxValue is not null) - { - var propertyName = settings.Inferrer.Field(FieldValue); - writer.WritePropertyName(propertyName); - JsonSerializer.Serialize(writer, BoundingBoxValue, options); - } - if (!string.IsNullOrEmpty(QueryNameValue)) { writer.WritePropertyName("_name"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoDistanceQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoDistanceQuery.g.cs index fa3b2bd10c9..8765cdb8de5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoDistanceQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoDistanceQuery.g.cs @@ -65,10 +65,6 @@ public override GeoDistanceQuery Read(ref Utf8JsonReader reader, Type typeToConv variant.ValidationMethod = JsonSerializer.Deserialize(ref reader, options); continue; } - - variant.Field = property; - reader.Read(); - variant.Location = JsonSerializer.Deserialize(ref reader, options); } } @@ -78,18 +74,6 @@ public override GeoDistanceQuery Read(ref Utf8JsonReader reader, Type typeToConv public override void Write(Utf8JsonWriter writer, GeoDistanceQuery value, JsonSerializerOptions options) { writer.WriteStartObject(); - if (value.Field is not null && value.Location is not null) - { - if (!options.TryGetClientSettings(out var settings)) - { - throw new JsonException("Unable to retrive client settings for JsonSerializerOptions."); - } - - var propertyName = settings.Inferrer.Field(value.Field); - writer.WritePropertyName(propertyName); - JsonSerializer.Serialize(writer, value.Location, options); - } - if (!string.IsNullOrEmpty(value.QueryName)) { writer.WritePropertyName("_name"); @@ -137,8 +121,6 @@ public sealed partial class GeoDistanceQuery : Query public Elastic.Clients.Elasticsearch.Field Field { get; set; } - public Elastic.Clients.Elasticsearch.GeoLocation Location { get; set; } - public Elastic.Clients.Elasticsearch.QueryDsl.GeoValidationMethod? ValidationMethod { get; set; } } @@ -161,8 +143,6 @@ public GeoDistanceQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.GeoLocation LocationValue { get; set; } - public GeoDistanceQueryDescriptor QueryName(string? queryName) { QueryNameValue = queryName; @@ -193,34 +173,9 @@ public GeoDistanceQueryDescriptor ValidationMethod(Elastic.Clients.El return Self; } - public GeoDistanceQueryDescriptor Location(Elastic.Clients.Elasticsearch.GeoLocation location) - { - LocationValue = location; - return Self; - } - - public GeoDistanceQueryDescriptor Field(Elastic.Clients.Elasticsearch.Field field) - { - FieldValue = field; - return Self; - } - - public GeoDistanceQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (FieldValue is not null && LocationValue is not null) - { - var propertyName = settings.Inferrer.Field(FieldValue); - writer.WritePropertyName(propertyName); - JsonSerializer.Serialize(writer, LocationValue, options); - } - if (!string.IsNullOrEmpty(QueryNameValue)) { writer.WritePropertyName("_name"); @@ -274,8 +229,6 @@ public GeoDistanceQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.Field FieldValue { get; set; } - private Elastic.Clients.Elasticsearch.GeoLocation LocationValue { get; set; } - public GeoDistanceQueryDescriptor QueryName(string? queryName) { QueryNameValue = queryName; @@ -306,40 +259,9 @@ public GeoDistanceQueryDescriptor ValidationMethod(Elastic.Clients.Elasticsearch return Self; } - public GeoDistanceQueryDescriptor Location(Elastic.Clients.Elasticsearch.GeoLocation location) - { - LocationValue = location; - return Self; - } - - public GeoDistanceQueryDescriptor Field(Elastic.Clients.Elasticsearch.Field field) - { - FieldValue = field; - return Self; - } - - public GeoDistanceQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - - public GeoDistanceQueryDescriptor Field(Expression> field) - { - FieldValue = field; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { writer.WriteStartObject(); - if (FieldValue is not null && LocationValue is not null) - { - var propertyName = settings.Inferrer.Field(FieldValue); - writer.WritePropertyName(propertyName); - JsonSerializer.Serialize(writer, LocationValue, options); - } - if (!string.IsNullOrEmpty(QueryNameValue)) { writer.WritePropertyName("_name"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoPolygonPoints.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoPolygonPoints.g.cs index 7f761428526..1488c331b7d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoPolygonPoints.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoPolygonPoints.g.cs @@ -26,9 +26,6 @@ namespace Elastic.Clients.Elasticsearch.QueryDsl { public sealed partial class GeoPolygonPoints { - [JsonInclude] - [JsonPropertyName("points")] - public IEnumerable Points { get; set; } } public sealed partial class GeoPolygonPointsDescriptor : SerializableDescriptorBase @@ -38,20 +35,8 @@ public GeoPolygonPointsDescriptor() : base() { } - private IEnumerable PointsValue { get; set; } - - public GeoPolygonPointsDescriptor Points(IEnumerable points) - { - PointsValue = points; - return Self; - } - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) { - writer.WriteStartObject(); - writer.WritePropertyName("points"); - JsonSerializer.Serialize(writer, PointsValue, options); - writer.WriteEndObject(); } } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/HasChildQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/HasChildQuery.g.cs index a6d1154ef42..8801b27b59f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/HasChildQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/HasChildQuery.g.cs @@ -40,7 +40,7 @@ public sealed partial class HasChildQuery : Query [JsonInclude] [JsonPropertyName("inner_hits")] - public Elastic.Clients.Elasticsearch.InnerHits? InnerHits { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.InnerHits? InnerHits { get; set; } [JsonInclude] [JsonPropertyName("max_children")] @@ -70,11 +70,11 @@ public HasChildQueryDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.InnerHits? InnerHitsValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.InnerHits? InnerHitsValue { get; set; } - private InnerHitsDescriptor InnerHitsDescriptor { get; set; } + private Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } - private Action> InnerHitsDescriptorAction { get; set; } + private Action> InnerHitsDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer QueryValue { get; set; } @@ -96,7 +96,7 @@ public HasChildQueryDescriptor() : base() private string TypeValue { get; set; } - public HasChildQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.InnerHits? innerHits) + public HasChildQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.Core.Search.InnerHits? innerHits) { InnerHitsDescriptor = null; InnerHitsDescriptorAction = null; @@ -104,7 +104,7 @@ public HasChildQueryDescriptor InnerHits(Elastic.Clients.Elasticsearc return Self; } - public HasChildQueryDescriptor InnerHits(InnerHitsDescriptor descriptor) + public HasChildQueryDescriptor InnerHits(Core.Search.InnerHitsDescriptor descriptor) { InnerHitsValue = null; InnerHitsDescriptorAction = null; @@ -112,7 +112,7 @@ public HasChildQueryDescriptor InnerHits(InnerHitsDescriptor InnerHits(Action> configure) + public HasChildQueryDescriptor InnerHits(Action> configure) { InnerHitsValue = null; InnerHitsDescriptor = null; @@ -197,7 +197,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (InnerHitsDescriptorAction is not null) { writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, new InnerHitsDescriptor(InnerHitsDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.InnerHitsDescriptor(InnerHitsDescriptorAction), options); } else if (InnerHitsValue is not null) { @@ -270,11 +270,11 @@ public HasChildQueryDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.InnerHits? InnerHitsValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.InnerHits? InnerHitsValue { get; set; } - private InnerHitsDescriptor InnerHitsDescriptor { get; set; } + private Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } - private Action InnerHitsDescriptorAction { get; set; } + private Action InnerHitsDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer QueryValue { get; set; } @@ -296,7 +296,7 @@ public HasChildQueryDescriptor() : base() private string TypeValue { get; set; } - public HasChildQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.InnerHits? innerHits) + public HasChildQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.Core.Search.InnerHits? innerHits) { InnerHitsDescriptor = null; InnerHitsDescriptorAction = null; @@ -304,7 +304,7 @@ public HasChildQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.InnerHits return Self; } - public HasChildQueryDescriptor InnerHits(InnerHitsDescriptor descriptor) + public HasChildQueryDescriptor InnerHits(Core.Search.InnerHitsDescriptor descriptor) { InnerHitsValue = null; InnerHitsDescriptorAction = null; @@ -312,7 +312,7 @@ public HasChildQueryDescriptor InnerHits(InnerHitsDescriptor descriptor) return Self; } - public HasChildQueryDescriptor InnerHits(Action configure) + public HasChildQueryDescriptor InnerHits(Action configure) { InnerHitsValue = null; InnerHitsDescriptor = null; @@ -397,7 +397,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (InnerHitsDescriptorAction is not null) { writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, new InnerHitsDescriptor(InnerHitsDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.InnerHitsDescriptor(InnerHitsDescriptorAction), options); } else if (InnerHitsValue is not null) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/HasParentQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/HasParentQuery.g.cs index d58ef570fdf..62a344f16c4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/HasParentQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/HasParentQuery.g.cs @@ -40,7 +40,7 @@ public sealed partial class HasParentQuery : Query [JsonInclude] [JsonPropertyName("inner_hits")] - public Elastic.Clients.Elasticsearch.InnerHits? InnerHits { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.InnerHits? InnerHits { get; set; } [JsonInclude] [JsonPropertyName("parent_type")] @@ -62,11 +62,11 @@ public HasParentQueryDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.InnerHits? InnerHitsValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.InnerHits? InnerHitsValue { get; set; } - private InnerHitsDescriptor InnerHitsDescriptor { get; set; } + private Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } - private Action> InnerHitsDescriptorAction { get; set; } + private Action> InnerHitsDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer QueryValue { get; set; } @@ -84,7 +84,7 @@ public HasParentQueryDescriptor() : base() private bool? ScoreValue { get; set; } - public HasParentQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.InnerHits? innerHits) + public HasParentQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.Core.Search.InnerHits? innerHits) { InnerHitsDescriptor = null; InnerHitsDescriptorAction = null; @@ -92,7 +92,7 @@ public HasParentQueryDescriptor InnerHits(Elastic.Clients.Elasticsear return Self; } - public HasParentQueryDescriptor InnerHits(InnerHitsDescriptor descriptor) + public HasParentQueryDescriptor InnerHits(Core.Search.InnerHitsDescriptor descriptor) { InnerHitsValue = null; InnerHitsDescriptorAction = null; @@ -100,7 +100,7 @@ public HasParentQueryDescriptor InnerHits(InnerHitsDescriptor InnerHits(Action> configure) + public HasParentQueryDescriptor InnerHits(Action> configure) { InnerHitsValue = null; InnerHitsDescriptor = null; @@ -173,7 +173,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (InnerHitsDescriptorAction is not null) { writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, new InnerHitsDescriptor(InnerHitsDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.InnerHitsDescriptor(InnerHitsDescriptorAction), options); } else if (InnerHitsValue is not null) { @@ -234,11 +234,11 @@ public HasParentQueryDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.InnerHits? InnerHitsValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.InnerHits? InnerHitsValue { get; set; } - private InnerHitsDescriptor InnerHitsDescriptor { get; set; } + private Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } - private Action InnerHitsDescriptorAction { get; set; } + private Action InnerHitsDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer QueryValue { get; set; } @@ -256,7 +256,7 @@ public HasParentQueryDescriptor() : base() private bool? ScoreValue { get; set; } - public HasParentQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.InnerHits? innerHits) + public HasParentQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.Core.Search.InnerHits? innerHits) { InnerHitsDescriptor = null; InnerHitsDescriptorAction = null; @@ -264,7 +264,7 @@ public HasParentQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.InnerHit return Self; } - public HasParentQueryDescriptor InnerHits(InnerHitsDescriptor descriptor) + public HasParentQueryDescriptor InnerHits(Core.Search.InnerHitsDescriptor descriptor) { InnerHitsValue = null; InnerHitsDescriptorAction = null; @@ -272,7 +272,7 @@ public HasParentQueryDescriptor InnerHits(InnerHitsDescriptor descriptor) return Self; } - public HasParentQueryDescriptor InnerHits(Action configure) + public HasParentQueryDescriptor InnerHits(Action configure) { InnerHitsValue = null; InnerHitsDescriptor = null; @@ -345,7 +345,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (InnerHitsDescriptorAction is not null) { writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, new InnerHitsDescriptor(InnerHitsDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.InnerHitsDescriptor(InnerHitsDescriptorAction), options); } else if (InnerHitsValue is not null) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NestedQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NestedQuery.g.cs index aefca35932e..c496ac692a0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NestedQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NestedQuery.g.cs @@ -40,7 +40,7 @@ public sealed partial class NestedQuery : Query [JsonInclude] [JsonPropertyName("inner_hits")] - public Elastic.Clients.Elasticsearch.InnerHits? InnerHits { get; set; } + public Elastic.Clients.Elasticsearch.Core.Search.InnerHits? InnerHits { get; set; } [JsonInclude] [JsonPropertyName("path")] @@ -62,11 +62,11 @@ public NestedQueryDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.InnerHits? InnerHitsValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.InnerHits? InnerHitsValue { get; set; } - private InnerHitsDescriptor InnerHitsDescriptor { get; set; } + private Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } - private Action> InnerHitsDescriptorAction { get; set; } + private Action> InnerHitsDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer QueryValue { get; set; } @@ -84,7 +84,7 @@ public NestedQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.QueryDsl.ChildScoreMode? ScoreModeValue { get; set; } - public NestedQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.InnerHits? innerHits) + public NestedQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.Core.Search.InnerHits? innerHits) { InnerHitsDescriptor = null; InnerHitsDescriptorAction = null; @@ -92,7 +92,7 @@ public NestedQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch. return Self; } - public NestedQueryDescriptor InnerHits(InnerHitsDescriptor descriptor) + public NestedQueryDescriptor InnerHits(Core.Search.InnerHitsDescriptor descriptor) { InnerHitsValue = null; InnerHitsDescriptorAction = null; @@ -100,7 +100,7 @@ public NestedQueryDescriptor InnerHits(InnerHitsDescriptor return Self; } - public NestedQueryDescriptor InnerHits(Action> configure) + public NestedQueryDescriptor InnerHits(Action> configure) { InnerHitsValue = null; InnerHitsDescriptor = null; @@ -179,7 +179,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (InnerHitsDescriptorAction is not null) { writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, new InnerHitsDescriptor(InnerHitsDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.InnerHitsDescriptor(InnerHitsDescriptorAction), options); } else if (InnerHitsValue is not null) { @@ -240,11 +240,11 @@ public NestedQueryDescriptor() : base() { } - private Elastic.Clients.Elasticsearch.InnerHits? InnerHitsValue { get; set; } + private Elastic.Clients.Elasticsearch.Core.Search.InnerHits? InnerHitsValue { get; set; } - private InnerHitsDescriptor InnerHitsDescriptor { get; set; } + private Core.Search.InnerHitsDescriptor InnerHitsDescriptor { get; set; } - private Action InnerHitsDescriptorAction { get; set; } + private Action InnerHitsDescriptorAction { get; set; } private Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer QueryValue { get; set; } @@ -262,7 +262,7 @@ public NestedQueryDescriptor() : base() private Elastic.Clients.Elasticsearch.QueryDsl.ChildScoreMode? ScoreModeValue { get; set; } - public NestedQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.InnerHits? innerHits) + public NestedQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.Core.Search.InnerHits? innerHits) { InnerHitsDescriptor = null; InnerHitsDescriptorAction = null; @@ -270,7 +270,7 @@ public NestedQueryDescriptor InnerHits(Elastic.Clients.Elasticsearch.InnerHits? return Self; } - public NestedQueryDescriptor InnerHits(InnerHitsDescriptor descriptor) + public NestedQueryDescriptor InnerHits(Core.Search.InnerHitsDescriptor descriptor) { InnerHitsValue = null; InnerHitsDescriptorAction = null; @@ -278,7 +278,7 @@ public NestedQueryDescriptor InnerHits(InnerHitsDescriptor descriptor) return Self; } - public NestedQueryDescriptor InnerHits(Action configure) + public NestedQueryDescriptor InnerHits(Action configure) { InnerHitsValue = null; InnerHitsDescriptor = null; @@ -363,7 +363,7 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o else if (InnerHitsDescriptorAction is not null) { writer.WritePropertyName("inner_hits"); - JsonSerializer.Serialize(writer, new InnerHitsDescriptor(InnerHitsDescriptorAction), options); + JsonSerializer.Serialize(writer, new Core.Search.InnerHitsDescriptor(InnerHitsDescriptorAction), options); } else if (InnerHitsValue is not null) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PinnedDoc.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PinnedDoc.g.cs deleted file mode 100644 index 83aa5429cb6..00000000000 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PinnedDoc.g.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -#nullable restore -namespace Elastic.Clients.Elasticsearch.QueryDsl -{ - public sealed partial class PinnedDoc - { - [JsonInclude] - [JsonPropertyName("_id")] - public Elastic.Clients.Elasticsearch.Id Id { get; set; } - - [JsonInclude] - [JsonPropertyName("_index")] - public Elastic.Clients.Elasticsearch.IndexName Index { get; set; } - } - - public sealed partial class PinnedDocDescriptor : SerializableDescriptorBase - { - internal PinnedDocDescriptor(Action configure) => configure.Invoke(this); - public PinnedDocDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.Id IdValue { get; set; } - - private Elastic.Clients.Elasticsearch.IndexName IndexValue { get; set; } - - public PinnedDocDescriptor Id(Elastic.Clients.Elasticsearch.Id id) - { - IdValue = id; - return Self; - } - - public PinnedDocDescriptor Index(Elastic.Clients.Elasticsearch.IndexName index) - { - IndexValue = index; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("_id"); - JsonSerializer.Serialize(writer, IdValue, options); - writer.WritePropertyName("_index"); - JsonSerializer.Serialize(writer, IndexValue, options); - writer.WriteEndObject(); - } - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PinnedQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PinnedQuery.g.cs deleted file mode 100644 index ecb5213f9af..00000000000 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PinnedQuery.g.cs +++ /dev/null @@ -1,429 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -#nullable restore -namespace Elastic.Clients.Elasticsearch.QueryDsl -{ - [JsonConverter(typeof(PinnedQueryConverter))] - public sealed partial class PinnedQuery : Query - { - internal PinnedQuery(string variantName, object variant) - { - if (variantName is null) - throw new ArgumentNullException(nameof(variantName)); - if (variant is null) - throw new ArgumentNullException(nameof(variant)); - if (string.IsNullOrWhiteSpace(variantName)) - throw new ArgumentException("Variant name must not be empty or whitespace."); - VariantName = variantName; - Variant = variant; - } - - internal object Variant { get; } - - internal string VariantName { get; } - - public static PinnedQuery Docs(IEnumerable variant) => new PinnedQuery("docs", variant); - public static PinnedQuery Ids(IEnumerable variant) => new PinnedQuery("ids", variant); - [JsonInclude] - [JsonPropertyName("_name")] - public string? QueryName { get; set; } - - [JsonInclude] - [JsonPropertyName("boost")] - public float? Boost { get; set; } - - [JsonInclude] - [JsonPropertyName("organic")] - public Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer Organic { get; set; } - } - - internal sealed class PinnedQueryConverter : JsonConverter - { - public override PinnedQuery Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - { - throw new JsonException("Expected start token."); - } - - object? variantValue = default; - string? variantNameValue = default; - string? nameValue = default; - float? boostValue = default; - Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer organicValue = default; - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType != JsonTokenType.PropertyName) - { - throw new JsonException("Expected a property name token."); - } - - if (reader.TokenType != JsonTokenType.PropertyName) - { - throw new JsonException("Expected a property name token representing the name of an Elasticsearch field."); - } - - var propertyName = reader.GetString(); - reader.Read(); - if (propertyName == "_name") - { - nameValue = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (propertyName == "boost") - { - boostValue = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (propertyName == "organic") - { - organicValue = JsonSerializer.Deserialize(ref reader, options); - continue; - } - - if (propertyName == "docs") - { - variantValue = JsonSerializer.Deserialize?>(ref reader, options); - variantNameValue = propertyName; - continue; - } - - if (propertyName == "ids") - { - variantValue = JsonSerializer.Deserialize?>(ref reader, options); - variantNameValue = propertyName; - continue; - } - - throw new JsonException($"Unknown property name '{propertyName}' received while deserializing the 'PinnedQuery' from the response."); - } - - reader.Read(); - var result = new PinnedQuery(variantNameValue, variantValue); - result.QueryName = nameValue; - result.Boost = boostValue; - result.Organic = organicValue; - return result; - } - - public override void Write(Utf8JsonWriter writer, PinnedQuery value, JsonSerializerOptions options) - { - writer.WriteStartObject(); - if (!string.IsNullOrEmpty(value.QueryName)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(value.QueryName); - } - - if (value.Boost.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(value.Boost.Value); - } - - writer.WritePropertyName("organic"); - JsonSerializer.Serialize(writer, value.Organic, options); - writer.WritePropertyName(value.VariantName); - switch (value.VariantName) - { - case "docs": - JsonSerializer.Serialize>(writer, (IEnumerable)value.Variant, options); - break; - case "ids": - JsonSerializer.Serialize>(writer, (IEnumerable)value.Variant, options); - break; - } - - writer.WriteEndObject(); - } - } - - public sealed partial class PinnedQueryDescriptor : SerializableDescriptorBase> - { - internal PinnedQueryDescriptor(Action> configure) => configure.Invoke(this); - public PinnedQueryDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - - private string ContainedVariantName { get; set; } - - private object Variant { get; set; } - - private Descriptor Descriptor { get; set; } - - private void Set(Action descriptorAction, string variantName) - where T : Descriptor - { - if (ContainsVariant) - throw new InvalidOperationException("A variant has already been assigned to the PinnedQueryDescriptor. Only a single PinnedQuery variant can be added to this container type."); - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - } - - private void Set(object variant, string variantName) - { - if (ContainsVariant) - throw new Exception("A variant has already been assigned to the PinnedQueryDescriptor. Only a single PinnedQuery variant can be added to this container type."); - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - } - - private Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer OrganicValue { get; set; } - - private QueryContainerDescriptor OrganicDescriptor { get; set; } - - private Action> OrganicDescriptorAction { get; set; } - - private string? QueryNameValue { get; set; } - - private float? BoostValue { get; set; } - - public PinnedQueryDescriptor Organic(Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer organic) - { - OrganicDescriptor = null; - OrganicDescriptorAction = null; - OrganicValue = organic; - return Self; - } - - public PinnedQueryDescriptor Organic(QueryContainerDescriptor descriptor) - { - OrganicValue = null; - OrganicDescriptorAction = null; - OrganicDescriptor = descriptor; - return Self; - } - - public PinnedQueryDescriptor Organic(Action> configure) - { - OrganicValue = null; - OrganicDescriptor = null; - OrganicDescriptorAction = configure; - return Self; - } - - public PinnedQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - public PinnedQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (!ContainsVariant) - { - writer.WriteNullValue(); - return; - } - - writer.WriteStartObject(); - if (OrganicDescriptor is not null) - { - writer.WritePropertyName("organic"); - JsonSerializer.Serialize(writer, OrganicDescriptor, options); - } - else if (OrganicDescriptorAction is not null) - { - writer.WritePropertyName("organic"); - JsonSerializer.Serialize(writer, new QueryContainerDescriptor(OrganicDescriptorAction), options); - } - else - { - writer.WritePropertyName("organic"); - JsonSerializer.Serialize(writer, OrganicValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - } - else - { - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } - } - - public sealed partial class PinnedQueryDescriptor : SerializableDescriptorBase - { - internal PinnedQueryDescriptor(Action configure) => configure.Invoke(this); - public PinnedQueryDescriptor() : base() - { - } - - private bool ContainsVariant { get; set; } - - private string ContainedVariantName { get; set; } - - private object Variant { get; set; } - - private Descriptor Descriptor { get; set; } - - private void Set(Action descriptorAction, string variantName) - where T : Descriptor - { - if (ContainsVariant) - throw new InvalidOperationException("A variant has already been assigned to the PinnedQueryDescriptor. Only a single PinnedQuery variant can be added to this container type."); - ContainedVariantName = variantName; - ContainsVariant = true; - var descriptor = (T)Activator.CreateInstance(typeof(T), true); - descriptorAction?.Invoke(descriptor); - Descriptor = descriptor; - } - - private void Set(object variant, string variantName) - { - if (ContainsVariant) - throw new Exception("A variant has already been assigned to the PinnedQueryDescriptor. Only a single PinnedQuery variant can be added to this container type."); - Variant = variant; - ContainedVariantName = variantName; - ContainsVariant = true; - } - - private Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer OrganicValue { get; set; } - - private QueryContainerDescriptor OrganicDescriptor { get; set; } - - private Action OrganicDescriptorAction { get; set; } - - private string? QueryNameValue { get; set; } - - private float? BoostValue { get; set; } - - public PinnedQueryDescriptor Organic(Elastic.Clients.Elasticsearch.QueryDsl.QueryContainer organic) - { - OrganicDescriptor = null; - OrganicDescriptorAction = null; - OrganicValue = organic; - return Self; - } - - public PinnedQueryDescriptor Organic(QueryContainerDescriptor descriptor) - { - OrganicValue = null; - OrganicDescriptorAction = null; - OrganicDescriptor = descriptor; - return Self; - } - - public PinnedQueryDescriptor Organic(Action configure) - { - OrganicValue = null; - OrganicDescriptor = null; - OrganicDescriptorAction = configure; - return Self; - } - - public PinnedQueryDescriptor QueryName(string? queryName) - { - QueryNameValue = queryName; - return Self; - } - - public PinnedQueryDescriptor Boost(float? boost) - { - BoostValue = boost; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - if (!ContainsVariant) - { - writer.WriteNullValue(); - return; - } - - writer.WriteStartObject(); - if (OrganicDescriptor is not null) - { - writer.WritePropertyName("organic"); - JsonSerializer.Serialize(writer, OrganicDescriptor, options); - } - else if (OrganicDescriptorAction is not null) - { - writer.WritePropertyName("organic"); - JsonSerializer.Serialize(writer, new QueryContainerDescriptor(OrganicDescriptorAction), options); - } - else - { - writer.WritePropertyName("organic"); - JsonSerializer.Serialize(writer, OrganicValue, options); - } - - if (!string.IsNullOrEmpty(QueryNameValue)) - { - writer.WritePropertyName("_name"); - writer.WriteStringValue(QueryNameValue); - } - - if (BoostValue.HasValue) - { - writer.WritePropertyName("boost"); - writer.WriteNumberValue(BoostValue.Value); - } - - writer.WritePropertyName(ContainedVariantName); - if (Variant is not null) - { - JsonSerializer.Serialize(writer, Variant, Variant.GetType(), options); - } - else - { - JsonSerializer.Serialize(writer, Descriptor, Descriptor.GetType(), options); - } - - writer.WriteEndObject(); - } - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/QueryContainer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/QueryContainer.g.cs index 6b8eea7365d..7311aad92f3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/QueryContainer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/QueryContainer.g.cs @@ -71,7 +71,6 @@ internal QueryContainer(string variantName, object variant) public static QueryContainer Nested(Elastic.Clients.Elasticsearch.QueryDsl.NestedQuery nestedQuery) => new QueryContainer("nested", nestedQuery); public static QueryContainer ParentId(Elastic.Clients.Elasticsearch.QueryDsl.ParentIdQuery parentIdQuery) => new QueryContainer("parent_id", parentIdQuery); public static QueryContainer Percolate(Elastic.Clients.Elasticsearch.QueryDsl.PercolateQuery percolateQuery) => new QueryContainer("percolate", percolateQuery); - public static QueryContainer Pinned(Elastic.Clients.Elasticsearch.QueryDsl.PinnedQuery pinnedQuery) => new QueryContainer("pinned", pinnedQuery); public static QueryContainer Prefix(Elastic.Clients.Elasticsearch.QueryDsl.PrefixQuery prefixQuery) => new QueryContainer("prefix", prefixQuery); public static QueryContainer QueryString(Elastic.Clients.Elasticsearch.QueryDsl.QueryStringQuery queryStringQuery) => new QueryContainer("query_string", queryStringQuery); public static QueryContainer Range(Elastic.Clients.Elasticsearch.QueryDsl.RangeQuery rangeQuery) => new QueryContainer("range", rangeQuery); @@ -309,13 +308,6 @@ public override QueryContainer Read(ref Utf8JsonReader reader, Type typeToConver return new QueryContainer(propertyName, variant); } - if (propertyName == "pinned") - { - var variant = JsonSerializer.Deserialize(ref reader, options); - reader.Read(); - return new QueryContainer(propertyName, variant); - } - if (propertyName == "prefix") { var variant = JsonSerializer.Deserialize(ref reader, options); @@ -563,9 +555,6 @@ public override void Write(Utf8JsonWriter writer, QueryContainer value, JsonSeri case "percolate": JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.QueryDsl.PercolateQuery)value.Variant, options); break; - case "pinned": - JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.QueryDsl.PinnedQuery)value.Variant, options); - break; case "prefix": JsonSerializer.Serialize(writer, (Elastic.Clients.Elasticsearch.QueryDsl.PrefixQuery)value.Variant, options); break; @@ -730,8 +719,6 @@ private void Set(object variant, string variantName) public void ParentId(Action configure) => Set(configure, "parent_id"); public void Percolate(PercolateQuery query) => Set(query, "percolate"); public void Percolate(Action> configure) => Set(configure, "percolate"); - public void Pinned(PinnedQuery query) => Set(query, "pinned"); - public void Pinned(Action> configure) => Set(configure, "pinned"); public void Prefix(PrefixQuery query) => Set(query, "prefix"); public void Prefix(Action> configure) => Set(configure, "prefix"); public void QueryString(QueryStringQuery query) => Set(query, "query_string"); @@ -914,9 +901,6 @@ private void Set(object variant, string variantName) public void Percolate(PercolateQuery query) => Set(query, "percolate"); public void Percolate(Action configure) => Set(configure, "percolate"); public void Percolate(Action> configure) => Set(configure, "percolate"); - public void Pinned(PinnedQuery query) => Set(query, "pinned"); - public void Pinned(Action configure) => Set(configure, "pinned"); - public void Pinned(Action> configure) => Set(configure, "pinned"); public void Prefix(PrefixQuery query) => Set(query, "prefix"); public void Prefix(Action configure) => Set(configure, "prefix"); public void Prefix(Action> configure) => Set(configure, "prefix"); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TopLeftBottomRightGeoBounds.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TopLeftBottomRightGeoBounds.g.cs deleted file mode 100644 index fbb05c3aad2..00000000000 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TopLeftBottomRightGeoBounds.g.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -#nullable restore -namespace Elastic.Clients.Elasticsearch -{ - public sealed partial class TopLeftBottomRightGeoBounds - { - [JsonInclude] - [JsonPropertyName("bottom_right")] - public Elastic.Clients.Elasticsearch.GeoLocation BottomRight { get; set; } - - [JsonInclude] - [JsonPropertyName("top_left")] - public Elastic.Clients.Elasticsearch.GeoLocation TopLeft { get; set; } - } - - public sealed partial class TopLeftBottomRightGeoBoundsDescriptor : SerializableDescriptorBase - { - internal TopLeftBottomRightGeoBoundsDescriptor(Action configure) => configure.Invoke(this); - public TopLeftBottomRightGeoBoundsDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.GeoLocation BottomRightValue { get; set; } - - private Elastic.Clients.Elasticsearch.GeoLocation TopLeftValue { get; set; } - - public TopLeftBottomRightGeoBoundsDescriptor BottomRight(Elastic.Clients.Elasticsearch.GeoLocation bottomRight) - { - BottomRightValue = bottomRight; - return Self; - } - - public TopLeftBottomRightGeoBoundsDescriptor TopLeft(Elastic.Clients.Elasticsearch.GeoLocation topLeft) - { - TopLeftValue = topLeft; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("bottom_right"); - JsonSerializer.Serialize(writer, BottomRightValue, options); - writer.WritePropertyName("top_left"); - JsonSerializer.Serialize(writer, TopLeftValue, options); - writer.WriteEndObject(); - } - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TopRightBottomLeftGeoBounds.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TopRightBottomLeftGeoBounds.g.cs deleted file mode 100644 index 56ac0c68c85..00000000000 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TopRightBottomLeftGeoBounds.g.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -#nullable restore -namespace Elastic.Clients.Elasticsearch -{ - public sealed partial class TopRightBottomLeftGeoBounds - { - [JsonInclude] - [JsonPropertyName("bottom_left")] - public Elastic.Clients.Elasticsearch.GeoLocation BottomLeft { get; set; } - - [JsonInclude] - [JsonPropertyName("top_right")] - public Elastic.Clients.Elasticsearch.GeoLocation TopRight { get; set; } - } - - public sealed partial class TopRightBottomLeftGeoBoundsDescriptor : SerializableDescriptorBase - { - internal TopRightBottomLeftGeoBoundsDescriptor(Action configure) => configure.Invoke(this); - public TopRightBottomLeftGeoBoundsDescriptor() : base() - { - } - - private Elastic.Clients.Elasticsearch.GeoLocation BottomLeftValue { get; set; } - - private Elastic.Clients.Elasticsearch.GeoLocation TopRightValue { get; set; } - - public TopRightBottomLeftGeoBoundsDescriptor BottomLeft(Elastic.Clients.Elasticsearch.GeoLocation bottomLeft) - { - BottomLeftValue = bottomLeft; - return Self; - } - - public TopRightBottomLeftGeoBoundsDescriptor TopRight(Elastic.Clients.Elasticsearch.GeoLocation topRight) - { - TopRightValue = topRight; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("bottom_left"); - JsonSerializer.Serialize(writer, BottomLeftValue, options); - writer.WritePropertyName("top_right"); - JsonSerializer.Serialize(writer, TopRightValue, options); - writer.WriteEndObject(); - } - } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/WktGeoBounds.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/WktGeoBounds.g.cs deleted file mode 100644 index c3ea80d300d..00000000000 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/WktGeoBounds.g.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Licensed to Elasticsearch B.V under one or more agreements. -// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. -// See the LICENSE file in the project root for more information. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using System.Text.Json; -using System.Text.Json.Serialization; - -#nullable restore -namespace Elastic.Clients.Elasticsearch -{ - public sealed partial class WktGeoBounds - { - [JsonInclude] - [JsonPropertyName("wkt")] - public string Wkt { get; set; } - } - - public sealed partial class WktGeoBoundsDescriptor : SerializableDescriptorBase - { - internal WktGeoBoundsDescriptor(Action configure) => configure.Invoke(this); - public WktGeoBoundsDescriptor() : base() - { - } - - private string WktValue { get; set; } - - public WktGeoBoundsDescriptor Wkt(string wkt) - { - WktValue = wkt; - return Self; - } - - protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) - { - writer.WriteStartObject(); - writer.WritePropertyName("wkt"); - writer.WriteStringValue(WktValue); - writer.WriteEndObject(); - } - } -} \ No newline at end of file diff --git a/tests/Tests.Configuration/tests.default.yaml b/tests/Tests.Configuration/tests.default.yaml index 70678851cbe..d2c61ab164f 100644 --- a/tests/Tests.Configuration/tests.default.yaml +++ b/tests/Tests.Configuration/tests.default.yaml @@ -8,7 +8,7 @@ mode: u # the elasticsearch version that should be started # Can be a snapshot version of sonatype or "latest" to get the latest snapshot of sonatype -elasticsearch_version: 8.4.2 +elasticsearch_version: 8.4.3 # cluster filter allows you to only run the integration tests of a particular cluster (cluster suffix not needed) # cluster_filter: # whether we want to forcefully reseed on the node, if you are starting the tests with a node already running diff --git a/tests/Tests/Document/Multiple/Bulk/BulkApiTests.cs b/tests/Tests/Document/Multiple/Bulk/BulkApiTests.cs index 78ab67b4950..7862cb5e5cd 100644 --- a/tests/Tests/Document/Multiple/Bulk/BulkApiTests.cs +++ b/tests/Tests/Document/Multiple/Bulk/BulkApiTests.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; +using Elastic.Clients.Elasticsearch.Core.Bulk; using Tests.Core.Extensions; using Tests.Core.ManagedElasticsearch.Clusters; using Tests.Domain; diff --git a/tests/Tests/Document/Multiple/Bulk/BulkInvalidApiTests.cs b/tests/Tests/Document/Multiple/Bulk/BulkInvalidApiTests.cs index dce3aee78ea..69021304017 100644 --- a/tests/Tests/Document/Multiple/Bulk/BulkInvalidApiTests.cs +++ b/tests/Tests/Document/Multiple/Bulk/BulkInvalidApiTests.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; +using Elastic.Clients.Elasticsearch.Core.Bulk; using Tests.Core.Extensions; using Tests.Core.ManagedElasticsearch.Clusters; using Tests.Domain; diff --git a/tests/Tests/Document/Multiple/Bulk/BulkInvalidVersionApiTests.cs b/tests/Tests/Document/Multiple/Bulk/BulkInvalidVersionApiTests.cs index fd31efef790..724f138db2e 100644 --- a/tests/Tests/Document/Multiple/Bulk/BulkInvalidVersionApiTests.cs +++ b/tests/Tests/Document/Multiple/Bulk/BulkInvalidVersionApiTests.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; +using Elastic.Clients.Elasticsearch.Core.Bulk; using Tests.Core.Extensions; using Tests.Core.ManagedElasticsearch.Clusters; using Tests.Domain; diff --git a/tests/Tests/Document/Multiple/Bulk/BulkUpdateManyTests.cs b/tests/Tests/Document/Multiple/Bulk/BulkUpdateManyTests.cs index bb906fbdb9f..29b32aba30b 100644 --- a/tests/Tests/Document/Multiple/Bulk/BulkUpdateManyTests.cs +++ b/tests/Tests/Document/Multiple/Bulk/BulkUpdateManyTests.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Elastic.Clients.Elasticsearch.Core.Bulk; using Tests.Core.ManagedElasticsearch.Clusters; using Tests.Domain; using Tests.Framework.EndpointTests; diff --git a/tests/Tests/PointInTime/PointInTimeApiTests.cs b/tests/Tests/PointInTime/PointInTimeApiTests.cs index ca9ea89436a..c6913c2a46d 100644 --- a/tests/Tests/PointInTime/PointInTimeApiTests.cs +++ b/tests/Tests/PointInTime/PointInTimeApiTests.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Threading.Tasks; +using Elastic.Clients.Elasticsearch.Core.Search; using Elastic.Clients.Elasticsearch.QueryDsl; using Tests.Core.Extensions; using Tests.Core.ManagedElasticsearch.Clusters; diff --git a/tests/Tests/Search/Search/SearchApiTests.cs b/tests/Tests/Search/Search/SearchApiTests.cs index 8ab242ed1d8..6979abc4fbd 100644 --- a/tests/Tests/Search/Search/SearchApiTests.cs +++ b/tests/Tests/Search/Search/SearchApiTests.cs @@ -5,6 +5,7 @@ using System; using System.Linq; using Elastic.Clients.Elasticsearch.Aggregations; +using Elastic.Clients.Elasticsearch.Core.Search; using Elastic.Clients.Elasticsearch.QueryDsl; using Tests.Core.Extensions; using Tests.Core.ManagedElasticsearch.Clusters; diff --git a/tests/Tests/Serialization/Bulk/BulkOperationCollectionSerializationTests.cs b/tests/Tests/Serialization/Bulk/BulkOperationCollectionSerializationTests.cs index 5bf5e427448..b35045d3575 100644 --- a/tests/Tests/Serialization/Bulk/BulkOperationCollectionSerializationTests.cs +++ b/tests/Tests/Serialization/Bulk/BulkOperationCollectionSerializationTests.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.IO; using System.Threading.Tasks; +using Elastic.Clients.Elasticsearch.Core.Bulk; using Tests.Core.Xunit; using VerifyTests; using VerifyXunit; diff --git a/tests/Tests/Serialization/Bulk/BulkUpdateOperationSerializationTests.cs b/tests/Tests/Serialization/Bulk/BulkUpdateOperationSerializationTests.cs index 45eccc2c5ff..6142710710d 100644 --- a/tests/Tests/Serialization/Bulk/BulkUpdateOperationSerializationTests.cs +++ b/tests/Tests/Serialization/Bulk/BulkUpdateOperationSerializationTests.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Threading.Tasks; +using Elastic.Clients.Elasticsearch.Core.Bulk; using Tests.Domain; using VerifyXunit; diff --git a/tests/Tests/Serialization/BulkSerialisationTests.cs b/tests/Tests/Serialization/BulkSerialisationTests.cs index a9e415e41fb..f8848f758ea 100644 --- a/tests/Tests/Serialization/BulkSerialisationTests.cs +++ b/tests/Tests/Serialization/BulkSerialisationTests.cs @@ -4,6 +4,7 @@ using System.IO; using System.Threading.Tasks; +using Elastic.Clients.Elasticsearch.Core.Bulk; using Tests.Core.Xunit; using Tests.Domain; using VerifyXunit; diff --git a/tests/Tests/Serialization/Documents/MGetSerialization.cs b/tests/Tests/Serialization/Documents/MGetSerialization.cs index 462cb8e8b19..ce8e3f91852 100644 --- a/tests/Tests/Serialization/Documents/MGetSerialization.cs +++ b/tests/Tests/Serialization/Documents/MGetSerialization.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Threading.Tasks; +using Elastic.Clients.Elasticsearch.Core.MGet; using Tests.Domain; using VerifyXunit; diff --git a/tests/Tests/Serialization/Documents/MSearchSerialization.cs b/tests/Tests/Serialization/Documents/MSearchSerialization.cs index b561938430f..9c230922162 100644 --- a/tests/Tests/Serialization/Documents/MSearchSerialization.cs +++ b/tests/Tests/Serialization/Documents/MSearchSerialization.cs @@ -9,6 +9,7 @@ using VerifyTests; using VerifyXunit; using Elastic.Clients.Elasticsearch.QueryDsl; +using Elastic.Clients.Elasticsearch.Core.MSearch; namespace Tests.Serialization.Documents; diff --git a/tests/Tests/Serialization/SearchResponseDeserialisationTests.cs b/tests/Tests/Serialization/SearchResponseDeserialisationTests.cs index f141b9f5c05..04f9d364d46 100644 --- a/tests/Tests/Serialization/SearchResponseDeserialisationTests.cs +++ b/tests/Tests/Serialization/SearchResponseDeserialisationTests.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; +using Elastic.Clients.Elasticsearch.Core.Search; using Tests.Core.Extensions; namespace Tests.Serialization; diff --git a/tests/Tests/Serialization/SuggesterSerializationTests.cs b/tests/Tests/Serialization/SuggesterSerializationTests.cs index df97c7af681..a953b5557e8 100644 --- a/tests/Tests/Serialization/SuggesterSerializationTests.cs +++ b/tests/Tests/Serialization/SuggesterSerializationTests.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Threading.Tasks; +using Elastic.Clients.Elasticsearch.Core.Search; using Tests.Domain; using VerifyXunit;